Notifications
Clear all

Grounding mystery

11 Posts
3 Users
0 Reactions
102 Views
(@winddance)
Member
Joined: 5 years ago
Posts: 9
Topic starter  

I have a setup for controlling a stepper motor with a TB6600 power supply and a joystick to control direction.

Everything had been working as planned for many months as I tweaked the setup. The other day it quit working. I tried everything I could think of to solve this but no luck. I decided to start over from scratch and try to identify the problem. My first thought was my Arduino died. So I got a brand new one, original arduino not a knock off, and that didn't solve the problem. Here's where it gets weird. While playing around, it suddenly sprung back to life. I discovered that if I touch the back of the arduino with my finger, it works. As soon as I let go it stops. So I started searching for a reason why and all things point to a grounding issue. (which is strange as everything was working fine and then just stopped). The joystick, tb6600 and arduino are all connected to ground pins on the arduino. I've tried every combination of I can think off including grounding everything to the power terminal on the tb6600, changing the joystick, undoing and redoing all connections. It still only works when I touch the back side of the arduino on the digital side only. I've tried sitting on a  plastic chair and lifting my feet off the ground and it still works as long as I touch the backside if the arduino. I'm perplexed. 

Cheers

Lawrence


   
Quote
(@winddance)
Member
Joined: 5 years ago
Posts: 9
Topic starter  

@robotbuilder Thanks for the reply. I will once again redo all the wires from the tb6600. I'll let you know if anything changes.

Cheers

 


   
ReplyQuote
(@winddance)
Member
Joined: 5 years ago
Posts: 9
Topic starter  

I redid all the tb6600 connections but nothing changed. I made a video of this strange behavior. In it you will see, the stepper doesn't move in the beginning when I move the joystick.  When I place my finger underneath the digital pins and thumb on the top to apply a bit of pressure, it works. when I remove my finger it stops working. Any ideas?

 


   
ReplyQuote
(@winddance)
Member
Joined: 5 years ago
Posts: 9
Topic starter  

Here's the rest of the video where I remove my finger from the backside. (the forum only allows 10mb attachment

size)


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 6 years ago
Posts: 2330
 

@winddance 

I redid all the tb6600 connections but nothing changed.

I was thinking maybe something changed in the tb6600 internals (lost earth or something) which was restored via the Arduino being earthed?

Does touching the earth on the tb6600 do anything?


   
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1959
 

Hi @winddance,

   Cases like this are always tricky, but I'll make a suggestion as to what might be happening.

   The skin on your fingers is partially conductive ... the resistance can vary over a wide range, and depends on lots of things, like surface moisture, etc., but a value of 20 kOhms would be typical.

When you touch the back side of the PCB, you will typically be touching several different points, effectively interconnecting them with "resistors" of (say) 20 kOhms.

-------------

Hence, a possibility is that you are touching both a GPIO input pin of the Arduino processor and a Vdd pin, pullling the input pin to near Vdd voltage.

There are many other possibilities, such as a GPIO input pin and a Gnd pin, pulling the input pin to near Gnd potential.

In many cases, this effect will not make any difference to a working programme/system, but occasionally it will disturb the status quo, such that a working system works, or vice-versa.

Sometimes, this situation occurs with a switch, that is intended to set an input to Vdd, when the switch is set one way (say pushed), and Gnd when it is the other way (say released). This situation may be created using a pull-up resistor, to pull the pin high when the switch is open, and low, when the switch closes, connecting to Gnd.

(Some designers use a resistor to pull-down, and the switch connects to Vdd when closed. The same problem can arise, but the high and low states are reversed, etc.)

A 'common' mistake with a situation like this, is to fail to connect the resistor. Under some circumstances, the pin may naturally float high, or be pulled high by internal pull-up resistors, but the internal pull-up resistors are usually too high for reliable operation with external switches.

Of course, although I have seen several situations like this, it is only conjecture that it applies in your case.

--------------

To diagnose such a situation, try to be more specific which pins you are touching, to try to identify a circuit change caused by touching.

------------

Alternatively, add print statements (to system monitor, assuming you are using Arduino IDE), reporting each pin input, and look for a pin that changes state when the PCB is touched.

----------

