Teacher’s Pi cluster controls digital learning classroom

Mike Reed is a completely self-taught digital learning teacher, and during his tenure he has built not one, but three, impressive Raspberry Pi clusters to make his lessons run more smoothly.

Back in the day, when Raspberry Pi Model 1 launched, Mike first learnt how to program in Python by himself, before going on to develop projects at suitable levels for all of his students.

Watch Mike’s Pi-powered classroom in action at Kimbolton School

From cluttered to cluster

Originally the Raspberry Pis were dotted around the classroom — one for each desk — with mice, keyboards, and power and HDMI cables plugged in. Each desk was a sea of cables, computers, worksheets, and monitors.

Wanting to declutter the desks, Mike started to think of ways he could use the computer terminals to connect to the Raspberry Pis remotely. So he taught himself about VNC, creating static IP addresses and configuring a router to run a network separate from the school network. That rabbit hole turned into the classroom’s first Pi cluster, made out of early Raspberry Pi Model 3s, an MDF board, and two multi-way extension cables:

Mike’s first Pi cluster, built eight years ago

New and improved

Fast forward ten years, and now a 32-board cluster — the third iteration — has just come online.
Using a custom laser-cut backing board, each Raspberry Pi 4 Model B has its own OLED to display its IP address and VNC status.

Behold Pi Cluster 3.0

Mike has picked up a lot of tricks in the decade or so he’s been playing with Raspberry Pi, including working out the optimal arrangement of all the boards to maintain access to their ports whilst having them as tightly and neatly packed as possible. He also realised that providing 5V via long cables doesn’t always work due to the voltage drop, so now the cluster’s power is delivered as 20V, before being stepped down by UBECs.

Pi cluster looking silently on over the workstations it is controlling

What does the cluster do?

Pupils connect via VNC from their classroom computer to one of the Raspberry Pis in the cluster. Using a GUI program Mike wrote — which autostarts on boot — they sync their school Microsoft OneDrive accounts to a folder on the Raspberry Pi’s desktop. Then they can either open existing scripts or create new ones before beginning their work. The whole process takes about two minutes.

The cluster is run from a “Control Pi”, which sends threaded SSH commands to the other boards to reboot them after each lesson, wiping the OneDrive connections ready for the next class. It has a colourful interface with lots of buttons to show Mike exactly what is happening with each Raspberry Pi.

The aforementioned colourful interface

Control Pi also has a seven-port USB hub, so Mike can image seven SD cards simultaneously when the Raspberry Pis’ software needs updating.

More teaching time

Building the Raspberry Pi clusters was more than a passion project for a dedicated tinkerer. It has practical benefits too, as Mike explains:

“I’ve finally got a setup I can use to teach classes with a fast turn-on and turnaround time. I can now spend my time helping pupils debug their code rather than managing the hardware.”

Learning about QR codes

Evolving a set of programming projects does still take a lot of time, however. They all start with “Hello World” and cover variables, data types, procedures, functions, parameters, and arguments, before moving onto graphics and GUIs. Pupils who get as far as the later projects can code Minesweeper, Pong, Flood It, and a basic version of MS Paint. Their booklets include lots of QR codes that they can scan to take them to YouTube videos with guides and walk-throughs.

The programming skills that pupils develop in Mike’s class not only allow them to meet exciting challenges and give them opportunities to problem-solve, but also provide an excellent foundation for pupils who aim to take the GCSE Computer Science course. “By the time they do actually begin their GCSE, they often have such good Python knowledge I’m scrambling to keep up!” Mike says.

19 comments
Jump to the comment form

Eric Olson avatar

Since the new version of Raspberry Pi OS based on Bookworm by default uses Wayland and RealVNC is incompatible with Wayland, have you thought about a way forward with the new OS? Will you switch it back to traditional X Windows (this is still possible) or try an alternative remote access solution?

Reply to Eric Olson

Roy Williams avatar

With Wayland you can use RDP or VNC native to Wayland. If you are trying to broker the connections maybe using something like haproxy. Although could use guacamole as a web interface instead of raw VNC or RDP clients.

Reply to Roy Williams

Ray Allen avatar

Nice setup, need to look into this more. I wish we had this when I was in school. We had to make do with BBC Micro, and no one showed us BASIC. I had to teach myself on my ZX81, Vic-20, and ATARI 600. Now I love tinkering with Pis, and my Pi400 is perminantly setup for daily use :)

Reply to Ray Allen

James Hughes avatar

I started on a BBC Micro (well, a bit of UK101 and Apple ][ first), and I now work at Raspberry Pi…

Don’t diss the BBC Micro!

Reply to James Hughes

Michał avatar

Can we hire him?

Reply to Michał

Phil avatar

