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.

relays, timers, switches, aarrgghhh!!!!

Status
Not open for further replies.

Night0wl

New Member
I'd like to start off with a big thanks to all that gave suggestions to me in the "incandescent light globe" thread. I found it very helpful! :)

Which brings me to my next dilemma....light.

I am opting for heating my reptile enclosures with a heat source that does not emit light so I am thinking about using bright white LED's for day time light and red LED's for night light in the enclosures.

What I need is a way to run the white LED's for about 10 - 14 hours (selectable time depending on summer/winter daylight hours) then switch them off and on comes the red LED's for the other 10 - 14 hours of night.

Let's assume I only JUST know what a PCB is and am very 'green' when it comes to electronics. I can build a distortion pedal using a JFet tranny for a guitar and that's about my limit! lol

Is there any way I could make a timer/relay/switch thingy to turn one light source off and another on?

The only other option I could think of is to wire the white LED's on a separate transformer to the red ones and run a timer on each from the mains outlet.

Thanks
Shane
 
Hi, sorry I'm no expert, I'm just "picking the low-hanging fruit" kinda thing because it seems like at least a partially easy question :)

In terms of having one set of lights switch on when the other switches off, I figure you could:
-EITHER try an SPDT relay (I think...) so current would be switched between the red LEDs and the white LEDs. Not sure what sort of transistor you'd need to switch the relay (assuming you switch it electronically! You could have a mechanical timeswitch or something...), I'm afraid I don't have any experience of relays as yet :p
-OR make or buy a simple digital (LOGIC, not power!!) inverter circuit; then the input to the inverter can feed a power transistor for one set of LEDs, whilst the output from the inverter can feed another power transistor for the other set of LEDs. That way only one set would be running at once. Depending on various details, you might want to use darlington connections to feed the output transistors. It wouldn't hurt but it's a few pence more money and a tiny bit more soldering :D

Not sure about the best way to handle the timing for such a thing, I'm sure someone else can come up with something though. All I can think of is a microcontroller (eg a PIC or similar) or a 555 timer. The PIC could work very well but would be a bit involved; the 555 would *probably* be cheap and easy to make something bad but hard to make something good I think.

Incidentally, if you're using multiple LEDs in each set, you should probably wire each set in *series* (ie + to -, anode-to-cathode, long-lead to short-lead, you get the idea), and then drive them with a constant current (of approx 20mA), RATHER THAN trying to wire them all in parallel (ie, all the anodes connected together and all the cathodes connected together) and then having a resistor and giving them a constant voltage.

If you do go the route of using the LEDs in parallel, I think you might get away with it if you did it using a separate resistor for each LED, but I'm not sure how to explain that clearly, sorry :D

If I get the chance later and you don't get what I mean about some of that, I might bash out a simple diagram to show you what I mean. Or someone smarter than me might say something more useful meantime ;)
 
the simplest, and probably most effective way would eb to use those timers you plug into the wall. just get two timers, and wire the white leds onto one of the transformers and timers, and do the same with the reds, or whatever colour you want to use
 
If you could get an old cheap central heating timer it would do the job.
They have separate times for heating and hot water but you would need two transformers, rectifiers etc.
A better solution would be if you could search for a 12 or 24 volt powered timer then you could run it all from one supply.
 
If you are lucky you can get hold of a timer with a change over switch already in it and the switching contacts fully separated from the mains.
I'm aware of brands of timers designed for that purpose.
Than you can run you LED's via a transformer and bridge rectifier, feeding the common contact, one way to red leds, other way to white leds with the appropiate series resistor.
I would opt for a 12 volt or 24 volt dc supply.
Put the leds in strings which nearly match the supply voltage.

for 12 volts.
RED led 1.7 volt drop, string of 7 leds [11.9v] R 5 :eek:hm:
Put more strings in parallel if more light is needed, as long you don't overload you power supply.
White leds ± 3.5 volt drop, string of 3 leds in series [10.5 volts] R 75 :eek:hm:

Check with multimeter the actual current through each string of leds.
I more than 20 mA increase the resistor value to the nearest E 12 value.
 
Hmm, some further thoughts+ideas:
Things' suggestion of 2 separate ordinary household timeswitches might well be a better idea, if it's ok for both sets of LEDs to be on together for a little while, or to be off together for a little while. Dunno if that's a problem or not.
You'd presumably also have to change the on/off times for them both every season or so, but what might be a bigger problem would be if they ran at slightly different speeds, so they'd get out of sync with each other. This could get annoying, but I imagine they wouldn't get to be off by more than 10 minutes or so.
Picasm's 12v-powered timer idea, if it'd work how I think it would, could be quite good for being able to hook up to an SPDT type arrangement (whether relay or transistor-based switch). I'm not sure how easy these are to find, I've not looked myself :D

Meanwhile I'd got back online to propose that if you had no other timer method available, you could make a VERY CHEAP (but slightly crappy) system using a simple triangle-wave generator (2 op-amps!) with a period of 24h, and then a comparator to give an output signal whenever the triangle-wave is above an adjustable threshold... just like PWM modulation, but very very very slow :D

The threshold level could be given by a simple potentiometer, adjustable to give different durations around the year, and the comparator output would be used to select between one set of lights and the other depending on if it's high or low. The main problems with this though, would be that it'd be really slow work to adjust the period to exactly 24h (you'd need precision components and a trimmer pot I guess, and you'd have to tweak the trimmer once per day till it was right :p), and I'm not sure how exactly you'd synchronise the cycle with the actual time of day... So unless someone else can improve on this general idea or you want to be extremely cheap, you might want to forget I said this ;)
 
An ordinary white LED doesn't produce white light. Your reptiles might not like it. It is a blue LED with a yellow translucent phosphor. It is missing many colours that a real white light has. Instead, use an RGB LED and adjust the currents to make white.
 
We don' need no steenkin' timer....

Just get a remote light sensor circuit to switch a SPDT relay. During daylight the sensor powers up the relay and you light the day time LEDs, whatever those may be. At night it shuts off the relay and the relay's other contacts power the night time LEDs. Just be sure to put this sensor in an enclosure, like a tube with a sealed end, with a shroud. The shroud blocks out the light from the LEDs. Point this thing at a window. Power supply wires go in, LED power wires come out. You should have no problem finding something suitable with a Google search. You'll have to rig the enclosure for this.

No more concerns about day light savings. Hope that helped.
kenjj
 
thanks for your replies everyone :) I had thought about a light sensor circuit but not sure I'm smart enough to make it lol

I'll have a look at the separate timers plugged into the wall as it seems the easiest way to do it. I like the idea of the light sensor though because it would react to actual daylight hours and seem more natural for the snakes.

Thanks audioguru, I didn't realise white light was a different light. I will also check out other colours and see what is available.

Thanks again you guys are extremely helpful! :)

Cheers
Shane
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top