Acrome's Autonomous Mobile Robot - AAMR
by Acrome Robotics in Circuits > Robots
467 Views, 3 Favorites, 0 Comments
Acrome's Autonomous Mobile Robot - AAMR
Acrome AMR (AAMR) represents a programmable, compact, and budget-friendly mobile robot that integrates seamlessly with ROS, catering to a wide range of applications including hobbyist projects, educational purposes, research endeavors, and robotics competitions. Users have the flexibility to program the AAMR in either Python or Arduino IDE, enabling it to undertake basic functionalities like line following and obstacle avoidance. Moreover, for more complex autonomous tasks such as Simultaneous Localization and Mapping (SLAM) or mission navigation, the AAMR can leverage the power of ROS support. The modular design of ACROME’s SMD Kits provides the AAMR with the ability to easily adapt to multiple applications, further enhancing its utility and versatility.
Supplies
[1] Acrome’s Smart Motor Drivers Full Kit which includes following items:
- ACROME SMD RED (Brushed DC) Module
- ACROME Ultrasonic Distance Sensor Module
- ACROME Reflectance Sensor Module
- ACROME Ambient Light Sensor Module
- ACROME Joystick Module
- ACROME Button Module
- ACROME Inertial Measurement Unit (IMU) Module(MPU9250)
- ACROME Buzzer Module
- ACROME Servo Module
- ACROME Potentiometer Module
- ACROME RGB Module
[2] RC TOYOTA GAZOO RACING WRT
[3] TAMIYA 54358 RS-540 Torque-Tuned Motor
[4] D645MW 32-Bit, High Torque, Metal Gear Servo
Selecting the Right Motor Controllers - Smart Motor Drivers (SMD)
The SMD simplifies control by offloading the main controller, managing motor speed, collecting sensor data, and delivering power via a daisy-chained network, ensuring seamless connectivity. Parallel power ports and RS-485 ports facilitate easy interconnection. The I2C port streamlines sensor module connection, while Arduino and Raspberry Pi libraries simplify coding and offer valuable information. Unlock a world of connectivity and coding with unparalleled ease through our innovative solution.
Selecting the Right Sensors
Depending on the applications you want the Mobile Robot to do, the sensors could differ. However in this project we want the robot to map the surrounding using ROS, follow or avoid certaing gray scale colored patterns on the ground, and avoid hitting the surrounding objects. Therefore, we use the following sensors respectively:
- LiDar
- Acrome SMD Ambient Light Sensor Module
- Acrome SMD Ultrasonic Distance Sensor Module
Selecting the Right Actuators
We need two seperate actuators. One for the driving the wheels and an other for turning them. For that, we are going to use the following:
- DC Motor: Mabuchi RS-540 Torque tuned motor. It has a nominal 12 volts power input and has a small size of 3.75 x 2.88 x 1.63 inches, which is crucial for tight space requirements of the mobile robots.
- Servo Motor: Hitec’s D645MW 32-Bit, High Torque, Metal Gear Servo. The operation voltage range (volts DC) is 4.8V ~ 6.0V ~ 7.4V with speed (second @ 60 ) range of 0.28 ~ 0.20 ~ 0.17. The maximum torque range kg/cm is 8.3 ~ 11.3 ~ 12.9 and a no load operating current draw of 500 mA while the stall current draw is 2650 mA.
Selecting the Right Power Source
Two 12-volt LiPo batteries are utilized in parallel to enhance capacity and provide redundancy for autonomous operation of the AAMR. Redundant battery packs are crucial for servicing the AMRs, and an SMD sensor add-on facilitates hot-swapping of batteries while the AAMR remains operational. The power source is linked to the SMD network, and the onboard 5V regulator powers the computing hardware (RPi).
Selecting the Right Controller
The AAMR features a Raspberry Pi single board computer responsible for processing sensor data, executing navigation algorithms, and making decisions. It transmits velocity and steering commands to the SMD modules for motion and communicates with remote systems, potentially via its WiFi chip and/or through a cloud service.
To install Acrome SMD library on the raspberry pi all you need to do is to open the terminal and execute the following promp:
pip install acrome-smd
Cabling and Connection Diagram
The AAMR's cabling and connection diagram is straightforward. The computing hardware (RPi) is at the top, with the LIDAR sensor connected to one USB port and the SMD's USB Gateway dongle connected to another USB port of the RPi. The battery is linked to one Power Port of the SMD RED motor driver module (#1). The optional SMD RED #2 motor driver module can be daisy-chained directly with the first motor driver module if needed, and the motor(s) will be connected to the motor port of the SMD(s). Sensors are connected to the I2C port of the RED #1 module, with the option to distribute them to both RED modules for simplified cabling.
The steering of the AAMR is achieved with the front wheels, connected to a servo motor, which is also linked to the SMD network via the Servo add-on module. All add-on modules are self-powered and connected to each other using the daisy-chain I2C port of the SMD RED modules.
The final representation of AAMR is also shown on the picture above.
Programming
from smd.red import*
import time
port = "/dev/ttyUSB0"
m = Master(port)
m.attach(Red(0))
print(m.scan_modules(0))
distanceID = Index.Distance_1
servoID = Index.Servo_1
#########################################
m.set_shaft_cpr(0, 4741)
m.set_shaft_rpm(0, 100)
m.set_operation_mode(0, OperationMode.PWM)
torque = False
########################################
def car_back():
torque = True
m.set_duty_cycle(0,10)
m.enable_torque(0, torque)
def car_forward():
torque = True
m.set_servo(0, Index.Servo_1, 0)
m.enable_torque(0,True)
time.sleep(0.1)
m.set_duty_cycle(0, -10)
m.enable_torque(0, torque)
while True:
distance = m.get_distance(0, Index.Distance_1)
print("Distance is: ", distance)
light = m.get_qtr(0, Index.QTR_1) # white = 0, black = 1
torque = True
print("Light:", light)
time.sleep(0.5)
if distance < 10 or distance == 0:
m.set_servo(0, Index.Servo_1, 0)
m.enable_torque(0,True)
m.set_servo(0, Index.Servo_1, 180)
m.enable_torque(0,True)
time.sleep(0.5)
car_back()
elif distance == 10:
m.set_duty_cycle(0, -10)
m.enable_torque(0, torque)
time.sleep(0.5)
m.set_duty_cycle(0, 0)
m.enable_torque(0, torque)
time.sleep(0.5)
elif distance > 11:
m.set_servo(0, Index.Servo_1, 0)
m.enable_torque(0,True)
time.sleep(0.5)
car_forward()
Share the Experience
That's all for this project! Feel free to add your comments, leave tips or ask any questions you have. Tackled a project like this before? Give us a virtual high-five, hit that 'I made it' button and share the love! You can also contact us for further questions about our products. The Acrome team is always ready and happy to help you!