Tag Archives: Raspberry Pi Resources

How to use a servo motor with Raspberry Pi

via Raspberry Pi

Learn how to use a servo motor with Raspberry Pi in our latest How to use video on YouTube.

HOW TO USE a servo motor with Raspberry Pi

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Over the next few months, we’ll be releasing more videos in our How to use series, including guides on the use of LEDs, buzzers, and sensors with your Raspberry Pi.

What other components do you think we should cover? While we can’t make videos for every available component on the market, we’d love to hear what you, our community, believe to be integral to the maker toolkit.

You can find the How to use YouTube playlist here, and you can subscribe to our channel and never miss a video!

And, while you’re in a subscribe-y mood, also subscribe to the Raspberry Pi Press YouTube channel, the home of all content from The MagPi, HackSpace magazine, WireFrame, Custom PC, and more.

The post How to use a servo motor with Raspberry Pi appeared first on Raspberry Pi.

Design 3D prints with a Raspberry Pi and BlocksCAD

via Raspberry Pi

BlocksCAD is a 3D model editor that you use in a web browser, and it runs on Raspberry Pi. You drag and drop code blocks to design 3D models that can be exported for 3D printing.

In this project, you will use BlocksCAD to design a 3D pendant. The pendant uses a geometric pattern based on ‘the flower of life’, a design which is often found in historical art.

The finished pendant with a cord threaded through the small hanging hoop

If you have access to a 3D printer, then you can print your pendant. The pendant is small and only uses a little bit of filament. There’s a hoop on top of the pendant so that you can put it on a necklace or cord. The pendant has a diameter of 40 mm, plus the hoop for hanging. It is 2 mm thick, so it will 3D-print quite quickly.

After this project, you’ll also be able to code your own design and create a custom pendant.

Step 01: create a hoop

This project can be completed in a web browser using BlocksCAD. Open Chromium and enter the BlocksCAD editor URL: blockscad3d.com/editor.

The design uses six interlocking hoops in the centre, and a larger hoop around the outside. As mentioned, the pendant is 40 mm wide, plus the hoop for hanging, which is 2 mm thick.

Click 3D Shapes and drag a cylinder block to the project. Create a cylinder with a radius of 12, and a height of 2 (the unit here is millimetres). Cylinders are automatically centred along the X and Y axes. Select not centered so that the pendant sits on the surface. (This means that the Z-axis value is greater than 0.)

Click on the Render button after each change to your code to see the results.

Step 02: add more hoops

Now, drag a difference block from Set Ops to encase the cylinder. Add another cylinder block in the bottom space, and this time give it a radius of 11 mm. This will remove a smaller cylinder from the centre. This creates a hoop. Click Render again to see it.

If you like, you can click on the coloured square to change the colour used in the viewer. This does not affect the colour of your pendant, as that depends on the colour of the filament that you use.

The design uses six intersecting hoops, and each hoop is moved out from the centre and rotated a different number of degrees.

In the final design, there is no central hoop: the hoops are all moved out from the centre.

Drag a translate block (from Transforms) around your code, and set X and Y to 5. This moves the first hoop into position.

Step 03: centre the hoop

Now the hoop is a little off-centre. You need multiple copies of this hoop, rotated around the centre. First, create three equally spaced hoops.

Add a count Loops block to create three hoops. To space the hoops, add a rotate Transforms block between the count loop and the translate block.

In the count block, set the i variable from 1 to 3. You’ll need to insert an arithmetic block from Math and a variable (i) block from Variables into the Z field of the rotate block.

The rotation moves each hoop by 120 × i degrees, so that the three hoops are distributed equally around the 360 degrees of a circle (360 / 3 = 120). Look at the code and make sure you understand how it works. The finished design has six hoops rather than three. In the count block, set i from 1 to 6, and set the Z rotation to 60, so it creates six equally spaced hoops.

Step 04: add a border

Next, add a border around the edge of the design. Create a centred hoop that touches the edges of the design. You can either do the maths to work out what the radius of the circle needs to be, or you can just create a circle and change the radius until it works. Either approach is fine!

Encase your code with a union block from Set Ops, to join the border to the other hoops. Add a difference block to the plus section of union, and two cylinder blocks to make the hoop.

