This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Relay doesnt work toggling GPIO Output? how can pull it down

Hi triying to drive a Relay with Output but have tried every functon in "nrf_gpio.h"

this works with a LED perfectly : nrf_gpio_pin_toggle(23);

in the main i configure :

nrf_gpio_cfg_output(23); nrf_gpio_pin_write(23, 0);

but the relay dont change state with Toggle, with STM32 i change the pullup, pulldown configuration and it works, i have to send a "0v" signal for the Relay to change state to off, and a voltage to go on.

how can output configuration be change in a output pin? thanks.

Parents
  • A relay. How much current does your relay coil need to operate, what voltage? The GPIOs on the nRF series are VERY current limited and work only to the voltage on the chip which may be 3.3v, they are not the monster 5-10mA outputs some of the STM and Atmel etc chips have.

    I wouldn't even think of considering driving a relay from an nRF chip without a transistor to drive it, and a reverse diode (flyback)

  • also claims to need a 5v battery. If you're hooking nRF chips up to 5v then bad things are going to happen. If you are hooking that relay module up to 3v3 it's impossible to say whether or not it will work.

    Either way those are the correct functions for turning a pin high and low so either you don't have enough voltage on the relay to activate it, or you don't have common ground, or you've blown up the GPIO

Reply
  • also claims to need a 5v battery. If you're hooking nRF chips up to 5v then bad things are going to happen. If you are hooking that relay module up to 3v3 it's impossible to say whether or not it will work.

    Either way those are the correct functions for turning a pin high and low so either you don't have enough voltage on the relay to activate it, or you don't have common ground, or you've blown up the GPIO

Children
No Data
Related