PDA

View Full Version : Discussion CMOS 4060B chips in cheap blinking LED setup


gravydrive
Mar 24, 2008, 04:38 PM
Assistance needed regarding CMOS 4060B chips in cheap blinking LED setup.

Referencing these articles:
http://www.cpemma.co.uk/blink.html
http://www.starshipmodeler.com/tech/cj_blink.htm

Using 1 CMOS 4060B chip, a few resistors, capacitors and LEDs, I will attempt to construct a blinking LED setup; I do, however, have a few questions that need to be answered in order to continue.

I have attached the board layout and parts from the cpemma site (http://www.cpemma.co.uk/blink.html).

My questions are as follows:

1.) from the starship modeler site I read how LEDs "eat" voltage. With a 9v power supply, using 1x3.6v LED and 1x2.4v LED, I would need to run a 3v dropping resistor to "eat up" the rest of the voltage. He also says that using a chip eliminates the need for the dropping resistor, but doesn't state how many LEDs can be run off one chip. Say I wanted to double or triple up on the LEDs from the same leads on the chips--how would one calculate the theoretical limit for how many LEDs can be run off one chip?

2.) I will be running leads directly from my battery to the 4060 chip, and since the operating voltage of a 4060 chip is 3v-15v I don't foresee any problems. I want to run 1 red LED and 1 green LED. I haven't selected the LEDs: what do I need to watch for when making a selection--what parameters are there for the mA range?

I intend to wire the array up with 1 green LED wired to the chip, then running a red LED in inverse-parallel with the first which will have it blink with the same pattern, but time shifted (according to the cpemma article), attempting to simulate the "heart-beat blink" of some full-sized aircraft.


Regards,
Mike

Malc C
Mar 24, 2008, 08:15 PM
Hi,

According to one article you need at least 6v to make the thing tick.. so you might need a flight pack rather than an rx pack to run it.

Also, whilst the circuit above as described on http://www.cpemma.co.uk/blink.html will flash one LED in a hartbeat fashion, you would require one circuit for each LED you wanted to flash, because if I read the following quote right, each sequential output is double the frequency of the previous one.

Each number pin changes half as fast as the smaller numbered pin “below” it in the sequence. Each numbered pin changes twice as fast as the larger numbered pin ‘above’ it in the sequence.

Personally, if you want to use CMOS then look at using an NE555 and a 4017 decade counter. By playing about with the connections to the 10 outputs and the speed of the NE555 you should be able to get something working and looking just right. However I would simply use a small PIC micro like the 12F675 and program it to do the flashing sequence - its much simpler - have a look at a short video to give you some idea http://www.micro-heli.co.uk/lights.wmv

gravydrive
Mar 25, 2008, 01:09 AM
Malc C,

thanks for having a look. When building a setup such as the ones you speak of, must one build a separate array for each light, or is it possible to program one chip to drive multiple diodes at the same frequency, but delayed one from another? Seeing how the lights "heart-beat" travels down the tail (bottom forward section and top of rear pod-->horizontal stab-->tail) one would think that there is a single component driving everything.


Regards,
Mike

Acetronics
Mar 25, 2008, 04:37 AM
Hi, Graydrive

First thing : I do not know what is your circuit intended for ... but the current available from the 4060 outputs is rather small ...

Some years ago, Elektor magazine had released a wonderful "Christmas star" based on a single 4060 chip ... and up to 24 Leds !!!

Was december '88 release.

Now, to get enough current for the leds ... a 9v batt was NECESSARY ( 1 "classical" Led ONLY between 2 Outputs ... )

Just placing the Leds between the different outputs gave nice blinking effects ...

Now, if you do not need great lighting from your Leds, you can go on with the '4000 circuits ...

For a plane ... some other circuit or buffering the outputs might be necessary.

Alain

PS: I think using a 556 ( or 2x 555 ! ) could give you much better results ... ( 1st 555 as a low speed osc gating the second "higher speed" 555 )

Malc C
Mar 25, 2008, 05:08 AM
Malc C,