The six hoops each have a radius of 12 mm, so the border cylinder that you are making needs to be bigger than that. You could try setting the radius to 24 mm.

To make a hoop, the radius of the second cylinder in the difference block needs to be 1 mm smaller than the radius of the first cylinder.

Adjust the size of the cylinders until the border hoop just touches the outer edges of the six inner hoops.

The radius should be around 20 mm. (As mentioned in the introduction, the finished pendant will be 40 mm in diameter.)

Step 05: work it out

You could also use maths to work out the diameter. The diameter of each inner hoop is 24 mm. If the hoops met at the centre of the pendant, the border hoop would need to have a radius of 24 mm. But the inner hoops overlap, as they are translated 5 mm along the X and Y axes.

This removes a section from the radius. This section is on the arc, 5 mm from the origin, so we need to remove 5 mm from 24 mm. Thus the inner radius of the border hoop should be 19 mm.

Maths is really useful when you need to be accurate. But it’s fine to just change things until you get the result you need.

Step 06: add a hanging hoop

Now, add a small hanging hoop through which you can thread a cord to make a necklace.

Click the [+] on the union block to add another section to add the new hoop.

At the moment, the position of the hanging hoop isn’t very visually pleasing.

Add a rotate block to move the inner hoops so that the hanging hoop is centred over one of the gaps between them.

Step 07: experiment with shapes

Experiment and change some values in your pendant. For example, change the number of hoops, or the rotation.

You could also try to use cuboids (cubes) instead of cylinders to create a pattern.

Step 08: export to STL

BlocksCAD 3D can export an STL file for 3D printing. Render your model and then click on Generate STL. Remember where you save the STL file. Now 3D-print your pendant using a filament of the colour of your choice. Very carefully remove the 3D print from the print bed. The pendant is thin, so it’s quite delicate.

You might need to remove small strands of filament (especially from the hanging hoop) to tidy up the print.

Thread the pendant on to a chain or cord. If you want to use a thicker cord or necklace, then you can adjust the design to have a larger hanging hoop.

Check your code

You can download the full code and check it against your own. You can also check out our projects page, where you’ll find more images and step-by-step instructions for using BlocksCAD.

This project was created by Dr Tracy Gardner and the above article was featured in this month’s issue of The MagPi magazine. Get your copy of The MagPi magazine issue 89 today from your local newsagent, the Raspberry Pi Store, Cambridge, or online from Raspberry Pi Press.

The post Design 3D prints with a Raspberry Pi and BlocksCAD appeared first on Raspberry Pi.

How to set up and use your brand-new Raspberry Pi

via Raspberry Pi

If you’re reading this, it’s probably because you bagged yourself a brand-new Raspberry Pi for Christmas, and you’re wondering what you should do next.

Well, look no further, for we’re here to show you the ropes. So, sit back, pull on a pair of those nice, warm socks that you found in your stocking, top up your eggnog, and let’s get started.

Do I need an operating system?

Unless your Raspberry Pi came in a kit with a preloaded SD card, you’ll need to download an operating system. Find a microSD card (you may have one lurking in an old phone) and click here to download the latest version of Raspbian, our dedicated Raspberry Pi operating system.

To get Raspbian onto the microSD card, use free online software such as Etcher. Here’s a video from The MagPi magazine to show you how to do it.

Use Etcher to install operating systems onto an SD card

Lucy Hattersley shows you how to install Raspberry Pi operating systems such as Raspbian onto an SD card, using the excellent Etcher. For more tutorials, check out The MagPi at http://magpi.cc ! Don’t want to miss an issue? Subscribe, and get every issue delivered straight to your door.

Turn it on!

Here, this video should help:

How to set up your Raspberry Pi || Getting started with #RaspberryPi

Learn #howto set up your Raspberry Pi for the first time, from plugging in peripherals to setting up #Raspbian.

Insert your microSD card into your Raspberry Pi. The microSD card slot should be fairly easy to find, and you need to make sure that you insert it with the contact side facing the board. If you feel like you’re having to force it in, you have it the wrong way round.

Next, plug your HDMI cable into the Raspberry Pi and your chosen HDMI display. This could be a computer monitor or your home television.

