Wednesday, August 28, 2013

Impressions: CrazyFlie

I just got a new Nano quad copter entitled the Crazyflie with 10 DOF from Bitcraze. This nifty device is tiny weighing under 20g, flies for about 7 minutes and is open source. The cool little device currently comes as a kit with almost everything you need to fly except the Crazyradio (sometimes included), a computer and a compatible controller. 

Crazyflie (10 DOF) with Crazyradio

Assembly was very simple with a tutorial available through the Bitcraze Wiki page along with a very simple video. Soldering is required as each motor must be soldered onto the board, but even with that, assembly took me under five minutes.

Once everything is put together a PC Client can be downloaded for your computer, personally I’ve been testing the Windows 8 version without any trouble. With the controller I’ve found flying to be fairly easy although it’s taken me quite a while to fly it with any accuracy.

Crazyflie (10 DOF)

As an open source project it’s really interesting and even as just a Nano quad copter it’s really fun to fly. The only major problems I’ve found is that the flight time is quite small at seven minutes due to the small size of the battery (170mAh Li-Po) although the site boasts a 20 minute charging time though the micro USB port which makes getting back to flying pretty fast.
Personally although such a great little device I haven’t seen too much in terms of the wider community development which could be attributed to how recent the Crazyflie copter has been out for. It will be interesting to see the future of this copter and how far development can go especially from the wider community.

Bitcraze Webstie:
Bitcraze Wiki:

Sunday, August 18, 2013

Weather Buddy System

As part of my embedded systems course I'm doing, I was able to design any project that I would like as long as it covered an embedded system. From this came the idea to create a Weather Buddy design utilising the Electric Imp and Arduino Due to provide a simple an easy output of the weather.

The main points of the Weather Buddy System was to create a way so that a user can easily and visually see the temperature and weather type for a particular day in both day and night times using specified lights. It also needs to be able to give more detailed information if needed and lastly give a recommendation for a specific item for the day to simplify a user's life in what the expected weather would be like outside.

This was designed in a few units, firstly the Electric Imp would go online using WI-FI and obtain weather data from the internet for a specified location (in this case the Weather Underground API was used). This data would then be sent from the Imp to the Arduino Due through the UART. Once sent to the Arduino, the information is then processed into three main variables which are 'location', 'weather type' and 'temperature'. 

The information is then displayed to the user in three main units as outlined below:

LED Unit
The LED unit shows a variety of 10 RGB LED's, which are set up with a common ground for each colour utilising three transistors. Each LED lights up depending on the temperature that was obtained from the Electric Imp. This is done in 5° Celsius blocks so that a temperature of 20°C would light up four LED's. The LED also change colour depending on the weather type so that red is used for clear or sunny, Blue is used for raining and green for cloudy. This is designed so that a user can grasp an easy and quick view of the current weather information outside using as little time as possible.

LCD Unit
The LCD part of the system outputs the information onto the display for a simple and quick view. This allows a user to easily gauge a proper perspective in not only checking what type of weather it is in detail but also the exact temperature, which isn't gained through the simple display of the LED Unit.

Recommended Item and Display
A recommended item and display was also set up so that different items could be obtained depending on the weather type. This was done by firstly showing a recommended item to the user with a green LED next to it, for example lighting up either a jumper, umbrella or hat. A sensor system was also used with an LDR so that the Weather Buddy System could tell that something was placed in the sensor. Lastly servos were utilised so that with the hand placed in the correct area the item would easily fall into a person's hand and could be quickly used for the day.

SMS Notification Unit
Lastly a notification was set up so that at a specific time of day such as the morning a SMS would be sent to the user's phone detailing the complete weather details for that time in the specific location. This was done by using the Twilio API found online.

With the design thought up I finished by making a prototype of how I hoped it would come out. The video of the prototype can be seen below.

Weather Buddy System