thanks for having a look. When building a setup such as the ones you speak of, must one build a separate array for each light, or is it possible to program one chip to drive multiple diodes at the same frequency, but delayed one from another? Seeing how the lights "heart-beat" travels down the tail (bottom forward section and top of rear pod-->horizontal stab-->tail) one would think that there is a single component driving everything.


Regards,
Mike

Hi Mike,

Yes, it used a single 8 pin 12F675, programmed to give a double flash on three pins in a loop sequence. With three outputs it makes no odds if it runs 1-2-3 or 1-3-2 as it will still give the same "chase" sequence. If 4 pins were used you could alternate to 1-3-2-4 so it would breake up the chase pattern. It's just a simple matter of changing the connections or re-program the PIC.

The other advantage is that a PIC can sink or source 20mA per pin so you can drive LEDs directly. In my case I risked connecting two 10,000 mcd LEDs to each output, and because I was only quickly pulsing the LEDs rather than constantly driving it, got away with it :)

gravydrive
Mar 25, 2008, 12:01 PM
Thanks for the advice, Alain and Malc. It looks like I'll have to break down and purchase a PIC programmer or look into the 555 if I can't get a 4060 setup working.

Regards,
Mike

Malc C
Mar 25, 2008, 01:31 PM
Mike,

PIC programming opens up a world of opportunities and its not that expensive to get started with (search this forum as there are loads of discussions on the subject).

I've found the following site that has a lot of LED flashers (good old google ;) ) there may be something there that you can use or adopt to do what you want using descrete chips

http://www.hobbyprojects.com/quick_circuits_reference/LED_related_schematics.html

gravydrive
Mar 25, 2008, 02:09 PM
Indeed, I was surprised that a USB programmer can be had for ~$50. Thanks for the link, I googled LED flashers in regards to 555 timers and 4060B chips, but not for PIC programmable chips. All those circuit schematics blow my mind; looks like I'll have to take a class to get started! ;)

Regards,
Mike

rpstar
Mar 27, 2008, 03:15 PM
If you guys are wanting to do micro-based led flashers you might want to consider a driver IC like this to go with it:

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4907

Makes things simple if you also have a simple micro like the PIC.

BushmanLA
Mar 27, 2008, 10:49 PM
Regarding the LED's appetite for voltage:

LED's have what is called a voltage drop, generally it is around .7 volts or so. If you apply less voltage than this, virtually no current will flow. When you apply more voltage than this the LED 'eats' the .7 volts (and poops it out as heat).

LED's like all diodes have what is called a IV or Current-Voltage curve.

The more voltage that is applied, the more current that is allowed to pass. So for small voltages, no resistor is needed because the LED will have an effective internal resistance such that only a small current is passed.

If the voltage is such that the allowed current will be too much for the LED to handle, a resistor must be used in series.

In some applications the output current of an IC's pins is limited in some way to around 20mA, perfect for driving an LED. However, you will be driving the IC beyond its maximum ratings unless the manufacturers specifically says that its ok to do this. So wonky things can happen if you rely on the max output of an IC pin to limit the current to your LED.

Gary Warner
Mar 28, 2008, 06:04 PM
Regarding the LED's appetite for voltage:

LED's have what is called a voltage drop, generally it is around .7 volts or so.
Just semantics, but it's more like 1.4 volts to 3.8 volts. It varies from LED to LED and can even be higher than 5 volts for some types. Check the datasheets for the ones you are using. Even within a single type there can be variances, hence the good idea to control current, not voltage. Hookup all the elements of a 7-segment LED to one single dropping resistor and you'll see what I mean, with differences in segment brightness’s.

jppizhere
Apr 02, 2008, 09:22 AM
If you do continue to consider going with the microprocessor route I can from from useage experience recommed the Picaxe line of chips which are nothing more than PIC chips with a basic compiler and bootstrap loader. Cost is fairly low (8 or 14 pin chips can be had online at 3 for 9.95), very few external components required to get started (if your computer has a serial port a serial cable cut up or some other way to connect 3 wires from serial port to chip and 2 resistors make the programmer), and a power source (a couple bucks worth of componets will build you a 5v regulated source that operated from a 9 volt battery.) It is programmed in basic so if you have any basic programming knowledge the learning curve is not at all steep, the programming software is free and downloadable, and as with any other microprocessor family there is a programming forum online as well as much example code easily available.

