Looking for an anti ESD solution for SPI/I2C

Hello all,

I have developed a ballbot, which is essentially a robot balancing on a ball using omni wheels.

Here's a fun picture:
https://drive.google.com/file/d/1-ln0lR6SKySvBJpT8dcFg4hfBq3J3Xl9/view

As you can see the robot is completely separated from the physical ground. What is worse is that the rubber on the wheels against the rubber ball build up a lot of static potential and, when touching the robot (as you tend to need to do when teaching a mechanical object to balance) there is a release of ESD.

The fun thing is that the only evidence of the ESD is that the IMU stops responding (yeah this is bad on a balancing robot). This phenomenon is consistent with both SPI and I2C sensors and trust me, I've been through a lot of them, until I narrowed it down to ESD.

You ask... how am I sure this is caused by ESD? Great question, because I noticed (by accident) that when the ball pressure got low, the metal on the bottom of the frame rubbed against the ball and the issue went away. The issue also never happens when the arduino is connected to a computer via USB.

For clarity, the ESD is running up the motors/encoders, which share a common ground to the speed controllers, which somehow is sending that up into the arduino. Actually the encoders are directly connected to the arduino (hmm). From there the sensors share the common arduino ground. God how I wish the arduino had an isolated ground circuit.

So here's what I need help with.

  1. Yes, I AM going to implement a physical ground. Dangling a piece of metal ceiling fan chain through the center of the bot to touch the ball and grounding that to the motors will hopefully solve it.

  2. I would really like (for reasons of scientific curiosity and as a backup plan) to figure out how to solve this without a physical ground.

Here's what I know:

  • My latest IMU is SPI driven and through my logic analyzer I have determined that all signals just stop when the ESD event occurs.
  • Curiously though, even the master clock stops, which I wouldn't have expected if only the IMU was effected
  • The arduino is functioning and the loop is running after the ESD event. I proved this by hooking up a button and can control the built-in LED after the IMU stops.

So far I have capacitors across the VDD/GND on the SPI devices and 47r resistors on the lines. Which make no difference.

I am thinking of putting in a level shifter such as the TXB0104, but since the one pin that isn't buffered is the ground and i don't need to go up or down in voltage, I'm not exactly sure how this will help.

And, yes. I've spend days reading and searching for a solution on Google.

Thanks for any help or ideas.

Richard

Wash the rubber parts with dish washing detergent and let dry. Do not rinse off. The residue will be a high resistance material that will conduct the charge to allow it to balance out.

Paul

Fascinating. Thanks for the tip!

Consumer electronics sometimes uses 5.1volt zener diodes between 5volt data lines and ground (assuming 5volt logic).
Use them close to each chip if the data lines are long.
Leo..

That is a pretty amazing picture.........

Carbon fibre brush to discharge the static? They are used for old vinyl record playing, for instance.

MarkT:
Carbon fibre brush to discharge the static? They are used for old vinyl record playing, for instance.

Really interesting thought. I just learned more than I ever knew about static on LPs. The brushes look a bit too wide, but could be a great solution with modification. Thanks pointing me towards it.

Wawa:
Consumer electronics sometimes uses 5.1volt zener diodes between 5volt data lines and ground (assuming 5volt logic).
Use them close to each chip if the data lines are long.
Leo..

Thanks. I assume its the arduino that is really getting zapped up from the motors and encoders. Should I put one on every input and the imu?

If ESD, I'd expect you would feel an electrical shock (may be just a light prick if the charge isn't that high), and you have a fair chance of simply frying your electronics.

Are you sure this is not a case of reverse voltages from the motors as they switch, or a similar source of noise on the power supply to the Arduino? A (larger) decoupling cap on the Arduino power supply may help in that case, as would a separate power supply (such as your USB).

wvmarle:
If ESD, I'd expect you would feel an electrical shock (may be just a light prick if the charge isn't that high), and you have a fair chance of simply frying your electronics.

Are you sure this is not a case of reverse voltages from the motors as they switch, or a similar source of noise on the power supply to the Arduino? A (larger) decoupling cap on the Arduino power supply may help in that case, as would a separate power supply (such as your USB).

Thanks for the response. While I'm not sure if it is ESD or not, I do have a 12v power regulator on the Arduino power (Arduino Due - but have the same issue with my mega 2560).

The other thing that ruled out motor noise for me is that it happens at very low motor power, essentially with the ballbot just hovering. If it happened at high speed, or certainly while trying to slow down, then I could see the back feed causing an issue.