If you’re using a Raspberry Pi Zero or Raspberry Pi Zero W, you’ll need a mini HDMI to HDMI cable or adapter.

If you’re using a Raspberry Pi 4, you’ll need a micro HDMI to HDMI cable or adapter.

Raspberry Pi official keyboard

Next, plug in any peripherals that you want to use, such as a mouse or keyboard.

Lastly, plug your power cable into your Raspberry Pi. This is any standard micro USB cable (if you have an Android phone, check your phone charger!), or a USB-C power cable if you’re using the Raspberry Pi 4.

Most kits will come with all of the cables and adapters that you need, so look in the box first before you start rummaging around your home for spare cables.

Once the power cable is connected, your Raspberry Pi will turn on. If it doesn’t, check that your SD card is inserted correctly and your cables are pushed in fully.

Still in doubt? Here’s Sally Le Page with more:

How to use a Raspberry Pi ft. Dr Sally Le Page

What is a Raspberry Pi and what do you need to get started? Our ‘How to use a Raspberry Pi’ explainer will take you through the basics of your #RaspberryPi, and how you can get hands-on with Raspbian and #coding language tools such as Scratch and Mu, with our host, Dr Sally Le Page.

Once on, the Raspberry Pi will direct you through a setup process that allows you to change your password and connect to your local wireless network.

And then, you’re good to go!

Now what?

Now what? Well, that depends on what you want to do with your Raspberry Pi.

Many people use their Raspberry Pi to learn how to code. If you’re new to coding, we suggest trying out a few of our easy online projects to help you understand the basics of Scratch — the drag-and-drop coding platform from MIT — and Python — a popular general-purpose programming language and the reason for the “Pi” in Raspberry Pi’s name.

The components of a virtual analogue Raspberry Pu synthesiser

Maybe you want to use your Raspberry Pi to set up control of smart devices in your home, or build a media centre for all your favourite photos and home movies. Perhaps you want to play games on your Raspberry Pi, or try out various HATs and add-ons to create fun digital making projects.

Sally Le Page

Whatever you want to do with your Raspberry Pi, the internet is full of brilliant tutorials from the Raspberry Pi Foundation and online creators.

Some places to start

Get involved with the Raspberry Pi Foundation

From community events and magazines to online learning and space exploration – there are so many ways to get involved with the Raspberry Pi Foundation.

The Raspberry Pi community is huge, and spreads across the entire globe, bringing people together to share their love of coding, digital making, and computer education. However you use your Raspberry Pi, know that, by owning it, you’ve helped the non-profit Raspberry Pi Foundation to grow, bringing more opportunities to kids and teachers all over the world. So, from the bottom of our hearts this festive season, thank you.

We can’t wait to see what 2020 brings!

 

The post How to set up and use your brand-new Raspberry Pi appeared first on Raspberry Pi.

Raspberry Pi Christmas Shopping Guide 2019

via Raspberry Pi

Stuck for what to buy your friends and family this Christmas? Whether you’re looking to introduce someone to Raspberry Pi and coding, or trying to find the perfect gift for the tech-mad hobbyist in your life, our Christmas Shopping Guide 2019 will help you complete your shopping list. So, let’s get started…

The good ol’ Raspberry Pi

They’ve asked for a Raspberry Pi but not told you which one they want? You know they like coding but don’t know where to start? They’re an avid baker and you think they may have spelt ‘pie’ wrong on their Christmas list? No problem, we’ve got you sorted.

Raspberry Pi 4 Desktop Kit

With everything you need to get started using Raspberry Pi 4, the Raspberry Pi 4 Desktop Kit contains our official mouse, keyboard with an integrated USB hub, USB-C power adapter, case, two micro HDMI leads, our Beginner’s Guide and, of course, the 4GB Raspberry Pi 4. Available from our Approved Resellers and the Raspberry Pi Store, Cambridge, the Desktop Kit is the perfect gift for anyone who’s wanting to get started with coding and digital making, or who’s simply looking to upgrade their current home computer to a smaller, less power-hungry setup.

Visit the Raspberry Pi Store, Cambridge, or find your nearest Approved Reseller online.

Raspberry Pi Zero W

Raspberry Pi Zero WH

