View Stonehenge in real time via Raspberry Pi
You can see how the skies above Stonehenge affect the iconic stones via a web browser thanks to a Raspberry Pi computer.
Stonehenge
Stonehenge is Britain’s greatest monument and it currently attracts more than 1.5 million visitors each year. It’s possible to walk around the iconic stone circle and visit the Neolithic houses outside the visitor centre. Yet, worries about potential damage have forced preservationists to limit access.
With that in mind, Eric Winbolt, Interim Head of Digital/Innovation at English Heritage, had a brainwave. “We decided to give people an idea of what it’s like to see the sunrise and sunset within the circle, and allow them to enjoy the skies over Stonehenge in real time without actually stepping inside,” he explains.
This could have been achieved by permanently positioning a camera within the stone circle, but this was ruled out for fear of being too intrusive. Instead, Eric and developers from The Bespoke Pixel agency snapped a single panoramic shot of the circle’s interior using a large 8K high-res, 360-degree camera when the shadows and light were quite neutral.
“We then took the sky out of the image with the aim of capturing an approximation of the view without impacting on the actual stones themselves,” Eric says.
Stone me
By taking a separate hemispherical snapshot of the sky from a nearby position and merging it with the master photograph of the stones, the team discovered they could create a near real-time effect for online visitors. They used an off-the-shelf, upwards-pointing, 220-degree fish-eye lens camera connected to a Raspberry Pi 3 Model A+ computer, taking images once every four minutes.
This Raspberry Pi was also fitted with a Pimoroni Enviro pHAT containing atmospheric, air pressure, and light sensors. Captured light values from the sky image were then used to alter the colour values of the master image of the stones so that the light on Stonehenge, as seen via the web, reflected the ambient light of the sky.
What can you see?
“What it does is give a view of the stones as it looks right now, or at least within a few minutes,” says Eric. “It also means the effect doesn’t look like two images simply Photoshopped together.”
Indeed, coder Mark Griffiths says the magic all runs from Node.js. “It uses a Python shell to get the sensor data and integrates with Amazon’s AWS and an IoT messaging service called DweetPro to tie all the events together,” he adds.
There was also a lot of experimentation. “We used the HAT via the I2C connectors so that we could mount it away from the main board to get better temperature readings,” says Mark, “We also tried a number of experiments with different cameras, lenses, and connections and it became clear that just connecting the camera via USB didnít allow access to the full functionality and resolutions.”
Mark reverse-engineered the camera’s WiFi connection and binary protocol to work out how to communicate with it via Raspberry Pi so that full-quality images could be taken and downloaded. “We also found the camera’s WiFi connection would time out after several days,” reveals Mark, “so we had to use a relay board connected via the GPIO pins.”
With such issues resolved, the team then created an easy-to-use online interface that lets users click boxes and see the view over the past 24 hours. They also added a computer model to depict the night sky.
“Visitors can go to the website day and night and allow the tool to pan around Stonehenge or pause it and pan manually, viewing the stones as they would be at the time of visiting,” Eric says. “It can look especially good on a smart television. It’s very relaxing.”
View the stones in realtime right now by visiting the English Heritage website.
15 comments
Nick Stringer
You’ve got a typo there (unless there’s a stone hedge around which I’ve not heard of) ☺
Alex Bate
Maybe there is, Nick. Maybe there is.
Michael Roberts
I think there’s a typo in the title – Stonehedge?
Alex Bate
I’ll fire my copy editor.
kayel
It looks like a b*gger to trim!
Alex Bate
HAHA, yeah, my bad. All sorted now.
Dougie Lawson
I’m puzzled why his RPi3A+ has a WiFi dongle there’s perfectly good WiFi on-board.
Crumble
Maybe they needed a certain chipset for their evil WiFi hacking.
But more common they ran into the issue with running serial and WiFi at the same time. or they needed simply a better antenna or another position for it. Without an antenna-plug you need external devices to solve such problems.
Mark Griffiths
I can answer that… We needed two WiFi networks: One to connect to the camera, the other to talk to the upstream router. Having them as two distinct networks mean it’s much easier to programmatically recover if one drops a connection.
Rich
A slight flaw in the theory: it’s been raining, and there’s currently rain drops on the camera window. The result is a vision of gargantuan water drops hovering ominously over the ancient stones!
Mark Griffiths
Anything that you want to leave running full time outdoors is going to be compromised in some way to deal with the effects of water… and there’s also always a balance between complexity and outcome. The dome is treated so raindrops clear pretty quickly, but any other solution would have resulted in much more complexity – windscreen wipers?
We decided we could live with the visible drops as it does give a clear indication that it’s raining.
JBeale
Very cool website- nicely done!
AberDerBart
When I was visiting, there was a fly on the camera – This resulted in a giant insect sitting in the sky :D
AndrewS
LOL :-D
“Stonehenge actually built by giant flies – photographic proof!”
Mark Griffiths
Flies, spiders, pigeons and rooks all seem to enjoy hanging out on the camera leading to some occasional bizarre images… the camera runs slightly warm, so this attracts them.
I’ve tried using AI in the cloud to recognise and filter out the flies, spiders and birds but it’s a bit hit and miss as the sky image is a circular, fish-eye image and there’s not much machine learning in place for that kind of picture, yet.
Comments are closed