robot lawnmower ROS

Testing Wheel Motors

So I made a small test drive to confirm that the motors and the roboclaw st 2x45a are working as they suppose to. The speed of the robot is quite slow now and running with 125mm wheels. On the Valify V2 robot 230mm wheels are going to be used.

Hardware that was used in this test:
1X roboclaw st 2x45a (Info here)
2X DC Planetary Geared Motor 24 Volt with HallIC 30-33 RPM 8mm shaft (Info here)
1X DS4 Controller.
1X Jetson tx2
1X 22.2v lipo battery

Motor specifications:Rated voltage: 24 volts
Rated speed: approx. 30-33 rpm
Nominal torque: 2.5 Nm
Length with shaft about 15.5 cm
Diameter: approx. 4.5 cm
Axle: 8mm

So after hooking up the Roboclaw to my mac with USB I needed to install Ion Studio Setup App. (this software was only available for Windows). So I needed to run it with a virtual PC. This software can be used to configure the Roboclaw board with simplicity.  I could control the motors without any problems, but I could not get the encoders to work properly. After some investigations and it seems this is a quite common problem with Hall effect encoders.

So after some further investigation I found a working solution, a Pull-Up resistor.

Typical open collector encoder output.
Typical open collector encoder output. Image credit: Dynapar Corp.

The basic function of a pull-up resistor is to ensure that when there is no input, a circuit takes on a default value. In other words, it sources current from the power supply to pull the voltage up to a specified value (typically the operating voltage) so that it can be read as a logic high signal. The output causes the voltage to drop to its low, or ground, state (0 V). This switching of the output pulses on and off creates a square wave.

Roboclaw and motors
Roboclaw and motors with test of Pull-Up resistor

After hooking up the Pull-Up resistors everything worked great. So I made some slightly smaller and better temporary Pull-Up resistors (this are not the final version) for the first concept.

Pull-Up Resistor
Pull-Up Resistor
Pull-Up Resistor connected
Pull-Up Resistor connected

To reduce electric noise on the motors (that could interfere with the rest of the system) and get a more clear square wave one can also solder 0.1UF ceramic capacitor across the terminals on the motors.

reduce electric noise
reduce electric noise

Getting Roboclaw to run on the Jetson @ubuntu 16.04 via USB. The Roboclaw is connected as ttyACM. I needed to build kernel and add the ttyACM module. I also added the Roboclaw in 99-usb-serial.rules so it always can be found as /dev/roboclaw.
Then I paired the DS4 over BT and installed package joy_teleop and it all worked

Ros test
Ros test

The robot will not use the DS4, but its a controller I had at home and good for testing purposes. So that´s it for now.

Motor sketch:

motor sketch
motor sketch
Motor sketch 2
Motor connections
motor info
motor informations

 

If you have any feedback. Just shoot me a comment.

raess

Chief Technology Officer with a demonstrated history of working in the internet industry. Skilled in Business Planning, Computer-Aided Design (CAD), Quality Process Development, and SolidWorks. Strong business development professional with a Higher Education Diploma with specialization in Mechanical Engineering focused in Product development from Blekinge Institute of Technology.

http://valify.se

Leave a Reply

Your email address will not be published. Required fields are marked *