Mooncake, the Official Raspberry Pi Cat, is fed biscuits twice a day by an off-the-shelf cat-feeding robo-hopper that we bought before Raspberry Pi was a reality. (She also gets that horrible-smelling cat food in gravy from a packet, served up by real live humans.) I’ve just found out what to replace the robot with when it breaks.
Mooncake, well-nourished, “helping” us to dispatch fund-raising stickers
Dave at Twin Cities Maker has made a Pi-powered cat-feeding robot which dispenses two sorts of biscuits, so your fickle pet has a choice of different liver-flavoured kibbles throughout the day.
Dave’s cat feeder, with toaster for scale
It’s much more functional than the one I bought from the pet shop years ago; for a start, it’s wi-fi enabled, so it can be sent instructions remotely. And Dave has plans for making it even whizzier, with sound clips (Cat from Red Dwarf), a camera and a mobile webUI.
Work in progress: this is an Adafruit PermaProto with a couple of solder bridges at the top left. Instructions are on Dave’s blog.
We’re looking forward to see what additions Dave develops for the feeder. Seriously; if you can make this thing self-cleaning, Dave, you can sit back and never have to work again. Cat owners the world over will be banging your door down.
This is brilliant. Livebots is a project which allows you to control a robot (powered by the Pi, of course) over the internet. Follow the link, or watch this rather excellent video to see what’s going on.
You’ll be using buttons in the browser to send Python instructions to the robots via their serial ports. The robots are available to control depending on which of them is online at the moment you visit. There’s a robot with googly eyes, one that does ballet poses and urinates (!), and plenty of LEDs to flash on and off.
Detailed instructions on adding your own robot to the collection are available at Instructables. We are torn between our love for the breakdancing robot and for the creepy robotic hand. It’s up to you to add some more so we can do some more arguing about which is our favourite.
The future has been so disappointing. We were promised force fields; teleporters; and androgynous, android manservants. Instead we got cagoules, budget airlines and robovacs. And what do you do with a robovac when it reaches the end of its useful life? You stick a Raspberry Pi on it and make it into a proper robot of course! In the first of our guest blogs Ben J, 14, does just that (thanks Ben!):
Hi! My name’s Ben.
I’ve always had a big interest in robotics and electronics in general, so when I heard about the Raspberry Pi, I knew I had to build a robot around it. This is what I came up with:
The robot, ready to do your bidding. Necessary wifi dongle not shown.
The base of the robot is an old iRobot roomba 4000 with all of the cleaning brushes and their respective motors removed.
The model of roomba that I used has two drive wheels and a coaster wheel in front, and the drive wheels draw almost 300mA of current, so powering them directly off of the Raspberry Pi’s GPIO obviously wouldn’t work. So, I considered using a relay board to control the two drive motors from the GPIO. However, it turns that all the good boards were a little too expensive for a hobby project, so I decided to open the roomba up and see if I could somehow control the motors from the existing circuitry. Guess what? It turns out that there are four small transistors on the main board that power four larger transistors that deliver power to the motors. This means that there are two transistors per motor: one for forwards and one for backwards.
The four small transistors I mentioned are circled in red. Behold my soldering!
They’re labeled Q13, Q14, Q30 and an un-labeled one near R129.
I had a little help in discovering this from a video that a man named Dean Segovis had posted on YouTube, but I ended up taking a multimeter to the board; just to make sure that I wasn’t hooking my precious pi up to anything dangerous. You can watch Dean’s video here: https://www.youtube.com/watch?v=TVp6QWcoilk.
Once I had confirmed the location of the transistors I needed on the board, I connected their bases to GPIO pins 4, 17, 18 and 21 on the Raspberry pi with with a 16 pin socket that I had lying around.
To power the Raspberry Pi, I soldered together a power supply circuit around a 1 amp 5 volt regulator (basically the regulator and two capacitors) on a piece of perf board and had the 5v output from the regulator run to a micro USB connector. I also added some miscellaneous components to the circuit, like a power switch, a 2.5 Amp fuse, a 12 volt in socket and some 12 volt out sockets; one of which the camera is plugged into. The roomba’s main board is also plugged into a 12 volt out socket.
For the camera, I just used an ip network camera from the company Vivotek.
I had tried to use a USB webcam that you might use for skype calls, but streaming video from the pi slowed it way down and the picture quality wasn’t as good as I had wanted. I wasn’t using the best webcam in the world, though.
To hold the Pi in place on the robot, I just glued some plastic pegs where I wanted it to go:
One in between the USB and Ethernet ports, one in between the audio jack and the component video port, one near the HDMI port
and one near the SD card slot. This makes it easy to remove the Pi from the robot when It isn’t in use, yet it holds it in place very well.
The ‘holder’, with Rpi inserted.
The entire robot is powered off of a small 12 volt lead acid battery that fits nicely into the slot where the roomba’s original battery went. I could have used the original battery, but the one that came with my roomba was extremely old and wouldn’t take a charge any more. .
Lastly, I wrote some software in python to take input from a Nintendo wii remote and transmit the input it got to the Pi over wifi, where it’s decoded by another piece of python software and the wheels are moved according to the position of the joysticks on the wii remote. You can get my code at the links below:
And I think that’s about it. If I was unclear about anything or if you want a more detailed description of my project, please email me at benhjake (at) gmail.com , or leave a comment below. Also, if you replicate my project, I’d love to see a picture or two. You could email those to the same address. Thanks, and Happy Hacking!
Want to control the temperature of your barbecue, smoker, firepit or clambake over a web interface? Here’s the Raspberry Pi-powered HeaterMeter. Bryan Mayland says:
HeaterMeter for RaspberryPi joins an Arduino / AVR ATmega328 microcontroller with OpenWrt running on a RaspberryPi $35 wonder-computer for the purpose of providing oven-like control of a charcoal BBQ grill via web interface. The microcontroller controls a fan which limits airflow to the pit, displays the current status on a character LCD, and passes the data on to the RaspberyPi which streams real-time updates to connected web browsers. The website also works on mobile browsers running Android or iOS, allowing users to unchain themselves from their grills and partake in many life-enriching activities such as
Going to the grocery store to buy more beer
Going to a bar to drink more beer
Not get off the couch, where your beer is
Possibly other non-beer related hobbies
Dean Ellis has got Monogame running on his Pi. There are details of exactly what hacks he’s used to get it running so well on the YouTube page that this video comes from.
Monogame is an open source implementation of the Microsoft XNA 4 Framework – and it gives us all kinds of ideas about game development on the Pi. You can read some more about Dean and his Pi here.
Make Yourself at Home
We’ve been seeing a lot of visual artists using the Raspberry Pi in their installations. Whether you’re driving video or if you want to drive something with wheels, the Pi offers artists a much cheaper way of getting to their goals than the old “borrow someone’s old laptop” model. We’ve seen Pis being used in the Tate Gallery’s new Tanks in London; we’ve seen them being used in installations at Milton Keynes shopping centre. Most recently, I’ve heard from Martin Beha, who was working on the electronics side of an installation by Austrian artist Robert F Hammerstiel in Hannover. He used Raspberry Pis to make three lawnmower robots talk to each other. (You can see them from about two minutes into this video.) The result is curiously charming.
Click for more on the installation
The communication is established through Wireless LAN. One of the Robots is configured as a server and delivers a (completely wrong but usable) time via NTP for synchronisation. It also calculates the start time for the audio files and delivers it to the other robots via SSH and “at”. The audio is taken directly from the analog output and is amplified by an 18W amplifier module. The sound quality is quite satisfactory for speech.
The devices are powered by a second battery because the manufacturer of the lawn mower robot has built in a function that monitors if additional current is taken from the main battery and stops the robot. The 5V is generated by DC/DC-Converters for car use. Other included circuits are for example a differential amplifier against an audio ground loop and a deep discharge protector.
I chose the Raspberry Pi for reasons of flexibility, size and because there was a very limited budget. The original plan was to communicate via Bluetooth Class 1 dongles and rfcomm to get a virtual serial connection. Because of several bugs in Bluetooth I could not connect the devices and decided to choose Wi-Fi as an alternative. Depending on different (resistor) jumper settings on the GPIO-Port, the RPIs recognize their conversation role after startup and play the right file. The jumper also defines the role as server or client. So I was able to use the same SD-Card image for all robots.
The actual audio files are mp3s of a dialogue about the sense of a robot’s life, spoken by three TV announcers of Austrian national television (Austrians will surely recognize their voices).
STEM – training the teachers
There was a big Raspberry Pi event in Manchester last week, where a large group (including our very own Pete Lomas, accurately described by gocracker.com as “charismatic“) came together for a CPD/networking event for teachers at the Museum of Science and Industry.
Krisma? Bags of it.
We’re not alone in recognising that there’s a lot to be done before a new Computing syllabus arrives at schools next year in helping teachers out of the old ICT mindset and showing them how easy starting with the Pi can be. We’re really pleased to see how seriously teachers are taking the Raspberry Pi, and, as always, incredibly grateful to STEMNET for their tireless volunteering. This was the first of a series of events, where teachers were learning how to use the Pi with Manchester University’s Pi Face, getting to grips with Scratch and Python, and working on cross-curricular activities with the Raspberry Pi. A number of STEM ambassadors from industry also attended, doing that support and mentorship thing that STEMNET does so well. (I don’t think I’ve been to a single Raspberry Pi event that hasn’t been attended by at least one STEM ambassador.) We’d like to thank every one of them, and all of the teachers who are working so hard on getting to grips with a new piece of kit – we’re very grateful.
I’m getting a real kick out of some of the fan movies that have been appearing on YouTube. Algorhythmic from Aon² has been featured here before with his robot arm. Now he’s got a night-vision robot that wants to be Christian Bale. Is there anything you guys can’t do?
Algorhythmic from Aon² has been working on speech recognition with his Raspberry Pi, and has a very nice video demo of a voice-controlled robot he’s been building, with full instructions on how to get something similar working yourself. (Edit to add, 12 Jul: the arm itself is available in the UK from Maplin – it’s currently in the sale at £29.99.)
We thought this was fantastic. If this is a project you’re going to try to replicate at home, it’s worth noting that for some arcane reason, a USB webcam like the one Algorhythmic is using in the video (which, of course, contains a microphone) is often cheaper than a dedicated USB microphone on its own. Let us know how you get on!
Liz: I try to keep an eye out for some of the kookier projects people are using their Raspberry Pis in. This autonomous, solar-powered, Atlantic-exploring work-in-progress fits the bill precisely (and it has a great name and incorporates Tupperware into its design), so I asked Greg Holloway, the Mind Behind, to write a few words about what he’s doing for us. Hoist the mainsail, Greg!
Massive 25 foot waves, 60mph winds, torrential rain, lightning, and the Kraken. None of those things should be put anywhere near a Raspberry Pi. On the Atlantic Ocean all of those are commonplace, and that is exactly where I’m sending my Raspberry Pi. The project is called FishPi, and the aim is to develop an Autonomous Marine Surface Vehicle, and have it cross the Atlantic Ocean.
I don’t suppose it will happen quite like the illustration depicts when the Kraken shows up; FishPi will be powered by a 130watt solar panel, so there will be no masts or sails. The propulsion will run from batteries, charged by the solar panel, and it will utilise a Kort Nozzle to gain maximum thrust from what will be limited power.
There’s a long way to go yet before the Raspberry Pi gets its sea legs, but that’s not to say progress has not been made. At the moment my time is being spent developing the Proof-Of-Concept Vehicle. The POCV has a hull of 20 inches, so it’s quite small. Below deck sits a brushed 540 motor coupled to a 2.5:1 reduction gearbox, which in turn drives a ducted 40mm Kort propeller. There’s also a servo which will rotate the nozzle to turn the vessel.
The Raspberry Pi is going into a waterproof container, an upside down lunch box, along with all the other important components. The important bits will run on the i²c bus, a GPS, a servo controller board (which will drive the rudder and the Electronic Speed Controller (ESC) for the motor), and a compass. I hope to attach the Raspberry Pi’s camera once it becomes available, if it’s not ready in time a USB one will do instead.
One of the systems I’m looking at now is the power for the POCV, and it looks like I’ll be running it from six 1.2v NiMh batteries. Power to the Raspberry Pi will come from an LDO outputting a regulated 5v, a similar LDO will be used to provide 3.3v for the devices on the i²c bus. The ESC will draw directly from the battery pack, but the output to the motor will be controlled by the Raspberry Pi via the Servo controller board on the i²c bus. The batteries are to be spread around the hull to help balance it on the water and to add ballast for stability.
There is a lot of head scratching going on, and I’m always ready to hear fresh ideas, and of course the occasional warnings associated with undertaking such a task. The project website is at fishpi.org, you’re all welcome to pop onto our forum, and follow the projects progress, and there is also a twitter account; @TheFishPi.
I’ll be taking the FishPi along to the Nottingham Hackspace Raspberry Jam on Tuesday the 3rd of July. Feel free to ask questions, make suggestions, and if you’re raucous enough, you can join in with some sea shanties too, ye landlubbers.
Our friends at the African Robotics Network (AFRON) are currently running a competition to design a low-cost robot platform. The idea is to create affordable robots to help ignite people’s interest in computing, science, maths and engineering.
While the ultimate target is to build a $10 machine, all prototypes that cost less than $100 qualify for entry. The IEEE Robotics and Automation Society are kindly sponsoring the cash prizes, and we’re also supplying some Raspberry Pis as prizes for the winning teams. The deadline for your entries is the middle of September.
Liz: A little while ago, we had an email from Alan Herbert, who helps run the Boreatton Scout troop. The troop had been hoping to get their hands on a Raspberry Pi but hadn’t been lucky with the first batch. They’re a pretty special troop, who have a real affinity with things technological; they’ve been busy winning robotics prizes and building rockets, and we decided they were just the sort of kids we wanted to see get an early start with the Raspberry Pi. We warned them that the software stack isn’t complete yet, and that there would be bugs in there which are being ironed out in time for the educational release – in particular, we’re working on X drivers at the moment to speed up scrolling and so on, which can make things aggravatingly slow for some, but Alan assured us that they’d be able to work around any problems.
The scouts have had their Raspi for a just under a month now: I asked Alan if he’d write something for us about how they’ve been getting on, and he’s really gone to town on it. An enormous thank you to Alan and all the scouts – we hope to feature more of what they’ve been up to with the Raspberry Pi as they develop their mind-control robot project. (And be sure to read down to the end, where there’s some video from some of the scouts on what they’ve been doing.)
The Boreatton Scouts Engineering and Science Team
My scout troop likes doing science projects and competitions – I think most kids do if they have an enthusiastic leader or teacher – and they take part in the First Lego League robotics competition. This year they did well and won their Regional Finals at Manchester University, and went on to win the National Finals Robot Design Prize at Loughborough University. We were chosen as one of the teams to represent the UK at the European Open Championships in Germany in June. Part of the competition is a research project, and the scouts have been busy experimenting in ways to preserve raspberries (see the connection coming!), so my house is filling up with bottles of gases for controlled atmosphere packaging, raspberries pickling in Coca-Cola and generally lots of raspberries in various states of decay! In the international competitions we want to show off some cool Lego-robotics ideas in our base camp, and we started planning what to do just as the Raspberry Pi was launched. Perfect! Especially as, although we missed the front of the queue to buy one, Liz at the Raspberry Pi Foundation liked our idea and sent us one of the very first!
So how have we got on? It’s great! The scouts love it and are very proud to be part of the community that is helping test and develop the Pi.
With all our techy projects, it is important to have a goal and to know what we want to do. That’s easy – we want a mind-controlled Lego NXT robot that is portable and independent of big bulky wired computers, and the Raspberry Pi looks just the job. We want it to be fun too – if it’s a computer then it must have some good games too. That’s what computers are for, right?
So what do we need from the Pi? It needs to do the basic computer things – internet, games, PowerPoint, more games…and it needs to look cool!
Putting it together
First things first – we made a Lego case! It is our Raspberry Pi now! The case is quite easy: the Pi fits into seven splots by eleven splots, and to allow for the the USB and LAN ports we need it to be three bricks high.
The Boreatton Scouts' custom-built Lego Raspberry Pi case
The SD card operating system download now has good detailed instructions. We bought a cheap Sony 8Gb SD card from Maplin, and had no problems once we remembered to resize the partitions after copying the image. We decided to use a old BlackBerry 700mA charger; an mini-USB, light-up keyboard; and a mini light-up mouse; all connected to a newish LCD TV through HDMI. Everything worked right out of the box (our new Lego box that is!). Wired LAN worked right away, and we were on the internet.
Because the software is still in development, it is very slow at the moment! You need patience when browsing in LXDE windows through Midori. I guess it is important to realise what you are trying to do with the Pi, and it you want a netbook or a laptop – that’s not the Pi. But you do need to be able to connect to the internet, and we needed to be away from the wired LAN which is in a room that we can’t devote to the scouts. This is where we ran into problems – the nano-usb WiFi dongles didn’t have drivers available that I could find in Debian, and nor did the full size D-link 54G dongle, so we took the tiny WiFi dongle back to Maplins and exchanged for a Netgear N150 full sized dongle that had been shown to work.
Not for me! Everything worked as per the instructions on the Raspberry Pi website up to the point where it is supposed to connect. This is now well documented as a USB power related issue, and lead eventually to trying a range of power supplies and hub combinations. In the end we found that cheap powered USB travel hubs (the ones that say power port available in case your devices need extra power) try to take power from the hub, and that WiFi and Bluetooth dongles seem to need more than the 150mA that is enough to trip the polyfuses protecting the board at the USB ports. You need a hub that does not connect unless it is powered. I also got quite adept at whipping the lid off the case and checking voltage on the board. The BlackBerry charger seems to deliver slightly low voltage, the iPad charger with a USB to micro-usb (BlackBerry) cable delivers too much voltage (5.3V). So does my Maplin external laptop battery. Quite frustrating.
In the end I gave up messing with random chargers and hub combinations and got a digital bench power supply (cheaper than the cost of petrol driving back and forth to Maplin, who, while not necessarily offering the cheapest price or most comprehensive range, were very helpful and allowed me try and exchange any of the peripherals if they didn’t work). That delivers 5.07V which drops a bit by the time it arrives at the test point. I use an old Belkin powered four-port hub that is not connected to the USB 5V line for WiFi or Bluetooth, and a cheap travel hub for keyboard and mouse. We generally have to boot the Raspberry Pi first then plug in the travel hub. There are still issues, and in particular, the Pi likes me to restart on average 3.14 times before booting up with WiFi working, but at least I can always get up and running now.
Introducing BERT5e, the Boreatton Scouts' prize-winning robot
We do want to be free of heavy accessories, so for going to our Lego competition we have bought an OPTOMA PK320 pico projector that works great from batteries or mains, and takes AV out or HDMI (although the HDMI port is very close to the mains plug, and I have to run off batteries if using my HDMI-mini-HDMI adaptor on the projector). It will be nice to sort our battery power for the Raspberry Pi and its hubs in due course, but for now we run with the bench power supply and the powered hub. I guess I should get the scouts to make up a little regulator circuit to see what happens when we try to run from four AA batteries…
As for drivers, the Debian wiki gives pretty good instructions and I found that the www.wiki.debian.org/WiFi and www.wiki.debian.org/BluetoothUser gave clear instructions that worked for the Netgear N150 WiFi dongle (Atheros chipset, also my WiFi is not secured so I needed to give the essid name directly in the configuration file rather than using a WEP configuration file – the Debian wiki has more general instructions than the ones on the forum links) and for an Abe UB22S Bluetooth dongle. We use the ALSA drivers and the modprobe command sudo modprobe snd-bcm2835 (searched for sound on the forum). Video works through VLC (www.videolan.org) but with rather odd colours (this is a known issue for the old Debian “squeeze” image).
We can also get the Raspberry Pi to drive the Lego robot through nxt-python (Hurrah!) www.code.google.com/p/nxt-python/ gives instructions to get the source and run from the Python IDE in LXDE. We ran one of the demo examples and BERT5e obligingly drove forward 3cm! One small step for BERT5e, and then we stopped for the day so as to end on a win!
Last but not least, we have the Quake III demo working.
Some of it works, some of the time – just not all of it works all of the time
Actually, with the above setup, we can get all of it to work, just not all of it at once – it is still not happy at having WiFi, Bluetooth, mouse and keyboard all together… [Liz: I'm going to butt in here, scouts, and suggest you replace the backlit mouse and keyboard with something that requires less power, and see how you get on with that setup.] I’ve parked that issue for now as we can set it up to do whatever we want now and just reboot when we want to change the setup. Hopefully that will be sorted out by the Educational release. Our next target is to get Puzzlebox Brainstorms. This works well from our laptops with an Emotiv EEG headset, and the Brainstorms software is written in Python. We probably need to get a NeuroSky EEG headset though as the Emotiv drivers are commercial and not yet available for Linux.
The scouting movement has really come on since I (Liz) was a girl, when it was gender-segregated, and, for my Girl Guides troop, all about making tea, washing up properly (I had the badge and everything) and learning what amounted to basic nursing skills. These scouts get to go mud-rafting, prepare pheasants for cooking, shoot bows and arrows, and go mountaineering. I think I was born a quarter of a century too early.
But finally, I can leave the scouts to just have a play on their Pi and be confident that they will be able to do things and explore. I do not know Scratch, but they have seen it at school and very quickly made some programs to chase a raspberry fish around the screen (you always lose, but can run and hide in the corners for a while); and a smiley face maze game where you have to hide from Pac-Man-type monsters that patrol their corners of the maze. They can all, of course, beat my attempts at Quake III.
A couple of them came across last Sunday to make an electric pickup for their guitar (a piezoelectric transducer disk for 99p), and to see what they could do on the Raspberry Pi. They had to be dragged away from the game they had made, and were busy changing and improving it as their parents finally prized them away from it – that’s what it’s about isn’t it!
The scouts’ games are pretty basic compared to downloaded games and anyone else would get bored with them in no time at all, but it is completely different when it is your game that you’ve written yourself, or a game your mate has written. The fun is in planning how to make it better and problem-solving to get the code to do that. GUI programming languages like SCRATCH and the Lego robotics NXT-G mean that my scouts can get to that point and enjoy developing something that is working straight away. They could do that on any computer, and it is a little bit intangible exactly what makes the Raspberry Pi so much cooler than a laptop. But when you can see the board and put it in your pocket it seems much more real. With the Pi they can have their own computer that will be able to go anywhere and it doesn’t matter if they mess things up – they can recreate the whole system by recopying the SD card. Developing the operating system and installing hardware is, for them, more like getting apps from the App Store than upgrading Windows. They will be able to share that with each other in the same way as they recommend new apps to each other. And they like the idea that when they have one each (they all want one each and several are in the queue already) they can just swap SD cards and will have recreated their computer with all their projects.
The initial development release of the Raspberry Pi has had some frustrations as the software and hardware gets sorted out, but that is part of the fun of this stage of the Pi. The scouts can see what I am doing to get it working (with the help of everyone on the troubleshooting forum!) and enjoy the small wins as we make progress.
Should everyone have a slice of the Pi?
How will the Raspberry Pi work for other groups? Obviously, I have a great group of scouts who win national STEM competitions and are a pretty unique bunch, but what makes them succeed? They come from a decent state school and are an ordinary mix of 10-14 year olds. They are not selected in any way other than wanting to join the team, so it’s not just for ‘gifted and talented’ kids. But the leaders enjoy science projects and we generally find that it is very easy to enthuse the scouts at everything that we are enthusiastic about ourselves. They are doing it in their own time and are having fun and not ‘being taught’. They have learned that if they put in the effort they can do really well at whatever they are doing, and now that they know they can succeed, that enthusiasm and confidence means they usually do! I think that formula will work for most groups of kids if they find an enthusiastic teacher or leader. They will be able to do all sorts of great things with a Raspberry Pi, and the price means that once they are widely available, it will be cheap enough for practically any group to get involved – just check out the Projects and Collaboration Forum.
As for the teacher/leader, you do not need to be a computing expert. You need to be reasonably computer literate at this stage obviously, but the Raspberry Pi Forum works well and there are plenty of people out there who will help you through getting to know Linux. The wider Debian community has produced a lot of walk-through instructions to do most things. I think the main requirement is to have some long term objective of what you want to do as a class/group and to want to do it!
Hear from the scouts themselves, and see the BERT5e the robot in action, as well as a game Doc has written in Scratch on the Raspberry Pi. The scouts here are Matt Farrow, Matty (Doc) Smith, Isabelle (Biz) Herbert and Ben Thomas.