Showing posts with label zumo. Show all posts
Showing posts with label zumo. Show all posts

Sunday, October 25, 2015

Short Circuit - Part 2

I finally managed to stack up the robot i have been building. The completed assembly is shown in the photo below. The robot can be remotely controlled as far as the NRF24L01+ with PA can allow and can transmit video over a WiFi connection. Video transmission is therefore limited to the range of the WiFi signal.


This article is a follow-up to a previous one that you can find here. Read this First !!!

[1] The foundation of the robot is a Zumo robot shield from Polulu containing the power source - batteries, gyro etc. 




[2] The zumo motors are controlled by an arduino clone called Entuino from Entesla. I had this board modified such that the header pins stick out of the bottom of the board so that i could mount custom shields on top of the main board. The DC jack had to be de-soldered too. This processor runs a state machine that controls the motors based on commands it gets from [3]



[3] I designed a custom board to mount the Teensy 3.1 ARM Cortex M3 module from PJRC. This board was stacked on top of the Entuino. The purpose of this board is to communicate with the NRF24L01+ 2.4 GHz radio transceiver and send the commands down below to the Ent. This board will also process the data obtained from the gyroscopes on the zumo shield. The reason behind using the Teensy was to offload the communication and computing from the ATMega, as it has more features and memory and use the Ent only for motor control.

As seen below the plastic mount is fastened to [3] using M3 bolts and slots cuts in the board & rests on header pins. I could have removed the pins but that would render the board useless for any other future projects. Hence, bob's your uncle....go figure...




[4] The last board on the stack is the RaspberryPi. It's sole purpose is to provide camera data over Wifi. On power up a remote login is made over wifi to access the RPi terminal, from the terminal a VNC server is started. Using a windows VNC client like TightVNC the remote VNC session is accessed providing the RPi desktop. Once on the desktop the camera can be accessed using OpenCV. The motion of the robot can now be controlled using another arduino with a NRF24L01+ connected to the PC serial port and you can view where the robot is going using the WiFi VNC session. There is a minor N/W delay in viewing the video over VNC.

I had to design a custom 3D printed part to mount the RPi board and it's camera. The part was printed using my FabX 2.0 printer. Some slots had to be cut out in board [3] using a dremel to mount the M3 bolts to fasten the 3D printed mount. The part went through several iterations to get the dimensions, thickness and placement right.


Design Iteration 1: The one on the left was too thin and bent under the pressure of the bolts given that the bolts did not align properly to the RPi holes due to inherent 3D printer drifts. The camera mount was totally miscalculated.

Design Iteration 2: The one in the center turned out fine but the camera mount slot turned out too wide because of a small dimension miscalculation in SolidWorks. Additionally the through-hole components of the RPi were causing misalignment when the fastening bolts were tightened. I removed some material from the center of the base plate and filleted the corners to speed up printing and use less filament.

Design Iteration 3: The one on the right turned out perfect but the camera mount had the same problem of not going into the slot enough. Though it was a tight fit, the camera was resting on the components on the bottom layer of the camera board which was not good. I would rather prefer to rest it on the camera edge cable connector.

Design Iteration 4: The one at the bottom and the last one finally turned out to be just right. The RPi mounting holes were extruded above the base plate to give a flat mount with a support at the end of the base plate, this prevented any through hole components from touching the plastic.. The camera mount was extended to the bottom and some material was removed such that it went right through the slot and came to rest on the edge connector. Instead of using holes i replaced them with rounded slots so that the bolts can be aligned properly with the mounting holes on the RPi to correct for drifts in intended design by the printer.




The above design can be found on my Thingiverse along-with other stuff.

A lot of mods have been planned to keep the stacking of boards to a minimum and have everything controlled using the RaspberryPi in the near future.

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.