LowPowerLab Forum

Hardware support => Projects => Topic started by: Memnon on February 12, 2017, 06:24:03 PM

Title: Moteino relay shield
Post by: Memnon on February 12, 2017, 06:24:03 PM
Hi

I'm trying to make a relay shield for my moteino. I got my first board back from manufacturer, but with a fault i can't find. i done lots of test with breadboard before i sent it to production. All was working fine. The schematic is simple, just a moteino relay shield. If anyone could guide me on to the right track here. I will be very greatful!!

The fault is that the relay does not activate. Just the LED`s

(https://i.imgsafe.org/0ee6191f3b.png)
(https://i.imgsafe.org/0ee7e29edf.png)
Title: Re: Moteino relay shield
Post by: perky on February 12, 2017, 08:31:55 PM
Have you selected the 5V version of the relay? If so:

You've got the opto-isolator diodes in series with the LEDs. You'll probably need around 1mA through that to turn the relay on which is about 1.5V voltage drop for the opto-isolator, which leaves you with around 1.8V for the LED. If it's a 2.2V LED it's probably not going to allow enough current (the LED may appear to light up, but it wouldn't be very bright). If you're using a green LED it may have a much higher forward voltage than that.

So I think changing the LED to a red 1.6V or 1.8V LED might fix it (you can test this by shorting the LEDs, if it works the LEDs are probably the culprit). This looks like the circuit was copied from a 5V Arduino design (?) as there would be plenty of voltage to have both diodes in series, but you've only got 3.3V.

Edit: Some current is clearly flowing for the LEDs to light, so another way might be to replace the relay driving NPN transistors with darlington pairs that have much higher gain. You'll lose about 0.8V of drive voltage (i.e. 4.2V at 5V nominal) but pick-up voltage for that relay is about 75% of rated voltage which is 3.75V.

It might be better to remove the LEDs from the opto-isolator side altogether and put them across the relay coils (with appropriate series resistors). That eliminates the LED forward voltage problem and has the added benefit of only lighting when the relay coil is energized.

Mark.

Title: Re: Moteino relay shield
Post by: TomWS on February 13, 2017, 08:09:34 AM
The only thing I see as a problem is that R4 is shorted.  Did you do a Design Rule Check on the PCB?

Tom
Title: Re: Moteino relay shield
Post by: Memnon on February 20, 2017, 03:30:10 PM
Found the error, it was the NPN transistors. The one that i had(emitter-collector-base) was organised differently than the one i used in eaglecad. Had no idea that the legs was swapped :(  So now everything is working fine.