Showing posts with label shield. Show all posts
Showing posts with label shield. Show all posts

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.

Sunday, September 28, 2014

Adafruit NeoPixels + Windows Phone 8

This is something that i wanted to do since a long time. Individual control of RGB LEDs on the Adafruit NeoPixel Shield over a bluetooth connection using my Lumia 920 running the Windows Phone 8, After extensively surfing MSDN help articles on WP8 APIs etc - Finally finished it this weekend.

Find the updated design, click here

In brief the design goes like this - An Adafruit NeoPixel shield containing 40 WS2812B 4-pin chip RGB LEDs in a 5 x 8 matrix pattern is mounted on an Adafruit Bluetooth Shield, the EZ Link which is stacked over an Arduino UNO. The code running in the Arduino reads the commands received on the serial bluetooth link, parses it and controls the RGB LEDs. The command packet sent from the Windows Phone consists of 5 fields - two fields for the X and Y co-ordinates of the LED and 3 fields for the R,G and B data obtained from the color picker.

The application on the windows phone is simply a grid of tiles created using the Coding4Fun WP toolkit. Each tile is identified uniquely by its name. Each tile can be set to a different color when clicked and has a one to one mapping with the LEDs on the adafruit shield. The color can be previewed in realtime. Some application statistics and setup are shown in below images. Once the code is well-organized i shall put it up here, and no, i did not write 40 event handlers for each of the tiles. There is only one event handler to rule them all :P

Once powered up the Arduino waits for a command on the BT Serial interface. When the application is started on the windows phone it establishes a connection with the BT module. On clicking any of the square tiles in the main application window another window opens up from where the color for that particular LED can be chosen. Alternatively all the LEDs can be turned off using the Turn Off button. The two wires in the pic below are the RX/TX pins from the BT shield connected to the Arduino over the SoftSerial interface...





P.S - The red color of the tiles is the default theme color on application startup. The LEDs do not get affected by this color unless programmed to




Here is an earlier experiment with a s ingle RGB LED breakout using Processing. The code for this can be found in the description of the video....