gee where to start ? noob here

10 Aug 2011

ok so i got my little mbed and mounted it on a radio shack breadboard now i need to figure out components lol. i am looking at controlling about 30 12volt automotive relays though a gsm/gprs modem via sms so i guess i will need a i/o expander chip. i don not think i have seen any write ups pertaining to this sort of setup. i would like to use 15 relays to actuate things and 15 relays to say the things have been actuated. Any help and input would be appreciated as to setting this up and maybe point to similar code . thanks

10 Aug 2011

hi..

well.. I've switched relays with an mbed, it's pretty standard stuff using a digital out and a transistor. (plus normal bits, like a base resistor as per usual).

Why use relays as sensors though ??

Just use a digitalIn to sense if a line is live. (presuming thats what you want to do).

If it's a 12v line, you can just use a potential divider to drop it below 3v3. (I *think* 2v -> 3v3 is high, but check that in thr cookbook)

Can't help you with the comms bits though, but at least you should be able to connect a relay and have it switching within 10 mins.

cheers

Dave.

11 Aug 2011

I would recommend an I2C or SPI relay driver to reduce the number of port pins and the number of external components you have to use. Something like the TPL9202 (8 port relay driver max 18V) The feedback part could be done with optocouplers if you need electrical isolation. To create an extra 16 input pins you could use the MCP23S17 SPI IO expander.