Skip to main content
Visitor II
April 16, 2021
Question

problem arising while connecting more than one Relay

  • April 16, 2021
  • 5 replies
  • 3289 views

Hi, i am working on a project where i am using 4 Relays. once i Set any one of the relay the voltage and current should flow to a particular Relay and it should turned on and off. But in my case all the four relays will set and reset . if i turned on or off any particular relay . But i am not getting what could be the reason and what i need to add in my code to work for particular relay to turn on and off. can anyone please help me with this.

Thank you

    This topic has been closed for replies.

    5 replies

    Explorer
    April 16, 2021

    There is not much we can do when you let us guessing about the schematics.

    Perhaps your supply source is too weak, or you omitted the EMF protection circuit (at least a reverse diode), and the EMI is messing up the drivers.

    I hope you do not have digital circuitry (STM32) and large coils (relays) on the same power supply.

    Lchal.1Author
    Visitor II
    April 17, 2021

    Thank you

    Graduate II
    April 16, 2021

    Is it a software issue, or one of wiring, buffering and protection.

    You should likely work with your colleagues or supervisor to debug your software and hardware implementation locally.

    The STM32 is more than capable of driving it's own pins high or low individually, and within the electrical limitations described in the datasheet.​

    Lchal.1Author
    Visitor II
    April 17, 2021

    Thank you

    Technical Moderator
    April 17, 2021
    Please also share the connections and circuitry between STM32 and the relays.
    Regards
    /Peter
    Lchal.1Author
    Visitor II
    April 17, 2021

    Relay 1, 2, 3 , 4 is connected to stm32f103 controller pin of PB9 (pin no 46), PB8 (pin no 45) ,PB5 (pin no 41) and PB4 (pin no 40) as a GPIO output.

    Please help me to solve this .

    Thank you

    Graduate II
    April 17, 2021

    Are you really pulling down a 12 Volt line with an STM32 output?

    Graduate II
    April 17, 2021

    The MCU is most likely fried with 12V and the only thing that can help is actually learning the basics of electronics.

    Lchal.1Author
    Visitor II
    April 17, 2021
    Actually for controller 3.3V is going . The circuit has been done in such a way that so that the controller gets 3.3V . No need to worry about it. But please help me solve about the relay concept please.
    Thank you