Even if you have no programming expertise what you are attempting to do would require just a few lines of code. LEDs can be directly connected to the output from chip (have done this many times with no problems) but most recommend a 330ohm resistor in series with LED to limit current, so wiring up this system would just take a few minutes work, and a solderless breadboard that can be had for under $10 makes development a breeze because you can make sure your circuit works exactly as you like before you commit to soldering anything to a circuit board.

The guys that recommend the PICs are right on the money as they are quite powerful and low cost chips, however, learning assembly to program one and the $20-$50 dollar cost of a programmer to me seems like a sizeable investment of time and money to make in order to flash a couple of lights.

Gary Warner
Apr 02, 2008, 01:26 PM
As one who uses PIC's and programms them in Basic, C and ASM, I'd say that hardest part is dealing with system registers. Does the Picaxe handle this part better?

jppizhere
Apr 02, 2008, 02:59 PM
With Picaxe you are not really directly dealing with registers, the basic interpreter is taking care of most everything for you. You really do not have the raw power of programming a PIC in assembly due to not being able to easily control every bit, however for a quick simple project with minimal learning curve they are an easy way to go... for example a program to fit the requirement stated at the beginning of this thread would go like this.

main:
high 1 ;Set LED1 to On
low 2 ;Set LED2 to OFF
pause 500 ;Wait half a second
low 1 ;Set LED1 to Off
high 2 ;Set LED2 to ON
pause 500 ;Wait Half a second
goto main ;repeat

And for another example, with the addition of a Y-cable on the throtte channel connecting the throttle data line to a pin on the Picaxe and a few more lines of code..

main:
pulsin 3,1,w1 ;record the length of a high pulse on pin 3 into w1
If w1 > 150 then goto LightsOn ;Turn on if over 50%
Goto Main

LightsOn:
high 1 ;Set LED1 to On
low 2 ;Set LED2 to OFF
pause 500 ;Wait half a second
low 1 ;Set LED1 to Off
high 2 ;Set LED2 to ON
pause 500 ;Wait Half a second
goto LightsOn ;repeat

We now have a R/C switch in which our lights would now stay off until we reach 50% throttle (150ms Pulse) and then would turn on. Like I said, not hugely powerful but pretty easy, even for someone with minimal programming skills to grasp.

Gary Warner
Apr 02, 2008, 05:50 PM
Yep, that sounds easy. Almost as easy as PBP without all the config and setup of system registers, or the cost of PBP (~$250US). If this had been around when I started, I would have used it.

jppizhere
Apr 02, 2008, 06:14 PM
Yes, is low cost and pretty easy. A good learning tool in my opinion, simple programming and a programming environment that does simulation and error checking really makes it easier to concentrate on the hardware aspects of a project. Certainly it is no replacement for a high end PIC or AVR, but is great for simple projects, especially of the RC type because it has built in servo control commands.

I actually got into uC trying to build a lighting project almost exactly as described in this thread, I went with a 555...I could get one light to flash perfectly, but the other just sort of pulsed and never went fully out. No matter what the circuit simulator I was using said I just could not get it to work right, finally just gave it up and went with Picaxe...had the dang thing built and working in about 20 minutes from the time I opened the envelope the picaxe came in.

David Parry
Apr 03, 2008, 11:55 AM
How about this thread
http://www.rcgroups.com/forums/showthread.php?t=772567

jppizhere
Apr 03, 2008, 01:01 PM
Yes, as can be seen there pretty complex lighting can be produced with a fairly simple circuit. I have seen lighting systems online that could control several lights and included a software to program lighting sequence from computer and load it to microprocessor, also should be fairily easily done using a Visual Basic executable to communicate via serial connection and write lighting variables to on chip eeprom.