40KHz Audio Spike from Light? Or something in ceiling?

James Newton wrote 07/20/2019 at 18:42 0 points

So I was teaching this class for UCSD Extension / Sally Ride Science Junior Academy and decided to use a PING sensor with the little robot platform.
https://github.com/JamesNewton/AdvancedRoboticsWithJavascript/wiki#week-4-day-1-the-bot

It all worked perfect at the house, but at the classroom, all of them returned nothing but 2cm. Even if only one was turned on, so it wasn't interference between units. Alex at Addicore.com was kind enough to lend me an audio spectrum analyzer and with that I found a very sharp spike at 40KHz apparently coming from the light. "Ok, it's the ballast or switcher for LEDs or something, it will go away if we turn off the lights" Nope. With lights off, NO change at all. "Ok, I'll use it as a teachable moment" Nope. During the presentation to the students, /it freaking disappeared/ (!!!) It did some back around the end of the class. While it was gone, our bots could return distance correctly, when it came back, they would all show 2cm. Here's a picture of it:
https://photos.app.goo.gl/6KxmLdzd4yzSsvef8
Any ideas what would produce that spike? Or what could be done to avoid it screwing things up?