Tag Archives: GPIO

Is the toilet free?

via Raspberry Pi

Here at Pi Towers, we are lucky enough to have more toilets than we have people. Some offices don’t. And it’s embarrassing to hear your colleagues micturating (at least for some people – the rest of us chatter through it all and make fun of each other’s shy bladders), so the guys at Made by Many have come up with a Pi-based solution.

It started quite simply. Reed switches on a toilet door would send information to a Pi, which would publish the data to a website, so the folks at Made by Many could check online before going to the loo. They made a LEGO prototype to make sure everything worked.

LEGO

And after applying the switches to the real toilet doors, they ended up with the real thing serving up a result like this when the website was polled.

isthetoiletfreewebpage

Of course, it’s axiomatic that if you can overcomplicate something, you should.

So the Made by Many team started looking at what data they could collect without invading people’s lavatorial privacy (with a privacy document being uploaded to GitHub). No identifying information or information about exactly what was going on in the cubicle was collected at any time.  Over three weeks they ended up with sufficient data points to work some SQL magic and be able to detect:

  • if the toilets are free
  • the total number of visits
  • minimum visit duration
  • maximum visit duration
  • average visit duration
  • total visits by hour
  • total visits by day

From which they could infer:

  • the office’s favourite toilet
  • peak times
  • off-peak times
  • an estimated wait time.

And then they made a command-line-style stats page.

statspage

And because a job half-done is no job at all, they also made a little toilet notifier to live in the menu bar in Mac OS.

toiletosx

They’ve made LED signs. They’ve irritated their colleagues so much that one of them dismantled and abducted one of the reed switches. They’ve demonstrated elegantly that the Internet of Things is always informative, and not always as useful as we think it is. We think this is one of the most entertaining projects we’ve seen in a while. We salute you, Made by Many. And if you’ll excuse me, I drank rather too much coffee after lunch. I’ll just be a minute.

Automated home brewing

via Raspberry Pi

The office conversation this lunchtime went a bit like this:

Me: “Two beer posts in a week is too much, isn’t it.”
Ben: “Maybe.”
Me: “OK. Damn shame: I’ve been sent a great automated brewing project; it’s way more complicated than the ones I’ve seen before. I’ll maybe put it up next week, after the new website goes live.”
James: “Can you send it to me now please? I’d love to read that. I want to update my system at home.”
Gordon: “Me too, please.”
Laura: “Can I see it?”
Clive: “That sounds brilliant.”
Eben: “Mmm. Beer.”
Lance: “Did someone say beer?”
Emma: “Do you have a link I can see?”
Me: “OK. I’ll POST ABOUT IT TODAY.”

So I apologise for inflicting two posts about beer on you in three days: I promise not to mention fermentation at all next week.

Ted Hale blogs at Raspberry Pi Hobbyist, where he concentrates on physical computing with the Raspberry Pi. His most recent project brings in another of his hobbies: home brewing.

We like this not only because we like beer, but because think more Pi projects should employ propane.

We’ve seen brewing projects where a Pi controls simple heating and cooling, but here, Ted uses a Pi here to control all the parts of the brewing method called partial mash: for this he needs to be able to:

  • Open and close a valve to a tank of propane
  • Start a grill igniter to light the burner
  • Detect if the burner actually did light
  • Sense the temperature for the wort (the brew of water, malt extract, and hops)
  • Operate a pump for circulating water through the wort chiller.
Ted had problems over the build, including discovering that one of his sensors actually melted at high temperatures, finding that the igniter gave off so much electromagnetic interference that the I2C bus was unhappy. Being a seasoned hacker, he found ways around all the problems he encountered. The following paragraph, describing how he dealt with the interference, demonstrates why we think Ted is so great:
I used shielded audio cables commonly used for microphones.  I am also a musician so I had some of this already.  If you have to buy a small reel you may find that it is rather expensive.  Cat-5 cable may also work well.  That is what I use for my hot tub controller, but it is not subjected to the massive EMI of this system.
This guy is a musician with a hot tub who brews his own beer and hacks with the Pi for fun. We are in awe.

There’s a writeup over at Raspberry Pi Hobbyist about how the whole setup comes together, and James, I expect you to have overhauled your entire home system over the weekend.

Glock around the clockenspiel

via Raspberry Pi

Are you a primary or secondary teacher in the UK? Do you want some free CPD? Apply to join our free Raspberry Picademy here at Pi Towers in Cambridge with our amazing education team: closing date for applications is March 28. 

Ivan Roulson from RPi Kitchen (really worth some of your time this afternoon if you fancy browsing your way around some rather excellent Pi projects) was at the local recycling centre earlier this year, when he came upon an abandoned glockenspiel.

