MOSFet HV circuit affects i2c connection on a STM32G4xx board

dacair

Sep 4, 2024
15
Joined
Sep 4, 2024
Messages
15
Hi,
I design and build a vacuum system that contains a sealed vacuum bag. The vacuum bag has sealed inside a BMP180 sensor board on i2c that measures vacuum (-mBars) and temp ( C ) . It has also a 6mm pipe that is connected to a vacuum pump. Under this vacuum bag there is an underfloor heating film at 230V/80W.
There is a STM32G431 board that controls two power boards by PWM - one for the vacuum pump motor and one for the heater. The controller has an OLED display, knob-encoder as menu selector and a power switch ( Power - On/Off)
The i2c connections : OLED connections are 4 wires ~100mm long, the BPM180 has a USB (4 wires/ shielded) cable that is ~500mm long.

Everything works fine until I connect the board for the heater. This board is a source to source MOSFet circuit that has commands from a SI8752. When the power is switched on the STM32 starts , but after some seconds, the i2c stops working.

In the hardware picture the control wires are not connected.
I added a separated source ( 230V/5V) for the board but I still have the issue.

Can anyone suggest some solution?
 

Attachments

  • VacuThermSys_SCH.png
    VacuThermSys_SCH.png
    32.3 KB · Views: 5
  • Hadware.jpg
    Hadware.jpg
    251.1 KB · Views: 5

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,315
Joined
Nov 17, 2011
Messages
14,315
These long wires are excellent antennas to catch any EMC from the high voltage side.
  1. Keep wires as short as possible.
  2. Keep I²C wires and the controller board as far away from HV wiring as possible.
  3. Use shielded wire for the I²C, connect shield to earth on both ends, if possible. If you don't have earth available, connect shield on the controller side to ground.
  4. Put an EMC shield (a sheet of metal connected to earth, preferably, connected to ground if no earth is available) between the controller and the high voltage side.
  5. Try adding a 1000 µF capacitor across the controller's power supply to stabilize the voltage.
In case this doesn't help, try restarting the I²C communication within your control loop in software.
 

dacair

Sep 4, 2024
15
Joined
Sep 4, 2024
Messages
15
Thanks Harald,:DI thought if I use a shielded cable (USB cables easily available ) would be enough. It seems it wasn't.

I can make two casings one for the controller and another for the HV.
The HV box I can take care to be well earthed and have the walls shielded.
Use a good quality shielded cable for the BMP180.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,315
Joined
Nov 17, 2011
Messages
14,315
if I use a shielded cable (USB cables easily available ) would be enough. It seems it wasn't.
The effectivity of a shielded cable depends on many factors. Among them are
- the quality of the shield
- the properties of the external disturbance (frequency, intensity, ...)
- the connection of the shield (to gnd, to earth, on both sides or single sided only)
When you search for these factors, you'll probably find as many opinions as there are experts :)
Sometimes it takes some experimenting to find the optimal soution for a given setup.

Also note that shielding is only on part of the possible solution. Others include
- stable power supply
- low impedance ground connection between controller, sensor and hv driver. Possibly using a star point (the exampel in the link is for pcbs, but is also applicable to wired ground) with the star point being at the power supply.
- reducing the impedance of the I²C connection by using the minimum possible pull-up resistors.

As a last resort you can isolate the I²C connection. Suitable chips are available from various manufacturers.
 

danadak

Feb 19, 2021
1,104
Joined
Feb 19, 2021
Messages
1,104
Do you have pullups on I2C lines ?



Working with a polled BMP/E280 sensors I found I had to gate the power
to its Vcc pin and restart it periodically to get stable consistent readings.
You have to give it some time to do its internal startup. Just a thought.

Also bypass caps, polymer Tant best for bulk. Look at your supply with a scope
set to edge trigger, say 100 mV, AC coupled, infinite persistence for display,
time/div 10 uS or so, and examine how much pk-pk noise you are getting on
supply line. Can be an eye opener....

1793876417935.png

OSCON is polymer Tatnt.
 
Last edited:
Top