2021-04-15 08:55 PM
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
2021-04-16 12:02 AM
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.
2021-04-16 02:12 AM
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.
2021-04-16 10:30 PM
Thank you
2021-04-16 10:30 PM
Thank you
2021-04-16 10:33 PM
2021-04-17 01:23 AM
2021-04-17 02:02 AM
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
2021-04-17 02:10 AM
Are you really pulling down a 12 Volt line with an STM32 output?
2021-04-17 04:09 AM
The MCU is most likely fried with 12V and the only thing that can help is actually learning the basics of electronics.