Electrical Setup
Wiring
Note
We do not give any safety warranties on the electrical wiring. All experiments and reproductions of our testbench are at your own risk.
The wiring diagram below shows how the double pendulum testbench is set up. A main PC is connected to a motor controller board (CubeMars_AK_V1.1) mounted on the actuator (AK80-6 from T-Motor). The communication takes place on a CAN bus with a maximum signal frequency of 1Mbit/sec with the ‘classical’ CAN protocol. Furthermore, a USB to CAN interface is needed, if the main pc doesn’t have a PCI CAN card. Two different devices are used in our setup: the R-LINK module from T-Motor and the PCAN-USB adapter from PEAK systems. The former has CAN and UART connectors at the output, but only works with Windows. The latter only features CAN connection, but also works with Linux. The UART connector of the R-LINK module is useful to configure and calibrate the AK80-6.
The actuator requires an input voltage of

Fig. 1: actuator = AK80-6, controller board = CubeMars_AK_V1.1, power supply = EA-PS 9032-40, capacitor = 10x 2.7V-400F cells connected in series, USB-CAN interfaces = R-LINK module and PCAN-USB adapter.
Steps for setting up the wiring
For setting up the CAN and power connections follow these steps:
Connect the emergency stop power cables to the power supply
Connect the capacitor in parallel to the power supply
Connect the emergency switch with power cables to the motors
Use the CAN cable to connect the motors with the CAN USB interface
Connect the CAN USB interface with the PC via USB
Note
Make sure that no cables hang in range of the motion of the double pendulum!
backEMF
The reverse current resulting from switching motor speeds from high to low is called backEMF (Electro Magnetic Force). When the motor speed decreases the motor works as a generator, which converts mechanical energy into electrical energy and hence the additional current needs some path to flow. The energy recycled back into the input power supply causes a voltage spike and potential risk. It is necessary to add enough input capacitance to absorb this energy. A sufficiently large input capacitance is important in the desgin of the electric curcuit. It is beneficial to have more bulk capacitance, but the disadvantages are increased cost and physical size.
If the power source were a perfect battery, then energy would flow back into the battery and be recycled. However, in our case the power source is a DC power supply. Especially power supplies with an inverse-polarity protection diode can only source current and cannot sink current, hence the only place the energy can go is into the bulk capacitor. The amount of energy stored in the bulk capacitor can be calculated with
where
where
External load
Capacitance of the power supply to source current
Motor braking method, output short brake or current polarity reversing brake.
Amount of parasitic inductance between power supply and motor system, which limits the current change rate from the power supply. The larger the input capacitance, the more stable the motor voltage and higher current can be quickly supplied.
The maximum supply voltage limit and acceptable voltage ripples
If the used capacitor is too small for your specific apllication it
introduces the risk of burning the capacitor. The voltage rating for the
bulk capacitors should be higher than the typical operating voltage and
provide some safty margin. In our case we supply the AK80-6 with