Wednesday 18 February 2015

Announcing the... Raspberry Pi 2

Raspberry Pi 2

The Raspberry Pi 2 is out now – we speak to Eben Upton and James Adams to get the inside story on its development, and the Raspberry Pi Foundation's 2015 plans

Six times more powerful. That’s one of the first things that we heard about the Raspberry Pi 2 and that alone was enough to get us loading the car for a road trip to Cambridge - that and the name itself. We had been half-expecting a Model C to arrive at some point early this year, but a Pi 2 - what would warrant the 2? As it turns out, the Raspberry Pi was upgraded with a mighty new processor: the BCM2836. Arriving at Pi Towers to learn more, we met Liz Upton, head of communications at the Raspberry Pi Foundation, and within minutes we were introduced to the engineering team and on the guided tour, surrounded by prototype boards, 3D printers hooked up to Raspberry Pis, desks strewn with resistor strips and Rubik’s cubes, massive oscilloscopes and all manner of delightful gadgetry.

Superstars of Pi Towers


It’s a fascinating, friendly place and the sense of excitement – and pride – was tangible as the team showed us what they were working on and explained their roles at the Foundation. These incredibly talented people have all been hard at work on the Raspberry Pi 2 – the next evolution of the world’s most popular single board computer – since early last year, with the design of the new processor itself starting as far back as the beginning of 2013. “It’sabit of a team of superstars,” says Eben Upton, co-creator of the Raspberry Pi, as he gives us the rundown of the Pi 2’s specs. “The cool thing about Pi is that I’ve been able to hire the best people I’ve ever met – I’m running out now. It’s that combination of people who are self-starting and look after themselves, and also very bright and productive, and that’s actually quite a narrow filter.” Eben is rightly proud of the engineering and software teams who have developed the expanding family of Raspberry Pi products.

We spoke to James Adams, director of hardware at the Foundation, who explained how he first got involved in the Pi project: “I joined Raspberry Pi back in the beginning of 2013. So the original Raspberry Pi A and B weren’t designed by me – that was Pete Lomax – and basically I came on board at the point where this group of guys were doing it all in their spare time. It sold well, there was some money, and it was obvious that they needed proper engineering resources, so we needed to hire some people, pay them salaries – set up shop properly. I was one of the two guys that they first hired – I knew Eben from way back – we used to work at Broadcom together and we’ve done lots of things from chip design to circuit board design, and in fact we worked together on the Video Core chip in the Raspberry Pi, the 3D graphics. Since I joined I’ve designed the B+, the A+, the Compute Module and now the Pi 2. The idea was to polish the thing and have a nice end-to-end, more coherent offering. And also try and fix some of the issues people had with the Pi.”

B+ built for Pi 2


The Foundation team is always on the raspberrypi.org forums and they get a lot of feedback, so they knew quite early on what people were happy with, what they weren’t and also which design decisions they would have made differently. They knew, for example, that they were going to move towards eventually having four USB ports and since they were going to be changing the form factor anyway, they started thinking about what else they could do. We asked James about his decision to design the Model B+ so that the end could be chopped off in order to make the shorter Model A+ base, and he revealed that he also “designed the B+ with the Pi 2 in mind.” If you look at the B+, the underside of the board isn’t as densely packed at the end closer to the USB ports, below the LAN connector, whereas on the Model B it was filled almost end to end. The reason for this, according to James, is that “in the Pi 2, the processor is slightly bigger and it doesn’t have the SDRAM stacked on top, so it needs space for it on the back.”

This was the decision to aband on the package-on-package design (PoP) used in the Raspberry Pi B+ and the original Models A and B. PoP is the process of stacking two or more packages on top of each other – in the Pi’s case, the processor and the SDRAM – with an interface to route signals between them. James says it was used partly because that’s what was sold to other customers for that chip in Broadcom, and partly because “it’s basically the best possible situation – you’re not quite sticking two chips together, but there’s very little in the way between the two that can go wrong. And there’s less routing on the board because you don’t have to route out this big SDRAM interface”. Sowhy the change? “Theway the BCM2836 was designed,” explains James, “we took the old 2835 chip, took the ARMv6 core out and we put in the quad-core ARMv7 with more cache just on the side. The rest of the chip, apart from that ARM complex, is basically identical. And the die grew, so it couldn’t physically fit in the PoP package. We wanted it to, but the original 2835 only just managed to fit in there and we’ve grown the chip size a little bit since then.”