There are so many places this story could go from here, but you’ve probably already guessed what happened next.

Ivan took that sad glockenspiel home and gave it a Pi for brains. He designed and built some hammers, and hooked up a motor mechanism and some rubber bands to make the hammers snap back up once they’d made contact. Ivan then proceeded to make the whole apparatus dingle-dongle its way through some sweet, sweet music using Python.

The motors are hooked up to the Raspberry Pi’s GPIO pins using two ULN2803 Darlington driver ICs – Ivan’s plan is to build a dedicated PCB to do the job.

This is not the first glockenspiel project we’ve seen (Mike Cook produced one a couple of years ago, with instructions you can follow to reproduce the project at home), but we very much liked the mechanism Ivan built to make his setup work. We’re dying to see a project where someone adapts Sonic Pi to interface with GPIO: seeing some of you replace the pretty-bell command with an honest-to-god real-world bell would make our day. Any takers?

Guests blog #3: This kind of sums it up for me….

via Raspberry Pi

I’ve spent much of today reading through the delightfully turgid folder of guest blog submissions and I was having a really tough time picking the next entry. Should it be technical? Educational? Just plain daft? Did it have enough documentation? Were the pictures good enough? Was it time for a glass of refreshing barley water?

And then I found this short piece from Jonathan Morris. In two hundred words and a couple of pictures, Jonathan sums up what we do at the Raspberry Pi Foundation far better than I ever could. Thanks Jonathan, we love what you are doing!

Hello, My name is Jonathan Morris. I am 10 years old and you guessed it…American!

For my birthday this year I received a Raspberry Pi. I was overjoyed! I wanted to put my Pi to use so I waited and waited for a good opportunity. My Fourth Grade class had been studying the Industrial Era and our final Project was the Invention Convention. The Invention Convention is where you become the inventor (Instead of studying one). (By the way the project’s name is Deliver-E.) So I bought a small wooden box and a doorbell.

Using a Python script and a PiFace Digital, I programmed the mailbox and doorbell to send you emails when either rung or opened. For instance if rang the doorbell, you would receive an email saying “Someone rang your doorbell at (Date/Time).” Same with the mailbox. When I checked the inbox of the project’s Gmail, I had over 115 emails! As of now I am integrating a USB Webcam into the project so when you ring the doorbell it takes a picture and attaches it to the email so you can see who exactly was at your door.

Hackspace security system

via Raspberry Pi

NESIT is the New England Society of Information and Technology in Connecticut, and they have a made a security system for their hackspace that gives us terrible feelings of envy. Their old RFID door lock, powered by an Arduino, was getting old and came bundled with some problems: it didn’t allow for easy modifications to the database of users (the old setup wrote user information straight to the Arduino’s eeprom), couldn’t output video, and would have been expensive to hook up to the network; running its server all the time would have cost about $200 in electricity over a year.

Running a Pi for a year costs about $3.

So Will, one of the hackspace members, set to work getting a Pi interfacing with an RFID reader, and finding some housing for the whole setup. It had to be secure, lockable and robust: somehow he squirreled up an old outdoor telephone network box made of heavy-duty plastic, which he cleaned up, using a Dremel to modify the door of the box so it could accommodate an LCD screen originally intended for a car reversing system.

Before…

…after. Note glistening result of elbow grease application.

Guts

Will really went to town on this build. He could have stopped there, but has also made sure that the system will tweet when someone enters or leaves. It also monitors temperature, can be controlled from his phone, sends an email alert if someone tries to tamper with the case, and detects motion: if it spots someone walking past, it’ll play a short video about the hackspace.

NESIT’s put details of the build online, and have made this video of the system in action. We note that the “beep” you’re using doubles as an excellent cat-scarer, Will; I have the scratches to prove it.

Bird photography with a Raspberry Pi and a DSLR

via Raspberry Pi

Tricky things, birds. Even when you’ve got yourself sorted out with boxes and feeders to entice them into your garden, it can be very difficult to get a decent photograph – they don’t stay still for long, especially if they see you coming (and it is amazing just how adept birds are at spotting the slightest movement – the sort of movement you might make to operate the zoom lens on your camera, for example), and many feeding birds will only visit the table for a few seconds at a time, even if you’re well hidden.

Enter Adrian Bevan and his Raspberry Pi.

Adrian had built a shutter release for his Canon1000D SLR, and decided to extend his new knowledge by making a DIY remote release. He’s been activating it manually, but has also made instructions available for using it with a motion detector (Adrian’s currently using a webcam and a second Pi for this part of the kit), so that the SLR can fire automatically when the Pi it is attached to senses that there was a bird on the table using information streamed from the outdoor Pi.

