cancel
Showing results for 
Search instead for 
Did you mean: 

problem arising while connecting more than one Relay

Lchal.1
Associate II

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

10 REPLIES 10
Ozone
Lead

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.

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.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you

Thank you

This is the schematic of my relays. can you help me to solve it please

Peter BENSCH
ST Employee
Please also share the connections and circuitry between STM32 and the relays.
Regards
/Peter
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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

Uwe Bonnes
Principal III

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

Piranha
Chief II

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