This project show how to use a Joystick with two axis to control speed of two big brushed motors to make cars, toys, robot... without any coding. Just wiring and play.
Concept- Control speed of two motors to make the car, tank...going forward, backward, turn left, turn right...
- Use a Joysticks with two axis to make a input for driver.
I use a strong Smart dual H bridge motor driver CCS_2xSHB50A to control two big brushed motors. The driver ready support analog bi-direction (Analog from Joysticks) and also support mixed mode (work as tank) So I can connect a driver direct with a Joysticks without any extension hardware.
Using a battery or power supply from 10V-30V to supply for the CCS_2xSHB50A, it is depend on your motor specification. The driver CCS_2xSHB50A also supply 5V, 200mA out. So we can use it to supply for Joysticks module.
Connection (Please see the schematic for more detail):- Connect two motors to the driver (CCS_2xSHB50A)
- Connect 5V, GND from driver to 5V, GND of Joysticks module to supply the power for Joysticks module.
- Connect two signals : driver's ana1 to Joystick's VRX, driver's Ana2 to Joystick's VRY.
- Final connect a Power supply 10V-30V to Driver (GND <-> VB-, Power+ connect to VB+). Note: Please make sure to correct the polarity of the power supply
- Set driver's to mode5 (Joystick Mixed Mode)
I use a Switching Power to supply the power for the driver. When I test with two big motors. I see my power supply will turn off when the Motor brake or stop. I discover that the motor will as a generator to generate the energy to power line and that energy will make over voltage in my power supply so my power supply protected.
Fixed: Lucky! after some time looking, I see the driver has Voltage Clamp Feature, that is exactly I need now. Seem this problem is just seeing in the Switching Power supply. The issues solved after I connect a power resister 1 Ohm, 25W to the driver. So please keep in mine that "the motor will generator when it is off or brake"
Thanks for your reading. Hope some my sharing will help some one. Have great day!
Comments