Introduction: ATTiny45/85 Multi Voltage "smart Relay"
This entry is intended as an overview only. If there is interest, I will expand it to include assembly instructions and some basic code. I've now added the gerber files (and .pdf files for anybody who wants to have a go by the toner transfer method, or similar).
The aim of this board is to provide a small, versatile and relatively cheap solution for art and automation projects that only need a couple of inputs and outputs and where a variety of different voltages may need to be sensed or switched.
One possible example might be to provide logic on one station of a 24Vac garden reticulation system to modify the solenoid run time depending on soil moisture (or some other variable).
The various sections do not need to be fully populated. You need only install those components that you actually require. Check out the (pretty crappy) schematic - I'll post a better one later.
Each channel of the "optomos" solid state relay (SSR) is capable of switching 400mA at 60Vdc. The spec sheet states that is can handle a 10ms "surge" current of 700mA, but I killed one with a 5ms 500mA pulse, so beware! I don't intend to use it for anything beyond about 300mA.
The 2 PTC resistors will act to limit the current in the event of a SSR failure (it will generally fail ON) but they WILL NOT protect the SSR from over current. They act way to slow for this.
Remember that inductive loads (i.e. relay coils) will produce a "back EMF" spike when switched off. Replacing the PTC's with diodes might protect the relay from this, but I have not tried it.
There are several tiny sections of "proto board" included - generally enough for one or two additional through hole components.
For example, I have used this space to place an additional LM317 and supporting components, leaving off one of the input optos in order to have a 12VDC supply at those terminals instead of an input. See photo.
There are several places on the board where 5VDC, GND and rectified VIN are accessible.
The PCB was designed using the free "Designspark" software from RS Components: http://www.designspark.com/
Coding can be done using the free AVRStudio IDE from Atmel, but I prefer to use the Arduino IDE with a very cool patch from the MIT "High Low Tech Group" that allows you to use the Arduino IDE for Attiny's. Check it out: http://hlt.media.mit.edu/?p=1695
TOTAL COST = around $11.00
Breakdown of cost:
Because of the sub 5cm x 5cm size, it was cheap to get manufactured using the SEEED Studios "FusionPCB" service: http://www.seeedstudio.com/depot/fusion-pcb-service-2-layers-p-835.html?cPath=185
Cost was AU$ 13.00 for 10 boards (including delivery) = AU$ 1.30 ea
All the individual component costs below are from a cursory search of various online suppliers - mostly Futurlec: http://www.futurlec.com.au/index.jsp
ATTiny from online supplier = AU$ 1.05 ea
HFS2/2A310D opto-MOSFET = AU$ 2.95 ea
LTV-8141 opto-isolator = AU$ 0.50 ea (x2)
LM317T 1.5A regulator = AU$ 0.45 ea
2 screw terminals AU$ 0.40 ea (x5)
Assorted LED's, diodes, resistors, capacitors, header pins and a pushbutton = no more than AU$2.00
Thanks to all the crew at The Artifactory for help and support http://artifactory.org.au/