I'm hoping to get some help in searching the best timer switch that suits my needs. I've had a look around on the internet and still can't find something that is what I want: I would like to find a timer switch that allows me to do the following:

  • Turn on for 10 minutes.
  • Turn off for 5 seconds
  • Repeat (on for 10 min/off for 5 sec)

All timer switches I can find only allow me either 15 minutes between them or only allow me 10/15 programs which is not enough as this will have to be on for at least 10 hours (I can manually pull the plug when I'm done).

Reason: I've read loads of studies on fleas and their behavior in attacking their hosts and it seems like the best way to capture them is not with a constant stream of light but with a little interruption (simulating an object obstructing the light). They'll jump straight onto where the light used to be on and eventually get stuck on a sticky sheet or drawn in soapy water.

I'm ok with either building something that's not too complicated or if you can point me to a product that exist already that will save me loads of time and I can just keep building the rest (lights, trays etc).

Extra credit: if you're interested, the project will work at its best when using a green light.

  • \$\begingroup\$ Which timer do you actally have, so I can give you an advice to continue with it. \$\endgroup\$ – Marko Buršič Sep 5 '16 at 10:11
  • \$\begingroup\$ Thanks Marko. I don't have any yet as I'd rather buy what's required when I know what I need :) \$\endgroup\$ – Simone Sep 5 '16 at 10:17
  • \$\begingroup\$ VTC as this is a shopping / product recommendation query which is off topic here. \$\endgroup\$ – Michael Karas Sep 5 '16 at 10:34
  • \$\begingroup\$ For accuracy and repeatability I would go for a simple microcontroller solution such as an aTTiny or even an arduino nano - simple to program. If you want a hardware timing circuit then something like a CMOS cd4060. A 555 timer could do the job but with 10min delays they tend to be a bit variable due to the large capacitor values used. \$\endgroup\$ – JIm Dearden Sep 5 '16 at 10:35

This sounds too perfect for the Arduino environment. You've already found that you can't buy a commercial product that does what you want. Yes, you could prepare a schematic and circuit with components like a 555, but why?

You might as well buy a $5 Arduino clone, download the Arduino environment, and have at it. Write in code what you want, in (almost) English, rather than designing an electronic variant.

Of course the issue is switching a (I assume) mains-supply light. There are relay shields for the Arduino for less than $10 - I think you can easily get what you want:

const byte relayPin = 4;

void setup() {
    pinMode(relayPin, OUTPUT);
} // setup()

void loop() {
    digitalWrite(relayPin, HIGH);
    for (unsigned i=0;i<10;++i) { // Ten minutes
       delay(60 * 1000); // Wait for a minute (in milliseconds)
    } // for
    digitalWrite(relayPin, LOW);
    delay(5 * 1000); // Wait for 5 seconds (in milliseconds)
} // loop()
| improve this answer | |
  • \$\begingroup\$ Yep, I think this is what I'm going for indeed. I'm a Systems Engineer so pretty confident with programming languages (c/powershell/php/autoit) so that part didn't scare me. It was just so that I could avoid spending time on making it look pretty when perhaps there was already something out there, but thanks for the code, I never programmed arduino so that'll come in handy! I was just thinking of a 9V battery to supply arduino's board and then just get 3 leds+resistances and that would pretty much be it. \$\endgroup\$ – Simone Sep 5 '16 at 12:19

Why not start with the basic 555 timer . You can change the resistance values to change the duty cycle according to your needs . This page gives a good description about how to do so. Hope this helps

| improve this answer | |

According to your name, some ready made italian stuff: Asymetrical timer relay Finder 83.91. If you need for 230vac then is the right choice.


| improve this answer | |
  • \$\begingroup\$ You are correct, but I live in another country right now, probably the worse in finding these sort of things. I've had a look at the link you've shared (thanks!) and to be honest it seems pretty expensive considering the sort of project I've got in mind. I've ordered a couple of compatible Arduino boards for about 10 euros, count an extra pound for the 9v battery socket for arduino and 3 leds+ resistors, in theory with less than 10 euros I should have a working device (excluding plastics etc). cheers \$\endgroup\$ – Simone Sep 7 '16 at 18:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.