Getting started with the Internet of Things

By 2020 there will be twelvety gigajillion of Internet Things all shouting at each other and sulking – Alice Bevel

The Internet of Things had been around for a while (since 1982 apparently) but it’s still a bit of a mystery to many. The concept of hooking up physical devices and letting them talk to each other is great, but how do you get started? How do you get useful data from them?

A Thing

A Thing

I’ve been playing around with IoT this week and came across this great starter IoT project for the Pi, a people counting project by Agustin Pelaez. It’s an oldie but goodie and worth a mention because it’s as simple as it gets in terms of IoT—a sensor sends data to a server, which then presents the data in a nice, human-friendly form.

PIR connected to Pi

A £2 PIR connected directly to the Pi with just three wires ( Photo: Agustin Pelaez)

It’s also as cheap as chips—apart from a Pi you only need a passive infra-red sensor (PIR) as used in several of our resources. We love PIRs: they cost a couple of quid, connect directly to the Pi GPIO pins and they can be used for all sorts of useful and/or mad projects. The basic Ubidots account that stores and analyses the data is free. So this is an ideal IoT beginners’ project— cheap, straightforward and can be adapted to other projects. (Note that there is a bug in the code, peopleev = 0 should read peoplecount = 0.)

node-red and thingbox

Node-RED on Thingbox, controlling LEDs on the Pi via the web (Photo: thethingbox.io)

If you want to dig further without too much pain, the ThingBox has an SD card image for the Pi that allows you to “Install Internet of Things technologies on a Raspberry Pi without any technical knowledge” and has a number of basic projects to get you started. It works with Ubidots out of the box and has a number of tutorials that will help you learn common IoT tools like Node-RED on the Pi (including a PIR counter project which is a nice compare-and-contrast  to the Python based one above.)

I like the ThingBox a lot. It lowers the activation energy needed to get started with IoT on the Pi (actually, it makes it easy) and it allows all Pi owners access to what appears at first glance to be an arcane … Thing. The Internet of Things is fun, useful and empowering, and a natural extension to physical computing using the GPIO pins on the Pi. Hook up some Things today and have play.

Another Thing

Another Thing

13 Comments

Pocket PiGRRL: is that an emulator in your pocket?

PiGRRL and robot

Huge, city-destroying robot for scale (Photo: Adafruit/ Ruiz Brothers)

Last year we went into full retronerd dribble mode over the PiGRRL, a Pi-powered Gameboy. Our friends at Adafruit have brought the project up to date with the Pocket PiGRRL. It has a 3D printed case and uses the smaller Raspberry model A+ plus a 2.4″ PiTFT HAT to bring the size down. Emulation is handled by RetroPie.

Adafruit say that “it’s easier than our previous PiGRRL build” and the use of components such as the amplifier and charger means that it’s suitable for a confident beginner—at the very least you’ll earn your soldering skills badge.

5 Comments

The Inquirer Tech Hero Awards

inq-tech-hero-awards-logo-540x334

This is not a flashy post with lots of pictures and farkles. It’s a thank you note.

In February 2012 we started selling the Raspberry Pi  (you may not have heard the story—it went pretty well ;)). A year later we moved into a small office. There were six of us.

Our very first office. Aww, cute.

Our very first office. Aww, cute.

Less than a year later we stormed the penthouse floor of the same building and have been there ever since. (We even have our own fridge now so we don’t have to write our names on our pies with a Sharpie). And here we are three years later—things have gone swimmingly and we’ve picked up one or two awards (OK, lots) along the way. We love getting awards but not (just) in a big-headian way. They are a confirmation that we are doing something right and doing something good.

Last night I travelled on the InterCity to London to attend the first ever Inquirer Tech Hero Awards (Liz and Eben are away and I was sent because I most resemble him physically). We were nominated in three categories: The Raspberry Pi 2 won ‘Best Product’ and Eben won ‘Tech Champion’. We had a great night, chatted to a load of people and we brought back two impressive chunks of glass that say, “Keep doing your thing, it’s good.”

The best photo I could manage - these things are shiny AND transparent

The best photo I could manage – these things are shiny AND transparent

So thanks to the Inquirer and to everyone who voted. But the biggest thank you goes to our amazing, unique and lovely community. We wouldn’t be here without you. Cheers.

10 Comments

Two factor authentication safe deposit box

github 2fa dialog

A skilled hacker attempts to crack 2FA

Securing your digital life with two-factor authentication (2FA) is pretty common nowadays. A password alone just doesn’t hack it. (Or does it?) Typically, 2FA on the web requires a one-time code, sent to your phone, as well as your password to log in. Other systems may use factors such as biometrics (e.g. fingerprints) or hardware dongles. (My own bank requires me to use a silly little (very losable) card reader every time I want to transfer a fiver.)

Safety deposit box with two-factor authentication