The new BCM2836 processor is, of course, the defining element of the Pi 2 – it’s this chip that’s boosting the Raspberry Pi’s power by a factor of six. We asked James how much of its design was custom and how much was based on its predecessor: “It’s very much based on the 2835,” he replies. “So the story with the 2836 is that back when I joined, there was talk about what we’d do with the next Pi. Do we do anything with the next Pi? What is the Raspberry Pi? We decided that the Raspberry Pi is this $35 form factor – we wanted a chip that would be better but that would also be the same, if that makes sense, and the way to do that is to custom-make one. Obviously Eben still works for Broadcom and the deal with Broadcom was that we’d put up some engineering resource, which was me, and there were a few other people in Broadcom working on this chip, so I went in for nine months for some contracting work. Basically we resurrected the design – took the old chip, took the ARM core out, put the new ARM core in, tested it, simulated it, built it, and now we’ve got products based on it. You don’t normally do chips this way, so it’s a bit of an interesting one.”

Upgrading to ARMv7


All the previous Raspberry Pi models have been based on theARMv6 instruction set, so what was the motivation for the upgrade? James told us that “having the v7 instruction set is really important because a lot of people don’t really think about ARMv6 or compile for ARMv6. With Debian, for example, they don’t have native ARMv6 – they’re all focused on ARMv7 and now ARMv8. So even back when the Raspberry Pi came out, ARMv6 was a little bit of an issue because we didn’t just get an off-the-shelf distribution – we had to recompile everything for ARMv6. So that’s a great win – clock for clock, the core’s faster. We’ve upped the Megahertz, you’ve got four cores and it’s also got half a Meg of dedicated cache for the processor, so it actually makes a significant difference to speed. You have also got double RAM. So this is a very usable little desktop machine now.”Regarding the Megahertz, while the official documentation records a benchmark of 800MHz for the quad-core, in their own tests the Foundation’s engineering team actually got results that were approaching 900MHz.

With all the extra horsepower, you’d think that the power draw of the Raspberry Pi 2 would be significantly higher than with the Model B+. James reassured us, however, that this is not the case: “When you’re idling and doing light tasks, the power consumption’s about the same as the B+, but if you load the processor heavily (this is in extreme scenarios) then it can draw quite a bit more power, obviously, because you’ve got a bigger silicon area there consuming it. On the flip side, this is now non-PoP – there’s more solder holding the physical chip down – so the heat dissipates better. We’re not expecting anyone to see any real difference though. You might see some higher peak current draws but it’s still within the envelope of the B+.”

We also confirmed that the Raspberry Pi 2 is going to be fully backwards compatible and can be used inside your existing projects once you’ve got it set up: “You need a v7 kernel and that’s it,” explains Eben. “You don’t even need new firmware because the firmware we’ve been shipping for the last three or four months already supports 2836.” (We raised some eyebrows at this point.) “Once we had sample boards it was convenient to just put it in the firmware – it’s just been lurking there. It’s actually worth googling for BCM2836 – there’s a pastebin with the kernel. It’s possible we got rid of it but anonymous pastebins are searchable, and this thing had been sitting there for four or five months. It’s got everything – it tells you what the cores are, how fast they are, and it’s just been sitting there.”

Rather than recompile the entirety of Raspbian to be ARMv7, the Foundation decided to ship the operating system with both the v6 and the v7 kernels, and on boot Raspbian will detect whether it’saPi 2 or an older Pi that’s being used and then run the required kernel – meaning that to account for the different requirements of the Pi 2 and its predecessors. As well as the twin kernels, Eben tells us that we should notice a real improvement to the design of Raspbian: “All open source software packages have very option-rich user experiences – they’re designed for power users – and, leaving the configurability there in the configuration files, it’s possible to remove a lot of the clutter away from the default configuration. So it’s really been about taking stuff out – and also rationalising, making things work more consistently. So you’ve got a highlight colour on the window frame, for example – have that be the same highlight colour that’s in the launch bar. Make all the fonts are the same. Use a nicer font. There’s lots of that sort of attention - to detail work that’s been going in, and that’sathing we’ve been able to do as we’ve grown the number of engineers.”

Model A and Compute Module


With Raspbian getting an exterior polish to match its engine upgrade and the Pi 2 set to smoothly replace the Model B+, we wondered what the next step was for the Foundation in terms of growing the Pi family. We asked Eben if a Raspberry Pi 2 Model A is on the cards: “So the issue is that I don’t think I could do a Raspberry Pi 2 Model A at twenty bucks,” he explained. “We’re pretty attached to the $20 price point – it’s hard to do that with the improved SBC, not least because if you put a quad-core SBC down with a quarter of a Gig of RAM, it feels like a kind of imbalanced system. You probably want to put at least half a Gig of RAM on there and then you’ve got something where fitting that into $20 is challenging. And most of the people using the A+ don’t need the quad-core performance. We’ve gotten an awful lot of performance out of the ARM11 on the Raspberry Pi 1 and so the A+ is still quite a viable platform. Maybe in due course – a year maybe, conceivably.” Of course, we had to ask about the possibility of a Raspberry Pi 2 Compute Module too, though Eben was a little more close-lipped on that one: “It’s certainly possible to build one, but I think we just want to get this one squared away first. It’s absolutely do able and I think it’s a pretty obvious thing to try and do, but we just need to get this out. Even with the expanded team, it’s pretty software heavy so we’re actually still quite constrained in terms of what we can do on the hardware side.”

