Skip to main content
Topic: Suitable relays (Read 4569 times) previous topic - next topic

Suitable relays

Hi, got my platform, got it working, sort of, sd card not playing at the moment, but there's plenty of helpful topics on here for that. What I'm asking is can someone point me in the direction of some suitable relays to use so I don't fry the board?
I'd be looking to switch on small servo's or stepper motors basically, but if I could control 240 v sockets, that would be perfect!
I'm trying to delelop a basic aquarium parameter web server with the option to feed/ turn lights on or off etc, for peace of mind when I'm away from my little reef.

Thanks in advance
Matthew.

Re: Suitable relays

Reply #1
I forgot to add, the tank is covered by a dedicated webcam, so the visible side is catered for, it's temperature, feeding etc I'm looking to Monitor/remote control.
Matthew.

Re: Suitable relays

Reply #2
You can not drive relays directly with this PIC (well you possibly can but you shouldn't even try). Generally you will need to use a transistor or (even better) a power MOSFET (3V switch on is perfect) as a buffer between the PIC output and a relay, using a similar setup I have switched many 12V items. As for 240, it is probably best to use a two relay setup, one on a separate 12V supply that switches the 240V relay.

Re: Suitable relays

Reply #3
Don't forget the flyback diode so you don't fry your transistor (BJT or MOSFET) when it turns off the relay!

Re: Suitable relays

Reply #4
You might like to look at solid state relays. 
If you pick one like the attached, the version without an LED will operate at 3 volts and at that level will draw around 2 mA. the pic I/O will supply 4 mA maximum.

Re: Suitable relays

Reply #5
I was also thinking of using solid state relays for controlling my outlets in my workspace here, but I decided to use relays.

If you want you can use my relay board:




With this board you can drive the relays directly with TTL or with I2C.

Partslist:
PCA9554
ULN2803A
LP2985-33

and standard relays that fit this footprint with 5V oder 12V DC. I use these boards with a webplatform (my own board but quite similar to the DP one from software point of view) and software I2C.
If you are interested, I can give you the software needed for I2C to work. ;)


Best regards.

EDIT: Forgot the eagle files: http://mega-bug.net/relay_board.zip
EDIT2: The vreg, port expander and darlington array can be sampled from TI... just FYI. :)
Web platform todo: bluetooth firmware update, some kind of database, GLCD.
Working: RS485 connection, NTP RTC time sync, I2C for portexpanders, Software PWM with timer interrupt, SPI flash(32mbit)

Re: Suitable relays

Reply #6
Thanks for the suggestions guys, that relay board looks perfect, thanks, need to buy breadboard and hookup wires first, looking good.