Safety deposit box with two-factor authentication

Thinking inside the box

Pablo Carranza Vélez decided to apply the principle of 2FA to a physical object, a Raspberry Pi controlled safe deposit box. To get into the box you need both your personal entry code and the code sent to your phone. This then triggers a solenoid to unlock the box.

Lots of cool stuff going on

The box uses resin.io and Authy API. Full details, schematics and code can be found on  Pablo’s hackster.io page. It’s a simple concept but there’s lots going on in terms of hardware and software—Authy, resin.io, MongoDB, node.js, Bootstrap, breadboard circuits, solenoids—to make a great project and an interesting proof of concept. It’s also an excellent introduction to the contemporary technologies used and there’s even some computer science with a nod to state machines.

Opening the resin safebox from Pablo Carranza Vélez on Vimeo.

A pre-emptive note thing

“Just hold on this minute!” shouts a completely imaginary concerned reader. “You could (literally) brute force it with a sledge hammer/ hack it with a giant Wile E. Coyote magnet/ steal the building it was attached to / drill a hole in it and send in a tiny monkey to feebly tug at the solenoid.” Well yes, you could. To all of them.

Our advice is: do not make one of these to store your ultra-rare U2 Panini stickers in as they might get nicked (my brother swears to this day that it wasn’t him who drew NHS specs on Bono in red biro). The 2FA safe box is a thought provoking Raspberry Pi / IoT project, not the Old Lady of Threadneedle Street, lawks! (I’ve always wanted to write that, it’s a cracking name :))

Solenoid control breadboard prototype

Solenoid control breadboard prototype

10 Comments

Snapping Stills with the Red TED Letters

TED2015 Photo Booth

I’m a bit of a TED talk fiend, so I was delighted to find out that a few Raspberry Pis had a hand in letting TEDsters capture their photo along with the iconic red TED letters at TED2015 in Vancouver. To explain:

A funny thing happens at the end of every TED — after the show wraps, first one brave person, and then duos and groups, rush the stage to get their picture taken with the red TED letters. So at TED2015, our tech team thought, why not bring the letters out to the conference floor and let everyone play? In a nights-and-weekends project, our engineers built a self-service photobooth that encouraged all TEDsters — attendees, staff and more — to strike a pose. By the end of the conference, 1,296 photos had been taken with the booth.

“A lot of people wanted to get jump shots,” says software engineer Joshua Warchol, who helped conceptualize and build the booth. “Some groups would spend 10 minutes trying to get the perfect aerial moment. And I also had not anticipated that people would feel an unstoppable compulsion to climb the letters. We had to get them repainted mid-week because of nicks and scuffs.”

We see a lot of people implementing great photo booths with Raspberry Pi, but what I especially like about this one is that it’s activated when a group scans their NFC badges. After the photo is taken, it automatically emails it to the group that badged in. Of course, the whole operation comes together with a lot of different off-the-shelf technologies working in concert. Along with the Raspberry Pis, there’s a tablet interface, Adafruit NFC reader, a camera, and a BlinkStick LED module to indicate the camera’s position and status. Luckily for us, Joshua posted all the details about how he pulled this off, including the code. Thanks, Joshua!

Interface

Camera1

2 Comments

Modulo: a simple, modular solution for building electronic devices

We came across the excellent Modulo on Kickstarter recently. Modulo is a “modular solution for building powerful electronic devices” and consists of a cluster of smart modules such as sensors, motor drivers and displays that slide into a solid base unit.

modulo

It abstracts all the jumbliness of building electronics from scratch and lets you concentrate on concepts, design and programming cool stuff.

Once you’ve built your project you can program it in Python on the Pi. It also plays nice with Arduino and Spark (now Particle).

Poseidon, a robotic landscape watering system. Using Modulo and a Pi it delivers just the right amount of water based on the weather forecast.

Poseidon, a robotic landscape watering system. Using Modulo and a Pi it delivers just the right amount of water based on the weather forecast.

The Raspberry Pi crew met the Modulo team at MakerCon this week and were, of course, challenged to Modulo Pong. Eben won 26-14 (I completely made that up based on a recurring dream in which the score is always the same and Eben is dressed as a giant ping pong ball.)

Modulo controlled Pong

Modulo controlled Pong

We like Modulo a lot. It’s smart, funky and a great way to get into digital creativity. Also, it has “Knob kit” and a tea brewing robot and it would be very un-British of us on both counts if we didn’t let that influence us.

Modulo has already reached its primary Kickstarter goal but is now aiming for sufficient funding to make Modulo a sustainable concern. Take a look if, like us, you’d like to see this happen.

20 Comments

Price cut! Raspberry Pi Model B+ now only $25

When we announced the Raspberry Pi 2 back in February, we said that we’d continue to support its predecessor, the Raspberry Pi Model B+. Since then, we’ve sold well over a million units of Raspberry Pi 2, but Model B+ has also continued to sell very well, despite also costing $35.

