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.

LED's and Sequence Flasher mixed with some other functions?

Status
Not open for further replies.

Justin98TransAm

New Member
My Goal
I want to be able to replace the taillighs in my car with LED's I plan on using a Multiple LED array for each taillight. Most likely 100+ per side. These will act as the taillights, brake lights, and blinkers. So here's my delima.
I need to be able to have the LED's at a lower intensity when in "Taillight" mode, and when in "brake light" mode they need to be brighter. Now the tricky part, I'd like to be able to be able to make the LED's flash in sequence in the direction i'm turning. I will have a different 12v Input for each of the 3 functions but how do I wire the LED's to multiple circuits to acheive the desired effect? I was thinking of using a decade counter for the sequence part, is there a way to tell the decade counter to illuminate all the LED's at once? if so this wouldn't be too hard. I dunno, there's many different ways to do this, do you guys have any pointers?

here's the design i was thinking of starting out with.
U2 is a 4017 Timer
U1 is 4011 NAND Gate
**broken link removed**
 
Tricky to incorperate with break lights and emergency flashers and parking lights.
 

Attachments

  • trafficlightseq.gif
    trafficlightseq.gif
    23.6 KB · Views: 814
  • seqturnnb.gif
    seqturnnb.gif
    6 KB · Views: 1,009
It must be terribly frustrating for those nice people at Microchip to have made just the very thing for this job, only to see people trying to use pocketfuls of ill assorted chips to do something vaguely similar to the intended application , for only thirty times the cost, eighty times the space and seven times the power consumption.
USE A MICROCONTROLLER IT'S WHAT THEY'RE FOR :evil:
 
I know this is an old post, but does anyone have a diagram to build a device to light up 10 led's in sequence with some sort of speed control available..?? I am a noob, looking to make a turn signal bar that lights up in sequence....
 
spuffock said:
It must be terribly frustrating for those nice people at Microchip to have made just the very thing for this job, only to see people trying to use pocketfuls of ill assorted chips to do something vaguely similar to the intended application , for only thirty times the cost, eighty times the space and seven times the power consumption.
USE A MICROCONTROLLER IT'S WHAT THEY'RE FOR :evil:

Wow, you can do all these thing with just a single chip, cheap and simple? Please show us how, and I'll rush out and buy a programmer and a PIC... Gee, I thought it would be a little more complicated and still require descrete components, probably another chip or two...

Sorry, I don't think PIC solutions are for everyone (where was you example anyway). Some people are just getting started in electonics, it's challenging enough. Others already have the parts on hand, just looking fit the pieces together. What about recycled parts, stuff most of us salvage and save, just for projects like these...

I've been getting serious about starting on microcontrollers. Was shopping for a USB PIC programmer ($60), but kind of got turned off by the instruction set, only 36 opcodes. So I started to look some more. One had 90, but didn't find much on programmers yet.
 
actually, yes. a microcontroller can do all that and more. Now, driving more than 20mA at < 5V worth of LEDs will take extra drivers but those are pretty cheap (ULN2803 springs to mind but there are others). The PIC (or other uC) can sequence it's outputs any way you want it to. So, other than higher voltage or higher current needs and 13-14 pins of output, all you need is a microcontroller costing less than $3 (plus assorted Rs and Cs).

the instruction set is powerful enough to do the job. And if you use a high level language like C or BASIC, it doesn't matter.

Though, I have to say I don't think the sarcasm of the previous posting is at all called for.
 
Last edited:
HarveyH42 said:
Wow, you can do all these thing with just a single chip, cheap and simple? Please show us how, and I'll rush out and buy a programmer and a PIC... Gee, I thought it would be a little more complicated and still require descrete components, probably another chip or two...

Check my PIC tutorials, they show a number of ways of sequencing LED's.

Sorry, I don't think PIC solutions are for everyone (where was you example anyway). Some people are just getting started in electonics, it's challenging enough. Others already have the parts on hand, just looking fit the pieces together. What about recycled parts, stuff most of us salvage and save, just for projects like these...

