The Electrical System
The electrical system on the robot is capable of the following functions:
Laser Beam Tracking
The laser beam is tracked using computer vision implented using the OpenCV and simpleCV open-source libraries. More information is available about the software in the Software section of this website.
In order to carry out the computation needed to determine the position of the laser, a raspberry pi revB was used:
- Tracking the position of a laser beam and following it
- Driving the rear two wheels independently and to provide forward and reverse motion as well as left and right steering
- Driving the domino dispensing system to dispense dominos
- Detecting the number of dominos that have been dispensed
- Provide appropriate power supplies to the motors, microcontroller and microprocessor
- Providing feedback to the user for common error modes (e.g. no remaining dominos to dispense, lost sight of laser beam)
Laser Beam Tracking
The laser beam is tracked using computer vision implented using the OpenCV and simpleCV open-source libraries. More information is available about the software in the Software section of this website.
In order to carry out the computation needed to determine the position of the laser, a raspberry pi revB was used:
A Creative Live! Sync HD Camera like the one below was then connected to the USB port of the raspberry pi:
Driving the Rear Wheels and Dispensing System
As mentioned in the mechanical section, there are three DC motors driving the robot in an open loop configuration. There is one motor each driving the left and right wheels and one motor driving the dispenser system. Because the camera is detecting the position of the laser, we do not need closed-loop control of the DC motors because the position of the laser beam in the image will determine the speed of the robot.
The speed and direction in which to run the motors is calculated by the Raspberry Pi using a driving algorithm we developed. More information on this is available in the software section. Once drive speeds have been calculated, the Raspberry Pi sends this information over the serial port. The serial port has a USB cable connecting the Raspberry Pi to the Arduino.
Once the Arduino receives the drive speeds and directions, the DC motors are then controlled using the Adafruit Arduino Motor Shield and an Arduino. The connections to the shield are shown in the image below:
The speed and direction in which to run the motors is calculated by the Raspberry Pi using a driving algorithm we developed. More information on this is available in the software section. Once drive speeds have been calculated, the Raspberry Pi sends this information over the serial port. The serial port has a USB cable connecting the Raspberry Pi to the Arduino.
Once the Arduino receives the drive speeds and directions, the DC motors are then controlled using the Adafruit Arduino Motor Shield and an Arduino. The connections to the shield are shown in the image below:
Detecting the Number of Dominos Dispensed
In order to determine the number of dominos dispensed, we have chosen to use a photointerrupter or breakbeam sensor. Specifically, we are using the GP1A57HRJ00F from Sparkfun Electronics:
In order to determine the number of dominos dispensed, we have chosen to use a photointerrupter or breakbeam sensor. Specifically, we are using the GP1A57HRJ00F from Sparkfun Electronics:
When the domino falls through the sensor, it breaks a beam of light and code on the arduino will increment the counter that will keep track of how many dominos have been dispensed. The circuit for that is shown as follows:
Power Supplies
We decided to keep the power supplies to the Arduino and Raspberry Pi separate from the power supply to the motors in order to ensure the higher power draw of the motors would not overload the power supplies to the arduino and raspberry pi and affect their performance.
The arduino and raspberry pi are powered by an EasyAcc Power Bank with a battery capacity of 7000mAh:
We decided to keep the power supplies to the Arduino and Raspberry Pi separate from the power supply to the motors in order to ensure the higher power draw of the motors would not overload the power supplies to the arduino and raspberry pi and affect their performance.
The arduino and raspberry pi are powered by an EasyAcc Power Bank with a battery capacity of 7000mAh:
The power bank has two-USB output ports and a micro-USB input port for charging. The robot uses both the USB output ports to power the Raspberry Pi and Arduino since both need a 5V power supply.
The motors are then powered by a standard battery holder that holds 6 AA batteries in series for a total of 9V supplied to the motor shield.
The motors are then powered by a standard battery holder that holds 6 AA batteries in series for a total of 9V supplied to the motor shield.
Providing Feedback to the User
We also need to be able to provide feedback to users during common error modes such as losing track of the laser beam or no remaining dominoes to dispense. In order to do so, we added a small speaker (COM-11089) from Sparkfun Electronics and generated a tone using the Arduino to emit a beeping sound during error modes such as when the domino stacks are empty or when the dispensing system is jammed.
We also need to be able to provide feedback to users during common error modes such as losing track of the laser beam or no remaining dominoes to dispense. In order to do so, we added a small speaker (COM-11089) from Sparkfun Electronics and generated a tone using the Arduino to emit a beeping sound during error modes such as when the domino stacks are empty or when the dispensing system is jammed.