led light controller

Thread Starter

cminke

Joined Jun 7, 2014
64
i have 8 dual colour (16) + 8 front facing dual colour (16) =32
i have 4 around the sides, 2 front facing, 1 left and 1 right =8
32+8= 40 LEDS then 5-10 switches for diffrent functions
 
Ok, well that's enough to get started on the hardware.

Controlling 40 LEDs from a small microcontroller using multiplexing is not a problem; 7-segment LED clocks have a similar number of LEDs, all of which are multiplexed.

I would control the LEDs from a 5x8 multiplexed matrix. Assign 5 bytes of RAM to the display and write the code to output each byte to its corresponding column of the matrix. Once the matrix driver code is running it's just a case of writing values into the display RAM in order to control individual LEDs.

You will require a device with 13 outputs for the LEDs plus however many inputs you think you need. Any small micro with enough i/o will do the job, I would use one of the 28-pin PICs but only because of familiarity.

This is an ideal application for a small microcontroller, it's not too complicated but will require some careful planning.
 
Last edited:

Thread Starter

cminke

Joined Jun 7, 2014
64
would that work even for leds that arnt arranged in grid? like i could sent an array and then just separate them based on the are to be lit up right?
now would i be able to run sets of code triggered by a 4 position switch? ie. position1 for off , position 2 for code 1+2 position 3 for 1+2+3 and position 4 for all?
 

#12

Joined Nov 30, 2010
18,224
would that work even for leds that arnt arranged in grid?
Has wire been invented?

This is getting very, "no place fast". Beside post #61, all you have contributed are questions, most of which have been answered outright or with links to the education you need. If you learned what you have been provided with, you would be programming by now. My conclusion is that you did not bother to learn the lessons provided and you don't intend to do any real work. You seem to be waiting for somebody to hand you the schematics, the code, and the wiring diagrams, without you even really defining what you want. The level you are performing at resembles a person who has been smoking funny cigarettes.

Do some work or you will never get this built.
 

Thread Starter

cminke

Joined Jun 7, 2014
64
i understand your opinion but i am just trying to design it all up and grasp the details i need insted of searching for hours for the answers i can simply ask here, i was under the impression that it would be safe to ask questions.
 

#12

Joined Nov 30, 2010
18,224
You can ask, and ask, and ask, and ask, and ask, but when you do not read the answers or the tutorials, the good will of the people who keep answering and answering and answering runs out.
but i am just trying to design it
I don't believe that because you have not designed anything. You have not shown any part of a design for a flow chart, an LED circuit, a subroutine, or a light bar. You haven't even chosen a type of communication to use between the parts. You have not read the information that was linked to and you have not learned the information that was given to you here. If you had, your questions would change to being about the subjects you need to learn. Instead, you ask,
would that work even for leds that arnt arranged in grid? like i could sent an array and then just separate them based on the are to be lit up right?
now would i be able to run sets of code triggered by a 4 position switch? ie. position1 for off , position 2 for code 1+2 position 3 for 1+2+3 and position 4 for all?
Can I light up LEDs that are not arranged in a grid pattern? Can I use a switch to select a pattern?
What do you think?
If you had made any effort at all, you would know the answers to those 2 questions.

So, yes, you can ask. You can ask the same questions over and over. The answers will be the same the second and third and forth time you ask, until the people here get tired of repeating themselves. YOU eventually have to make an effort or YOU will not get any results.
but i am just trying to design it all up and grasp the details i need insted of searching for hours for the answers i can simply ask here,
You have been answered, and you received those answers by using other people's hours. Ignoring the answers and not studying the information turns those hours into a waste of our time instead of yours.
 

Brevor

Joined Apr 9, 2011
297
I believe some of the problem here is that Connor (the OP) has difficulty understanding what is involved in a project like this. I also believe he has a difficult time explaining his ideas too others. I'm not trying to be offensive to him, I have worked with people who have this problem. It's made even harder by trying to communicate over a forum rather than face to face. I'm not sure how to continue, it seems to me that the OP wants to build a very complicated project but doesn't really understand the level of knowledge required to complete it. Maybe he should consider something with fewer features....?
 