In the design of the weather buddy system, I got very lucky as I found that sending SMS data and obtaining weather details were very simply written through tutorials on the Electric Imp developer's site. The prototype did end up achieving all my design goals I had planned for it though and the useful information given for developers for both the Electric Imp and Arduino Due made things a lot easier. It also helped show many of the features I was curious about on the Electric Imp, and how well it can be integrated as an embedded system with the Arduino Due.

Electric Imp Developers Wiki:

Simple Arduino Due to Electric Imp Tutorial Through UART

The Electric Imp being such an amazing and small device, and the Arduino Due being such a powerful one, I started looking into the best ways in which they can be connected up. Through my search I found quite a few ways in which the Arduino Uno would work but unfortunately as of time of writing and as far as I'm aware this is quite cumbersome for the Arduino Due. The biggest problem lies in the fact that the Arduino Due hasn't had its software serial libraries ported to it yet which makes things really difficult especially for people who are new to the device and are trying out a lot of the tutorials designed for the Arduino Uno. As such I attempted to make a simple tutorial to use UART connection of the Electric Imp and Arduino Due. I also tried to make it as simple as possible so that anyone can do it. The link to the tutorial can be found below:

Electric Imp with Wires Connected to Arduino Due

My tutorial can be found at:

Impressions: Electric Imp

I finally bought myself an Electric Imp with an arduino shield. It has its own Wi-Fi and Cortex M3 processor, with different I/O pins and even a cloud processing and development area.

Using the Electric Imp for the first time has been really interesting especially since the cloud processing and development uses a Squirrel type programming language. This creates a very simple to use but also different type of embedded system compared to normal. The Electric Imp actually uses an android application with a series of quick blinks to send the wireless network data to it through a sensor. After that though all the programming is done on the cloud and every time you run the cloud programming it downloads it onto your device through the wireless network you connected up to.

It's an interesting concept bringing to mind many different advantages such as being easier to program from great distances just by using the internet and also being able to utilise online websites and information. Unfortunately there are disadvantages such as all the code produced is placed on the Electric Imp system in the cloud which may make programming work difficult for a business point of view since it's on a different companies system. Currently it also must be connected to the internet at all times or else it won't function appropriately. Below is a picture of the Electric Imp Shield by Sparkfun. The second Picture shows the shield connected to the Electric Imp which is the SD Card looking device, it's also attached to my Arduino Due.

Side View of Electric Imp Shield
Soldering the headers myself was very easy and made quite a good connection between the Arduino Due and the Electric Imp shield. There is no problems with connectivity and voltages work perfectly fine. Interestingly though the Arduino Due is not actually needed since the Electric Imp has its own processor although it's a lot easier so that it can be powered by the USB connection of the Arduino.

Electric Imp with Arduino Due and Shield
All up this is a really nifty device which opens up a lot more projects especially internet based ones. It also allows for a very effective and sort of cheap way to make the Arduino online accessible while also having the added advantage of many extra features though the cloud processing. Personally I can't wait to try this out and coming up with some projects of my own.

Electric Imp Website:
Electric Imp Wiki:
Spark Fun Shield: 

Sunday, August 11, 2013

Kinect Driven Arduino Powered Hand

After buying an Xbox with the kinect, and the kinect lying on my table collecting dust and being a moderately useful paper weight as of late. I had an idea of a project to design an arduino powered hand which is driven by the kinect sensor. This sensor would find my hand, check the position of my fingers and send information to the arduino hand accordingly. I ended up building a basic prototype which worked fairly well although with a few restrictions. The video can be viewed below:

Skip to 0:57 seconds to watch the hand in action

The design consisted of the kinect which was simply placed into the USB port of my laptop. From there a program called Processing was used to work with the data from the kinect and the addition of two main libraries which was a Finger Tracking one and Simple-openNI which allowed me to easily process the kinect information and find finger location data and tracking.
The data is sent through by the Processing application to the Arduino Uno which uses the information obtained and moves each servo of the electrical hand I built depending on the view of the kinect. This allowed me to control the fingers very simply as seen in the video above.