The Raspberry Pi has certainly been successful in the hobbyist market, which the A+ and the Compute Module are chiefly targeting, but we asked how the Foundation felt its core educational mission was going. Eben was really positive about its impact in the classroom: “It’s good – we had the curriculum change in September and that’s really caused a lot of schools to wake up and realise that they need to do this now, they’re going to be assessed on how good they are at doing this. While we’ve never advocated that schools get rid of their computers and replace them with Raspberry Pis, it’s actually a lot more feasible with this device – it is a PC. But we’d never advocate that in schools. The place of the Raspberry Pi in the school is as a device for children to own themselves and have at home that runs the same educational software that you can run on school computers. The nice thing about the Pi is that most of these pieces of educational software are open source – even the ones you’re using under Windows at school – and you can use them on the Pi.”

Teacher training


Picademy was another of the Foundation’s great educational successes last year. Launched back in April, Picademy is a teacher training initiative that has become a regular event (the next one is 27-28 April), inviting primary and secondary school teachers down to Pi Towers in Cambridge for a free weekend crash-course in all things Pi, culminating in a projects day where everyone gets creative with a Pi and puts their new knowledge to use. Eben tells us that it’s been hugely popular: “On the education side, Picademy is the first thing we’ve found that really works. This year it’s about trying to figure out how we can do more of that. We trained 150 teachers last year – there are 25,000 schools in the UK, so we’ve got to go faster.

“And we want to do stuff outside the UK, right?” Eben continues. “That’s the other thing. We understand the UK education system well but we want to figure out how to do this in North America. I mean, the US is our biggest market and we know almost nothing about the way the American education system works. We’ve just hired Matt Richardson, who’s our first US employee, and his role is to figure out how to make the Pi as successful and to integrate it into education over there as it is over here.” It sounds exciting and will be an amazing resource for American teachers, though the Foundation still has a little work left to do regarding how exactly to implement Picademy in the States: “We don’t have an answer to this at the moment – it’s how you can scale it beyond what we can do here with the team we have here, how you take Pi Academy and push it out to a large number of people. Do we just scale the organisation? Or do we come up with some sort of franchising scheme, a system where you put in one layer of abstraction and teach people how to deliver Picademy? But does that thing make sense? At the current small scale, there’s a kind of exclusivity about it. When teachers go out and get their Raspberry Pi Certified Educator badge it actually means something, because there aren’t that many people who’ve got it, and then they can go around and be advocates.”

With the growth of initiatives like Picademy and the sea-change that has come about in the UK education system as a result of the new IT curriculum, things are looking very good indeed for the future of computing. Towards the end of the day, we were chatting to Eben about how rewarding it will be a few years down the line, when all the kids who are coding Sonic Pi and Scratch in schools right now start to hit college and university, and start pushing those computer science graduate numbers back up. Apparently, we don’t even need to wait that long: “The canary in the coal mine for us was the application numbers at Cambridge,” says Eben. “They had this massive decline from the Dotcom boom, like five or six hundred people applying for eighty places, down to 250 people in 2008. Interesting thing is, it’ll take a while to feed through kids who are playing with Raspberry Pis but it takes no time at all for it to feed through the message that computer science is important, valid. One thing we’ve made is this educational tool, but the other thing is a lot of noise. Actually, the noise has already taken effect – the application numbers now are above where they were in the Dotcom boom.

Mission accomplished?


“At 2008 it was like a dead cat bounce,” elaborates Eben, “then it went up to seven or eight hundred. The nice thing is it’s actually loads of organisations who woke up going ‘We’ve got a problem!’ It catalysed itself – it was this wave of enthusiasm. A number of organisations materialised at exactly the same time around exactly the same thing, not competing with each other but just doing different aspects of the same thing. So in my college interviews, when I was director of studies and we were interviewing people, and we had six credible applicants for three places, it was just horrific. My college interviewed 42 applicants this year – same college, just ten years later – again for three places. With 42 applicants you get a few good ones, and then you go and beg to the administration and say, ‘Look, just let me pick five or six.’ But yeah, I was talking to my friend who was interviewing and he said, ‘We just interviewed for days.’ It was only an afternoon when I was doing it!”