I’d really like to see Mike asked to deliver some cpd on this. So many good aspects and there is a lack of technical cpd linked to education

Reply to Phil

Kelsey Williams avatar

I love Raspberry Pi’s and I love this setup. It truly makes me feel warm inside. However, I also love brevity and simplicity and I propose that an easier setup would be to run Raspberry Pi OS on a virtual machine. You can’t emulate ARM hardware on a vm, but this shouldn’t matter for most general higher level programming on the Raspberry Pi OS. It should only matter for certain outlying cases and when attempting to write assembly on the machine. This configuration would greatly reduce the effort required of the system administrator as the management of drives becomes a task a shell script could accomplish. The idea that you should look into investing in custom laser backed boards would not enter your mind. By emulating the hardware we can automate the setup.

Reply to Kelsey Williams

Steve avatar

While that sounds true and virtualization on one more powerful computer could be easier, I wonder if they students ever get shown the collection of Pi’s in the cupboard to show what they connect to virtually is still physical hardware? Maybe the few that show more interest in computing might ask to see it, I know I would if there was anything like that when I was in school.

Reply to Steve

Orion avatar

This isn’t a cluster, it’s a fancy Active Directory in a DiY fashion. Granted, the project seems super cool, but calling it a Raspberry Pi cluster is misleading, as none of the Pi’s talk with each other, and there is no splitting of tasks. Still cool tho!

Reply to Orion

Petter avatar

Very nicely done!
I can’t help but feel that the concept “we need a computer that we can connect to with our computer so we can do computer stuff”.. is rather odd.
Though sometimes working around the IT-department is simpler than working with them, I suppose.

Reply to Petter

v avatar

Interesting concept but multiple users connecting to a few server-like boxes or the like would do this way simpler and cheaper. Think 1992 Xterminals for examples.

(and it’s not a cluster, it’s a bunch of tiny servers)

Reply to v

Mike (story originator) avatar

Hi all- just to follow up on some comments- I know there are far simpler alternatives out there (e.g., I could just use the Macs), but as a teacher my #1 aim is to enthuse pupils with the wonders of computer science. In lessons, as well as using the Cluster, pupils use Raspberry Pis to control rovers and robots etc, so I wanted to use one device across all projects- to show them how versatile computers can be.
Moreover, a physical, flashing cluster of Pis looks incredible and works wonders in getting pupils interested and engaged and many have gone on to buy one for themselves- I’ve had so many pupils telling me they’ve been inspired to explore and experiment, based on their experiences in lessons. Physical devices- something that can be seen and touched- are more accessible to children than, say, a virtual machine, that they can’t take home and call their own.
So yes, far easier options are available, but I’ve yet to find anything that piques a pupils interest more than connecting to a Pi and exploring what it can do.

PS. ‘Cluster’ is more my nickname for it than anything else. It’s always fun coming into the room and Firing Up The Cluster!

Reply to Mike (story originator)

Mr Internet avatar

Thank you for the pedagogical explanation! I guessed this was the reason but the confirmation really adds to the story and how it’s important to engage students where they are and in a way that empowers and inspires their curiosity. That’s the mark of great teaching and absolutely vital. I wish more teachers kept that in mind. Their job isn’t to teach a task in the most efficient way possible but to inspire and engage. Great work.

Reply to Mr Internet

ej avatar

Your focus on educating your students using technology in an innovative and accessible way for your students is admirable. Well done sir!

Reply to ej

Nic avatar

Nice job. I agree with other people that this could have been done much easier, but still it’s cool. I’d recommend since all of them look to be linked via Ethernet to image using pxe instead of imaging sd cards. Also, look at using nfs for user storage. Both would make it much easier.

Reply to Nic

Marco Pomponi avatar

Did Mike provide cluster monitoring software?

Reply to Marco Pomponi

Douglas avatar

You should be able to run actual clustering software on top of your ‘cluster’ and add teaching about distributed computing to your classroom experience.

Reply to Douglas

Graham Toal avatar

What are you using to connect the display and keyboard to a Pi? I’m guessing some small computer of equivalent power to the Pi itself. Surely it makes a lot more sense to attach the Pi to the back of each individual monitor, sharing the monitor’s power supply with the Pi[*], which would also give your students access to the GPIO bus when they get to that stage?
[*: assuming its the sort of monitor with an external PSU rather than a mains cable that plugs in directly]

Reply to Graham Toal

Graham Toal avatar

Unfortunately I can’t edit my previous comment so have to post a followup. I just realised from the other photos that the pi’s are connected to Mac computers, not simple HDMI displays. In which case it’s not clear what the point of having a pi at all would be. You can do everything that you could do on a Pi on the Mac. Or do everything that the Mac could do on a Pi if you prefer, at a fraction of the cost.

Reply to Graham Toal

Leave a Comment