Unfortunately as a prototype a few problems and restrictions occurred which made the project difficult. First is the use of five servos for each finger, this took a lot of power from the arduino and I found some servos didn't react as well due to this. The second and biggest problem was due to the limitations involved in the finger tracking library. As seen in the video there are five main squares which are created through a calibration method of the five fingers. When the fingers are within these squares the arduino knows the fingers are open and thus moves the servo, and when not placed in the boxes the arduino knows the finger is not there and moves the servo accordingly.

This unfortunately is not as accurate as a proper design and creates two problematic constraints. The first of which is that the hand can't move around the vision of the kinect as it needs to be in place for the calibration squares and secondly the finger will be seen as either always up, or down, but not in-between.

Further programming has allowed me to remove the calibration part which lets me move my whole hand in the vision of the kinect with the same output for the electrical hand. Unfortunately it is much more error prone since the finger tracking library has a lot of trouble evaluating fingers compared to other objects in its vision.

A way around both problems could be to create a single point on the hand such as one for the palm which would help in evaluating not only the distance between the tip of the finger and the palm allowing the electrical hand to know that the finger is slightly down, or completely down or completely up. But also gives a point in which an appropriate quadratic formula could be created by graphing the finger tips and then segregating the distance in relation to each finger to the common palm point. This not only maps out the accurate location of each finger but also allows for error handling for other objects which are not included as a finger. For example the web between your fingers are commonly an error prone place which disrupts and adds extra fingers to the program. These fingers can be removed though if there found to be outside an appropriate finer tip range. Such as if there not within the quadratic formula of which all the finger tips should fit in then it can be safely assumed to not be a finger at all but a random object and thus not processed, though this could prove to be difficult.

As it stands though with the current libraries it does work fairly well, with slight issues which can be worked on. I hope to be able to attempt this with different finger tracking libraries as well and see if I can obtain a better accuracy and fix any problems with the system.

FingerTracker Library:
Processing Application:

Impressions: Arduino Due

As of recently I bought an Arduino Due and have been testing it out on a few projects. It contains a SAM3X8E micro-controller with 54 digital I/O pins 12 of which are PWM. The device itself is very interesting and I haven't had any problems running it so far. With such a powerful micro-controller it's enabled me to be able to learn how the Due works especially as an embedded system. With it I've been looking a lot into lower level programming and how the Arduino libraries are utilized. I've also been able to test out things such as using different clocks, communication through USART and referring to the Atmel data sheet and Arduino pin mappings and schematics for different designs. 

Overall the Due is a really nicely designed board which has allowed me to further increase my knowledge in electrical and embedded applications. Hopefully it will be able to reinforce my learning about lower level programming and further testing will allow me to create some interesting projects.

Mini Battlebot

I used to read up a lot about battlebots when I was younger and with YouTube I spent many hours trawling through different videos and seeing the power between two bots and how the construction and design was created so that one is able to beat another. With that I thought about making a very simple one myself albeit a super simplified version of the amazing machines I've seen. 

The design was similar to a wedge with a simple blade at the back which turns using an independent motor. A servo was hacked so that a 360 degree rotation could be obtained and that was used for the wheels. The whole Battle Bot utilized an aluminium sheet and was designed with simplicity in mind. Unfortunately as a battle bot stand point it can be seen that the wheels majorly stick out which makes it difficult to keep it safe in a battle bot setting. If I had another go at the redesign I would probably place the wheels inside since each wheel runs independently it would be fairly simple to do, although in this case due to the limited tools I had, it was a lot easier just placing it out.

A quick video of the build can be seen above, apologies for the quality as it's recorded on my phone:

As a battle bot it doesn't really stand up to a few of the amazing ones I've seen, but with a small amount of resources and money I thought it was an interesting build to make. In the future I would love to be able to do a much more professional job on building a proper battle bot, especially if I had more funds and spent some time on the design I believe it could come out pretty well.

I made a tutorial for this which can be found at:


Technology, electronics and design has always been a major passion of mine. As an engineer I've come across a lot of projects that has really intrigued me and as such I've always spent a lot of time creating and making my own random projects. I've created this blog so that I can log the projects I've done and share them as well as talk about impression of devices.