Your best bet here is to set the camera up in continuous shooting mode so that it’ll take several shots over a few seconds once your target has been spotted. Adrian has put exhaustive instructions on making your own setup on his blog, complete with circuit diagrams and code, alongside some video of the shutter in action.

Speaking of birds, I was, sadly, nowhere near a camera when a sparrowhawk dropped out of the sky to disembowel a blue tit on my front lawn this morning. Rotten shame, that. Oh – and if anybody has any tips on how to stop my bird-feeders being reliably emptied within ten minutes of filling by a horde of marauding starlings, I’m all ears.

Adrian has used that old Pi hackers’ standby, Tupperware, to house the webcam, battery pack and associated Pi in a waterproof environment. Securely housing your DSLR outside in a way that means it won’t get wet but can still take pictures is, obviously, a bit trickier; his is, I think, set up indoors, pointing out of a window, with a whacking great zoom lens attached to the front. If you’ve any ideas on how to set up and leave a good camera outdoors without it getting wet or stolen, please let us know in the comments!

 

 

 

 

 

Oliver and Amelia make a bee box

via Raspberry Pi

Oliver is five, and has produced this lovely bee box for school. He did the modelling, the painting and some of the soldering, and had lots of help from his very talented big sister Amelia, who is seven and did all the programming for this project in Scratch.

bee box

The bee is made of clay, and has a magnet inside his body. His location is determined by some reed switches inside the box, which are connected to the GPIO pins on a Raspberry Pi, as are the LEDs in the flower and the hive. Amelia’s Scratch program, running on the Pi, then uses a TV to display what the bee’s up to (and, to a very enthusiastic Oliver’s great pleasure, emits a buzzing noise).

I mean it about the enthusiasm. Seriously. If you could bottle this stuff you’d make a fortune.

Full instructions on how to make your own bee box (it’s a really enjoyable project for parents to set up with their kids, and I’m sure you can think of a million ways to customise it) are available at Dad Stewart’s website, along with the Scratch code you’ll need, some GPIO instructions and a costed parts list.

Thanks to Oliver and Amelia from all of us at the Foundation – we are flapping our arms and shouting “BUZZ” right along with you.

Matt Richardson and the world’s smartest bike light

via Raspberry Pi

Our friend Matt from Make (whom I totally failed to hook up with for drinks when we were in NYC last month – sorry Matt! We’ll see you at Maker Faire San Mateo) has been busy. This demo is absolutely superb. He’s rigged up a light on the front of his bike that works as a headlight and as a projector to show what speed the bike’s travelling at – Matt has plans to add some more features and make the whole thing rather more beautiful, and we’ll be putting video of the finished article up here as soon as he’s ready.

Matt’s book, Getting Started with Raspberry Pi is published by Make – check it out!

Flag-waving, without use of arm muscles

via Raspberry Pi

Eben met Alex from RasPi.tv earlier this week, and was given this rather fantastic flag-waving kit for our demo table. (If you’ve got something you think we could use in demos at schools, in talks, and when we chat to the press, give me a shout at liz@raspberrypi.org – we’re always looking for new kit to show off.)

This demo is something you can very easily set up yourself at home, if you’re interested in learning how to use servos. Alex’s setup means you won’t require any expansion boards – you’ll be ready to go with just a servo (very cheap from your local electronics shop – Alex’s cost him £3), some wire, some batteries and a few bits of wood.

And a flag.

Instructions are at RasPi.tv – if you make your own, please send us some video!

Recantha’s only gone and made a tricorder.

via Raspberry Pi

I’ve been waiting for…ooh, just over a year, for someone to do this. Recantha, an old hand here in the comments and on the forums, has built a tricorder.

There surely can’t be anyone here without a passing familiarity with Star Trek, but just in case: the tricorder is a made-up thing used by the crew of the Enterprise to measure stuff, store data and scout ahead remotely when exploring strange new worlds, seeking out new life and new civilisations, and all that jazz. Despite its made-up-ness, the tricorder remains a terribly desirable thing. I’ve always wanted to be able to tell whether my planet is M-class or not.

Recantha has bodged together his home-made tricorder using a Pi, some sensors (two for temperature, and one each for magnetism and distance), an LCD display, some switches, a light-resistant resistor, a thermistor and an Arduino Leonardo clone. We hope he keeps adding sensors to it, and maybe, later on, a camera board, until he runs out of space. How about a Geiger counter (this one already works with the Pi)?

Here’s a spot of video explaining what everything on the Picorder does:

(Best of all, the whole thing is cased in LEGO.)

And here’s some more video, showing the thing in action.

