Connecting Multiple Motors
Forums:
Multiple Motors were not found using "ThunderBorg.ScanForThunderBorg"
Hello ThunderBorg,
I recently purchased two "ThunderBorg - Dual 5A Motor Controller with DC/DC & RGB LED".
I ran the example with the GUI screen and sliders, the motors and LEDs worked for both boards, no problems.
Then I followed the instructions exactly as stated in (Under "Multiple Boards"):
https://www.piborg.org/blog/thunderborg-getting-started
I ran exactly for the first board:
ThunderBorg.SetNewAddress(10)
And then used for the second board:
ThunderBorg.SetNewAddress(11)
I then connected them in parallel and ran:
print ThunderBorg.ScanForThunderBorg()
It printed out that it found 1 ThungerBorg:
[10]
The raspberry pi was directly connected to [10] and the [11] board was not found at all. So I decided to move the raspberry pi connections over to the other board, it found [11], but not [10].
I also tried the example GUI with sliders again, there was no response to ether board, however the LED was on and nothing seemed hot or drawing more power than before (I was monitoring power). Voltage was 12 V in, amperage was limited to 4.5 Amps peak (often under an amp for testing, never peaked). I supplied power to both boards independently. Other than that, a raspberry pi was hooked up and running off the power that the ThunderBorg provided.
Please help me figure out what is wrong with the boards. I followed the setup instructions exactly, so I do not know why it did not work.
Thanks,
Chris
piborg
Fri, 09/14/2018 - 19:50
Permalink
Daisy-chain connection not working
It sounds like the connections between the two ThunderBorgs are to blame since both boards work fine directly connected.
What cables have you used to connect the two ThunderBorgs? Some photos of the connections would be helpful.
The examples will need to be changed slightly to get them to control the boards as they talk to the default I2C address. For example to update the GUI open the
tbGui.py
script in a text editor and look for this line:if you change it to
then the GUI will now control the motors attached to that ThunderBorg.
cryptoscientia
Mon, 09/17/2018 - 16:02
Permalink
Daisy-chain not working
So I have taken some images (attached here) and have also checked and rechecked the wiring. I also did as advised above, the motors worked on individual boards, but again, not daisy chained. I did not want to pull off the boards and inspect them but will if advised.
I have also tried 2 sets of wires on this, still no daisy chained functionality.
piborg
Mon, 09/17/2018 - 22:37
Permalink
Things to try
I am not entirely sure what the problem actually is in this case. The wiring looks correct and based on your experiments both boards seem to be functioning correctly on their own.
Given that the problem only occurs with the daisy-chained board it is very likely a wiring or power related problem. In both cases the I2C signals can become "noisy" and the second board fails to understand them correctly.
Based on past experience these are my suggestions on what to try next:
It would also help to know what result you get from running this command with both ThunderBorgs connected:
sudo i2cdetect -y 1
cryptoscientia
Tue, 09/18/2018 - 16:24
Permalink
Daisy-chain now working!
So I started going through your suggestions, I shortened the wires by about an inch, no change, I then wrapped it in a tinfoil shield, then it started working!
I do find that a little odd that there would be that much influenced by the Pi but I must assume there was. Thank you for your help and suggestions.
piborg
Wed, 09/19/2018 - 16:51
Permalink
Great news
Glad to hear you have solved the problem :)
It is fairly unlikely that the Pi was the problem, I suspect that the connections were picking up noise from the PSU or another nearby source.
Basically long wires tend to act like radio antennas, causing them to pickup any noisy electrical signals to some extent. Generally longer wires pick up more of this noise, which is why only the second ThunderBorg was affected.
We have seen this kind of problem on robots where the motors actually cause this kind of noise, especially with high speed motors.
kato
Wed, 11/07/2018 - 04:15
Permalink
It does not move
I executed the program but can not turn.Is there a way to incluse the output?
piborg
Wed, 11/07/2018 - 08:57
Permalink
Changing the power settings
Most of our examples have power settings in the script itself:
The first thing to check is that the two settings match the voltages for the motors and the battery pack you are using.
You can increase the output by making
voltageOut
larger. IfvoltageOut
is larger thanvoltageIn
then the actual power output will be the full power of the batteries.The other thing to check is that your batteries are fully charged. Flat batteries will also have reduced power.