Microcontroller or the analog way?

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
Hello everyone!

I'm Cagri from Turkey, who is in IT business and has a hobby of electronic circuits who needs help about making a decision than building a circuit.

By the way I've read lots of posts in your from about the circuit I'm trying to have, and I think you have a great knowledge share, great help given to each other which is something we missed here in Turkey...

Anyway, I greatly need your help.

I'm trying to build a circuit which will drive leds in such different ways.

There will be two types of led arrays, first will have a dimmed brightness (thinking of a PWM circuit for that) while running and Full-On while triggered.

Second Array will split in two, and will have a strobing effect for a second or two when triggered, (full off when not triggered) and then will stay full-on if kept triggered. but strobing effect should change between the two seperated sections of this array, like array 1st, array 2nd, array 1st, array 2nd and goes on.

I searched the forum a lot and found some circuit designs which does the second array's job, but couldnt find a circuit for the first array, and my big question is, should I do this as a 2 seperate array(circuit)? Or should I integrate a microcontroller to drive these leds and make it more professional(in a whole single circuit)?

I need the leds to have a long-life period, so I want to limit the output voltage to 9V using the 7809 and design my led connections in that way. Probably 3 in series and parallels of that 3 series many enough.

Please show me a way, and please dont forget that you will be teaching a newbee.

Thank you very much in advance
 
Last edited:

pilko

Joined Dec 8, 2008
213
In my humble opinion,if you have the programming knowledge, a microcontroller would be easier. --- others may disagree.

pilko
 

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
I think the same, but I do not have programming knowledge about the microcontrollers... I'm still waiting for help.
 

pilko

Joined Dec 8, 2008
213
Take a look at "PICAXE" microcontrollers, they are cheap and easy to use. (I learned the basics in a few hours and I am an old man with slowed down learning abilities).
 

eng1ne

Joined Dec 4, 2009
97
How do you think you can achieve the second circuit? If it works, it will probably help you achieve the first. 555 IC's will be useful for both circuits.

Microcontrollers take investment of time, and a little money. Without the know-how and tools, this is an analog job for you I think.
 

atferrari

Joined Jan 6, 2004
4,768
I need the leds to have a long-life period, so I want to limit the output voltage to 9V using the 7809 and design my led connections in that way.
You need to control the current (usually with a limiting resistor caclulated for a given supply voltage).

Learn how to use a simple micro. That knowledge will be useful in the future. You are not going to waste your time.
 

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
Thank you everyone for your quick replies!

In fact I have a little knowledge about Lm317T so I know how to control current or voltage or both, but I don't know how to bypass this circuit and give the leds full power when needed.

I want to go the digital way cause I want it to be more professional. But If there will be a huge difference in the circuit and the analog way would be easier, than I'll choose that way.

I've searched the forum for my scenario many times, read lots of posts, found some circuits seems to solve my problem, tried some of them, but I couldnt get the effeciency I needed.

Also when I search for strobing leds I always got into some brake/tail lights, and circuits for them. Today I tried to make one, http://forum.allaboutcircuits.com/showthread.php?t=26275 this particular one indeed, but couldnt make it work.

The led turn on (both arrays) they strobe for once after a few seconds, then sit full on. adjusting the pots didnt make any change.

Maybe I should first tell you what I'm trying to do, than everyone may understand the purpose why I need digital control ;)

I'am trying to lit a contester's table. The contestant will listen to the question, and when he/she thinks they know the answer they will press the button in front of them. To this point only the contestant's name will be lit (which is in front of the table) dimmed. When they press the button, their name will lit in full current mode, and also, 2 sets of leds(top of the table at both sides) will strobe respectively. Left-Right-Left-Right.... After that all the leds will put lit till the contestant stops pressing the "I know it all!" button :)

Now the particular reasons why I want a microcontroller:

1-) I need to be able to adjust the dimming level
2-) I need to adjust the strobing speed, and time to strobe
3-) If the contestants accidently presses the button again in just a few seconds (that time should be adjustable too) the system should go instant on instead of first strobing then full on.

I thought of two independent circuits like, one will control the name panel dimming and full on mode, the other will control the "strobe-then stop" leds. That's why I first tried the circuit(for the strobe circuit) I linked here at the top of my entry. But couldnt manage it to work as I need.