$10 cheaper, but just as much fun

$10 cheaper, but just as much fun

A side effect of the production optimizations that allowed us to hit the $35 target price for Raspberry Pi 2 is that the Model B+ is now much cheaper to manufacture than it was when it was introduced. With this in mind, we’ve decided to drop its list price to $25. If you’re looking for a Raspberry Pi with networking and multiple USB ports, and don’t need the extra performance or memory that the Raspberry Pi 2 brings, you might want to check it out.

The Raspberry Pi product line now stretches from the Model A+ at $20, via the Model B+ at $25, to the top-of-the-range Raspberry Pi 2 at $35. The new pricing will take effect across our partners’ websites over the next few days, but right now RS Components in the UK and MCM Electronics in North America look like your best bet.

58 Comments

The Sense HAT: headgear for the terminally curious

Having looked at the chunky outside goodness of the Astro Pi case yesterday it seems only fair to take another look at the heart of the Astro Pi, the Sense HAT. (This is not a conical cap that you put on the really clever kid and stand him in the corner but our add-on board for the Pi bristling with sensors and other useful things.) It’s currently going out to schools and organisations who took part in our recent competition but we also plan to sell it.

A Raspberry Pi wearing a Sense HAT

A Raspberry Pi wearing a Sense HAT

The full tech specs are here but basically it has:

  • 8×8 LED matrix display
  • accelerometer, gyroscope and magnetometer
  • air pressure sensor
  • temperature and humidity sensor
  • a teeny joystick

The Astro Pi site explains what these all do and how they could be used.

I’m really excited about the Sense HAT. With all of those sensors on a single board it’s obviously a brilliant tool for making stuff (I have in mind a self-balancing attack robot that senses humans, aggressively hunts them down and then gently dispenses Wagon Wheels from its slot-like mouth). But it’s the potential for science that’s making me think. In particular I’d love to see it flourish in the science classroom.

A typical school science classroom

A typical school science classroom

Despite the teacher recruitment ads that inevitably show zany antics with Van de Graaff generators, explosions and dancing bonobos the reality is that much of high school science is about experimentation and observation (which is a good thing!). But lab kit such as sensors, controllers and data loggers don’t come cheap (I was once told by a class that their usual science teacher never let them use the data loggers because “they were too expensive). Nor is it easy to get bits of kit to talk to each other or the Internet of Things (with the potential benefits that come from that such as improved assessment, parental involvement, sharing and consolidating data).

data logger

A data logger I found in a school skip. The size of a cash register yet only logs temperature. On paper.

A Pi wearing a Sense HAT could do everything from monitoring plant growth to controlling and logging experimental variables. A series of experiments using the accelerometer/gyroscope to investigate forces and equations of motion is mandatory. Feel free to add your own ideas below and if any science teachers would like to get involved the please get in touch.

If you are lucky enough to already have a Sense HAT, Martin “When does that man sleep?” O’Hanlon has written an excellent getting started tutorial . If not then it’s worth taking a look anyway to get a sense (yeah, yeah :)) of what it can do.

Astro Pi sense HAT LED

Up above the streets and the houses, Sense HAT climbing high. (Photo: Martin O’Hanlon @martinohanlon)

The final price is yet to be announced but we’re confident that there will be nothing else out there to rival it for value, potential, support and resources. Keep your eyes peeled for more news on the Sense HAT soon.

30 Comments

Astro Pi flight case

You can’t just take a Raspberry Pi into space in your pocket or an old soft scoop ice cream tub. It’s too spiky for one thing. What you need is a block of aluminium the size of your head and some mad milling skills to make the best Pi case ever. Dave Honess explains:

The latest update to the Astro Pi project is the unveiling of the Astro Pi aluminium flight case that British ESA Astronaut Tim Peake will be using on the ISS. This will not be available to the public to buy because we’re only making a small number of them. We may however, in due course, release an object file so schools with a 3D printer can print one themselves.

The Astro Pi flight case.

The Astro Pi flight case.

The case is made from 6063 grade aluminium which is standard for aerospace applications. The image below was taken from the CAD software that we used to model it.

This is the top view showing the opening for the LED matrix and joystick along with a quad of buttons with an adjacent pair. The face on the right is used to attach it to a Bogen arm so that the Astro Pi can be held in place, for example if the crew want to aim the camera out of the cupola window.

The hole next to the joystick is to allow air to flow inside and reach the temperature, pressure and humidity sensors.

case_final_1

The design may surprise you because it’s so big a bulky. It satisfies the safety requirements that ESA and NASA have in place for small payloads aboard the ISS though!

This is not a 3d rendering.

This is not a 3d rendering!