The smallest Raspberry Pi still packs a punch despite its size and price. For $10, Raspberry Pi Zero W is perfect for embedding into projects and, with onboard Bluetooth and wireless LAN, there are fewer cables to worry about. Buy a Raspberry Pi Zero W with or without pre-soldered header pins, and pop it in someone’s stocking this Christmas as a great maker surprise.

Visit the Raspberry Pi Store, Cambridge, or find your nearest Approved Reseller online.

Get Started with Raspberry Pi 3A+

 

This isn’t just a book: it’s a book with a computer on the front. Getting Started with Raspberry Pi is a great gift for anyone curious about coding and, at £35, it’s a pretty affordable gift to give this festive season. Alongside the 116-page getting-started guide, the package also contains a Raspberry Pi 3A+, official case, and 16GB micro SD card pre-loaded with NOOBs. Raspberry Pi 3A+ can be powered with a good-quality micro USB phone charger, and it can be connected to any TV or computer display via standard HDMI. Grab a keyboard and mouse — you’ll be surprised how many people have a keyboard and mouse lying around — and you’re good to go!

Order your gift today from the Raspberry Pi Press online store, with international shipping available.

A full range of all Raspberry Pi variants, official accessories, and add-ons can be found on our products page.

A Raspberry Pie

Don’t be lazy, make your own!

Books

Raspberry Pi Press has released a small library’s worth of publications these last few months — have you ordered all your copies yet?

Pre-orders are now open for our glorious Code the Classics, so secure your copy now for the 13 December release date, with free UK shipping. And, while you’re on our Raspberry Pi Press page, check out our latest range of publications to suit all techy interests: Retro Gaming with Raspberry Pi will show the budding gamer in your life how to build their own Raspberry Pi retro arcade to play their Code the Classics favourites on, while Book of Making 2 and Raspberry Pi Projects Book 5 will inspire them to make all manner of amazing projects, from electronics and woodworking to crafts and rockets.

An Introduction to C and GUI programming by Simon Long

If they’re already full to the brim with Raspberry Pi, why not treat them to our Get Started with Arduino guide so they can expand upon their electronics skills. We also offer a host of established publications at discounted prices, including Sophy Wong’s Wearable Tech Projects, An Introduction to C & GUI Programming, and previous volumes of the Book of Making and the Raspberry Pi Projects Book.

Visit the Raspberry Pi Press online store, or head to the Raspberry Pi Store, Cambridge to find all our publications. You may also find a selection in your local WHSmith, Sainsbury’s, or Barnes & Noble.

Magazine subscriptions

Subscriptions are available for all of our magazines. 12-month subscribers to The MagPi magazine will receive a free Raspberry Pi, while a 12-month subscription to HackSpace magazine will net you a free Adafruit Circuit Playground Express.

Subscribers to Wireframe magazine, Custom PC magazine, and Digital SLR Photography will save up to 49% compared to newsstand prices, with many subscription options to choose from.

Babbage Bear

Everyone needs a Babbage Bear. Your new Babs will come complete with their own Raspberry Pi-branded shirt. And, with some felt, stuffing, and a stapler, you can make them as festive as ours in no time!

Order yours online, or buy Babbage at the Raspberry Pi Store, Cambridge.

Great third-party add-ons and essential kit

The Pi Hut’s 3D Xmas Tree

This newest iteration of The Pi Hut 3D Xmas Tree includes programmable RGB LEDs! Simply detach the two halves of the tree from their frame, slot them together, and place them onto the GPIO pins of your Raspberry Pi. With the provided libraries of code, the tree will be lit up and merry before you know it.

How about programming it to flash to your favourite Christmas song? Get yours today from The Pi Hut and the Raspberry Pi Store, Cambridge.

Pimoroni Pirate Radio

“Pirate Audio Speaker,” Pimoroni explain “is perfect for making a Lilliputian radio, sound effect player, or even as a teeny-weeny games console!”

Attach this HAT to any 40-pin Raspberry Pi and start creating a whole host of wonderful audio-visual projects — such as a Christmas #1 jukebox — to get you in the mood for your office party.

Available from the Pimoroni website and the Raspberry Pi Store, Cambridge.

PocketMoneyTronics GPIO Christmas Tree

