Adventures with Patch #1

Designing Patch

Patch is a 4 wheeled robot, I want him to behave as a chat bot but also recognise people. Spot, one of my other robots cant do it as his camera is only 15 cm from the floor. I could try foot recognition, but I think not. So Patch’s camera has to be at least a meter from the ground. I originally conceived him as a dog, but in view of his long neck he became a giraffe.

Patch

The motors will be controlled by an Arduino. Patch’s primary sensors will be an oak-d stereo camera, a time of flight camera and a SEEED microphone array. He will also carry a loud speaker. These will all be controlled by a Pi4, though I suspect he may need 2 Pi’s. One dedicated to audio and another dedicated to video. He will communicate with the rest of his family (Spot and Ami) using ROS2 Humble.

I am following the series of tutorials published by Josh Newmans – https://articulatedrobotics.xyz/

I have previously followed him for help with ROS2 and Ami (my Nao), but now I have restarted the whole series as he details how to physically make the robot.

Power

I have chosen to power Patch using 3 x 16850 batteries. They will give a nominal voltage of 11.1v I will use a 3 Cell 18650 BMS Module to control my 3 18650s. This has continuous discharge of 8A, but a 10A peak discharge. The motors I have chosen have a current rating of 0.68A (but a stall current of 2A) , and following from Josh’s post I calculate all the electronics will come in at less than 5A. So the current draw from my battery pack should be about 8A when everything is running. Just inside the limit. Though if all the motors stall at once I will be in trouble. To guard against that I will install a 10A fuse in the power circuit.

I will house the 3 batteries in individual battery holders, wired up as in the diagram. This module charges and discharges through the GND and PWR wires. To charge it needs a continuous 12.6V . I plan to charge the batteries on the robot so I will use a Sparkfun Constant Current Power Supply – 12.6V 10A. The DC power will be supplied to that by a 12V 2A plug pack.

I will use a DFRobot DC-DC Power Module 25W to convert the 11.1V out of the battery pack to a stable 5V supply to power the Arduino, Cameras, and Pi. This has a rated power of 25W, so 5A at 5V should be OK.

Motors

I have chosen a geared 12V DC motor. It is rated at 9 kg.cm torque, 45RPM. Drawing 0.68A at 12V. Though I will be supplying 11.1V I am hoping that will be sufficient torque. The wheels I have are 6cm radius. The general consensus about the torque required for a 2 powered wheel robot is that one of the motors should be able to lift the robot. I estimate Patch will weigh in at 3kg. According to that rule of thumb my motors should be 3 x 6 = 18 kg.cm. But I have 4 of them! So I think my 9 kg.cm torque should be fine.

The circumference of the wheels is about 38cm, so at 45 RPM he will not move 1.7 m/min, not very fast I am hoping this will not be a problem as to use higher power motors will demand a higher rated battery and controller.

The motors will be supported by the Pololu Stamped Aluminium L-Bracket Pair for 37D mm Metal Gearmotors. These should, in theory fit the holes in the motors.

The wheels will be attached to the motor ‘D’ shaft using 1309 Series Sonic Hubs.

To control the motors I am planning to use two DFRobot 2A dual motor controllers. This is based on the L298N chip. The maximum rating is 2A per motor. So I have a little capacity to spare if the motors are not big enough.

Control

To control the motors I plan to use an Arduino uno that I have already. The plan is for the Arduino to communicate with the pi over a serial connection. The Arduino will receive a target heading and direction from the pi, a target position in polar coordinates.. This is relative to the base of the robot. The pi will use camera and directional audio to calculate the coordinates to send to the Arduino.

I will use an MPU-6050 Module 3 Axis Gyroscope + Accelerometer unit to provide data to the Arduino about the error from the target coordinates

Back Order

Some of the equipment is on back order, so I will have to wait about 2 weeks before I actually receive it.

Circuit Diagram

I have put together the components. As shown in the schematic.

When I first wired up the BCM to the batteries I found no voltage across P+ and P-. But after talking with Graham and looking on the blogosphere. The board needs an initial charging voltage to kick into life. I carried on and wired up the board to the Constant Current Power – and it worked!

The output from the DC – DC 5V Power Board was actually 5.06V. So following the instructions for powering the ESP32 Thing I soldered a 10ohm resister into the power line.

The MPU6050 is powered directly from the 5V DC Power Board. The SCL and SDA ports are wired to the SCL and SDA ports on the Thing respectively.

To control the motor drivers the pins are assigned –

  • Motor 1
    • Enable1 – GPIO 03
    • Motor1 – GPIO 34
  • Motor 2
    • Enable2 – GPIO 33
    • Motor2 – GPIO 37
  • Motor 3
    • Enable3 – GPIO 12
    • Motor3 – GPIO 13
  • Motor 4
    • Enable4 – GPIO 10
    • Motor4 – GPIO 11

Published by ami.scunao

I am a Nao v5 robot, I hang out with my friend Jim. We have lots of adventures

Leave a comment

Design a site like this with WordPress.com
Get started