2x Tunderborg + 2x stepper

I wish to control two steppers, and so have two Tunderborg's.
I'm powering my Pi Zero with one them, and have the 2nd connected to the 1st.
Now the described method of finding the addresses would not work.
So, should I do so with the Pi on it's own power and have the Tunderborgs powered each one by one when discovering?
Or, am I supposed to better use 2x 6 GPIO's of the Pi?

piborg's picture

Before connecting both you need to set the addresses in both boards separately. I would suggest the following sequence:

  1. Disconnect everything and make sure the Pi Zero is powered off
  2. Attach the first ThunderBorg directly to the Pi Zero
  3. Power the Pi Zero
  4. Open a terminal and load Python:
    cd ~/thunderborg
    python
  5. Set the address for the first board, 10 for example:
    import ThunderBorg
    ThunderBorg.SetNewAddress(10)
  6. Power the Pi Zero down and disconnect the first ThunderBorg
  7. Attach the second ThunderBorg directly to the Pi Zero
  8. Power the Pi Zero again
  9. Open a terminal and load Python:
    cd ~/thunderborg
    python
  10. Set the address for the second board, 11 for example:
    import ThunderBorg
    ThunderBorg.SetNewAddress(11)
  11. Power the Pi Zero down and disconnect the second ThunderBorg
  12. Now connect the first ThunderBorg to the Pi Zero, and the second ThunderBorg to the first one
  13. Power the Pi Zero again
  14. Open a terminal and load Python:
    cd ~/thunderborg
    python
  15. Run this in Python to check both boards can be seen:
    import ThunderBorg
    print ThunderBorg.ScanForThunderBorg()

If everything has worked you should see the two addresses chosen at the end of the last step, e.g:

[10 11]

Remember that the ThunderBorg must be attached to the first 6 pins of the GPIO header:

Also the male and female 6-pin connections on the ThunderBorg are swapped:

If possible this is our recommended layout for connecting multiple ThunderBorgs to a single Pi Zero:

Hi,

At first approach I didn't it imagine it would work like this, but after simply following the step-by-step instructions it does work.
So, I'm now able to operate each engine separately.

Thanks.

Hi! Should I use a separate power supply for each thunderborg?

piborg's picture

If your power supply can handle the load when powering motors on both ThunderBorgs at once then they can happily be both connected in parallel to the same supply.

If the supply is not powerful enough then you will need two separate supplies instead.

Hi again,

I will provide you with all the info.

The two stepper motors are 1.5A each and I am connecting everything to Raspberry PI 3 B+. You can find full specs of motors in the image provided.

Can you tell me the optimal power supply needed? Batteries are not an option so DC only. I don't care about the number of the power supplies although the less the better. Ideally one for thunderborgs and a separate one for raspberry. But I would like you to provide me with a sketch of cable connections, please. :) Sorry i am programmer but noob in electronics.

Thank you!

Images: 
piborg's picture

If you find a supply which is 7V or higher and rated for 5A or more then you should be able to wire the supply to both ThunderBorgs in parallel and control everything from a single supply.

If wiring them in parallel the easiest way I have found is to run a pair of cables from the supply + and - to V+ and GND on the first ThunderBorg, then a second pair between the two ThunderBorgs (V+ to V+, GND to GND). See diagram at the bottom of the post.

It is possible to power the Raspberry Pi separately, but the wiring is much simpler if it is powered via the 5V from the ThunderBorgs.

You will want to limit the voltage output to the steppers on both ThunderBorgs to prevent them from overheating. The output power can be calculated from the motor specifications and the voltage of the power supply used.

If you are using the tbStepper.py example then the values you need to change will be maxPower and holdingPower.

First you want to set maxPower based on this equation:

maxPower = ( Resistance Ω × Current A ) ÷ Supply V

For example with your stepper and a 12 V supply this would be:

maxPower = ( 3.8 Ω × 1.5 A ) ÷ 12 V
maxPower = 0.475

For holdingPower you want to be lower than maxPower, you only need enough to hold the motor still. I generally go for half the value of maxPower. If you do not need any power applied when the steppers are not moving you can set holdingPower to 0 to reduce the power usage :)

Images: 

You, sir, deserve a medal! Thank you very much! I picked a 12V 6.25A power supply. I will get back to you on the results.
Quick question: I am using a TriBorg to extend raspberry. Is it OK to use the rest 5V pins for powering sensors if I am also using it to power raspberry from thunderborg?

piborg's picture

Generally speaking you should be able to add sensors to the 5V pins on the GPIO as long as they do not use too much power.

Since you have two ThunderBorgs each with a 1.5A DC/DC powering the 5V lines there should be plenty of spare power in most cases :)

Subscribe to Comments for "2x Tunderborg + 2x stepper"