This super-cute GPIO add-on allows users to write their own light shows via GPIO. Available for £4 from the Raspberry Pi Store, Cambridge, and the PocketMoneyTronics website, it’s a nice festive addition to any coders stocking.

Full instructions are provided with the kit, and are also available online. Buy the kit pre-soldered or loose, depending on your giftee’s soldering skills.

Visit the websites of all our Approved Resellers for more great Raspberry Pi gifts. Find your local Approved Reseller by selecting your country from the dropdown menu on any Raspberry Pi Products page.

Essential kit

Fill their maker kit this festive season, with a whole host of great components and tools. A soldering iron is a great way for coders to start bringing their projects out into the real world, allowing them to permanently add sensors, lights, buttons, etc. to their Raspberry Pi. They’ll also need one if they want to add header pins to the $5 Raspberry Pi Zero and $10 Raspberry Pi Zero W.

You can never have enough LEDs. Available in a variety of sizes and colours, you can find packs of LEDs online or in your local electronics store.

Never underestimate the importance of a cutting mat. Not only will it save your tabletop from craft knife cuts and soldering iron burns, but they also look great in photos for when its time to show of their latest project!

Amazon Smile

If you plan on making online purchases via Amazon, please consider selecting the Raspberry Pi Foundation via Amazon Smile! Your items will still be the same cost to you, but Amazon will donate a portion of the purchase price to help us continue to make free computer science education available to adults  and young people everywhere.

  • Amazon Smile for the UK
  • Amazon Smile for the US
  • For those of you based elsewhere, we’re pretty sure that you just need to add smile. before amazon in the Amazon web address you use in your country, so give that a try. If that doesn’t work, try searching for Amazon Smile via your prefered search engine.

Our gift to you

We wanted to give you a gift this festive season, so we asked the incredibly talented Sam Alder to design an illustration for you to print or use as your desktop wallpaper.

The poster is completely free for you to use and can be opened by clicking on the image above. We just ask that you don’t sell it, print it onto a t-shirt or mug, tattoo it onto your body, or manipulate it. But do feel free to print it as a poster for your home, classroom, or office, or to upload it as your computer wallpaper. And, when you do, be sure to take a photo and share it with us on social media.

You can also download a wider version of the image.

Happy gift-giving this 2019!

The post Raspberry Pi Christmas Shopping Guide 2019 appeared first on Raspberry Pi.

Pre-order Code the Classics today!

via Raspberry Pi

Today, we are proud to announce Code the Classics, the latest (and long-awaited) publication from Raspberry Pi Press.

Pre-order Code the Classics today

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Code the Classics

Code the Classics not only tells the stories of some of the seminal video games of the 1970s and 1980s, but shows you how to create your own games inspired by them using Python and Pygame Zero, following examples programmed by Raspberry Pi founder Eben Upton.

Get game design tips and tricks from the masters. Explore the code listings and find out how they work.

Learn how to code your own games with Pygame Zero. Download and play games examples by Eben Upton.

Pre-order Code the Classics today

Code the Classics is available to pre-order now from the Raspberry Pi Press online store, and it will be released in time for Christmas on 13 December. Pre-order today for FREE UK shipping.

Code the Classics is the perfect gift for anyone with fond memories of the video games of the 1970s and 1980s, and it’s also a brilliant way for young coders to get into understanding the code mechanics behind gaming, helping to inspire them to create their own.

The post Pre-order Code the Classics today! appeared first on Raspberry Pi.

Thermal testing Raspberry Pi 4

via Raspberry Pi

Raspberry Pi 4 just got a lot cooler! The last four months of firmware updates have taken over half a watt out of idle power and nearly a watt out of fully loaded power. For The MagPi magazine, Gareth Halfacree gets testing.

Raspberry Pi 4 Model B

Raspberry Pi 4 launched with a wealth of new features to tempt users into upgrading: a more powerful CPU and GPU, more memory, Gigabit Ethernet, and USB 3.0 support. More processing power means more electrical power, and Raspberry Pi 4 is the most power-hungry member of the family.

The launch of a new Raspberry Pi model is only the beginning of the story. Development is continuous, with new software and firmware improving each board long after it has rolled off the factory floor.

