Advice on connecting relays to a Beagle?

I need to control 4 relays from a Beagle Board. I was wondering if
anyone had any advice for doing this?

I'm planning on triggering them from a Python script, if that's a
factor.

Depending on the relay, you could use a PCF8574 connected to the I2C bus on Beagle. You will need a level translator on the I2C bus to convert from 1,8V to 5V. You may need a relay driver, such as a ULN2004, as well. You could also use a level shifter direct into the ULN2004 and use 4 GPIO pins.

Gerald

I would also consider using an opto isolator for such things just to
ensure my beagle board is fully protected.

That is a good idea.

Gerald

Don't forget your flyback diodes. Turning a relay's coil on isn't a
big deal because the current through it changes slowly. However, when
you switch it off the current from the magnetic flux has to go
somewhere and can create a large voltage spike if you don't protect
against it, usually with a flyback diode.

That is why I suggested the ULN2004. They have the diodes built in.

Gerald