2024-04-22
02:05 AM
- last edited on
2024-04-22
03:51 AM
by
Lina_DABASINSKA
Salut la communauté,
J'ai créé une carte électronique permettant de visualiser l'état de la batterie d'un ULM. J'ai utilisé le microcontrôleur STM32F401CD, et j'avais initialement prévu d'utiliser uniquement l'horloge interne HSI du MCU, donc je n'ai pas ajouté d'horloge externe. En voulant programmer ma carte, j'ai remarqué que je parviens à effectuer une mise à jour sur mon STM32 Link/v2, mais je n'arrive pas à cibler mon MCU en SWD (qui est correctement alimenté en 3.3V, comme mesuré). Je voulais donc savoir si le problème pourrait venir du HSI.
Merci beaucoup.
2024-05-06 12:36 AM - edited 2024-05-06 12:41 AM
2024-05-06 06:36 AM
Hello,
I'm not very comfortable with this part: PB3 connected to +BATT (12V?) via a resistor bridge 1k/100k!
In my opinion there will be a risk of important current injection and voltage exceeding VIO input max!
Did you make the calculation on that point (V_YES/NO_Charge)?
@Andrew Neil what do you think?
2024-05-06 06:41 AM
Me too, i didn't notice this, it's a mistake. I think 20k/100k would be better (+BATTmax = 15V).
What do you think ?
2024-05-06 06:47 AM - edited 2024-05-06 06:50 AM
In my opinion need to find a solution to isolate the battery voltage from the MCU. May be by using optocoupler?
2024-05-06 06:52 AM
I want to charge my battery with my alternator, so they need to be on the same potentiel. And i want to pilot the charge with my MCU ("Autorisation charge" + Contacte charge batterie").
Do you think that i can isolate the battery voltage from the MCU ?
2024-05-06 07:35 AM
In my opinion you need to isolate your MCU from the alternator/battery circuitry ..
2024-05-06 07:37 AM
So i must have to use VDD and not +batt ?
2024-05-07 02:00 AM
Hi, do you think that if i add a Zener it will be enough to protect the MCU here ?
2024-05-07 02:23 AM
You need to give more details - remember that we know nothing about your project!
@yassir wrote:I want to charge my battery with my alternator
What battery? What alternator?
Is this a car?
If so, beware that automotive electronics can be a very hostile environment!
@yassir wrote:+BATTmax = 15V
That might be the highest nominal voltage, but spikes & glitches can cause much higher transients than that -, eg, do a search for "load dump" ...
2024-05-07 05:32 AM
As a first-year engineering student on an apprenticeship in a design office specialized in lithium batteries, I'm still developing the reflexes needed to assess the solutions for the circuit board I'm currently working on. This board aims to protect the battery system of ULMs (ultralight aircraft). To achieve this, it will need to balance the cells, and control the battery charge (15V) by operating power MOSFETs through my microcontroller. It will also need to isolate the battery charge from the alternator. Additionally, it will provide alerts for encountered issues through various visual and auditory signals (LEDs and a buzzer). That's the overall context; I hope this sheds some light.