Raspberry Pi 4 updates

Raspberry Pi 4 is no exception: since launch, there has been a series of updates which have reduced its power needs and, in doing so, enabled it to run considerably cooler. These updates apply to any Raspberry Pi 4, whether you picked one up on launch day or are only just now making a purchase.

This feature takes a look at how each successive firmware release has improved Raspberry Pi 4, using a synthetic workload designed – unlike a real-world task – to make the system-on-chip (SoC) get as hot as possible in as short a time as possible.

Read on to see what wonders a simple firmware update can work.

How we tested Raspberry Pi 4 firmware revisions

To test how well each firmware revision handles the heat, a power-hungry synthetic workload was devised to represent a worst-case scenario: the stress-ng CPU stress-testing utility places all four CPU cores under heavy and continuous load. Meanwhile, the glxgears tool exercises the GPU. Both tools can be installed by typing the following at the Terminal:

sudo apt install stress-ng mesa-utils

The CPU workload can be run with the following command:

stress-ng --cpu 0 --cpu-method fft

The command will run for a full day at default settings; to cancel, press CTRL+C on the keyboard.

To run the GPU workload, type:

glxgears -fullscreen

This will display a 3D animation of moving gears, filling the entire screen. To close it, press ALT+F4 on the keyboard.

For more information on how both tools work, type:

man stress-ng
man glxgears

During the testing for this feature, both of the above workloads are run simultaneously for ten minutes. Afterwards, Raspberry Pi is allowed to cool for five minutes.

The thermal imagery was taken at idle, then again after 60 seconds of the stress-ng load alone.

Baseline test: Raspberry Pi 3B+

Already well established, Raspberry Pi 3 Model B+ was the device to beat

Before Raspberry Pi 4 came on the scene, Raspberry Pi 3 Model B+ was the must-have single-board computer. Benefiting from all the work that had gone into the earlier Raspberry Pi 3 Model B alongside improved hardware, Raspberry Pi 3B+ was – and still is – a popular device. Let’s see how well it performs before testing Raspberry Pi 4.

Power draw

An efficient processor and an improved design for the power circuitry compared to its predecessor help keep Raspberry Pi 3B+ power draw down: at idle, the board draws just 1.91W; when running the synthetic workload, that increases to 5.77W.

Thermal imaging

A thermal camera shows where the power goes. At idle, the system-on-chip is relatively cool while the combined USB and Ethernet controller to the middle-right is a noticeable hot spot; at load, measured after 60 seconds of a CPU-intensive synthetic workload, the SoC is by far the hottest component at 58.1°C.

Thermal throttling

This chart measures Raspberry Pi 3B+ CPU speed and temperature during a ten-minute power-intensive synthetic workload. The test runs on both the CPU and GPU, and is followed by a five-minute cooldown. Raspberry Pi 3B+ quickly reaches the ‘soft throttle’ point of 60°C, designed to prevent the SoC hitting the hard-throttle maximum limit of 80°C, and the CPU remains throttled at 1.2GHz for the duration of the benchmark run.

Raspberry Pi 4 Launch Firmware

The fastest Raspberry Pi ever made demanded the most power

Raspberry Pi 4 Model B launched with a range of improvements over Raspberry Pi 3B+, including a considerably more powerful CPU, a new GPU, up to four times the memory, and USB 3.0 ports. All that new hardware came at a cost: higher power draw and heat output. So let’s see how Raspberry Pi 4 performed at launch.

Power Draw

There’s no denying it, Raspberry Pi 4 was a hungry beast at launch. Even idling at the Raspbian desktop, the board draws 2.89W, hitting a peak of 7.28W under a worst-case synthetic CPU and GPU workload – a hefty increase over Raspberry Pi 3 B+.

Thermal Imaging

Thermal imaging shows that Raspberry Pi 4, using the launch-day firmware, runs hot even at idle, with hot spots at the USB controller to the middle-right and power-management circuitry to the bottom-left. Under a heavy synthetic load, the SoC hits 72.1°C by the 60-second mark.

Thermal Throttling

Raspberry Pi 4 manages to go longer than Raspberry Pi 3 B+ before the synthetic workload causes it to throttle; but throttle it does after just 65 seconds. As the workload runs, the CPU drops from 1.5GHz to a stable 1GHz, then dips as low as 750MHz towards the end.

