Another Relay x16 question

Well that would explain why it works better with computer supply - probably less EMF.
I need help on this though - how big capacitors do I need and where to wire them exactly?

grab a flight and Iā€™ll show you :slight_smile:

Thanks to Brett and a friend of mine I finally got it working. And the solution isā€¦ capacitors. One between + and motor casing, one between GND and motor casing and one between + and GND. Theyā€™re all 150nF (0.15 uF). After 500+ relay on/off cycles not a single hiccup. Iā€™ll do some more testing tomorrow but I think this is it!

It is very nice, can you take some photos to explain more details ?

(thumbs up)

Hereā€™s the final wiring diagram. Iā€™ll post the pictures of wiring when I put it all together in next days.

1 Like

Ok i wait your post
because I have the same problem.

See the posted wiring diagram. If you wire it like that it will work.

Update: After wiring it all up today it works fine through FEZ Spider but fails when switch is pressed - after couple of presses all relays come on. Adding resistors here and there helped a little but still no good.

The only solution is to get a relay board without GHI header (already ordered - on ebay for ~ 15 EUR yes, way cheaper than one with GHI header on it) and solder digital IOs to breakout module (P3-P9) to control 7 relays without any trouble. I tried that today with current module and even though shift registers come into way there are still 3 free digital IOs and it worked perfectly on those 3 IOs.

You need to buy a new relay board without GHI header, so how you can control signal via relay board with FEZ control board like FEZ Spider? would You use another board to control it ?

you would use a breakout module or extender module, and as described wire up GND and control signals to the relay boardā€™s control lines. But youā€™re limited to how many IO ports you can access (this is why the shift registers exist on the Gadgeteer module)

exactly what Brett said. If you wire it directly you can control up to 7 relays per Y socket. To use all 16 you would need 3 sockets. With shift registers you can control many more with just few digital IOs eg. 1 socket.

When I receive my board and wire it up Iā€™ll post a step-by-step tutorial with pictures.

Thanks Brettā€™s response and i wait your tutorial, thanks again Hyperlisk

So I finally got my new relay board and I wired it up today. Itā€™s working perfectly. I have it wired up as seen on the attached picture - you connect breakout module GND to GND on the relay board and pins P3-P9 to any of the 16 relay inputs on the board. When you have it all wired up you connect breakout module to any Y socket (you need 7 GPIOs for 7 relays).

Next step is the driver. Itā€™s really easy but thereā€™s a trick to it. When FEZ Spider pulls line high (relay off) it goes to about 3.3V. Relay board is 5V so it sees this as LOW which is wrong and turns on relay. The problem is that you canā€™t turn it off or on because both high and low are seen as low on the relay board. To overcome this problem you simply define GPIOs as DigitalIO ports (DigitalIO class) and then to turn on any relay you switch that port to Input (which pulls line high/low - it doesnā€™t matter) - DigitalIO.IOMode = DigitalIO.IOModes.Input. To turn off relay you set it to Output which disables the resistor and the port goes back to 5V. In DigitalIO constructor set ResistorMode to ResistorMode.Disabled and initialize all ports as Output so the relays stay off at startup.

This works on FEZ Spider. You try this on your own risk. I will not be responsible if you damage your board. Do not try this on FEZ Hydra as itā€™s not 5V tolerant and you might damage the board.

Most 5v devices say that 3v3 is sufficient to be regarded as a HIGH input. Something in the 2v2 area is usually the measure used. What chips are on the relay?

I donā€™t have it here right now to check but I found this:
http://www.amazon.com/SainSmart-16-Channel-Relay-Module-Arduino/dp/B0057OC66U
(pictures on the left) . Two chips are Toshiba ULN2803 and thereā€™s a voltage regulator on the right. Donā€™t know about other components.

Schematic is here: http://www.ebay.co.uk/itm/New-16-Channel-12V-Relay-Module-Arduino-PIC-ARM-DSP-AVR-/280825466634?pt=LH_DefaultDomain_3&hash=item4162808f0a

according to this datasheet http://www.semicon.toshiba.co.jp/info/docget.jsp?pid=ULN2803APG&lang=en&type=datasheet the minimum input voltage for ON is 2v5. So what youā€™re seeing, I think, is being confused. I donā€™t have one so I canā€™t talk about it with any confidence, but perhaps you need to clarify what you did, your explanation is somewhat convoluted. Instead of swapping inputport/outputport, have you considered tristate port, that may also be suitable?

Didnā€™t know about TristatePort. Just looked it up and looks perfect for this. Will try it soon and will report back. Thanks.

Well there are only few Tristate ports available so I dumped that. Switching input/output ports works perfectly.

@ Hyperlisk - I have the same Iso16 board with the same issues,

Is it possible to remove the GHI board and wire it using the breakout module as per your last image? Or is it a different board.

If it is possible, would you be able to upload the driver you have for the board?

Cheers,

Glen