I recently upgraded my 4-wheel autonomous wall-following robot from a Mega2560 main controller to a Teensy 3.5, and managed to (I think) kill a T3.5 after repeatedly connecting/disconnecting the battery charging probe to the robot. The probe is a simple 2.1/2.5 mm plug that fits into a mating jack with a contact that gets lifted away from the power supply minus when the probe is engaged. I use this line to tell the Teensy when the charger gets connected (so I can stop the motors and monitor the charge, etc). The PS is always active, so there is no issue with PS rise times.
I had gotten the robot built up to the point of testing the charger functions when I started noticing that the T3.5 was rebooting each time I connected the charger. Then I noticed I didn't have to actually connect the charger - all I had to do was touch the probe sleeve to the inside of the jack (so only the minus of the supply was connected to the minus side of the robot power system) to cause the reboot. Then I noticed the teensy power draw had increase from about 300mA to about 600mA and things on the board were getting a bit warm, and after that the Teensy became intermittently unusable.
I looked at the power supply (MeanWell GST60A12-P1J DC-DC 120VAC/12VDC) output. It's output looks very clean as would be expected. However, when I looked at either output of the PS with respect to the minus side of my robot power system, I saw what looks like a 60Hz 110VAC waveform - yikes! After some thought I realized this was because the two power systems (robot and MeanWell PS) are totally separate and do not have a common reference, so what I'm measuring (I think) is just the 110AC 60Hz that is everywhere in space. If I measure the robot minus side with respect to the PS minus (or plus) side, I still get some 60Hz signal, but only a few volts P-P, probably due to the fact that my robot is housed in an aluminum chassis and has fairly short circuit runs. Of course, when I connect the charger to the robot, the two minus sides are physically connected, so all is wonderful again, EXCEPT there seems to be something like an ESD event just as the two systems come in contact, and it is this event that seems to be causing problems.
Here's the schematicView attachment 26775
And some photos of the layout
View attachment 26776
View attachment 26778
View attachment 26777
And, of course, the full code is attached
I don't believe the code is really relevant here, except for the setup() function and the IsChargerConnected() function. This same MeanWell PS has been charging my previous robot (everything basically the same except with a Mega2560 instead of a T3.5) literally for years with no problems, with the same method for detecting charger connect/disconnect.
I am beginning to suspect that the charger connect/disconnect line, connected to a digital input on the T3.5 with INPUT_PULLUP specified, may be transmitting something like an ESD pulse to the T3.5 when the PS probe first touches the charger input jack, and because it is set up as an input, it is at high impedance. I was thinking that I might change the code to make this line an output with a LOW output, and only change it to an input when I want to actually check for a connection. Also, I was thinking that it might be advisable to add a series RC filter on this line, or even a resistor across the normally-shorted pins that would become a voltage divider with the T3.5 pullup resistor, but with a value that would still allow for a HIGH detection when the pin was changed from output to input_pullup. I looked at the M4 documentation for the pullup resistor values, but couldn't find them, so I'm at a loss there.
I would appreciate any ideas or thoughts regarding this issue. I'd like not to burn up too many more T3.5's before figuring this out, if at all possible. Also, before anyone starts laughing too hard at this setup, please understand this robot operates only indoors in an air-conditioned environment, and this same setup has been running for years without any problems. I only decided to upgrade to achieve a better wheel-turning geometry, and decided to upgrade the main controller from a Mega 2560 to a T3.5 at the same time.
TIA,
Frank
For all the gory details, you can see my blog post here.View attachment T35_WallE3_V3.ino
I had gotten the robot built up to the point of testing the charger functions when I started noticing that the T3.5 was rebooting each time I connected the charger. Then I noticed I didn't have to actually connect the charger - all I had to do was touch the probe sleeve to the inside of the jack (so only the minus of the supply was connected to the minus side of the robot power system) to cause the reboot. Then I noticed the teensy power draw had increase from about 300mA to about 600mA and things on the board were getting a bit warm, and after that the Teensy became intermittently unusable.
I looked at the power supply (MeanWell GST60A12-P1J DC-DC 120VAC/12VDC) output. It's output looks very clean as would be expected. However, when I looked at either output of the PS with respect to the minus side of my robot power system, I saw what looks like a 60Hz 110VAC waveform - yikes! After some thought I realized this was because the two power systems (robot and MeanWell PS) are totally separate and do not have a common reference, so what I'm measuring (I think) is just the 110AC 60Hz that is everywhere in space. If I measure the robot minus side with respect to the PS minus (or plus) side, I still get some 60Hz signal, but only a few volts P-P, probably due to the fact that my robot is housed in an aluminum chassis and has fairly short circuit runs. Of course, when I connect the charger to the robot, the two minus sides are physically connected, so all is wonderful again, EXCEPT there seems to be something like an ESD event just as the two systems come in contact, and it is this event that seems to be causing problems.
Here's the schematicView attachment 26775
And some photos of the layout
View attachment 26776
View attachment 26778
View attachment 26777
And, of course, the full code is attached
I don't believe the code is really relevant here, except for the setup() function and the IsChargerConnected() function. This same MeanWell PS has been charging my previous robot (everything basically the same except with a Mega2560 instead of a T3.5) literally for years with no problems, with the same method for detecting charger connect/disconnect.
I am beginning to suspect that the charger connect/disconnect line, connected to a digital input on the T3.5 with INPUT_PULLUP specified, may be transmitting something like an ESD pulse to the T3.5 when the PS probe first touches the charger input jack, and because it is set up as an input, it is at high impedance. I was thinking that I might change the code to make this line an output with a LOW output, and only change it to an input when I want to actually check for a connection. Also, I was thinking that it might be advisable to add a series RC filter on this line, or even a resistor across the normally-shorted pins that would become a voltage divider with the T3.5 pullup resistor, but with a value that would still allow for a HIGH detection when the pin was changed from output to input_pullup. I looked at the M4 documentation for the pullup resistor values, but couldn't find them, so I'm at a loss there.
I would appreciate any ideas or thoughts regarding this issue. I'd like not to burn up too many more T3.5's before figuring this out, if at all possible. Also, before anyone starts laughing too hard at this setup, please understand this robot operates only indoors in an air-conditioned environment, and this same setup has been running for years without any problems. I only decided to upgrade to achieve a better wheel-turning geometry, and decided to upgrade the main controller from a Mega 2560 to a T3.5 at the same time.
TIA,
Frank
For all the gory details, you can see my blog post here.View attachment T35_WallE3_V3.ino