The most important of these requirements is touch temperature. There is a rule that any surface, that the crew can touch, must not reach or exceed 45 degrees Celsius. Our Jonathan Bell and SSTL’s Nimal Navarathinam did extensive thermal simulations to work out the requirements. That’s really hard maths to you and me! The CAD heavy lifting was done by Jonathan Wells who runs an industrial design consultancy local to us in Cambridge.

IMG_2033

In space the process of convection doesn’t happen. On Earth the air warmed by a Pi CPU will rise as colder air is pulled down by gravity. On the ISS the air warmed by a CPU just stays there and bakes it. So the case has been designed for thermal dissipation in mind. There is a guaranteed level of airflow within all of the ISS modules which makes this possible.

Those pillars on the base each dissipate about 0.1 Watts of heat. All of them combined with the surface area of the case ensure that the Astro Pi can never get anywhere near 45 degrees. Inside the case the Raspberry Pi is thermally joined to the aluminium by way of a heat conductive boss / slug.

case_final_3

The view above shows the hole for the camera module in the middle too. So make a mental note that the camera faces in the opposite direction to the LED matrix when in flight configuration. You can also see the corner bolts that hold the two halves of the case together.

IMG_2019

The ISS crew are also really fond of bungee cords, the kind you might use for camping or mountaineering with those hooks on the ends, and so the four corner columns have holes to allow bungee cords to be used to lash the Astro Pi to whatever they want.

IMG_2016

The case is made from a solid block of aluminium and a serious set of skills are required to turn it into what you see above. We’re using a company based in Derby called Pentaxia for this. They’re a great company and have been hugely accommodating of our needs. Below is a picture of their main shop floor. The machines on the right were the ones used to make the case.

pentaxia-1


So that’s about it for now. The only thing left to tell you is that we’ve now reached and successfully passed phase two of the flight safety process with ESA. So it’s only phase three to go now before we get the mighty flight safety certificate that says we can go on the Soyuz rocket with Tim! Between now and the phase three review all the testing will occur at SSTL and Airbus Defence and Space.

Here is a brief summary of the tests we have to do:

RTC (real time clock) Battery

  • Measurement of open circuit voltage and loaded voltage
  • Vacuum exposure test (450 mmHg for 2 hours)
  • Post vacuum inspection for leaks and deformation
  • Post vacuum measurement of open circuit voltage and loaded voltage

Flight Hardware

  • Operation checks (verify it boots and functions correctly)
  • Power integration test (using an ISS mains AC inverter)
  • Thermal test (stress the Astro Pi to cause maximum current consumption / heat dissipation and measure touch temperature)
  • Vacuum thermal test (same as the above but in a vacuum)
  • Off gassing assessment (determination of off gassing products from materials and assembled articles to be used inside the ISS modules)
  • EMC test
  • Vibration test (Soyuz launch vehicle conditions)

Keep an eye on social media over the coming weeks for as it happens updates!

Thanks for reading.

38 Comments

Despicable Katie’s Minion Pi

When we were at SXSW Create in Austin back in March, teaching hundreds of kids about Bash script, we met a young lady called Katie.

Katie looks unassuming, but she’s actually an evil genius.

katieandeben

Some guy who needs a shave, and Katie.

Some of the other kids we talked to during the three-day event hadn’t done a huge amount with a Raspberry Pi before (although we saw a lot of young people who were using Pis at school or home for Scratch programming or Minecraft); but there were some real experts among the crowd – and Katie, who came along to tell us all about what she’s been doing with her Raspberry Pi, and to get some tips, was the sinister stand-out.

Katie’s been using a Pi at home for some years for a number of projects, but her most ambitious yet is her Minion Pi, which she was preparing for a school science exhibition when we met her. Minion Pi is a customised Kossel Mini 3D printer driven by a Raspberry Pi 2 – Katie’s built a custom power supply and a custom user interface on an iPad using her phone as a hotspot, so the whole thing is completely self-contained. Why? She’s building an army of Minions, her first step towards world domination.

MinionPi_RPi

(An important note: Katie is eleven years old. Like most of us here at Pi Towers, when I was eleven I was mostly making forts in shrubbery and chewing stuff that wasn’t meant to be chewed; not building complicated computing systems.)

Katie made this board to explain how her project works. Click to embiggen.

Katie made this board to explain how her project works. Click to embiggen.

Here’s Katie’s diabolical contraption in action. (Printing Minions, naturally.)

Gru Katie mailed me to say:

I’ve still got some work to do on the project (Pi Cam should arrive on Thursday), but it’s running really, really well, and the Raspberry Pi makes it easy to control from my iPad, and made it really easy to take to school and demo. People are already paying me to print stuff!

Katie’s made a very detailed build diary available (she warns me that the server it’s on is easily overloaded, so it’s possible you may have to come back later to look at it). Congratulations, Katie: this is an amazingly polished project. Please look upon us kindly when you are Despicable World Queen.

20 Comments