If you’re interested in reproducing or building on this project, Recantha’s blogged about it (he has an excellent website, all about Raspberry Pi), and has left a guide to the project over at Pideas, the new site for collecting Raspberry Pi projects. (Go and add something of your own!) Thanks very much for this, Recantha; our office costume parties will now have a dash of added realism. Jamesh has drawn the short straw and will be dressed as Nog.

24-port GPIO on a PCI card

via Hack a Day» hardware

btgpio

So you’ve got a project running on an x86 board and you’d like some GPIO pins. Whether you want to read a few buttons, light up a few LEDs, put an accelerometer in your computer or whatever, you’ve got a problem. Luckily there’s an easy way to get 24 GPIO pins on an x86 board using a PCI card for just a few bucks.

The key component of the build is a PCI TV Tuner card made by Hauppague under the WinTV brand. If you’ve got one of these cards with either a Brooktree bt848, bt849, bt878 or bt879 video capture chip, having 24 GPIO pins is just a spool of magnet wire, a soldering iron, and a steady hand away.

It’s a great build if you’d like some GPIO action without going through the usual parallel port mess, and especially useful since these WinTV capture cards can be had from the usual Internet suppliers for just a few bucks. You’ll need a driver, of course, but the relevant Linux kernel driver - bt8xxgpio – should be included any reasonably modern distro.

Special thanks to [Dex Hamilton] for notifying us of this build.


Filed under: hardware

Pi Matrix

via Raspberry Pi

A very quick post: I’m about to run out of the door to meet TechCrunch at Adafruit. Have a squizz at the video below; this is a really cute little add-on for your Pi that’s just been put out by w8bh.net. It’s an 8×8 matrix of LEDs that you can plug directly into your Pi’s GPIO and program to do neat stuff. You can buy one at mypishop.com. Discuss it among yourselves – I have to go and jump in a taxi!

 

Emma’s second-grade poster project

via Raspberry Pi

Emma is in the second grade (7-8 year olds). And she’s already well on her way to being a fully fledged engineer.

Every year, Emma’s school runs a State Board project, where each kid in the second grade is assigned a US state to make a trifold poster about. Emma’s already a Maker Faire veteran who knows how to solder and how to use a milling machine. She programs in Python, and she’s very keen on electronics; so with some help from Dad she used a Raspberry Pi to turn her poster into an all-singing, all-dancing interactive Vermont extravaganza.

Here’s a great bit of video of Emma showing off her soldering skills; she’s constructing a Perma-Proto that’s used in the project. She learned how to solder at Maker Faire in NY last year; those adults among you who sometimes comment here saying you haven’t ever done any soldering and don’t feel you have the time to learn should hang your heads. (And then go and buy a soldering iron.) Remember: Soldering is Easy.

When I was Emma’s age, I was glueing fake fur, lentils and macaroni onto a large cut-out ankylosaurus. If I remember correctly, I wasn’t allowed to use the scissors on my own, so someone else did the cutting-out for me. I feel a little outclassed.

Well done Emma – we’re all really impressed by your project and your technological skills, and we hope you’ll let us know if you use a Raspberry Pi in any of your future schoolwork!

You can learn more about Emma’s State Board project at Dad’s website.

Meltwater’s RGB LED libraries lesson

via Raspberry Pi

Meltwater (of MagPi fame) has been working on some affordable teaching add-ons for the Pi. He’s demonstrating what you can do with one of his little kits with this natty tutorial where you’ll be creating your own Python library, and using it to do some low-level control of the GPIO. You’ll need one of his RGB LED kits if you want to be able to use your brand new library to play with making disco rainbows (Meltwater’s selling them for a very reasonable £14.49, and they’re a superb teaching tool) – but if you don’t have the kit you can still use the tutorial, with a little adaptation, for your own GPIO projects. And everybody should know about Python libraries, so if you don’t, get to it.

RGB LED teaching kit, with a rev1 Pi. Click to enlarge.

When you’ve worked through the tutorial, you’ll have learned how to use Python libraries, and you’ll be able to make (tiny) blinky disco lights in many colours. But Meltwater’s not doing all the work for you: there are further tasks in there for extra credit and a (pretend) gold star. For extra credit, you’ll be working out on your own how to make the LEDS output the first five colours of the rainbow, which, as any fule kno, are red and yellow and pink and green, orange…

These little teaching kits come with a useful manual too. Fancy sending us one for the demo table, Meltwater? :)

 

Raspberry Leaf

via Raspberry Pi

Dr Simon Monk (who has written a book on the Pi and Python – check it out on Amazon) has come up with a really useful idea: a bit of paper you can install over the GPIO pins of your prototyping Pi (and leave there) to remind you which pin is which.

The simplest ideas are the best, aren’t they? Visit Simon’s site to download and print your own version for free.