When the output pin is high and the relay is disconneted.The output voltage of the pin is 3.3V.But when I plug the relay to the pin ,the voltage drop to 1.6V and the relay is not activated.
I don’t understand why the pin output voltage drop when we plug the relay/
I tried to plug the relay on 3v3 pin and its work perfectly
@mbenlarbi, you will need a transistor driver to be able to control the relay as it a) needs a 5v drive which the Boron cannot do since the GPIO voltage is 3.3v and b) needs a minimum of 33ma current which the Boron cannot provide as the max current is 25ma.
You can use a power FET or 2N3904 NPN transistor with current limiting resistors on both the gate/base and collector/drain. There are countless topics in this forum and on the internet regarding driving relays.
Actually the Boron datasheet is currently wrong. The GPIO are currently set to standard drive, not high drive, so the current limit is 2 mA typical, 4 mA maximum. We may switch the GPIO to default to high drive in a future version of Device OS.
But the transistor will still be required for the reasons peekay123 mentioned.
If we use the output pin on sinking mode.so,i put the input voltage of the relay as 3.3 V(3v3) and the output pin as low (0V) with the SOLID STATE RELAY (11.5mA).
It will be the same as the first case
There are two possible problems. One is that you can only sink 4 mA in the current pin configuration (standard drive) and there’s no API to change it, except for directly modifying the nRF52 register.
The other issue depends on how the SSR works. With an electromechanical relay you definitely can’t connect the + terminal to 5V and sink to GND because when the pin is initialized, it will be in input mode. The coil will essentially connect the pin to 5V, which is well above the absolute maximum of 3.6V and will likely fry the pin.