PDA

View Full Version : Can anyone help with digital circuit design?


-[ND]-Morgoth
19-01-2003, 17:48
I hope so. I've got this project to do - an electronic roulette wheel, and I can't figure out how to do the following. Take a look at this image of my circuit: http://www.clannd.utvinternet.com/gfx/johnson.jpg

Ok, the 4017 is a Johnson counter, it basically counts through it's ten states then goes back to the start and keeps counting over and over. That's great, however a roulette wheel with 10 lights is pretty lame, so I need to link the counters. I can't do this directly from one counter to the next because it will divide the frequency by 10 (second 10 lights go 10 times slower than first 10), and I can't do it using the MR reset pin in conjunction with the states of the 00 state and 09 states because although this works, one light will remain lit on the inactive counters.

i.e. What I need is to actually turn the power off and on as needed, so when the first 10 lights on the first chip are being lit sequentially, the other 2 chips need to be powered off. Then, when the first counter has counted through all the lights once, I need to power this chip off and power on the second one - this then counts through all the lights, is powered off; the third chip gets power, counts through, powers off, power goes back into the first chip.

Problem is I can't figure out how to do this. I've tried loads and loads of combinations of flip-flops in conjunction with combinational logic. Most of my attempts came from taking the output of the 09 pin on the first chip and trying to manipulate the power into the current and next chip using this. I've had varying degrees of success, but can't get it to work perfectly (or adequately).

God knows I've trawled the net, and asked the demonstrators in college - the former revealed little to nothing, the latter tell me that they "can't give away too much". Yes I'm well aware that this is the key to the whole project - slowing the lights down to a stop is something I've already figured out how to do, I just can't get the counters linked properly.

So, can anyone offer some advice/help/hints/solutions?

(edit: btw the long horizontal wire running along the top of the image is coming from a 555 timer and is providing the clock frequency)

Toothpick
19-01-2003, 18:19
At a guess hook it up with an astable (555) to provide an input pulse (ie 1 pulse = 1 count) then on the 10th out put fire up another astable (latch it) and so on for 4 of em, or however many u need, although they will go at the same time (unless your a god with mark to space ratios) its a solution of sorts. I cant think of a way to get it to stop on 1 off hand.

How desprate are you? I could porbably give you a working solution on monday night after ive had a chance to actualy have a fiddle with em.

Toothpick
19-01-2003, 18:28
Ok just had another think and you could use a 4017 as a timing chip. The carry out of the other chips lead into the input for the timing chip which then advances the count which moves onto the next chip in the series.

-[ND]-Morgoth
19-01-2003, 18:52
I'm not desperate, I've got a couple of weeks yet, but I don't want to let the time slip by any longer.

I don't understand what you mean using a Johnson as a timing chip. I tried doing what I interpreted from your post but suffice to say that the following didn't give me anything at all in the way of lights lighting:

http://www.clannd.utvinternet.com/gfx/johnson2.jpg

Do you mean using the 05-9`output, or the simply the 09 one as I did in the pic? Anything I've tried using the 05-9`output has ended rather dismally in failure. :)

Again, I was under the impression that one had to use flip-flops to change output states and so either turn the power to a chip on or off in order to ensure that *only* a given chip will be cycling through it's respective lights at a given time.

Mucho thanks for anything you can offer, I'm still kinda stumped.

-[ND]-Morgoth
19-01-2003, 21:17
Just FYI Toothpick, this was the last thing I tried tonight:

http://www.clannd.utvinternet.com/gfx/last.jpg

There are two rather obvious and constricting problems:

1) It only cycles through once. I have nowhere to take the Q output from the final flip-flop, because there's already Vcc going into the first 555 timer and I don't see how I can substitute this once it's started the first count with the Q output from the last FF.

2) The feckin flip-flops are positive edge-triggered, so the 10th light from each counter (the 09 pin) is only flashing on for an infinitesimally small time, because as soon as the clock pulse for that count goes on it's rising edge, it triggers the flip-flop/logic and turns the power off to the chip. So I don't really have 3 of the lights on the wheel lighting at all. D:

Another problem of course is that I have to use three 555 timers just to get it to work like this. I gave up using just one because I just could not get the FF's to turn off one counter and turn on the next without loads of glitches and problems that made the whole thing useless.

Yes any help would be tremendously appreciated. :)

wedgey
20-01-2003, 00:59
Long long time since I did any of this stuff, but from your description of what you need to happen in the middle paragraph, is this not what transistors/relays were invented for?

The-Bandido
20-01-2003, 21:22
Divide the LEDs into groups of 10, use one 4017 to drive the anodes of one in every group, use another 4017 (clocked from the first one) to drive transistors (or open-collector buffers) that each turn on a whole group.

ICQ me 151245238 if you need more help

The-Bandido
24-01-2003, 21:46
Any joy on this morgy??

-[ND]-Morgoth
26-01-2003, 14:19
Yes I finally managed it, thanks for asking. :)

An S-R latch out of the last light on each 4017 chip along with AND gates going into the clock and first light on each counter, plus OR gates into the master resets. It's not a perfect solution (the last light on each counter only flashes on instantaneously so it's effectively useless) but at least it works.

Now all I gotta do is get this humpty-dumpty capacitor to slow it down on a switch-press. :) And wire the thing! I'm half way through at the moment - really great way to spend a sunday.

edit: incidentally thanks for the tip above but I didn't use it, because our course rather overlooks the whole foundation of circuitry so I don't really know how to use transistors or what they do. :p

Toothpick
26-01-2003, 15:07
Jesus H Christ!!!!!!!!!!!!!!!!!!!!

Transistor (sp) = like year 8 to learn what they are

Its an elcetronic switch, the output from the majority of cmos chips is extreamly low, enough to power maybe one or two LED's but anything more and its gunna struggle, so basically u shove a transister in (base from the chip) then depending on its use the components off the emitor or collector then when the base turns on at x amount of volts it opens the flood gates and the rest of the circuit gets mega power straight from the positive rail.


(omg i suck at descriptions)

Flomotion
26-01-2003, 16:01
I had a red transistor, was great, about a foot long with wheels, and it unfolded into a robot with arms and legs and a head that folded up from its back.