Low Voltage level problem in STM32 system chip

Thread Starter

Mike2526

Joined Nov 10, 2020
86
Dear all, hope you are doing great. I am designing a circuit using EasyEDA simulation tool. But I am facing a problem after connecting the relay to the single-Chip IC (STM32 103RTC6). The low voltage is showing around 2V, whereas it was originally supposed to be 0 volts. I am still unable to understand why it is, so I need your help, please.
 

MrChips

Joined Oct 2, 2009
34,628
Dear all, hope you are doing great. I am designing a circuit using EasyEDA simulation tool. But I am facing a problem after connecting the relay to the single-Chip IC (STM32 103RTC6). The low voltage is showing around 2V, whereas it was originally supposed to be 0 volts. I am still unable to understand why it is, so I need your help, please.
Post your circuit schematics.
 

Thread Starter

Mike2526

Joined Nov 10, 2020
86
Post your circuit schematics.
Dear Sir, Thanks for your kind and prompt response, the circuit is drawn in Chinese version, and that should be not very convenient for you. Sorry for the inconvenience in advance. Right now I have screenshots but tomorrow morning I can share the schematic, it is 12:21 am herein China. I am an international student here. Thanks for your kind understanding.
 

Attachments

Thread Starter

Mike2526

Joined Nov 10, 2020
86
Your problem is obvious.
The relays operate on 70 mA @ 5 VDC.
STM32 operate a 3.3 V and will never drive or sink 70 mA. You need a driver circuit such as ULN2003.
Thank you so much dear Sir. I will work on it and update you about my results. if still there is any issue or problem i will seek for your kind help, please.
 

sparky 1

Joined Nov 3, 2018
1,218
An estimate plus any further needs includes the voltages required and current draw.
A 5V power supply with 3.3V step down converter or
3.3V power supply with 5V step up converter. So long as you fit the circuit with an appropriate supply.
For a closer look the range in logic level shifting, and related, pulling active high or low.
Logic Levels - SparkFun Learn
And then there are 5V rasberry pi hackers and that can add to the confusion, hacks must be done very careful to work right.

To try a logic level shifter in Simulation of 3.3 to5V, use intended module correctly, check both isolated and non isolated.
BSS138 level shifter - OSHWLab
 
Last edited:

Thread Starter

Mike2526

Joined Nov 10, 2020
86
Dear Sir, Thank you very much for your previous assistance and kind reply ( @MrChips and @sparky 1). I have been working diligently on the hardware issue, but unfortunately, I have been unable to resolve it. After connecting the relay, I noticed that there is a disturbance in the voltages. I have attached my schematic files for your review. Could you please take a look at them and let me know if you see any potential faults or issues? I would greatly appreciate your expertise and guidance on this matter. Thank you once again for your time and consideration.

(I am trying to connect the related files, but unable to upload them. So, I am uploading .txt files, sorry for inconvenience.)
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,181
Dear Sir, Thanks for your kind and prompt response, the circuit is drawn in Chinese version, and that should be not very convenient for you. Sorry for the inconvenience in advance. Right now I have screenshots but tomorrow morning I can share the schematic, it is 12:21 am herein China. I am an international student here. Thanks for your kind understanding.
I see the drawing and the fact that the notation was in Chinese text did not make much difference to me.
 

Thread Starter

Mike2526

Joined Nov 10, 2020
86

Dear sghioto, I would like to express my sincere gratitude for your kind assistance. I am writing to seek your expertise on a specific matter related to the diode utilized at Pin #4 of the relay. Could you kindly recommend an appropriate value and/or model for this diode? Your insights would be greatly appreciated. Thank you in advance for your valuable guidance.
 

MisterBill2

Joined Jan 23, 2018
27,181
With no voltage applied at A11 the relay is active, so there is a logic inversion And as the relay will draw 70 mA that will load the power source a bit.

The diode from pin 4 back to the 5 volt source is to clamp the amplitude of the anticipated voltage spike caused by the collapse of the magnetic field in the relay coil. The actual magnitude of this voltage pulse would be very difficult to measure, and it is primarily dependent on the rate of current change, which is also difficult to know exactly. IF the rate of change is "instant" then the pulse may be very large. but very few transistors provide "instant" switching. So now you have the explanation of the purpose of the diode.
 

MisterBill2

Joined Jan 23, 2018
27,181
Really, a more robust power diode such as the 1N4000 or 1N4001 will be a better choice than the lesser rated signal diode the 1N4148. For any power application, a power diode is a better choice than a signal diode.
 

Thread Starter

Mike2526

Joined Nov 10, 2020
86
Is there still a problem with the voltage disturbance??
Dear Sir, the simulation results appear to be promising. However, I am also interested in verifying these results on hardware. I plan to conduct experimental work tonight and will inform you of the outcomes subsequently. Thank you once again for your valuable suggestions.
 
Top