Homemade bot with camera and wifi control

After reading the published article Once upon a time plywood, atmega, yes raspberries , I decided to share my craft, which is available (not complicated) for repetition.

When creating the bot, the following tasks were set:
  • Wireless bot management
  • The presence of an online camera
  • Programming convenience


On-board computer


For the on-board computer, I chose the UG-802 dual-core android minicomputer, which was at hand. As an operating system - a full Linux distribution, the assembly of Ubuntu from Linaro.



First you had to do something with the problematic built-in wifi adapter, which stubbornly did not want to run under a reassembled kernel. The cardinal decision was to unsolder it and install a second USB host connector, into which you can plug a normal usb wifi (or even a 3G modem). No sooner said than done, the built-in wifi board was unsoldered and a second host was soldered in its place.

First check of the internal USB host: The


final view of the installed USB host:


Wheel platform


Once I ordered an Ardubot platform and wheels with motors for it, but my hands did not reach it. Without hesitation, it was decided to use it. A converter board with 12 to 5 volts mounted on a car charger specially purchased at the store was mounted on it (the microcircuit used in it has a wider input voltage range). A 11.1V / 1250mA lithium-polymer battery was already available from a broken model in the past. The Ardubot board had to be lightly modified due to the features of the control board (the track is cut off from D9 and soldered to D7). A usb connector was also installed, on which only 5 volt power was output:


From the rear, wires coming from the wheel encoders are visible:


Engine, light control


Initially, the Ardubot platform was designed for sharing with Arduino, why not take advantage of it. Instead of Arduino, I took the OLIMEX PIC32-PINGUINO-MX220, compatible by connectors. It turned out an unpleasant trifle - one of the motor control pins was used for the LED on the PINGUINO board. Everything would be fine, but this LED blinked in the firmware boot mode, while turning the wheel. Therefore, I had to re-solder the track, as was written above.

For ease of debugging and versatility, the control board is connected via USB. PINGUINO firmware emulates a CDC-ACM device that is visible to the user as the serial port / dev / ttyACM0. Control commands sent look like this:
MOTOR XYX - motor number, Y - state
Light xyX - lamp number, Y - state
Clearreset everything to default state
COMMITTo apply


Numbering of motors: 0 - left, 1 - right.
States: 0 - stopped, 1 - forward, -1 - back.

For example, to turn on the rear LED on the platform, it is enough to send the commands from the console:
echo "LIGHT 1 1" > /dev/ttyACM0
echo "COMMIT" > /dev/ttyACM0


To go ahead:
echo "MOTOR 0 1" > /dev/ttyACM0
echo "MOTOR 1 1" > /dev/ttyACM0
echo "COMMIT" > /dev/ttyACM0


Camera and hub


One USB port of the on-board (bot) computer is used by a wifi adapter, and the other is a platform control board. Where to connect the camera? There is a solution - use the hub. In one of the computer stores one of the cheapest web cameras and a USB hub of a suspicious kind was bought.

Electronics Placement


In the process of finding out what to make the bot look for, a plastic box packaging from the IPOD TOUCH was successfully found, into which the UG802 and a disassembled USB hub were ideally inserted. A cutout was made in the side for the three hub connectors. A camera (with a pre-shortened cable) stuck into the fourth (internal) connector. A cutout for the USB connector on the UG802 was also made in the lid, which did not allow it to close: This


whole thing was screwed on top of the PINGUINO-MX220 - the platform control board:


Final assembly and testing


It was time to put everything together:


All the wiring was stuck where it was supposed to be - PINGUINO in the hub, UG802 power in the USB connector on Ardubot:


The on-board computer is configured for ssh access, all the necessary tools for work (compiler, libraries, mc) are installed from Linaro repository. Come in, write, compile and debug right on it. Beauty!

For testing, a control console has been developed that displays an online image from the bot’s camera and sends him commands to go where, which lamps to turn on and off. The software bot receives commands and sends online video to the management console. Current status is deep beta. However, you can already use the system!

Video demonstration




Recommendations

It is not necessary to use a sparkfan ardubot, there are cheaper and better options.
UG802 can also be replaced with cheap analogs (MK802, CX-01), but you need to look so that kernel sources that work on a specific device clone are available. Otherwise, installing a full-fledged Linux will be problematic or impossible at all.

References

Project on googol code (source)
Linaro
PIC32-PINGUINO-MX220 on the OLIMEX
Ardubot website on Sparkfun


Also popular now: