Relay8 on EtherMega

Hi folks,

I have recently purchased some relay8 boards to control some relays in my switchboard, and I have just started playing with them. I have bridged the “Link DC Input and VIN” jumper, used the example code on a Freetronics Eleven and it works as expected. However when I shift the shield onto an EtherMega, the green power LED adjacent the 5-24Vdc in does not illuminate, and the relays do not fire. I intend on using four of these shields stacked onto an EtherTen in production, and I am assuming I will find the same issue with that board as the EtherMega.

Is there some weirdness with the EtherMega that I am not aware of?

Is anyone using relay8 boards and have some code examples they would like to share?

Hi there prof,
I haven’t used these boards yet, however, acording to jon oxers info you need to modify the shield boards slightly to make them work with a mega style board. Tge mega has a slightly different pin layout, but code should be the same.

Go to the link and and read the section titled “If you are using a Freetronics EtherMega board”[https://www.freetronics.com.au/pages/relay8-8-channel-relay-driver-shield-quickstart-guide#.XEuTd2nZU0M]

You may only need ‘bend the pins’ on the lowest board in the stack.

Hope this helps
Chris H.

Hi there Chris,

Thanks for the reply. I actually didn’t see that as the relay8 board has gone through a revision and the new version documentation does not mention that at all. I suspect that is because the old revision of the relay8 used R2 header format as default, and the Mega uses R3 header format. The new relay8 board is R3 by default, and the online docs are for the old relay8 that used R2 by default.

I tried bending the pins up anyway and I had the exact same result. It seems like I am getting no power to the board even though I am bridging the “Link DC Input & VIN” jumper.

Thanks for the thought, but I am unfortunately no closer.

Alex

I use generic 16 relay boards with identical features, I’ve never been able to use the 5v link for power like ud expect to be able to… using a completely isolated power supply was the only workaround I could come up with… (I even tried a separate external 12v-5v converter as I have a central 12v system already in place with zero success)

I think the I2C should be OK without change on the current Relay8, since I changed the default bridge to be the R3 headers instead of A4/A5. It sounds like the problem is just power, which should be easier to solve.

What voltage do you measure on VIN on the Mega when the shield isn’t plugged in? Then add the shield, and see if you get the same thing on the lower pin of the bridge jumper.

Hi Jon,

It appears you are completely correct. On the Eleven I read 5v on VIN and that works as expected. On the Mega I read <100mV on VIN even without the shield attached.

Maybe I’ll just stick to using an external power supply in testing, which is what I am planning to do in production anyway.

Thanks for your help.

Alex

How is the EtherMega being powered? If you supply power to the DC jack, that voltage (minus a 0.6V drop across the protection diode) should appear on the VIN header. However, one quirk of the EM design is that if you power it only from USB, you won’t get anything on the VIN header. This unfortunate, and it’s a side effect of the way the onboard switchmode regulator works: the controller chip can’t handle being back-powered, so it’s isolated to prevent the magic smoke from escaping. It really sucks that we couldn’t put auto-selection on the power source, and had to use a jumper to select either USB or DC IN, and this is one of the side effects.

If you’re using 5V relays and you can power them from USB, one solution is to connect a jumper wire from the 5V header on the Relay8 to the top position of the 2-pin header where the “Power connect to VIN” jumper can be placed. Leave the jumper off so that VIN itself is still isolated, for safety.

I hope that makes sense :slight_smile:

Or to achieve the exact same thing, jumper between the 5V header and the “+” screw terminal where it says “Input 5-24Vdc”. That may be easier than using the pin header.

Hi Jon,

I think I have gotten to the bottom of this. Out of the four relay8 boards that I have, one of them I have identified as a bit inconsistent. Upon closer inspection, the address pin A1 is missing the 20k resistor to IOREF.

It appears to be completely unresponsive now, but I can only assume that there was an addressing issue on the bus.

@jon do you know when you will have relay8’s back in stock? I am now missing one.

Also, upon thinking about this through, I have an answer to a previous question about the form factor of the relay8/carrier board. I think the best solution would be to have a 16 relay version of the relay 8, with the same connectors and form factor as the carrier board. That way you can din mount the "relay16’ while still using a single MCP23017 and daisy chain them to increase the amount of addressable relays. What do you think?