Relay8 on EtherMega


#1

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?


#2

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.


#3

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


#4

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)


#5

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.


#6

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


#7

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:


#8

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.