Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LEDs to light one after the other

Status
Not open for further replies.

blckscab

New Member
Hey there everyone.
I need to light 5 rings of LEDs positioned along a length of pipe, but rather have them apear on and off at a flick of a switch, it would be great if i could have them 'animated' in some way.
I was thinking by using the wonders of technology, i could make the LEDs turn on one after another, and then turn off in a reversed fashion.


Just to show what i mean ill draw a little diagram, after 5 secs i want it to go to the next stage.
ΘΘΘΘΘ
ΦΘΘΘΘ
ΦΦΘΘΘ
ΦΦΦΘΘ
ΦΦΦΦΘ
ΦΦΦΦΦ
and then turn off like
ΦΦΦΦΘ
ΦΦΦΘΘ
ΦΦΘΘΘ
ΦΘΘΘΘ
ΘΘΘΘΘ

Hope that made sence :)
How would i make a circuit that does that? Id prefere not to go into programing PIC chips, but if that is the only way im willing ot learn :eek:

Any help will be greatly appreciated :D
 
Hello

I had to make a similar circuit once. I ended up using a serial to parallel IC... A 74HC164. That way I could control the LEDs with two pins from my microprocessor.
I hope that gave you any inspiration.
 
The simplest way I can think is to generate a long period triangle wave with an oscillator chip and apply it to a LM3914 display driver, using only the number of outputs you want (5)

Miguel
 
So the best way to do this is to learn how to program microcontrolers?
what chip would i need? and im guessing i would need a programmer to plug into my laptop?:confused:
 
So the best way to do this is to learn how to program microcontrolers?
what chip would i need? and im guessing i would need a programmer to plug into my laptop?:confused:

We it's covered in Nigels tutorials and I do sell programmers :)

PICs can sink or source enough current to light the LEDs just add current limiting resistors and a 16F628A would be suitable.
 
So the best way to do this is to learn how to program microcontrolers?
what chip would i need? and im guessing i would need a programmer to plug into my laptop?:confused:

Once you start using uC's there are many other things you can do. Even better, there are a good number of poeple here who will help you with problems along the way.

3v0.
 
So the best way to do this is to learn how to program microcontrolers?
what chip would i need? and im guessing i would need a programmer to plug into my laptop?:confused:
No...you simply use a shift register.

The best way to do something depends on what you want to end up with. No matter what people who might be interested in feeding their egos or wallets might say, something this simple as a one time thing by a newbe is best done with a few ICs and a soldering iron for $3 instead of $2-$10 for a micro plus $50 for a programmer plus all the time and frustration of learning to program from scratch.

I can do that function in 3 chips: 74HC194, 74HC132, 74HC112. About $0.50 each in singles. ... Actually 4 chips since you want 5 outputs.

Dan
 
Last edited:
Whether you want to use shift registers only or micros or a mix, depends on the number of LEDs you want to turn on. If you have only 8-10-ish LEDs, you might as well drive them directly from the micro. If you have more, like 50 for example, it would be wiser to use a mix of micro and shift registers. In any case you need a clock source of some sort for your shift register. That might be a mechanical switch or a photo cell, but by using the micro, you can make an "intelligent" solution where the micro looks at external inputs and determines how to control the LEDs.

Asking what micro to use is like trying to provoke a religious war :)
I see the PIC is popular in this thread, and its probably an excellent choice. Back when I had to choose, I went with Atmel's AVR-family because it had completely free coding software and a great community to back it up at AVR Freaks.
In any case, you should probably stay clear of the 89C51-family of micros as they're kind of old and have their limitations.
Programming micros is easy and fun, but it'll make you a worse hardware engineer, as you get the opportunity to replace a lot of circuitry with code :)
I can highly recommend learning to use micros, if you like to construct circuits. Its an investment in time you'll get back a gazillion times.
 
