Page 1 of 2

Help needed please

Posted: Fri Sep 21, 2012 12:52 pm
by kila2000
I'm totally new to Arduino and hobby electronics as a whole really. However, I have been building a model of Star Treks Deep Space 9 and I have lit it with LEDs and fibre optics.
Here what I want to do, I built the station with a total of 11 different light circuits for different sections of the station. From a control board I'd like to be able to manually switch on different sections of my choosing but also have a 'mains' switch that will turn on EVERY light regardless of the manual switches. But, I'd ALSO like to have an automated lighting sequence that would light the model in a certain way and, if possible, accompanied by music. It all sounds doable in my mind but I don't know the first thing about doing this other than hooking up the LEDs to switches and a power supply.
Is the Eleven board capable of controlling my automated lighting sequence and if so, won't it be an easy thing to do? Also, is it possible to have the 3 lighting techniques I mentioned?
Please keep in mind I'm a total novice but any help/advice I can get would be most appreciated.


Re: Help needed please

Posted: Tue Sep 25, 2012 7:17 am
by csconsulting
You would be able to do this, however you are going to need a fair few outputs.
You can either use the atmega with its more output pins, or use an eleven with a shift register module to give you more outputs.
That will make the code a bit more difficult though.

For the control system you could use the LCD shield with its buttons, or use a few push buttons to change the sequence.

The most difficult part of your program is to define what sequences of lights you actually want.
Programming will be fairly simple from that point.

Music however is a different ball game altogether, the arduino can make noise, but i wouldnt call it music however.

For simplicity sake you could do all this with a few switches and diodes, using the diodes and one switch as a global "override" that will turn all the circuits on.
However there will be no automatic control.

Re: Help needed please

Posted: Tue Sep 25, 2012 10:06 am
by kila2000
Thanks for your reply.
I'm thinking I might give the arduino a miss, for now at least.
You mention using just switches and diodes, how would I go about wiring up switches in that way? I don't know how to draw up circuit plans myself but I can usually figure them out when I see them. Ideally I'd like to be able to switch on the 11 different lights independently of each other and then of course, have an 'overide' that will turn on everything regardless of the individual switches. Could you perhaps help me with that?

Re: Help needed please

Posted: Tue Sep 25, 2012 12:45 pm
by csconsulting
This would be easy.
Get 11 switches, and each switch turns on its particular set of lights.

Then have one more switch, that feeds to 11 diodes, and each one of these diodes also goes to each string.

When that switch is turned on, it supplies power via the diodes to each string.
When that switch is off, the diodes prevent one string from powering another.

Re: Help needed please

Posted: Tue Sep 25, 2012 10:12 pm
by kila2000
I think I understand, like I said, I'm a total novice at this.
So, the cathode of each diode would connect to the overide switch and antode to the LED string, is that correct?

Re: Help needed please

Posted: Wed Sep 26, 2012 4:29 am
by csconsulting
If you wire the switches as switching to earth, yes that is correct.

Re: Help needed please

Posted: Wed Sep 26, 2012 6:27 am
by kila2000
ummmm, this will sound dumb, what do you mean by switching to earth?
My set up is a regulated 12 volt power supply. My understand is I send power to the switches, then onto each LED group with the negative terminals hooking back to the power supply. The overide switch will be wired inbetween the individual switches and LED groups with a diode to each group.
I'm sorry if this is all tedious, I'm a total novice and just trying to get everything right in my head first. I really appreciate your help with this.

Re: Help needed please

Posted: Thu Sep 27, 2012 6:23 am
by csconsulting
Ok your setup will work fine.

Get your diode cathodes and hook them up to the positive line after each switch.

Then wire up all the diode cathodes to one line, and have that line go to another switch thats connected to your power supply.

When THAT switch is turned on, each one of those diodes will forward bias and conduct, allowing current through to the LED strings.

Re: Help needed please

Posted: Thu Sep 27, 2012 6:32 am
by kila2000
Thanks again for your help.
I tried it out on a breadboard with a few different setup, 1 LED, 4 LEDs, etc and all worked great!!
I have something else I want to try though and wonder if I could be cheeky enough to ask you how I'd do it.
One of the LED groups is a set of 4 2v red LED's wired in series with an 82ohm resistor. This group acts as the stations power core. What I'd like to try is when the switch is flipped the LEDs start dim and slowly get brighter, as if the core was powering up. Is this possible to do without having to turn a dial, as in, can it be made to do it on its own? And would the master switch just turn it on full brightness? as I'd prefer that.

Re: Help needed please

Posted: Thu Sep 27, 2012 1:42 pm
by csconsulting
yea thats the kind of thing the arduino was designed exactly for :)

however you can kind of fake it using a transistor, some resistors and a fairly large capacitor.

You set up the transistor as a simple switch, and put a capacitor between its base and earth.
Charge the capacitor with a fairly large resistance, and as the cap charges it slowly turns the transistor on, giving you a fade in.