It’s an amazing response and the Raspberry Pi Foundation is well on its way to completely transforming computing education. On a final note, Eben reassured us that his ambitions don’t stop there: “We still want the desktop. Linus wants the desktop and we want to help him get it. There’s no better way to get him the desktop than to make it very, very cheap to get the hardware.” Reader, you’ll be the first to know once we’ve replaced each of our ageing rigs with a powerful little Pi. We can’t wait!


What's new?


The changes that have been implemented in the Raspberry Pi for its first full iteration are few but potent. In a nutshell, here are the highlights of the Ras Pi 2:
• BCM2386 quad-core 800MHz processor Based on the BCM2835, this is the first outing for the custom-made processor
• 512Kb dedicated processor cache
• ARMv7 core A more modern instruction set, this is far better supported than ARMv6
• 1 GBRAM
• Raspbian updated The OS now ships with two kernels: ARMv7 to support the PI2 and ARMv6 to support other Pi models

New display module


As we investigated the treasure trove of tech that is Pi Towers, we caught wind of a number of new products that are currently in development – among them the Raspberry Pi display module. A touchscreen designed to work with the Pi’s MIPI DSI connector, the idea is that an adapter board will fit underneath the Raspberry Pi and the screen over the top of it, so that the IO pins are accessible round the back and you can place the entire setup into an enclosure or other project.

Eben has been keen to make use of the MIPI DSI connector for a while now: “These connectors cost several pence each – make four and a half million of them and you found you’ve spent half a million dollars on this connector and you’ve never used it, so we’re highly motivated to get this out.” As well as making use of the Pi’s MIPI DSI, the Raspberry Pi display module will also, naturally, be one of the best displays out there: “It’s a wide VGA, 800 x 480, but it’s an industrial quality display so it has a very good viewing angle. One of the things you find with cheaper displays is that they’re great with tablets, because you can orient the tablet in order to get the optimum viewing angle, but if you have something that you actually need to build into an object then you’ve got no control over the viewing angle. So you need something that’s got proper viewing. This has got 10-point capacitive touch on the front as well. We’re actually just in the process of getting the first prototypes of the adapter board in. We’ll squeeze that in before the Pi 2 production ramp, just.”

New Wi-Fi dongle


When we asked whether or not onboard WiFi was considered during the design process of the Raspberry Pi 2, Eben Upton quickly dashed out to fetch another brand new product from the Foundation by way of reply - a 150-Megabit Raspberry Pi Wi-Fi dongle.

The question, according to Eben, was “can we do onboard Wi-Fi for significantly cheaper than we can get offboard Wi-Fi?” For now, at least, the Foundation’s engineering team has landed on the side of‘no’, mainly because of a few quality concerns: “You know, onboard’s not being sold at enormous margins,” explains Eben, “soyou can imagine that it might cost us five bucks to put Wi-Fi on there - if we’re going to put Wi-Fi on there then we want to make it really good Wi-Fi and that does cost. You do need to make sure you get the right components. It’s things like having an actual metal antenna like we have in our Wi-Fi dongle, rather than just a printed PCB antenna - it does bump the cost up a little bit. So that’s been done as a sort of sideline, really - it’s not something we focused on. But it does give us an opportunity to bundle some really good Wi-Fi with the Raspberry Pi 2”

And the retail price? Spot on, according to Eben: “We’re shooting for something ridiculously low like $5 plus VAT - so with VAT, something like £4. It’s going to be cheap and tiny - and fora good dongle.”

Astro Pi ready to launch


Towards the end of last year, the Foundation announced a new project and competition in partnership with the European Space Agency, UK Space and ESA astronaut Tim Peake. Two Raspberry Pis are going to be blasted off into low Earth orbit on the International Space Station, along with a brand new Raspberry Pi HAT (hardware attached on top) board called the Astro Pi.

“I’ve just been putting the finishing touches on the board that’s going into Astro Pi,” says James. “It has this LED matrix you can use like a frame buffer, a little joystick, and an accelerometer, gyroscope, magnetometer, humidity, pressure and temperature sensors. It’s a great board you can do various things with. We’re going to put it into production, and obviously it’s going to space, and we’re going to use it as one of the primary boards for writing educational materials. Actually, one of the guys has already written a little Snake game for it, which you can play on your eight-by-eight matrix using the joystick. And Flappy Bird, that’s the other one. Or you can use the sensors and provide feedback. So it’s sort of an open experimenter’s board with just a bunch of cool stuff, and we’ll try and make it available as cheaply as we can so people can buy it for fun or education.”