I've been getting serious about starting on microcontrollers. Was shopping for a USB PIC programmer ($60), but kind of got turned off by the instruction set, only 36 opcodes. So I started to look some more. One had 90, but didn't find much on programmers yet.

The small instruction set is a BIG advantage, it means it's very easy to learn - and there are lots of code examples and help on the net, far more than other processors. The idea of a RISC processor is to have very few instructions, it's NOT a problem.
 
Yeah, I get the RISC deal, and a higher level language makes it no big deal to program. I'm familiar with assembly not C, so opcodes are important. Fewer instructions means more programming and more clock cycles (slower execution).
Anyway, the PIC set seems very light on branch and compare opcodes. Like I said, I'm just shopping around for the best place for me to get started. True, its no problem learning 36 opcodes, just how to make use of them. Just from what I read about the PIC I was strongly considering, I realized I'd need to use about 6 instructions, where I could have used a single 2 clock-cycle one. Sure, I could learn to live with that, memory is cheap and the processor is plenty fast for most anything I would want to do, and maybe the other chips are no better in some regards.

Back to the tail lights... So far, the PIC needs a voltage regulator and a driver IC, and a few descretes... The origional post used two chips and a few descretes. Seems like its a tie game so far...

Parking lights, brake lights, and turn signal... If I remember correctly, these are all seperate bulbs usually. You could set your LEDs for partial brightness (resistor), use the wire from the brakelight through another resistor to add enough for full brightness. Interlace the sequencial turnsignal LEDs with the the other ones. This will leave gaps in between the two, but should function.
3 bulbs into two sets of LEDS, but you will have to do it twice (right and left).

A microcontroller should have no problem reading 4 inputs, just not sure how well it can control all those LEDs... Oh, forgot about hazzard lights, when you get like a flat tire.
 
HarveyH42 said:
Yeah, I get the RISC deal, and a higher level language makes it no big deal to program. I'm familiar with assembly not C, so opcodes are important. Fewer instructions means more programming and more clock cycles (slower execution).

But RISC instruction are generally faster, if you are already used to assembly it won't take long at all - it's more a question of looking at things differently.

Anyway, the PIC set seems very light on branch and compare opcodes.

It's simply a matter of checking the STATUS register bits, it's very simple and quick to do.

Like I said, I'm just shopping around for the best place for me to get started. True, its no problem learning 36 opcodes, just how to make use of them. Just from what I read about the PIC I was strongly considering, I realized I'd need to use about 6 instructions, where I could have used a single 2 clock-cycle one.

As with anything, you can find advantages and disadvantages, generally PIC instruction cycles are faster than many processors - with most only taking one instruction cycle, and a few taking two - the instruction cycles are also only 1/4 of the clock oscillator, which is far faster than most, some run at 1/12 the clock speed.

Sure, I could learn to live with that, memory is cheap and the processor is plenty fast for most anything I would want to do, and maybe the other chips are no better in some regards.

Generally ANY micro-controller will do the job, and if you are already familiar with one?, I would suggest sticking to it - I see very little point in changing - unless it's for production purposes, and you can make substantial savings by moving to some other processor (either PIC or something else?).

A lot of the shock of the small number of instructions is caused by a lack of understanding what you DO get, a device optimised for it's purpose - for example you get one instruction bit manipulations (e.g. setting a pin HIGH or LOW, or checking if a pin is HIGH or LOW). Normally you have to read the entire byte, AND or OR it, and write it back - a process that requires a number of instructions, all of which take more than a single cycle.

So it's not a device for writing a disc operating system on, but for simple, fast, hardware manipulation it's hard to beat - and many of them already contain most of the peripheral devices you might be needing.

As you also say, speed is rarely an issue, probably 99% of PIC programs spend 99% of their time wasting time or waiting for something to happen.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top