Edit: I just re-read where you said switching. The issue is that it switches back and forth to balance rapidly and can do so for minutes on end and then mysteriously hang - any thoughts for troubleshooting that?

It also never happens when I'm not touching it, although it does happen while I'm touching it (not necessarily at the moment, but during handling).

It's all very frustrating.

I'm also pretty sure its not lose connections since I've completely rebuilt the thing, new arduino, new IMU, all hard wired etc and still the same issue.

Not ruling anything out, just providing what I know to help narrow it down.

Any ESD build-up should be gone the moment you touch it (at least: you're then at the same potential as your device).

Another option to test for ESD is to connect only a ground wire to your computer or other large object (even holding the other end yourself may work - especially with high humidity - or connect the device to yourself through an anti-electrostatic bracelet), to remove any charge build-up.

But when you're handling the device, you may inadvertently restrain it in an unbalanced position making the motors work hard, current surges, voltage drops. Yes, that's also guessing. Interesting problem with a very interesting looking project.

Camen:
I do have a 12v power regulator on the Arduino power (Arduino Due - but have the same issue with my mega 2560).

12volt is borderline high for a 5volt board. 7volt has to be wasted as heat in the onboard regulator.
With 12volt on V-in or the DC socket, you can't draw a lot from any pin (<100mA total) without overheating the regulator.
Leo..

Wawa:
12volt is borderline high for a 5volt board. 7volt has to be wasted as heat in the onboard regulator.
With 12volt on V-in or the DC socket, you can't draw a lot from any pin (<100mA total) without overheating the regulator.
Leo..

The Arduino Due has a 7v to 12v input barrel plug. Are you saying that using 12v on that plug is still too high?

Forgot that the Due has a switching (buck) 5volt regulator, so it's safe for the Due.
The Mega however has a linear regulator, and will shut down if you draw more than 150mA from any pin combination (including the 5volt/3.3volt pins) with 12volt on the DC socket or V-in.

You can't just swap a Mega for a Due. A Mega uses 5volt logic and a Due uses 3.3volt logic.
Every sensor needs to be checked/converted to the right logic.
Leo..

Wawa:
Forgot that the Due has a switching (buck) 5volt regulator, so it's safe for the Due.
The Mega however has a linear regulator, and will shut down if you draw more than 150mA from any pin combination (including the 5volt/3.3volt pins) with 12volt on the DC socket or V-in.

You can't just swap a Mega for a Due. A Mega uses 5volt logic and a Due uses 3.3volt logic.
Every sensor needs to be checked/converted to the right logic.
Leo..

Yup, the entire project was re-wired for the new voltage and sensors, libraries were also reconfigured. Trust me, everything works great except for the IMU randomly stopping when I touch the robot after it's been balancing for a while.

Camen:
The Arduino Due has a 7v to 12v input barrel plug. Are you saying that using 12v on that plug is still too high?

Too high... well, that's a bit strongly stated, but in all (semi)permanent installations I'd want to use a proper power supply and directly supply the voltage the board needs - i.e. 5V for a Mega, 3.3V for a Due, connected to the Vcc pin. The ability to use a 7-12V supply is mostly for prototyping, and to make the Arduino platform more robust for beginners.

Your Due must drop 12V to 3.3V, that's 8.7V to (quite literally) burn off. The regulator can dissipate no more than about 700 mW, allowing you about 80 mA of current without overheating and shutting off.

A buck converter will offer a much more stable 3.3V resp. 5V supply while producing no significant heat.

wvmarle:
Too high... well, that's a bit strongly stated, but in all (semi)permanent installations I'd want to use a proper power supply and directly supply the voltage the board needs - i.e. 5V for a Mega, 3.3V for a Due, connected to the Vcc pin. The ability to use a 7-12V supply is mostly for prototyping, and to make the Arduino platform more robust for beginners.

Your Due must drop 12V to 3.3V, that's 8.7V to (quite literally) burn off. The regulator can dissipate no more than about 700 mW, allowing you about 80 mA of current without overheating and shutting off.

A buck converter will offer a much more stable 3.3V resp. 5V supply while producing no significant heat.

Thanks for the info. I'll turn my voltage regulator down to 3.3 and connect to vcc instead.

Don't do that for the Due.

The Due already HAS a buck converter between V-in and 5volt, and then drops it to 3.3volt for the processor with a linear regulator. Other circuits on the Due board might depend on that 5volt rail.

So 12volt on V-in is ok for a Due.
For a Mega it would be better to supply 5volt to the 5volt pin.
Leo..

Thanks for the correction. Didn't know that about the Due.