Saturday 4 June 2016

An Arduino Controlled Cyber Pet


As a volunteer in a creative computing club I was looking for ideas to inspire students and came across a collection of school project kits based on the PICAXE microcontroller.

One of the more interesting projects describes uses of microcontrollers in popular cyber toys such as the Furby. Here are some extracts from the manual for that project:


the inner workings of a Furby


Although we were working with Arduinos, much of the information provided for PICAXE microcontrollers applies equally to the Arduino and this looked like an excellent project to inspire my students.

And for anyone looking for clear descriptions of basic electronic components and microcontroller interfacing circuits the PICAXE manuals are brilliant.

So, I set about creating a cyber pet of my own using the components we were teaching the students about and the craft materials we had available. For the body of the pet I used a cheap soft toy dog (from a charity shop). Here is a video of the finished result:




The following components were used:

  • 2 LEDs for the eyes
  • 1 reed switch in the nose
  • 1 light emitting diode (LDR) in the head
  • 1 servo motor mounted on k'nex in the body
  • 1 piezo module attached directly to the Arduino
  • several resistors
The arduino and battery pack were hidden in the body.

As I had not soldered before I chose to use conductive thread to attach and link components.

LEDs, resistors, LDR and the reed switch were all attached to the inside of the head with conductive thread which was then attached to insulated wires. This required some thought in order to avoid short circuits. All of the sewing was within the head of the toy which was filled with stuffing. The circuit was planned out in advance of any sewing with components being added gradually and tested as I went along: 

planning out the circuit

The servo motor was mounted on a k'nex structure. This required creating extra screw holes in two orange pieces of k'nex. A lolly stick was attached to the servo arm to provide a mechanism for moving the head. 
k'nex motor support
Servo motors are great for beginners as they contain their own driver and can be connected directly to the Arduino. The motor I used was a tiny towerPro SG90; these are available very cheaply. The disadvantage of servos is that most are not continuously rotating, but for projects such as this they are perfect.

The finished cyber pet was used as a demo when introducing students to the project part of the club. I had also picked up a couple of Furbys in a charity shop as examples of very sophisticated commercially available cyber pets, but which included many of the components we were learning about:

demo furby

dissected furby
This turned out to be a popular choice of project for the students over the last few weeks of the club. Unfortunately time was very limited and most students only got as far as adding a motor to their own soft toys (enabling them to wag tails, nod heads etc.) but they all enjoyed the experience and hopefully got a feel for how commercial toys are developed.

Sunday 3 April 2016

Creative Computing with the Arduino - experiences of a school club

Last year I volunteered on a Creative Computing project with Science Oxford. Myself and a fellow STEM ambassador ran a lunchtime club in a local secondary school with kit kindly donated by The Royal Academy of Engineering.







First Time Experiences

The first week was about getting to grips with the arduino, a breadboard and a simple LED circuit.


The Blink Circuit


The Blink Sketch

For the next few weeks we introduced basic programming concepts and a few simple electronic components. This was very successful, with most students being able to complete the weekly set task within the short lunch break.



Simple Tone Generator




For the final few weeks we encouraged the students to work on a project of their own, using the programming concepts and components they had learned about. We gave them a few ideas and lots of craft materials to work with. This was based on the success of a few workshops that had been run previously in the school holidays.


Animating a soft toy

In terms of production, the project weeks were less successful, with few students completing anything they set out to achieve. I think the main reasons for this were:
  • time required for setting up and tidying away eating into useful project time
  • C/C++ being a difficult language for beginners
  • wider mix of abilities and ages compared to the holiday clubs
  • our inexperience of teaching
  • too many different projects on the go at once, too much freedom
  • students preferring to spend time constructing the craft element, rather than doing any programming
This was a little disheartening. However, the school was delighted with our efforts and we were invited back to run a second club. I was pleased to see some of the original students returning for more in addition to several new faces.

However, we were now faced with the problem of some students being total beginners and others having already done the taught part of the club. In addition, we wanted to improve on the less successful 'project' part of the club.

Improving Our Efforts

We decided to stick with the taught part. But for the project weeks I devised a number of ready made projects complete with guidelines on connecting and programming (but not full solutions). Students who had been with us before were allowed to work on the projects from the first week or re-do any parts of the taught weeks.


trainer light sequencing

plush toy mood lamp

This worked well on the whole, and was much better than the free for all of the first club. The ready made projects were less of a step up from the taught component of the club and students had more of a sense of achievement at the end. In addition, managing students working on familiar projects was a lot easier, particularly as I was the only STEM ambassador available for much of this club. It also meant we didn't have to store several crates worth of craft materials.



In Conclusion


This was a very rewarding experience but I did feel that the weekly sessions were too short and that this would have been better run as a series of after school workshops (maybe 2 hours each session). Having to disconnect everything at the end of a session was frustrating. Just getting a student back to where they had been the week before could take up half the session. And they had to eat their lunch whilst at the club.

However, I was very impressed with the robustness of the Arduinos as they certainly were not treated with kid gloves! Not one of them failed. But the programming language (C/C++) proved too much for many students, especially as few had programmed before (not even in Scratch). 

What Next?

The BBC recently launched the micro:bit:


I am looking forward to when the micro:bit becomes available to the general public and hope to adapt some of the Arduino projects that came out of this club. From what I can see, it will be a much easier platform to get started with compared to the Arduino.