Sorry, this is a bit of a ramble, but hopefully it will help you diagnose your issue. If anything is unclear, pleas e ask.

Good luck!!  Best wishes, Dave


   
ReplyQuote
(@winddance)
Member
Joined: 5 years ago
Posts: 9
Topic starter  

@davee Thanks Dave. I've discovered one more clue (perhaps). I have to press my finger quite hard against the bottom of the row of pins. In order to do that i have to place my thumb on top of the board. When I do that my thumb comes into contact with the VCC and MOSI pins on the ICSP connection. Having realised this, I now see that it works when my thumb touches these pins and stops when I move my thumb off while still maintaining pressure on my finger on the back side. One more strange thing is when I move my finger off those posts, the stepper will still work, but only in the direction and only until I release the joystick. Then it stops completely. If I retouch those pins it works again. 

I hope this helps.

Cheers

Lawrence


   
ReplyQuote
(@winddance)
Member
Joined: 5 years ago
Posts: 9
Topic starter  

Touching the VCC + MOSI pins without my finger on the back doesn't work by itself


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 6 years ago
Posts: 2330
 

@winddance 

If you have checked the wiring for shorts or incorrect connections then it must involve the driver?

That it worked and then stopped makes me wonder what changed? Something happen within the driver? You really need another driver to see if that is where the problem is.

I wondered about a common earth problem being solved when you touch certain parts of the Arduino board. There has to be a return somewhere is that via the negative driving signals EN- DIR- PUL-

Although I couldn't see any common earth connections in example circuits using an Arduino and the driver they do write about it and show such a configuration here.

https://dfimg.dfrobot.com/nobody/wiki/0bcc0b661ce7750ff7d0134bfc3e88b3.pdf

"You need to connect ALL input signals, i.e. all [-] have to go to Arduino GND, otherwise it won't work. Reason is the internal optocoupplers do not share any common input pins, so just connecting the <+>signals and one [-] pin won't work.

You need to connect ALL input signals, i.e. all [-] have to go to Arduino GND, otherwise it won't work. Reason is the internal optocoupplers do not share any common input pins, so just connecting the <+>signals and one [-] pin won't work.
reply from the query,
Yes you r correct, problem solved by wiring all - to arduino ground"

Did you try @davee suggestion? " Alternatively, add print statements (to system monitor, assuming you are using Arduino IDE), reporting each pin input, and look for a pin that changes state when the PCB is touched."

Use your multimeter maybe to check changes in the three connections when you touch and don't touch the Arduino?

 

This post was modified 1 week ago 5 times by robotBuilder

   
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1959
 

Hi @winddance,

   It sounds like your finger maybe acting as a pull-up to the MOSI pin, and any pins of other chips, etc. that is connected to the MOSI pin, although I am not sure what  "Touching the VCC + MOSI pins without my finger on the back doesn't work by itself" is implying.

At this point, I would look at both your circuit, to find out what is connected to the MOSI pin, and also to the software, suspecting something like the MOSI pin has not been correctly set up as an output pin that drives both high and low, as required.

(An oscilloscope could be really handy at this point, but I assume you do not have one.)

At this point, I am not clear if it is a hardware or software fault, as I can imagine ways either software or hardware, could cause fairly similar symptoms, albeit in very different ways.

For a start, let's 'imagine' it is a hardware fault. Could you please provide a sketch of your circuit, so that I have a better idea of your precise circuit?

Also, to try to understand what "Touching the VCC + MOSI pins without my finger on the back doesn't work by itself" is implying, please be more specific about the difference between 'working' and 'non-working' cases, in which you are maintaining contact with VCC + MOSI pins. Is it because you need to press quite hard, or are you also touching another electrical point, possibly with the other hand? Or maybe something else you are doing differently?

Sorry, this is a bit more random searching for clues, but whilst I expect we will search a few blind alleys, hopefully we are gradually making progress.

Best wishes, Dave


   
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1959
 

Hi @winddance Lawrence,

   As I mentioned, I would like to know your wiring, as I can't visualise why the MOSI pin should have any effect.

In particular, do you have anything that should be wired to the MOSI pin?

Alternatively, do you have any software that refers to that pin, possibly as GPIO input, rather than in the MOSI role?

Best wishes, Dave


   
ReplyQuote