The main idea is to adjust the system easly with programming, so I can make a couple backup circuits and If a table fails, I can easly replace it with a backup one, enter the same values, and go on in a few minutes.

I may use lots of leds, so the system should handle a little bit more current than that given circuits for car/bike brake/tail lights.

I'm going to supply the system with a 12volt dc adapter, but I would like the system to run it in 9volts using a LM317 or LM7809 if possible (don't know if the microcontrollers operate in that voltage) Cause if a voltage drop or rise happens from the adapter, I somehow will be manage to protect the whole circuit including leds. I can design my led array for 9v outputs. less in series, much in parallels, much safer, much easier to repair ;)

Anyway, If you managed to read this entry this far, thank you very much:)
I hope you will all forgive me for my bad english grammer.
And also I hope that someone will greatly help me with my demand.

Please dont forget that I'm kinda newbee in electronics, but open to every bit of learning.

Thanks everyone in advance.
This is such a great forum...
 
Last edited:

eng1ne

Joined Dec 4, 2009
97
In that case, you should follow your ambition and go ahead with the microcontroller.

Either go with pilko's suggestion and use PICAXE, or go to www.gooligum.com.au and look into PIC's and their programming techniques. Look into both.

Other tutorials and brands you could look at are Atmel and AVR.

When do you want to have this project finished? There is nothing in the requirements that couldn't be achieved using a microcontroller.
 

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
Thanks eng1ne for your reply, I need the project to be finished as soon as possible, but I don't have a big knowledge about designing the circuits, so I need some help here...

I'm currently checking out the link you gave me, but if there is someone out who would like to help with a circuit, I'll be very very very very very glad:)
 

eng1ne

Joined Dec 4, 2009
97
Allow me a bit of time and I will try to help; but be aware that the circuit is going to be the easy bit - the programming might not be so.
 

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
Thank you very very much eng1ne, I'm waiting for the circuit patiently, and will do anything to figure out the programming side. I do have a business in IT so I believe it wont be very hard for me to figure out. At first I might need some help about the programming thing but when I figure out the basics I believe I will complete the system.

In fact the system may be very handy for some of us here. A friend of mine gave his idea to implement the system in a car alarm system where a movement sensor detects that someone's coming, turns on the lights dimmed, (first stage of my table) and flashes the turn/brake signals, sounds the horn for a time then puts them lit on etc. (second stage) A lot of people who are looking for a brake/tail light conversion could also use this I believe.

There are lots of combinations, and if we could manage it to run on microcontroller, possibilities will be endless.

Once again, I'm proud to say that this is such a great forum. I've loved the knowledge sharing here. When I educate myself much more in electronics, I believe I'll be helping people out too. Until that time, anyone with a computer problem should feel right to ask me anything they want. I'll be glad to answer everyone.

Thank you very much again indeed.
 

eng1ne

Joined Dec 4, 2009
97
Do bear in mind, I am from a mechanical background with limited knowledge of μc's; hopefully others will be able to add to my suggestions.

See the attached for a simple diagram indicating how this might be achieved with 3 pins of the uc. Of course, the supply pins etc. have been omitted for clarity.

This is at least somewhere for you to start. Your specific current requirements would be helpful, i.e. the current consumption of each LED and how many you intend to have.

The principle would be something like the following:

Turn on

PWM output enable for dim light
Is switch pressed? No, do nothing. Yes, do below
Disable PWM, output PWM port as high to turn on LED.

Enable left/right port as input to flash left.

Enable left/right port as output to flash right.

Repeat
....

Unfortunately, I have run out of time... the above code is not finished though someone might understand my logic and be able to elaborate for you!

If I get chance tonight I will pop back! My apologies!
 

Attachments

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
First of all eng1ne thank you very much for your precious work, I'm taking your time so it should be me who is supposed to apologize.

I thought the same principle for the logic, but dont have any circuit ideas, cause never used an uC before...

