I am using relays to power 120 volt AC devices. The relays I have always work using the "blink" code with the UNO, but not with my MKR 1010. These are Grove relays with Grove shields on each board. I imagine my issue is voltage as I can measure my UNO signal at 5 volts and the MKR signal at 3.19 volts.
Some relays work, some work for a few sessions but after using do not work again. Is there anything I'm missing?
I understand that. But then why does the Arduino store sell Grove relays with a Grove shield? Shouldn't they be compatible and if not shouldn't they mention in the product description that the relays might not work?
See the blue screw connectors for the external voltage supplies.
They are there for a reason.
Almost any Arduino is not fully capable of supplying the current and or voltage needed for most relays.
The specs for your board will confirm that.
If you use the SEARCH facility (upper right of the page) and type in relay you will find many posts to back that up and often how they fixed the issue with an external supply of the correct current / voltage capacity.
ANY relay is compatible with Arduino if you know how to set them up and understand the specifications of the arduino and the relay.
These are all the components I am using. They are all purchased from the Arduino Store. And the relays are not working with this setup. I have an adequate power supply and have tried several others to send the 3.3 V signal. If I am not missing anything I will explore stepping the voltage up artificially.
If I jump the 5V source on the Grove shield to the signal pin on the relay it triggers. If I let the digital.Write command set the D3 pin to HIGH the relay does not trigger.
Again, if I use an UNO with a Grove shield the relay triggers
I found out today that I can take a jumper wire from the top shield in the picture on the digital pin and when I touch it to the signal pin on the relay it activates properly. There is, however, enough power to deactivate the relay armature using only the Grove connector after activating directly from the digital pin.
Using the Grove shield quick connect does not supply enough voltage. I have messaged Seeed who makes the shield as I'm sure it is a product defect. I have two separate MKR 1010 board and two separate Grove shields that are both exhibiting the same behavior.
The Grove pins measure 3.19 volts and the header pins measure 3.25. I can direct wire the Vcc, ground, and digital pins to the relay and it works.
I have grounded my power supply to the common from the street and the ground of my house. the shields link the ground appropriately. I even jumped the ground according to the previous comment... no luck.
The MKR's output current is only 2mA on some of the pins, maybe not enough to trigger the relay, that's a problem trying to run devices designed for 5V on the puny output from 3.3V MCUs.
And that would make sense because the MKR 1010 is limited to 20 mA. But I just tried the same setup with a GSM 1400 board which can output 100 mA. Same phenomenon. I can't activate the solenoid through the Grove shield. But if I jump the digital pin to the signal wire of the Grove relay, it activates. The voltage for the GSM 1400 at the relay connection is even lower than the MKR 1010. About 3.06 volts.
Hi Guys,
I have the same problem with my Arduino MKR1010 and Connector Carrier...
I can't trigger my relay by the shield but I'm abble to do it by Arduino board: https://store.arduino.cc/usa/grove-relay
I also try to supply the shield in some different ways and here you are the resoults
On Arduino board I've got always the values
V=3.32 volts ; A= 0.5 mA
Powered by Arduino USB
Connected Carrier => V= 4.95 volts ; A= 0.4 mA on pin D0
Powered by screw terminal block:
Vin= 7.5 volts ; A= 2 A => D0: V= 4.75 volts ; A= 0.3 mA
Vin= 9 volts ; A= 1.75 A => D0: V= 4.78 volts ; A= 0.3 mA
5 volts screw
V= 5 volts ; A= 3 A => D0: V=5.09 volts ; A=0.4 mA
May be I should use someting with more amps on 5v screw...
I don't know...
May be I have a broken shield...
The Grove Relay user manual is here Grove Relay. It shows two versions. Version 1.1 is 5 volts only while version 1.2 runs on 3.3 or 5 volts. The version 1.2 board has a voltage regulator and actually works at 3v when connected to 3.3 or 5 volts. For either version there is a transistor amplifier stage so that the Arduino pin does not get loaded with the full relay current.
You can tell if you have the 1.2 version by looking at the relay. It will say "3V" if it is the 1.2 version and "5V" if it is the 1.1 version. The 1.2 version has an operating current of 100mA and the 1.1 version is 60mA so should have a separate power supply (not the Arduino board) if for no other reason then isolating the Arduino from power spikes caused by the relay.