Asking what micro to use is like trying to provoke a religious war :)
I see the PIC is popular in this thread, and its probably an excellent choice. Back when I had to choose, I went with Atmel's AVR-family because it had completely free coding software and a great community to back it up at AVR Freaks.
In any case, you should probably stay clear of the 89C51-family of micros as they're kind of old and have their limitations.
PICs are popular among hobbyists, AVR is better and ARM are the best when it comes to volume production. That is high production reality but since they all have free development systems you really start getting down to personal preference when you talk about hobbyist or custom industrial control (under say 100 units for the life of the design.

For myself I design with ARM for a number of reasons, 10X horse power for the money, multiple vendors, low cost. When vendors crap out or just plain do not have the perfect part, companies can not afford to spend the 6 months and $1-10K for professional grade development systems to get to speed on new hardware, not to mention the $1500 and engineering time to get a new PCB in house if the footprint is not 100% compatible!
 
Last edited:
PICs are popular among hobbyists, AVR is better and ARM are the best when it comes to volume production. That is high production reality but since they all have free development systems you really start getting down to personal preference when you talk about hobbyist or custom industrial control (under say 100 units for the life of the design.

Bear in mind this is one persons personal opinion, if you look what's inside commercial equipment you will find far more PIC's than AVR's or ARM's :D

PIC's and AVR's are on a par performance wise, ARM's are a completely different device - very large and powerful only - no cheap six pin SM ARM devices. You can use a PIC or AVR to replace a 555 circuit, where it will far out perform a 555, use less components, be cheaper, and be smaller - try that with an ARM :p
 
Whether you want to use shift registers only or micros or a mix, depends on the number of LEDs you want to turn on. If you have only 8-10-ish LEDs, you might as well drive them directly from the micro. If you have more, like 50 for example, it would be wiser to use a mix of micro and shift registers. In any case you need a clock source of some sort for your shift register. That might be a mechanical switch or a photo cell, but by using the micro, you can make an "intelligent" solution where the micro looks at external inputs and determines how to control the LEDs.
Wiser how? He has a predetermined simple pattern that is easily supported by a simple shift register, oscillator and flip-flop. No fancy timing, not even any dimming. Hell, even the dimming would easily be supported in raw hardware as long as it was consistent.

The only reason for this project to be in a micro would be as a simple learning project. It is probably worth mentioning here that I am fluent in both HW and assy language. In a college micros course I practically sent the instructor to the psych ward by beating his code length by about 30%. (we had a bit of a manic personality)
 
Ubergeek.

I find you comments a bit strange.

And as Nigel pointed out you are mixing apples and oranges.

backs up what Nigel said about useage. The most interesting thing I see here is that Atmel has about half the market share and about 1/10 the profit margin on uC's. That makes the microchip uC effort about 20 times more profitable.

Code:
MCHP and Major Competitors ($ in millions)
Company 	                          Revenue  uC Revenue  Operating Margin 
Microchip Technology (MCHP)[16] 	1,040 	833 	29.13% 
Atmel Corporation (ATML)[18] 	1,639 	458 	3.27%

3v0
 
Ubergeek.

I find you comments a bit strange.

And as Nigel pointed out you are mixing apples and oranges.

backs up what Nigel said about useage. The most interesting thing I see here is that Atmel has about half the market share and about 1/10 the profit margin on uC's. That makes the microchip uC effort about 20 times more profitable.

Code:
MCHP and Major Competitors ($ in millions)
Company 	                          Revenue  uC Revenue  Operating Margin 
Microchip Technology (MCHP)[16] 	1,040 	833 	29.13% 
Atmel Corporation (ATML)[18] 	1,639 	458 	3.27%

3v0
Pointed out where? It is also interesting to note that the snippet you included says nothing about usage what so ever, only about money. As to REAL industry usage, how many DVD or set top box design wins does microchip lay claim to? How about PDAs or cell phones? The fact is that the majority of those apps are ARM based and add up to millions a year PER DESIGN! I tend to think that the entire PIC line production volume pales in comparison.

EDIT: just looked up on ARM's site... the estimate is over 3 BILLION ARM core parts are sold every year. To that you can add the relatively small number of soft cores put into FPGAs.

If one company sells 10 $1 units for $10 each and another company sells 10 $1 units for $1.50 each, which one has more usage?

Microchip has a long history of the former making them a profitable niche supplier.

My comment was not about what was profitable for the chip maker, but what was profitable for the chip consumer. Obviously the latter.

As to mixing apples and oranges, who is really doing that when the thread started out with "Id prefere not to go into programing PIC chips"?
 
Last edited:
Pointed out where?
Nigel said:
, if you look what's inside commercial equipment you will find far more PIC's than AVR's or ARM's

If you do not like the dollar figures dig up some unit based data.

If microchip has a long history of selling less expensive uC's and has a higher dollar volumes it stands to reason they have a higher unit count too.

When the OP said "Id prefer not to go into programing PIC chips" I think he meant that he would rather not solve the problem with a uC, he indicated he did not know how to program.

I do not have a great bias in the direction of PICs. Low and mid range uC's are for the most part a done deal and from a hardware point you can get what you need from most any major supplier.

I use PICs because Microchip provides real support to education without a lot of fuss. Microchip provides free samples to most anyone who wants to learn or use their products. That is a good thing.



Pointed out where? It is also interesting to note that the snippet you included says nothing about usage what so ever, only about money.

If one company sells 10 $1 units for $10 each and another company sells 10 $1 units for $1.50 each, which one has more usage?


Microchip has a long history of the former making them a profitable niche supplier.

My comment was not about what was profitable for the chip maker, but what was profitable for the chip consumer. Obviously the latter.

As to mixing apples and oranges, who is really doing that when the thread started out with "Id prefere not to go into programing PIC chips"?
 
If you do not like the dollar figures dig up some unit based data.
I don't need to, if you divide Microchip's monetary sales figures of 1 billion per year (**broken link removed**) by ARM's sales rate of 3 billion units per year Microchip would have to be selling only PICs at less than $0.33 each to reach the same unit volume. We both know that many of the PIC line actually go for $10 or more each...

I believe I heard that Microchips RF sector was their most profitable which takes the statement that PICs are the most used part even further into the land of make believe.
If microchip has a long history of selling less expensive uC's and has a higher dollar volumes it stands to reason they have a higher unit count too.
But they do not... what they have is a long history of selling small uCs at a high mark ups, distorting the relationship between dollars and units. They saw a gap, "low" cost sub micro controllers, and filled it at a high profit margin. The problem is now the big boys are there too so their profit margin is shrinking on parts that are competitive and the old gap parts are dwindling.
When the OP said "Id prefer not to go into programing PIC chips" I think he meant that he would rather not solve the problem with a uC, he indicated he did not know how to program.
That is what I was saying... Nigel is the one mixing apples with oranges when the OP specifically requested, almost begged, for a logic solution.
 
Last edited:
Ok, back to basics for a second, what is the difference between all of these?

I have just bought this little kit for me to play with.
**broken link removed**
What else can i do with that?

I do want to learn how to do all this stuff anyway, but thought it would be like jumping into the deep end. So i did want to avoid it. But if this is pretty basic stuff, and can help me learn how to fo it, then i dont mind trying. :p
 
Last edited:
I don't need to, if you divide Microchip's monetary sales figures of 1 billion per year (**broken link removed**) by ARM's sales rate of 3 billion units per year Microchip would have to be selling only PICs at less than $0.33 each to reach the same unit volume. We both know that many of the PIC line actually go for $10 or more each...

I believe I heard that Microchips RF sector was their most profitable which takes the statement that PICs are the most used part even further into the land of make believe.

But they do not... what they have is a long history of selling small uCs at a high mark ups, distorting the relationship between dollars and units. They saw a gap, "low" cost sub micro controllers, and filled it at a high profit margin. The problem is now the big boys are there too so their profit margin is shrinking on parts that are competitive and the old gap parts are dwindling.

So you would advise using a huge and expensive ARM processor to flash five lines of LED's? - where a tiny and cheap PIC (or AVR) would do just as good a job (and possibly better).

What are you trying to prove?, comparing ARM to PIC/AVR, there's no real comparison - by your terms ARM's are obviously rubbish, because all PC's use INTEL or AMD processors, and not ARM. They aren't for the same market, and you can't compare them.

That is what I was saying... Nigel is the one mixing apples with oranges when the OP specifically requested, almost begged, for a logic solution.

It wasn't me who even first suggested it (it was Bill), and he actually said "Id prefere not to go into programing PIC chips, but if that is the only way im willing ot learn". And, like it or not, a micro-controller is by far the best way - but an ARM would be a really poor and expensive choice to flash five LED's.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top