Thread Starter

cminke

Joined Jun 7, 2014
64
will all information here i agree i dont know the information and yes i would agree i may not be doing the best to describe the issue or my requirements or my extent of understanding.

its a lot of work and with the mulitplexing i understand now how to design and lay out the wiring, it took me a while to visualize it before drawing it out.
sometimes i just need to work though it mentally before i write it down on paper
 

#12

Joined Nov 30, 2010
18,224
i understand now how to design and lay out the wiring
So, show us your progress to demonstrate that we are not working into a vacuum.
i just need to work though it mentally before i write it down on paper
Here's an idea: Put SOMETHING down on paper. Projects like this have several parts that can be worked as modules. If you wait until you:
understand how to write the software,
write the software entirely in your mind,
mentally test and debug the software without connecting any electricity,
know all the part numbers you will need to buy,
know all the wire gauges and how long the wires will be,
design the voltage regulation in your mind,
account for the necessary automotive surge protection,
know where, how many, and what size the fuses are,
design the LED drivers,
imagine and memorize all the different flashing patterns,
imagine all the ways light bars can be bolted to a car,
know all the different sizes of light bars,
and how many LEDs each will contain,
and which colors go where,
know which communication standard you will use,
know which microcontroller you will use,
know how your MCU works,
know how many remote modules you will need and how they will work,
know whether you can use a switch to switch something,
know how to debounce a switch in software,
know whether an LED will stop working if you move it 3 inches from the rest of the LEDs,
know how to set up a matrix in programming language,
know how multiplexing works,
know how much wattage every single resistor needs to handle,
and be ready to draw it all up in one continuous session,
before you pick up a pencil,
you will either be waiting forever or you're a bigger genius than Albert Einstein.

If you think about photos of him, you will realize that he wrote on a chalk board BEFORE he knew all the answers.
 
Last edited:

pwdixon

Joined Oct 11, 2012
488
Has wire been invented?

This is getting very, "no place fast". Beside post #61, all you have contributed are questions, most of which have been answered outright or with links to the education you need. If you learned what you have been provided with, you would be programming by now. My conclusion is that you did not bother to learn the lessons provided and you don't intend to do any real work. You seem to be waiting for somebody to hand you the schematics, the code, and the wiring diagrams, without you even really defining what you want. The level you are performing at resembles a person who has been smoking funny cigarettes.

Do some work or you will never get this built.
Exactly what I worked out by post 29 which is why I stopped posting.
 
will all information here i agree i dont know the information and yes i would agree i may not be doing the best to describe the issue or my requirements or my extent of understanding.

its a lot of work and with the mulitplexing i understand now how to design and lay out the wiring, it took me a while to visualize it before drawing it out.
sometimes i just need to work though it mentally before i write it down on paper
You are looking too far ahead without putting the basics in place. It is essential to write ideas down, they will almost certainly contain errors, but that is part of the design process. Experienced designers know that their first ideas/ solutions are junk but that's how the process works; the best solutions take many iterations to find.

I said most of this back in post#16, but here goes:

The best way for you to proceed is to first choose a micro-controller+programmer and while you're waiting for it to arrive, write the flowcharts for some simple routines e.g. reading a switch and flashing an LED. This may seem a long way from what you are ultimately aiming for but it is entirely relevant and will open the door to creating the rest of the project.

I just did a quick search on Google and found this excellent PIC tutorial that clearly explains the process:

http://www.markhennessy.co.uk/pic/
 

#12

Joined Nov 30, 2010
18,224
Exactly what I worked out by post 29 which is why I stopped posting.
I'm not all that heavily invested...4 posts until yesterday...but when I check in on a project that has been running for 2 weeks and the question is, "Can I use a switch to switch things?" :confused:
This one should be up to how fast mosfets switch or how many dimensions my matrix needs.
Two weeks of hard study and sophisticated interaction with knowledgeable people and the question is, "Can I use a switch to switch things?"

I felt a need to say something is wrong here.
 
Top