Raspberry Pi 4 VLI Firmware

USB power management brings some relief for Raspberry Pi heat

The first major firmware update developed for Raspberry Pi 4 brought power management features to the Via Labs Inc. (VLI) USB controller. The VLI controller is responsible for handling the two USB 3.0 ports, and the firmware update allowed it to run cooler.

Power Draw

Even without anything connected to Raspberry Pi 4’s USB 3.0 ports, the VLI firmware upgrade has a noticeable impact: idle power draw has dropped to 2.62W, while the worst-case draw under a heavy synthetic workload sits at 7.01W.

Thermal Imaging

The biggest impact on heat is seen, unsurprisingly, on the VLI chip to the middle-right; the VLI firmware helps keep the SoC in the centre and the power-management circuitry at the bottom-left cooler than the launch firmware. The SoC reached 71.4°C under load – a small, but measurable, improvement.

Thermal Throttling

Enabling power management on the VLI chip has a dramatic impact on performance in the worst-case synthetic workload: the throttle point is pushed back to 77 seconds, the CPU spends more time at its full 1.5GHz speed, and it doesn’t drop to 750MHz at all. The SoC also cools marginally more rapidly at the end of the test.

Raspberry Pi 4 VLI, SDRAM firmware

With VLI tamed, it’s the memory’s turn now

The next firmware update, designed to be used alongside the VLI power management features, changes how Raspberry Pi 4’s memory – LPDDR4 SDRAM – operates. While having no impact on performance, it helps to push the power draw down still further at both idle and load.

Power Draw

As with the VLI update, the SDRAM update brings a welcome drop in power draw at both idle and load. Raspberry Pi 4 now draws 2.47W at idle and 6.79W running a worst-case synthetic load – a real improvement from the 7.28W at launch.

Thermal Imaging

Thermal imaging shows the biggest improvement yet, with both the SoC and the power-management circuitry running considerably cooler at idle after the installation of this update. After 60 seconds of load, the SoC is noticeably cooler at 68.8°C – a drop of nearly 3°C over the VLI firmware alone.

Thermal Throttling

A cooler SoC means better performance: the throttle point under the worst-case synthetic workload is pushed back to 109 seconds, after which Raspberry Pi 4 continues to bounce between full 1.5GHz and throttled 1GHz speeds for the entire ten-minute benchmark run – bringing the average speed up considerably.

Raspberry Pi 4 VLI, SDRAM, Clocking, and Load-Step Firmware

September 2019’s firmware update includes several changes, while bringing with it the VLI power management and SDRAM firmware updates. The biggest change is how the BCM2711B0 SoC on Raspberry Pi 4 increases and decreases its clock-speed in response to demand and temperature.

Power Draw

The September firmware update has incremental improvements: idle power draw is down to 2.36W and load under the worst-case synthetic workload to a peak of 6.67W, all without any reduction in raw performance or loss of functionality.

Thermal Imaging

Improved processor clocking brings a noticeable drop in idle temperature throughout the circuit board. At load, everything’s improved – the SoC peaked at 65°C after 60 seconds of the synthetic workload, while both the VLI chip and the power-management circuitry are clearly cooler than under previous firmwares.

Thermal Throttling

With this firmware, Raspberry Pi 4’s throttle point under the worst-case synthetic workload is pushed back all the way to 155 seconds – more than double the time the launch-day firmware took to hit the same point. The overall average speed is also brought up, thanks to more aggressive clocking back up to 1.5GHz.

Raspberry Pi 4 Beta Firmware

Currently in testing, this beta release is cutting-edge

Nobody at Raspberry Pi is resting on their laurels. Beta firmware is in testing and due for public release soon. It brings with it many improvements, including finer-grained control over SoC operating voltages and optimised clocking for the HDMI video state machines.

To upgrade your Raspberry Pi to the latest firmware, open a Terminal window and enter:

sudo apt update
sudo apt full-upgrade

Now restart Raspberry Pi using:

sudo shutdown - r now

Power Draw