SgtWookie, thank you very much for the link I read it twice but couldnt understand the main idea (how can I use it for my work) :( can you help us a little bit here?

If you have read the project of mine you already got the idea, keep in mind that I have a little bit of knowledge about circuits, and willing to learn much more. I tried couple of circuits in our workshop (we work in IT business), tried to seperate the project into two circuits, (collected the idea from the tail/brake light posts) but couldnt make the circuits work as the way I wanted them to...

So if you can help me, you couldnt know how much I will thank you guys... And by the way, I dont know if you agree with me but, giving a complete circuit and the programming is something I will deeply appreciate but it will not teach me anything...

I am here to learn, I want to get that circuit but I wanna learn the steps and learn what is what and why it is there, what it is doing in our circuit... Hope you got the idea, and will show me the way...

Thanks everyone, thank you so much...
 

eng1ne

Joined Dec 4, 2009
97
I'm not sure how much more guidance I might be able to give. I and others have given you ideas.

Perhaps give an indication what you are thinking, how you want to approach it yourself and where you are in your project at the minute. What have you learned so far?
 

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
Ok, now the picture has shapen in my mind.

Please correct me where I am wrong.

-We will have a uC with at least 3 gates and 1 input signals.

-In order not to drive the current over the uC we need to trigger some switches with uC to let the current pass over them to the associated led's. (mosfets?)

-As far as we want to protect the leds from overloading, we should limit the input voltage of those mosfets to 9volts with LM317T or if we can, we should limit the uC's input too. (not sure if they work with 9volts.) (or limiting the current?)

-We will connect the leds in order to run on 9volts, less in series a lot of parallels to make sure if some dies not the whole system dies. And for repairing purposes, to make possible identifying easier.

That's the basics I've got so far, but I dont know anymore, not sure about the components and how to wire them...

Can you help me to move on please?
 

SgtWookie

Joined Jul 17, 2007
22,230
How many LEDs do you plan on using, and what are their specifications?
I'm looking for the typical Vf @ current rating, like: typ Vf 3.2v @ 25mA

Need to get some idea of how much power this is going to require.

What are you planning on using for a power source?

You are in Turkey, you may or may not have limits as to the components that you can purchase. I have no idea.
 

Thread Starter

cagriaksu

Joined Jun 7, 2010
20
In Turkey, I believe I can find anything I need. We have such great electronics stores.

For the 3 arrays of leds I think that 1A will be required. I still didnt calculated the exact led count but I can limit it to an array of 1A. But 1A is maximum for each array, so the system will consume 3 amperes in total when running in full mode.

I will use an 12 volt dc power supply for this but, if we can run the uC on 9v then I would like to limit the voltage to 9 volts using an lm317t or a lm7809. If not, I want to only limit the led arrays voltage to 9 volts and I will arrange them for that voltage.

Is my idea possible? Using uC as a switch controller and running the high corrent over mosfets not uC?
 

SgtWookie

Joined Jul 17, 2007
22,230
In Turkey, I believe I can find anything I need. We have such great electronics stores.
Really? How convenient for you! We used to have lots of electronics stores everywhere in the USA, but sadly most of them have disappeared, or just sell cellular phone plans now. :(

For the 3 arrays of leds I think that 1A will be required. I still didnt calculated the exact led count but I can limit it to an array of 1A. But 1A is maximum for each array, so the system will consume 3 amperes in total when running in full mode.

I will use an 12 volt dc power supply for this but, if we can run the uC on 9v then I would like to limit the voltage to 9 volts using an lm317t or a lm7809. If not, I want to only limit the led arrays voltage to 9 volts and I will arrange them for that voltage.
OK, this is not making sense.

If you have a 12v power supply, why not just use it?

Except the more that you are talking about this project, the more it sounds like automotive tail/brake/turn signal lamps, which are not a project for a novice to attempt.

Is my idea possible? Using uC as a switch controller and running the high current over mosfets not uC?
It certainly is possible.

But not if they are related to automotive safety signalling lamps, such as parking/running/brake/turn signal lamps.

The problems we run into on here is that people with limited knowledge wish to take on projects that, if they don't function properly, can cause great bodily harm and/or high-dollar property damage amounts.

A neophyte may believe that they can order cheap LEDs from a vendor in Taiwan or China, slap together a circuit in a week, install it in their vehicle and it will function perfectly forever.

It is not that simple.

Even if you did get a somewhat well-designed circuit from here, there would be no guarantee even if it were built to specifications given that it would perform suitably in the original application.

If it is a vehicle, my best recommendation is to leave all of the running lights configured and maintained exactly as they were when the vehicle was originally sold.

We have three vehicles. They are all completely stock, except for the addition of a towing package that a trained mechanic installed.

If you want to experiment with LEDs, do so on your test bench - but don't try to modify your vehicle's lighting.
 
Top