Showing posts with label robots. Show all posts
Showing posts with label robots. Show all posts

Monday, April 4, 2016

Vibration Robot - Iteration 1 - Chaos

I was always fascinated with the Kilobots developed by Harvard and their amazing capabilities when operated in massive swarms of self-organizing robots. I therefore decided to build my own prototype using modules easily available locally. This was not going to be a Kilobot clone but something different based on the same principle. So recently i managed to wrangle up a few breakout boards to make a vibration robot as shown below. The modules used are as follows

Main board - Arduino Lilypad (ATMega328) from Sparkfun. The reason i chose this was due to the large number of I/O and because the PCB is circular. 50 mm diameter, 17 mm more than that of the Kilobot, which is around 33mm.

Communications - Adafruit Bluetooh EZ Serial link. This board snugly fit on top of the Lilypads serial connector. The main board could now be programmed wirelessly over the BT Serial link.

Motor Driver - A Spakrfun TB6612FNG 1A Dual H-Bridge based motor driver for the vibration motors.

Power Source - A 400mAh Li-Ion battery similar to this. (External charger)



The orange colored housing for the motors is designed in my favorite CAD tool and 3D printed on me printer. The position of the holes  for mounting the screws was calculated from the board files supplied by Sparkfun. The motors were glued in their sockets. The entire assembly was held together using M3 screws through the Lilypad holes.



The block diagram of the system is shown below. The ATMega328 operates off the 3.7 V Li-Ion battery, which also powers the BT serial. The motor driver is powered from the 3.3V regulator on the BT serial board and draws maximum 2.2 mA of supply current, which is within spec of the regulator on the BT serial board as it can source maximum 100 mA. The driving voltage for the motors comes directly from the battery. Other control and PWM signals are connected to the arduino PWM and digital I/O pins.



And the end result after all that was - Chaos - as you can see in the video below. The robot is controlled via a windows phone application that i wrote which connected over BT serial to the bot. A single 4-Byte (integer) command was sent to the bot comprising of :

Byte 0 - PWM value for motor A (0 - 255)
Byte 1 - PWM value for motor B (0 - 255)
Byte 2 - Control signals for motors: Bit 1 - Motor A CCW, Bit 2 - Motor B CCW, Bit 3 - STANDBY/STOP
Byte 3 - Reserved.




The objective was to send varying PWM values to the motors to observe a linear motion along a straight line and characterize the 2DOF aspects of the system. Not shown in the video is my phone through which i am controlling the robot by varying the PWM to the motors.





Further iterations will include several improvements over shortcomings in the current design - thinner wires, smaller or custom boards etc. Thanks for watching...




Sunday, February 1, 2015

Short Circuit - Part 1

I've  got my hands on the Zumo 1.2 robot and it's time to do some crazy stuff with it. Last month i finished designing a customized baseboard for the Teensy 3.1 Cortex-M4 board by PJRC. This baseboard was tailored specifically for the Zumo. More details on the Zumo 1.2 can be found here. The zumo is designed such that it acts as a shield for the arduino uno board. However if you mount the standard original arduino on the zumo, you cannot mount other shelds. Some pins are specific to the Zumo which you can check on the Zumo wiki. Some of my friends who are founders of Entesla managed to give me one of their arduino clones - the Entuino with all the headers removed. I soldered the new headers as per my convienience, removed the DC jack and reset switch and it looks like this.



When mounted on the Zumo the board looks like this. Now i can mount an infinite number shields on top of this board (conditions apply....even mathematically :P)



Notice that few of the pins have been cut off such that they do not interfere with the shield on top. These are primarily the controls for the zumo motors that were mapped to the same pins used by SPI. The power pins too were not made available to shields above the entuino. The Teensy board has its own voltage regulators for 5V and 3.3 V and hence sources from the Vin supply from the Zumo shield which is 7.5 V



I will be using the arduino for the sole purpose of controlling the motors. All the sensors' data computation will be taken care by the Teensy over the I2C bus. The teensy and entuino communicate with each other via the hardware UARTs, (0, 1) on the entuino and (0,1) Serial1 on the Teensy. The Teensy also has a NRF24L01+ interfaced over the SPI bus for remotely controlling the bot and for data telemetry. The Teensy base board also has support for the ESP8266 wifi (not connected) and a 40 pin header to connect the Raspberry Pi. The Teesny baseboard and the RPi communicate over the UART. The whole block diagram of the entire system is shown below. Currently the ESP8266 and RPi are not connected to the teensy baseboard. Initially i had planned to use the SoftwareSerial library on the teensy for comms between teensy and entuino, but that backfired as the SoftSerial library is defunct. Therefore, i patched the ESP uart to the hardware uart of the entuino (the white wires in pics below).


The fully assembled robot.


The two boards


Now i have to take utmost care to solder the 40 pin header whose component side is behind the board. R.I.P ESP8266. #facepalm, softwareserial #fail.


The Eagle schematic. Not perfect i must say, jeez, look at some vias and those clearances... :P


Fully Powered Up



More adventures with this in Short Circuit - Part 2.