The beta firmware decreases power draw at idle to reduce overall power usage, while tweaking the voltage of the SoC to drop power draw at load without harming performance. The result: a drop to 2.1W idle, and 6.41W at load – the best yet.

Thermal Imaging

The improvements made at idle are clear to see on thermal imaging: the majority of Raspberry Pi 4’s circuit board is below the bottom 35°C measurement point for the first time. After 60 seconds of load, there’s a smaller but still measurable improvement, with a peak measured temperature of 64.8°C.

Thermal Throttling

While Raspberry Pi 4 does still throttle with the beta firmware, thanks to the heavy demands of the synthetic workload used for testing, it delivers the best results yet: throttling occurs at the 177s mark while the new clocking controls bring the average clock speed up markedly. The firmware also allows Raspberry Pi 4 to up-clock more at idle, improving the performance of background tasks.

Keep cool with Raspberry Pi 4 orientation

Firmware upgrades offer great gains, but what about putting Raspberry Pi on its side?

While running the latest firmware will result in considerable power draw and heat management improvements, there’s a trick to unlock even greater gains: adjusting the orientation of Raspberry Pi. For this test, Raspberry Pi 4 with the beta firmware installed was stood upright with the GPIO header at the bottom and the power and HDMI ports at the top.

Thermal Throttling

Simply moving Raspberry Pi 4 into a vertical orientation has an immediate impact: the SoC idles around 2°C lower than the previous best and heats a lot more slowly – allowing it to run the synthetic workload for longer without throttling and maintain a dramatically improved average clock speed.

There are several factors at work: having the components oriented vertically improves convection, allowing the surrounding air to draw the heat away more quickly, while lifting the rear of the board from a heat-insulating desk surface dramatically increases the available surface area for cooling.

Throttle Point Timing

This chart shows how long it took to reach the throttle point under the synthetic workload. Raspberry Pi 3B+ sits at the bottom, soft-throttling after just 19 seconds. Each successive firmware update for Raspberry Pi 4, meanwhile, pushes the throttle point further and further – though the biggest impact can be achieved simply by adjusting Raspberry Pi’s orientation.

Real World Testing

Synthetic benchmarks aside, how do the boards perform with real workloads?

Looking at the previous pages, it’s hard to get a real idea of the difference in performance between Raspberry Pi 3B+ and Raspberry Pi 4. The synthetic benchmark chosen for the thermal throttle tests performs power-hungry operations which are rarely seen in real-world workloads, and repeats them over and over again with no end.

Compiling Linux

In this test, both Raspberry Pi 3B+ and Raspberry Pi 4 are given the task of compiling the Linux kernel from its source code. It’s a good example of a CPU-heavy workload which occurs in the real world, and is much more realistic than the deliberately taxing synthetic workload of earlier tests.

With this workload, Raspberry Pi 4 easily emerges the victor. Despite its CPU running only 100MHz faster than Raspberry Pi 3B+ at its full speed, it’s considerably more efficient – and, combined with the ability to run without hitting its thermal throttle point, completes the task in nearly half the time.

Kernel compile: Raspberry Pi 3B+

Raspberry Pi 3B+ throttles very early on in the benchmark compilation test and remains at a steady 1.2GHz until a brief period of cooling, as the compiler switches from a CPU-heavy workload to a storage-heavy workload, allows it to briefly spike back to its 1.4GHz default again. Compilation finished in 5097 seconds – one hour, 24 minutes, and 57 seconds.

Kernel compile: Raspberry Pi 4 model B

The difference between the synthetic and real-world workloads is clear to see: at no point during the compilation did Raspberry Pi 4 reach a high enough temperature to throttle, remaining at its full 1.5GHz throughout – bar, as with Raspberry Pi 3 B+, a brief period when a change in compiler workload allowed it to drop to its idle speeds. Compilation finished in 2660 seconds – 44 minutes and 20 seconds.

Get The MagPi magazine issue 88 now

This article is from today’s brand-new issue of The MagPi magazine, the official Raspberry Pi magazine. Buy it from all good newsagents, Raspberry Pi Press, and the Raspberry Pi Store, Cambridge.

Subscribe to pay less per issue and support our work, or download the free PDF to give it a try first.

The post Thermal testing Raspberry Pi 4 appeared first on Raspberry Pi.