user27435: I want to simply switch a relay like Majenko describes it for my last question. (time based switching of a relay)
That's the code I came up with based on the documentation:
int relayPin = 2; // pin where relay is attached
long mins = 5L;

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

void loop() {
    digitalWrite(relayPin, HIGH);
    delay(mins * 60L * 1000L);
    digitalWrite(relayPin, LOW);
    delay(mins * 60L * 1000L);
}

Now I want to use a real device and have been looking around, but there are tons of different boards, so some shopping advice would be really great. What I would like if possible:

Closed casing to reduce risk of people touching stuff. (also for a "professional" look)
Built in power supply from 220V AC.
Outputs strong enough to work without external logic, just connect the relay and go.
Small size and low cost, in case I start using these everywhere in the house i don't need to reevaluate. :) 


user27165: Personally I would recommend a chip from the ATtiny series (ATtiny85 for example - it has 5 programmable pins and costs about $1 - $3).
Even though it is not really an Arduino board - it is really great  as you can easily program it from another board from within the Arduino IDE, and it is really lightweight and cheap.
Watch this
Youtube video
for a guide to set it up - it is really useful.
Otherwise you can simply give "attiny85 arduino setup" a google

27435: <p>I want to simply switch a relay like Majenko describes it for <a href="https://arduino.stackexchange.com/a/30250/27435">my last question</a>. (time based switching of a relay)</p>

<p>That's the code I came up with based on the documentation:</p>

<pre><code>int relayPin = 2; // pin where relay is attached
long mins = 5L;

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

void loop() {
    digitalWrite(relayPin, HIGH);
    delay(mins * 60L * 1000L);
    digitalWrite(relayPin, LOW);
    delay(mins * 60L * 1000L);
}
</code></pre>

<p>Now I want to use a real device and have been looking around, but there are tons of different boards, so some shopping advice would be really great. What I would like if possible:</p>

<ul>
<li>Closed casing to reduce risk of people touching stuff. (also for a "professional" look)</li>
<li>Built in power supply from 220V AC.</li>
<li>Outputs strong enough to work without external logic, just connect the relay and go.</li>
<li>Small size and low cost, in case I start using these everywhere in the house i don't need to reevaluate. :) </li>
</ul>
 27165: <p>Personally I would recommend a chip from the ATtiny series (ATtiny85 for example - it has 5 programmable pins and costs about $1 - $3).</p>

<p>Even though it is not really an Arduino board - it is really great  as you can easily program it from another board from within the Arduino IDE, and it is really lightweight and cheap.</p>

<p>Watch this
<a href="https://youtu.be/30rPt802n1k" rel="nofollow">Youtube video</a>
for a guide to set it up - it is really useful.</p>

<p>Otherwise you can simply give "<em>attiny85 arduino setup</em>" a google</p>
