All posts by Ashley Whittaker

40 years of the PC

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/40-years-of-the-pc/

Ben Hardwidge travels back to August 1981, when IBM released its Personal Computer 5150 and the PC was born.

A big ape had only just started lobbing barrels at a pixelated Mario in Donkey Kong arcade machines, Duran Duran’s very first album had just rolled off the vinyl presses and Roger Federer was just four days old. In this time, the UK was even capable of winning Eurovision with Bucks Fizz. It’s August 1981, and IBM has just released the foundation for the PCs we know and love today, the PC 5150. 

IBM PC 5150
IBM’s 5150 PC

‘By the late 1970s the personal computer market was maturing rapidly from the many build-it-yourself hobbyist kits to more serious players like Apple, Commodore and Tandy,’ retired IBM veteran Peter Short tells us. ‘As people realised the greater potential for personal computers in business as well as at home, pressure grew on IBM to enter the market with their own PC.’

Short is now a volunteer at IBM’s computer museum in Hursley, which holds a huge archive of the company’s computing machines and documentation, from Victorian punch card machines to the company’s personal computers. We ask him if it felt like the beginning of a new era when the PC was first launched 40 years ago. ‘Yes,’ he says, ‘but probably not the beginning of something so huge that its legacy lives on today.’

At this time, the home computer market was really starting to take off, with primitive 8-bit computers, such as the Sinclair ZX80 and Commodore VIC-20, enabling people at home to get a basic computer that plugged into their TV. At the other end of the scale, large businesses had huge mainframe machines that took up entire rooms, connected to dumb terminals. 

There was clearly room for a middle ground. IBM was going to continue producing mainframes and terminals for many years yet, but it also wanted to create a powerful, independent machine that didn’t need a mainframe behind it, and that didn’t cost an exorbitant amount of money. 

IBM’s System 23 Datamaster, pictured here at the IBM Hursley Museum, cost $9,000 US
IBM’s System 23 Datamaster, pictured here at the IBM Hursley Museum, cost $9,000 US

The PC 5150’s launch price of $1,565 US (around £885 ex VAT) for the base spec in 1981 equates to around £3,469 ex VAT in today’s money. That’s still very far from what we’d call cheap, but it was a colossal price drop compared with IBM’s System/23 Datamaster, an all-in-one computer (including screen) that had launched earlier the same year for $9,000 US – six times the price. And even that was massively cheaper than some of IBM’s previous microcomputer designs, such as the 5100, which cost up to $20,000 US in 1975. 

IBM needed to act quickly. Commodore had already got a foothold in this market several years earlier with the PET, for example, and IBM realised that it couldn’t spend its usual long development time on the project. The race was on, with the project given a one-year time frame for completion.

‘At the time, IBM was more geared up to its traditional, longer-term development processes,’ explains Short. ‘But it eventually realised that, with a solid reputation in the marketplace, it was time to look for a way to do fast-track development that would not produce a machine three, four or five years behind its competitors.’ 

Processors and coprocessors

We opened up a PC 5150 for this feature, so we could have a good look at the insides and see how it compares with PCs today. It’s hugely different from the gaming rigs we see now, but there are still some similarities. For starters, the floppy drive connects to the PSU with a 4-pin Molex connector, still seen on PC PSU cables today. The PC was also clearly geared towards expansion from the start.

An AMD 4.77MHz 8088 DIP CPU sits in the bottom socket, with an optional IBM 8087 coprocessor sitting above it for floating point operations
An AMD 4.77MHz 8088 DIP CPU sits in the bottom socket, with an optional IBM 8087 coprocessor sitting above it for floating point operations

The ticking heart of the box is a 4.77MHz 8088 CPU made by AMD – Intel had given the company a licence to produce clones of its chips so that supply could keep up with demand. It’s for this reason that AMD still has its x86 licence and can produce CPUs for PCs today, but at this point, the two companies weren’t really competitors in the way they are now. To all intents and purposes, an AMD 8088 was exactly the same as an Intel one, and PCs generally came with whichever one was in best supply at the time of the machine’s manufacture.

The CPU itself is an interesting choice. It’s a cut-down version of Intel’s 8086 CPU that it had launched in 1978. The 8088 has the same execution unit design as the 8086, but has an 8-bit external data bus, compared with the 8086’s 16-bit one. As with today’s PCs, the CPU is also removable and replaceable, but in the case of the PC 5150, it’s in a long dual in-line package (DIP) with silver pins, rather than a square socket.

Immediately above the CPU sits another DIP socket for an optional coprocessor. At this point in time, the CPU was only an integer unit with no floating point processor. This was generally fine in an era when most software didn’t overly deal with decimal points, but you had the option to add an 8087 coprocessor underneath it. This worked as an extension of the 8088 CPU. ‘Adding the 8087 allowed numeric calculations to run faster for those users who needed this feature,’ explains Short.

The floppy drive connects to a 4-pin Molex connector on the PSU – a plug that’s still sometimes used in today’s PCs
The floppy drive connects to a 4-pin Molex connector on the PSU – a plug that’s still sometimes used in today’s PCs

The decision to use a CPU based on Intel’s x86 instruction set laid the machine code foundation for future PCs, and hasn’t changed since. Comparatively, Apple’s Mac line-up has had a variety of instruction sets, including PowerPC, x86 and now Arm. Nvidia might be making big noises about the future of Arm in the PC, but the x86 instruction set has stood its ground on the PC for 40 years now.

IBM itself has also dabbled with different instruction sets, including its own 801 RISC processor. Why did it go with Intel’s CISC 8088 CPU for the first PC? The answer, according to Short, is mainly down to time and a need to maintain compatibility with industry standards at the time. 

‘The first prototype IBM computer using RISC architecture only arrived in 1980 and required a compatible processor,’ he explains. ‘In order to complete the 5150 development in the assigned one-year time frame, IBM had already decided to go with industry-standard components, and there was existing experience with the 8088 from development by GSD (General Systems Division) of the System/23. RISC required the IBM 801 processor, but the decision was made to go with industry standard components.’

Expansion slots

In addition to the ability to add a coprocessor, the IBM PC 5150’s motherboard also contains five expansion slots, with backplate mounts at the back of the case, just like today’s PCs. Three of the slots in our sample were also filled.

The IBM PC 5150 had five 8-bit ISA slots for expansion cards
The IBM PC 5150 had five 8-bit ISA slots for expansion cards

One card is actually two PCBs sandwiched together – it’s a dual-monitor video card with the ability to output to both an MDA screen and a CGA screen simultaneously (more on these standards later) – each standard required a separate PCB on this card – there’s a composite TV output in addition to the pair of 9-pin monitor outputs as well. Bizarrely, this card also doubles as a parallel port controller, with a ribbon cable providing a 25-pin port. It’s typical of the Wacky Races vibe seen on cards at the time, with multiple features shoehorned into one expansion slot. 

Similarly, there’s also a 384KB memory expansion card, which also doubles as a serial I/O card, with a 25-pin port on the backplate. The final card is an MFM storage controller for the 5.25in floppy drive at the front of the machine.

Although the PC was clearly built with expansion in mind, Short points out that ‘IBM was not the first to introduce expansion slots. As far back as 1976, Altair produced the 8800b with an 18-slot backplane, the Apple II also featured slots from 1977 and there was also an expansion bus on the BBC Micro from 1981. No doubt market research and competitive analysis showed that this approach would provide additional flexibility and options without having to redesign the motherboard’.

A raw ISA card at the Hursley museum, designed for hobbyists to make their own expansion cards
A raw ISA card at the Hursley museum, designed for hobbyists to make their own expansion cards

Interestingly, though, Short also says IBM was keeping an ‘eye on the hobby market. A standard bus with expansion slots would allow users to create their own peripherals. IBM even announced a Prototyping Card, with an area for standard bus interface components and a larger area for building your own design’. It’s a far cry from the heavily populated PCI-E cards with complex machine soldering that we see today.

Memory

That 384KB memory card shows a very different approach to memory expansion than the tidy modules we have today. Believe it or not, at launch, the PC 5150 base spec came with just 16KB of memory (a millionth of the amount of memory in today’s 16GB machines), which was supplied in the form of DRAM chips on the bottom right corner of the motherboard. 

A 5.25in floppy drive was the standard storage system for the 5150, with no hard drive option at launch
A 5.25in floppy drive was the standard storage system for the 5150, with no hard drive option at launch

The top spec at launch increased that amount to 64KB, although you could theoretically also install the DRAM chips yourself if you could get hold of exactly the right spec of chips and set it up properly. The chips on the motherboard are split into four banks, each with nine chips (eight bits and one parity bit). In the original spec, the 16KB configuration filled one bank, while the 64KB configuration filled all four banks with 16KB of memory each. 

A later revision of the motherboard expanded this to 64KB as the base spec with one bank filled, and 256KB with all four banks filled (this is the spec in our sample). If you then added a 384KB memory card, such as the one in our sample, you ended up with 640KB of memory – the maximum base memory addressable by PCs at this time.

The memory is organised in four banks in the bottom right corner of the motherboard – in this case there are four 64KB banks, adding up to a total of 256KB
The memory is organised in four banks in the bottom right corner of the motherboard – in this case there are four 64KB banks, adding up to a total of 256KB

Graphics and displays

As we previously mentioned, our PC 5150 sample has a dual-monitor card, which supports both the display standards available to the IBM PC at launch. A Mono Display Adaptor (MDA) card could only output text with no graphics, while a Color Graphics Adaptor (CGA) card could output up to four colours (from a palette of 16) at 320 x 200, or output monochrome graphics at 640 x 200. 

However, as Short notes, ‘the PC was announced with the mono 5151 display in 1981. The CGA 5153 was not released until 1983’. Even if you had a CGA card in your PC 5150, if you used the original monitor, you wouldn’t be able to see your graphics in colour. Seeing colour graphics either required you to use the composite output or a third-party monitor.

IBM’s colour 5153 monitor didn’t come out until 1983, shown here with an IBM PC XT at Hursley, with Alley Cat in full CGA glory
IBM’s colour 5153 monitor didn’t come out until 1983, shown here with an IBM PC XT at Hursley, with Alley Cat in full CGA glory

‘Once the colour monitor became available,’ says Short, ‘it could either be attached as the sole display with its own adaptor card, or equipped with both a mono and colour adaptor card, and could be attached together with a mono screen. Now you could run your spreadsheet on the mono monitor and display output graphics in colour.’

There’s an interesting connection with the first PC monitors and the legacy of IBM’s computing history too. When we interviewed the Hursley Museum’s curator Terry Muldoon (who has now sadly passed away) in 2011, he told us the reason why the first PC monitors had 80 columns. ‘It’s because it’s the same as punch cards,’ he said. ‘All green-screen terminals had 80 columns, because they were basically emulating a punch card.’

Storage

Storage is another area where the PC is at a crossroads between new tech. As standard, the PC 5150 came with a single 5.25in double-density floppy drive, with 360KB of storage space on each disk. There was the option to add a second floppy drive in the empty drive bay, but there was no hard drive at launch.

DOS running on an IBM PC 5150 with a monochrome green screen at Hursley
DOS running on an IBM PC 5150 with a monochrome green screen at Hursley

‘The first hard drive for microcomputers did not arrive until 1980 – the Seagate ST506 with a capacity of 5MB,’ explains Short. ‘By that time, the PC specifications had already been agreed and the hardware development team in Boca Raton was in full swing. The requirement was for a single machine developed within a one-year time frame. 

‘A small company called Microsoft was also developing the first version of DOS under sub-contract. The 5150 BIOS therefore had no hard disk support – DOS 1.0 and 1.1 are the same. The power supply selected for the 5150 wasn’t beefy enough at 63W to power the 5150 and a hard drive.’

Later versions of the 5150, such as our sample, came with a 165W PSU, and future DOS versions enabled you to run a hard drive, but it wasn’t until the IBM PC 5160 XT in 1983 that there was a hard drive option with an IBM PC as standard.

You flip the big red switch (BRS) on the side to power the PC 5150 up or down
You flip the big red switch (BRS) on the side to power the PC 5150 up or down

The PSU also connects to a massive red switch power switch on the side, which is very different from the delicate touch-buttons we have today. You had to literally flip a switch to power on the first PCs. This was another legacy of IBM’s past – a time when, if a machine needed to be shut down drastically, you would ‘BRS it’ – BRS stands for big red switch.

The back of the PC 5150 also alludes to another form of storage. There are two DIN sockets on the back, one of which is labelled for the keyboard – the other is labelled ‘cassette’. ‘It was common at the time to provide software on cassette tapes, which could also be used to store user written programmes,’ says Short. ‘My own Radio Shack TRS80 in 1979 used this method. A standard cassette tape machine such as the Philips could be connected through this socket.’

Software support

This brings us neatly to the subject of software support. We’re now used to graphical user interfaces such as Windows as standard, but in 1981 Microsoft was a small company, which had developed a popular version of the BASIC programming language.

‘Microsoft Basic was already very much an industry standard by 1980,’ says Short. ‘It was Microsoft’s first product. This fitted with the concept of using industry standard components. IBM chose to sub-contract its operating system development to Microsoft, perhaps for this reason. Again, the compressed development schedule influenced these decisions.’

The IBM Personal Computer laid the foundation for the PCs we know and love today
The IBM Personal Computer laid the foundation for the PCs we know and love today

Terry Muldoon gave us some more insight into the development of the PC’s first operating system, IBM PC DOS 1.0, when we spoke to him in 2011. ‘The story I heard is that basically IBM needed an operating system,’ he said, ‘and IBM didn’t have time to write one – that’s the story. So they went out to various people, including Digital Research for CPM, but Digital Research didn’t return the call. Bill Gates did, but he didn’t have an operating system, so he went down the street and bought QDOS. 

‘The original DOS was a tarted-up QDOS, supplied to IBM as IBM Personal Computer DOS, and Gates was allowed to sell Microsoft DOS (MS-DOS). And they carried on for many years with exactly the same numbers, so 1.1 was DOS 1 but with support for us foreigners, then we went to DOS 2 with support for hard disks, DOS 2.1 for the Junior, DOS 3 for the PC80 and so on.’

You can have a play with DOS 1.0 on an emulated PC 5150 at custompc.co.uk/5150, and it’s a very basic affair. Even if you’ve used later versions of DOS, there are some notable absences, such as the inability to add ‘/w’ to ‘dir’ to spread out the directory of your A drive across the screen, rather than list all the files in a single column.

What’s also striking is the number of BASIC files supplied as standard, which can be run on the supplied Microsoft BASIC. One example is DONKEY.BAS, a primitive top-down game programmed by Bill Gates and Neil Konzen, where you move a car from left to right to avoid donkeys in the road (really). What’s more, this game specifically requires your PC to have a CGA card and to run BASIC in advanced mode – you couldn’t run it on the base spec.

A future standard

With its keen pricing compared with previous business computers, the IBM PC 5150 was well received in the USA, paving the way for a launch in the UK in 1983, along with DOS 1.1 and the option for a colour CGA monitor. Clone machines from companies such as Compaq soon followed, claiming (usually, but not always, rightly) to be ‘IBM PC compatible’, and the PC started to become the widespread open standard that it is today. Was this intentional on IBM’s part? 

‘Industry standard components, an expansion bus and a prototyping card would naturally lead to an open standard,’ says Short. ‘Not publishing the hardware circuitry would make it difficult to capture the imagination of “home” developers. Open architecture was part of the original plan.’  

Muldoon wasn’t so sure when we asked him back in 2011. ‘Now where did IBM make the mistake with DOS?’ He asked. ‘This is personal opinion, but IBM allowed Bill Gates to retain the intellectual property. So we’ve now got an Intel processor – the bus was tied to Intel – and another guy owns the operating system, so you’ve already lost control of all of your machine in about 1981. The rest is history.

‘The only bit that IBM owned in the IBM PC was the BIOS, which was copyright. So, to make a computer 100 per cent IBM compatible, you had to have a BIOS. There were loads of software interrupts in that BIOS that people used, such as the timer tick, which were really useful. You get that timer tick and you can get things to happen, so you have to be able to produce something that hits the timer tick, because the software needs it.’

Rival computer makers could circumvent the copyright of the BIOS by examining what it did and attempting to reverse-engineer it. Muldoon explained the process to us.

‘The way people did it is: with one group of people, say: “this is what it does”, and another group of people take that specification, don’t talk to them, and then write some code to make it do that – that’s called “clean room”. So one person documents what it does, and another person now writes code to do it – in other words, nobody has copied IBM code, and there’s a Chinese wall between these two people.

‘What some of the clone manufacturers did is, because we published the BIOS, they just copied it. Now, the BIOS had bugs in it, and we knew they’d copied our BIOS because they’d copied the bugs as well. This was only the small companies that came and went. Phoenix produced a clean room BIOS, so if you used a Phoenix chip in your clones, you were clean.’

Of course, any self-contained personal computer can technically be called a PC. Peter Short describes a PC as a machine that ‘can be operated directly by an end user, from beginning to end, and is general enough in its capabilities’. It doesn’t require an x86 CPU or a Microsoft OS. In fact, there was and still is a variety of operating systems available to x86 PCs, from Gem and OS/2 in the early days, through to the many Linux distributions available now. 

However, the PC as we generally know it, with its x86 instruction set and Microsoft OS, started with the PC 5150 in 1981. Storage and memory capacities have hugely increased, as have CPU clock frequencies, but the basic idea of a self-contained box with a proper CPU, enough memory for software to run, its own storage and a display output, as well as room to expand with extra cards, started here. Thank you, IBM

Custom PC issue 217 out NOW!

You can read more features like this one in Custom PC issue 217, available directly from Raspberry Pi Press — we deliver worldwide.

custom pc front cover

And if you’d like a handy digital version of the magazine, you can also download issue 217 for free in PDF format.

The post 40 years of the PC appeared first on Raspberry Pi.

Deter package thieves from your porch with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/deter-package-thieves-from-your-porch-with-raspberry-pi/

This Raspberry Pi-based build aims to deter porch pirates from stealing packages left at your front door. In recent times, we’ve all relied on home-delivered goods more than ever, and more often than not we ask our delivery drivers to stash our package somewhere if we’re not home, leaving them vulnerable to thieves.

Watch the full build video: ‘Fighting porch pirates with artificial intelligence (and flour)’

Flashing lights, sirens, flour and sprinklers

When internet shopper and AI project maker Ryder had a package stolen from his porch, he wanted to make sure that didn’t happen again. He figured that package stealers would be deterred by blaring sirens and flashing red lights. He also went one step further, wanting to hamper the thief’s escape with motion-activated water sprinklers and a blast of flour ready to catch them as they run away.

package thief running away
A would-be package thief dropping their swag and running away from the sprinkler

A simple motion detector wouldn’t work because it would set off Ryder’s booby traps whenever an unsuspecting cat or legitimate visitor happened across his porch, or if Ryder himself arrived home and didn’t fancy a watery flour bath. So some machine learning and a Python script needed to be employed.

How does it catch package thieves?

inside the package thief build
It’s what’s on the inside that counts. Us. We’re on the inside.

The camera keeps an eye on Ryder’s porch and is connected wirelessly to a Raspberry Pi 4, which works with a custom TensorFlow machine learning model trained to recognise when a package is or isn’t present. If the system detects a package, it gets ready to deploy the anti-thief traps. The Raspberry Pi sets everything off if it detects that someone other than Ryder has removed the package from the camera’s view.

And Ryder had an interesting technique to train the machine learning model to recognise him:

If you want to make your own anti-porch pirate device, Ryder has shared everything you need on GitHub.

Wanna see some cool dogs?

We can always rely on Ryder Calm Down’s YouTube channel for unique and quasi-bonkers builds.

If you’re not familiar with Ryder’s dog-detecting (and happiness-boosting) build, check it out below. We also blogged about this project when we needed a good dopamine boost during lockdown.

The post Deter package thieves from your porch with Raspberry Pi appeared first on Raspberry Pi.

TOFU for Raspberry Pi Compute Module 4

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/tofu-for-raspberry-pi-compute-module-4/

In the latest issue of Custom PC magazine, Gareth Halfacree reviews Oratek’s TOFU, a carrier printed circuit board for Raspberry Pi Compute Module 4.

The launch of the Raspberry Pi Compute Module 4 family (reviewed in Issue 209) last year sparked an entirely unsurprising explosion of interest in designing carrier boards. This was aided in no small part by the Raspberry Pi Foundation’s decision to release its own in-house carrier board design under a permissive licence from which others could springboard with their own creations.

TOFU for Compute Module 4
Smartly designed with some clever features, the Tofu is a great carrier for a Raspberry Pi CM4 or compatible boards

Oratek doesn’t hide its inspiration. ‘Inspired by the official CM4IO board,’ chief executive Aurélien Essig openly admits, ‘it is intended for industrial applications. With user-friendly additions, it may also be used by enthusiasts looking for a compact yet complete solution to interface the many inputs and outputs of the single-board computer.’

The board is undeniably compact, although it bulks out when paired with the optional 3D-printed Switchblade Enclosure designed by Studio Raphaël Lutz. The reason for the name is that there are hinged lids on the top and bottom, which swing out for easy access, locking into place with small magnets when closed.

An optional adaptor converts the M.2 B-Key slot into an M-Key for NVMe storage
An optional adaptor converts the M.2 B-Key slot into an M-Key for NVMe storage

At least, that’s the theory. In practice, the magnets are a little weak; there’s also no way to fasten the lid shut beyond overtightening the screw in the corner. Otherwise, it’s a well-designed enclosure with top and bottom ventilation. Sadly, that’s not enough to prevent a Compute Module 4 from hitting its thermal throttle point under sustained heavy load, so you’ll need to budget for a third-party heatsink or fan accessory.

The Tofu board itself is well thought out, and finished in an attractive black. Two high-density connectors accept a Raspberry Pi Compute Module 4 board – or one of the increasing number of pin-compatible alternatives on the market, although you’ll need to provide your own mounting bolts.

TOFU for Compute Module 4 case
The 3D-printed case comes in an attractive ‘galaxy’ finish, but it isn’t cheap

The 90 x 90mm board then breaks out as many features of the computer-on-module as possible. The right side houses a Gigabit Ethernet port with Power-over-Ethernet (PoE) support if you add a Raspberry Pi PoE HAT or PoE+ HAT, two USB 2 Type-A ports, along with barrel-jack and 3.5mm terminal-block power inputs. These accept any input from 7.5V to 28V, which is brought out to an internal header for accessories that need more power than is available on the 40-pin general-purpose input/output (GPIO) port.

Meanwhile, the bottom has 22-pin connectors for Camera Serial Interface (CSI) and Display Serial Interface (DSI) peripherals, a full-sized HDMI port and an additional USB 2 port. These ports aren’t available outside the Switchblade Case by default, although a quick snap of the already-measured capped-off holes fixes that.

TOFU for Compute Module 4 case
Both the top and bottom rotate out of the way for easy access to the hardware inside

The left side includes a micro-SD slot for Compute Module 4 variants without on-board eMMC storage, plus a micro-SIM slot – hinting at another feature that becomes visible once the board is flipped. There’s also a USB Type-C port, which can be used for programming or as an On-The-Go (OTG) port. Oddly, there’s no cut-out at all for this in the Switchblade Case; if you want one, you’ll need to take a drill and file to it.

Turning over the board reveals the micro-SIM slot’s purpose. The Compute Module 4’s PCI-E lane is brought out to an M.2 B-Key slot, providing a connection for additional hardware including 3G/4G modems. For storage, you can use an optional adaptor board to convert it to M-Key for Non-Volatile Memory Express (NVMe) devices, with a spacer fitted for 2230, 2242, 2260, or 2280 form factor drives.

TOFU for Compute Module 4 ports
The Tofu has plenty of ports, but no USB 3

That’s not as flexible as it sounds, unfortunately. The spacer is soldered in place and needs to be chosen at the time of ordering. If you want to switch to a different-sized drive, you’ll need another adaptor.

There’s one other design point that makes the Tofu stand out: the inclusion of a user-replaceable fuse, a Littelfuse Nano 2 3.5A unit that was originally designed for automotive projects. 

While it’s primarily there for protection, it also enables you to cut off the on-board power supply when the board is driven through PoE. With the fuse in place, there’s clearly audible coil whine, which can be silenced by carefully popping the fuse out of its holder. Just remember to put it back in if you stop using PoE.

The biggest problem is price. At 99 CHF (around £78 ex VAT) you’ll be into triple figures by the time you’ve picked up a suitable power supply and Compute Module 4 board. The M.2 M-Key adaptor adds a further 19 CHF (around £15 ex VAT), and the Switchblade Case is another 35 CHF (around £28 ex VAT). If you have access to a 3D printer, you can opt to print the latter yourself, but you’ll still pay 8 CHF (around £6 ex VAT) for access to the files.

The Tofu is available to order now from oratek.com. Compatible Raspberry Pi Compute Module 4 boards can be found at the usual stockists.

Custom PC issue 217 out NOW!

You can read more features like this one in Custom PC issue 217, available directly from Raspberry Pi Press — we deliver worldwide.

custom pc front cover

And if you’d like a handy digital version of the magazine, you can also download issue 217 for free in PDF format.

The post TOFU for Raspberry Pi Compute Module 4 appeared first on Raspberry Pi.

Raspberry Pi ‘WeatherClock’ shows you the hour’s forecast

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-weatherclock-shows-you-the-hours-forecast/

Meet Eli’s WeatherClock, a digital–analogue timepiece that displays the weather at each hour of the day as well as the time. Here’s an example: every day at 3pm, instead of the hour hand just pointing to a number three on the clock’s face, it also points to a visual representation of what the weather is doing. Obviously, Eli’s WeatherClock still tells the time using the standard positions of the hour and minute hands, but it does two jobs in one, and it looks much more interesting than a regular clock.

We agree, she is lovely (sound on for the video will make that make sense)

Detailed forecast

You can also press on every hour position of the watch’s touchscreen display to see more detailed meteorological information, such as temperature and the likelihood of rain. Then once you’ve gotten all the detail you need, you return to the simple analogue resting face to by pressing the centre of the touchscreen.

Weather details view of the weatherclock digital-analogue clock project.
weatherClock can give you more detail if you want it to

Under the hood

The device uses the openWeatherMap API to fetch weather data for your location. It’s a simple build powered by Raspberry Pi Zero W with a Pimoroni 4″ HyperPixel Hi-Res Display providing the user interface. And its slim, pocket-sized design means you can take it with you on your travels.

Inside view of the weatherclock digital-analogue clock project.
Tiny Raspberry Pi Zero W and a Pimoroni 4″ touchscreen fit inside perfectly

We found this creation on The Digital Vagrant‘s YouTube channel. A friend named Eli gave them the idea so the maker named the project after him. The Digital Vagrant liked the idea of being able to quickly check the weather before leaving the house — no need to check a computer or get your phone out of your bag.

Side view of the weatherclock digital-analogue clock project.
Its super slim design makes WeatherClock portable

Want to make your own WeatherClock? The lovely maker has deposited everything you need on GitHub.

The post Raspberry Pi ‘WeatherClock’ shows you the hour’s forecast appeared first on Raspberry Pi.

Raspberry Pi powers weather station in Nepal

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-powers-weather-station-in-nepal/

This Raspberry Pi-powered weather station is a vital tool for Nepalese farmers, who work in remote, changeable conditions, and rely heavily on monitoring the environment.

nepal weather station being built
All the parts had to be low-cost and easy to maintain

It’s hard to forecast the weather in Nepal. Conditions can vary a lot within a small area because the country is so mountainous. Plus, there is no national weather service. This makes life even harder for farmers working in remote villages. There were a few essentials elements that any solution had to have:

  • Low-cost
  • Reliable and easy to maintain
  • Solar-powered
  • Able to run off readily available motorcycle batteries when the solar panels don’t get enough sun
nepal weather station on the roof
A simple plastic food container keeps the hardware safe and dry

How was it made?

Prabesh Sapkota and Binod Kandel from the Robotics Association of Nepal led the team that built the solar-powered weather station with battery back-up. They were able to complete the project affordably using Raspberry Pi. Prabesh and his team wrote the software and created a display dashboard in Raspberry Pi OS Jessie.

nepal weather station hardware insides
The core components put together as a prototype with a breadboard to check everything worked

One of the challenges they faced was being able to power the Raspberry Pi and Arduino reliably, and that’s where the BitScope Blade Uno came in to play (more on that later).

The weather station sensors measure temperature, barometric pressure, humidity, wind direction and wind speed, and all of the sensors are connected to the Arduino, which records the data and sends it to the Raspberry Pi to display on the dashboard.

Full kit list

  • Raspberry Pi 3 Model B
  • Raspberry Pi 7″ Touch Display
  • Arduino Uno
  • BitScope Blade Uno (directly powers Raspberry Pi and Arduino)
  • GPS module (NEO-6M-0-001)
  • Pressure sensor (BMP180)
  • Humidity sensor (DHT11)
  • 12V Lead-acid battery
  • 20 Watt solar panel
  • Hall effect sensor (used together with magnets in an anemometer to measure wind speed)
  • 8 reed switches (used with a wind vane that has an attached magnet to sense wind direction)
nepal weather station in action
Testing out the weather station on the roof

The team is working with an Australian sponsor to run workshops on basic electronics, with the intention of helping people build more of these affordable weather stations for rural schools and remote areas.

What is Bitscope Blade?

This weather station is an inspiring application of BitScope Blade, available to buy from element14. BitScope developed these power and mounting solutions for people working in challenging conditions, making them perfect for remote areas of Nepal without access to reliable power. They’re designed for industrial deployment as well as being suitable for off-grid hobbyist and educational applications.

You can choose from three variants, according to how many Raspberry Pi computers you need to support: BitScope Blade Uno for one Raspberry Pi and optional HAT, useful for makers and students; Duo for a pair of Raspberry Pis, ideal for building a standalone desktop and server system; and Quattro for four Raspberry Pis in applications such as compute clusters, private clouds or build farms.

Read more on the BitScope blog.

The post Raspberry Pi powers weather station in Nepal appeared first on Raspberry Pi.

Humane mouse trap | The MagPi #108

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/humane-mouse-trap-the-magpi-108/

Safely catching mice is a better way of fixing a problem, and using Raspberry Pi means it needs less supervision. In the new issue of The MagPi magazine, Rob Zwetsloot takes a look with the maker, Andrew Taylor.

With some IoT projects, it’s the little things that help. For example, take Andrew Taylor, who did the good thing of setting up a humane mousetrap. However, checking it to see if any mice had been caught in it, while necessary, was getting a little boring.

There’s one major component to the setup, which is the PIR sensor

“If a mouse had gone in and I did not check it, the mouse would quickly run out of food and water!” Andrew tells us. “Having been interested in Raspberry Pi for a couple of years and having recently begun learning Python using the Enviro+ environment sensors, I figured a Raspberry Pi with a motion sensor would be an ideal way to check.”

It’s a fairly simple setup, one commonly used in CCTV builds and some fun ‘parent detectors’ on the Raspberry Pi Foundation’s projects site.

An old coffee tub is used as a case for the sensor, a good way to recycle

Mouse motion

“I came across a couple of automated mousetraps that people had made from scratch, but wanting to keep it simple and cheap,” Andrew explains. “I wanted to use off-the-shelf parts where possible and keep costs down. The Pi Hut had a tutorial for a DIY burglar alarm utilising a PIR sensor, IFTTT, and Pushbullet, which seemed like an ideal starting point.”

A Raspberry Pi Zero is used to check the motion sensor and send data if it’s activated

IFTTT – If This Then That – is an online service popular with IoT folks. It’s great for small things like cross-posting images on social media services, or sending a push notification when motion is detected in a mousetrap.

“I have only had one mouse since, but it worked!” Andrew says. “I was averaging about 800 detections a day and suddenly got well over a 1000. Sure enough, there was a mouse in the trap which I released shortly afterwards. I do tend to notice that the values fluctuate a bit, so it is always worth checking over the previous day’s results to see if it is notably higher.”

Wiring up the PIR to Raspberry Pi is quite simple, and means the project is easy to maintain

You might think that 800 push notifications a day is far worse than just occasionally checking your garage, and you’d be right, so Andrew tweaked the code a bit: “The code examples I found sent a notification for each movement detection – which I knew would be rather annoying, considering how randomly PIR sensors sometimes seem to trigger. My script instead logs any hits at a max of 1 per 30 seconds and then triggers a notification once every 24 hours, meaning I just get one notification a day.”

It’s a simple design, and was kept simple to keep to a small budget

Beat a path

There’s always room for improvement, as Andrew explains: “I intend to improve the code so that it can record running averages and give an indication as to whether it believes there has been a significant spike that might necessitate me checking it out.”

The first successful capture was released back outside the garage

Whilst the aim of the project was to keep costs down, Andrew is tempted to experiment by adding a camera, and possibly a light, so he can have a peek remotely when there has been a spike in the readings and to see if it is a false alarm. Which, as he admits, is “a new height in laziness!”

The MagPi #108 out NOW!

You can grab the brand-new issue right now from the Raspberry Pi Press store, or via our app on Android or iOS. You can also pick it up from supermarkets and newsagents. There’s also a free PDF you can download.

The post Humane mouse trap | The MagPi #108 appeared first on Raspberry Pi.

Raspberry Pi makes your retro analogue camera digital

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-makes-your-retro-analogue-camera-digital/

Befinitiv has built a custom film cartridge, using a Raspberry Pi Zero W, that turned their gorgeous old analogue camera into a digital one, and enabled it to take digital photos, videos, and even wirelessly live stream to the Internet.

A quick, simple build video for a smooth-running project

The analogue camera they used in the build was considered state-of-the-art around fifty years ago, but it lives on to capture another day, all thanks to a tiny computer we made just a few years ago.

analogue to digital camera original model hero shot
It’s a beauty

The maker replaced the old-fashioned camera film roll with a digital cartridge housing a tiny Raspberry Pi camera — with the lens removed — and a Raspberry Pi Zero W. The housing was designed to fit in the back of the camera where original photographers would have clipped the film roll in, and then spooled it over.

analogue to digital camera film with raspberry pi stuff in
Designed to fit

Along with the camera and the Raspberry Pi Zero W, the custom-built cartridge also houses a LiPo battery and a DC to DC converter, used to boost the power supply to the Raspberry Pi up to +5V.

analogue to digital camera insides
Teeny tech packed into a teeny space

The whole project took just two hours to complete from start to finish, everything worked first time. Befinitiv had wanted to use the Raspberry Pi High Quality Camera, but space inside the housing was just too tight. Maybe next time? Perhaps they can use one of those giant ancient cameras, where the photographer had to flip a blanket over their head, all while holding a stick in the air with the flash.

analogue to digital camera looking out the window
This old analogue camera is now fully digital

More retro projects from the maker

Fancy more where this retrofit goodness came from? The maker has also upgraded a flip phone from the year 2000. Oh! I just realised the year 2000 was more than 20 years ago. Watch the build video while I go and burn all of my skater boy jeans and slogan t-shirts…

Don’t let your old flip phone die

They also did something weird but cool sounding with this noisy teletype machine. Is it a teletype machine? What’s a teletype machine? I saw a fax machine once..?

I know EXACTLY what a “teletype message” is…

The post Raspberry Pi makes your retro analogue camera digital appeared first on Raspberry Pi.

Archimedes the AI robot | HackSpace #45

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/archimedes-the-ai-robot-hackspace-45/

When we saw Alex Glow’s name in the latest issue of HackSpace magazine, we just had to share their project. HackSpace #45 celebrates the best Raspberry Pi builds of all time, and we remembered spotting Alex’s wearable robotic owl familiar back in the day. For those of you yet to have had the pleasure, meet Archimedes…

archimedes owl on maker's shoulder
Archimedes taking a perch on his maker’s shoulder

Back in 2018, Hackster’s Alex Glow built Archimedes, an incredible robot companion using a combination of Raspberry Pi Zero W and Arduino with the Google AIY Vision Kit for its ‘brain’.

An updated model, Archie 2, using Raspberry Pi 3B, ESP32-powered Matrix Voice, and an SG90 micro-servo motor saw the personable owl familiar toughen up – Alex says the 3D-printed case is far more durable – as well as having better voice interaction options using Matrix HAL (for which installer packages are provided for Raspberry Pi and Python), plus Mycroft and Snips.ai voice assistant software.

archimedes owl insides laid out on table
Owl innards

Other refinements included incorporating compact discs into the owl’s wings to provide an iridescent sheen. Slots in the case allowed Alex to feed through cable ties to attach Archie’s wings, which she says now “provide a lively bounce to the wings, in tune with his active movements (as well as my own).”

archimedes owl wing detail
Raspberry Pi getting stuffed into Archimedes’ head

HackSpace magazine issue 45 out NOW!

Each month, HackSpace magazine brings you the best projects, tips, tricks and tutorials from the makersphere. You can get it from the Raspberry Pi Press online store or your local newsagents.

Hack space magazine issue 45 front cover

As always, every issue is free to download from the HackSpace magazine website.

The post Archimedes the AI robot | HackSpace #45 appeared first on Raspberry Pi.

Raspberry Pi turns cryptocurrency into music

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-turns-cryptocurrency-into-music/

Forget Beanie Babies as McDonald’s Happy Meal toys, or U2’s new album magically appearing on everyone’s iTunes list: the collaboration of the century is here. Estefannie Explains it All answered a call from LOOK MUM NO COMPUTER (aka Sam) who was looking for a coding genius to bring his cryptocurrency-measuring musical machine to life.

Sam wanted to use the up-and-down nature of cryptocurrency value to generate voltages that would power synthesisers and generate sounds. He’s good at music, but middlingly bad at the coding side of things, and so he roped in Estefannie’s smarts to devise a solution.

The Raspberry Pi bit

Estefannie‘s plan involved a Raspberry Pi and some pulse-width modulation signals, which can be filtered down into analogue voltages.

A breadboard for prototyping a. cryptocurrency music instrument.
Estefannie’s breadboard of cryptocurrency LEDs

She marked this all out on a breadboard, with ten LEDs connected to Raspberry Pi standing in for ten cryptocurrencies. The Raspberry Pi pins send voltages to the LEDs that correlate with the real-time percentage of change the cryptocurrency values experience.

The music bit

In order to make the monotone output of Estefannie’s creation sound more musical, Sam needed more than one cryptocurrency to be heard at a time, and to be able to alter the chords. So he built ten analogue circuits on perf boards. These slow down the changes in the cryptocurrency values, altering the audio output. And ten separate oscillators allow each board to interact with each other. Sam explains it much better, so check out his build video.

The analogue circuits inside the cryptocurrency music instrument.
Sam’s army of analogue circuits

Transatlantic collaboration videos

This is a cool mash-up of a project, with each maker producing brilliant videos focusing on the separate expertise they brought to the build.

If you want to dig deep into the marathon coding session Estefannie performed to create this musical machine, check out her project video:

Estefannie’s video goes deep into the coding side of things

And if you’re interested in the analog musical side of things, check out Sam’s:

Sam focuses on the musical element of the project

Hour-long cryptocurrency concert

If you actually trade cryptocurrency, this would be a whimsical way to keep an eye ear on market changes. If you don’t trade cryptocurrency and you also don’t have the skills to build something like this, then you can just pretend.

Sam has produced an hour-long ‘performance’ video of the machine doing its thing. So stick it on in the background next time you’re doing busy work at your desk and pretend you’re also a crypto-trading coding artist.

One-hour performance video

The post Raspberry Pi turns cryptocurrency into music appeared first on Raspberry Pi.

Mega six-screen cyberdeck

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/mega-six-screen-cyberdeck/

Holy cyberdecks! Redditor Holistech (aka Sören Gebbert) really leaned in to the “more is more” idiom when building this big orange cyberdeck using three Raspberry Pis. Why use just one screen to manipulate enemy cyberware and take down your cyberpunk foes, when you can have six?

six screen cyber deck rear view
Rear view (keep reading for the big reveal)

From four to six

We first came across Sören’s work on hackster.io and we were impressed with what we found, which was this four‑screen creation running Linux Mint on a dual Raspberry Pi setup:

four screen cyberdeck
The first, four-screen, iteration of this project is still impressive

So imagine our surprise when we clicked through to check out Holistech on reddit, only to be confronted with this six‑screen monstrosity of brilliance:

six screen cyberdeck
Level up

He’s only gone and levelled up his original creation already. And before we even had the chance to properly swoon over the original.

Under the hood

Originally, Sören wanted to use Raspberry Pi Zero because they’re tiny and easily hidden away inside projects. He needed more power though, so he went with Raspberry Pi 4 instead.

cyberdecks on a desk
The whole family

Sören 3D-printed the distinctive orange frame. On the back of the rig are openings for a fan for active cooling and a mini control display that shows the CPU temperature and the fan speed.

Six 5.5″ HD resolution screens are the eyes of the project. And everything is powered by hefty 26,000 mAh battery power banks.

Carry on

And it gets even better: this whole multi-screen thing is portable. Yes, portable. You can fold it up, pack it away in its suitably steampunk metal box, and carry it with you.

There are plenty more photos. Head to Instagram to take a closer look at how Sören’s genius design folds in on itself to enable portability.

The post Mega six-screen cyberdeck appeared first on Raspberry Pi.

Learn the Internet of Things with “IoT for Beginners” and Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/learn-the-internet-of-things-with-iot-for-beginners-and-raspberry-pi/

Want to dabble in the Internet of Things but don’t know where to start? Well, our friends at Microsoft have developed something fun and free just for you. Here’s Senior Cloud Advocate Jim Bennett to tell you all about their brand new online curriculum for IoT beginners.

IoT — the Internet of Things — is one of the biggest growth areas in technology, and one that, to me, is very exciting. You start with a device like a Raspberry Pi, sprinkle some sensors, dust with code, mix in some cloud services and poof! You have smart cities, self-driving cars, automated farming, robotic supermarkets, or devices that can clean your toilet after you shout at Alexa for the third time.

robot detecting a shelf restock is required
Why doesn’t my local supermarket have a restocking robot?

It feels like every week there is another survey out on what tech skills will be in demand in the next five years, and IoT always appears somewhere near the top. This is why loads of folks are interested in learning all about it.

In my day job at Microsoft, I work a lot with students and lecturers, and I’m often asked for help with content to get started with IoT. Not just how to use whatever cool-named IoT services come from your cloud provider of choice to enable digital whatnots to add customer value via thingamabobs, but real beginner content that goes back to the basics.

IoT for Beginners logo
‘IoT for Beginners’ is totally free for anyone wanting to learn about the Internet of Things

This is why a few of us have spent the last few months locked away building IoT for Beginners. It’s a free, open source, 24-lesson university-level IoT curriculum designed for teachers and students, and built by IoT experts, education experts and students.

What will you learn?

The lessons are grouped into projects that you can build with a Raspberry Pi so that you can deep-dive into use cases of IoT, following the journey of food from farm to table.

collection of cartoons of eye oh tee projects

You’ll build projects as you learn the concepts of IoT devices, sensors, actuators, and the cloud, including:

  • An automated watering system, controlling a relay via a soil moisture sensor. This starts off running just on your device, then moves to a free MQTT broker to add cloud control. It then moves on again to cloud-based IoT services to add features like security to stop Farmer Giles from hacking your watering system.
  • A GPS-based vehicle tracker plotting the route taken on a map. You get alerts when a vehicle full of food arrives at a location by using cloud-based mapping services and serverless code.
  • AI-based fruit quality checking using a camera on your device. You train AI models that can detect if fruit is ripe or not. These start off running in the cloud, then you move them to the edge running directly on your Raspberry Pi.
  • Smart stock checking so you can see when you need to restack the shelves, again powered by AI services.
  • A voice-controlled smart timer so you have more devices to shout at when cooking your food! This one uses AI services to understand what you say into your IoT device. It gives spoken feedback and even works in many different languages, translating on the fly.

Grab your Raspberry Pi and some sensors from our friends at Seeed Studio and get building. Without further ado, please meet IoT For Beginners: A Curriculum!

The post Learn the Internet of Things with “IoT for Beginners” and Raspberry Pi appeared first on Raspberry Pi.

Charge your Tesla automatically with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/charge-your-tesla-automatically-with-raspberry-pi/

It’s the worst feeling in the world: waking up and realising you forgot to put your electric car on charge overnight. What do you do now? Dig a bike out of the shed? Wait four hours until there’s enough juice in the battery to get you where you need to be? Neither option works if you’re running late. If only there were a way to automate the process, so that when you park up, the charger find its way to the charging port on its own. That would make life so much easier.

This is quite the build

Of course, this is all conjecture, because I drive a car made in the same year I started university. Not even the windows go up and down automatically. But I can dream, and I still love this automatic Tesla charger built with Raspberry Pi.

Wait, don’t Tesla make those already?

Back in 2015 Tesla released a video of their own prototype which can automatically charge their cars. But things have gone quiet, and nothing seems to be coming to market any time soon – nothing directly from Tesla, anyway. And while we like the slightly odd snake-charmer vibes the Tesla prototype gives off, we really like Pat’s commitment to spending hours tinkering in order to automate a 20-second manual job. It’s how we do things around here.

This video makes me feel weird

Electric vehicle enthusiast Andrew Erickson has been keeping up with the prototype’s whereabouts, and discussed it on YouTube in 2020.

How did Pat build his home-made charger?

Tired of waiting on Tesla, Pat took matters into his own hands and developed a home-made solution with Raspberry Pi 4. Our tiny computer is the “brains of everything”, and is mounted to a carriage on Pat’s garage wall.

automatic tesla charger rig mounted on garage wall
The entire rig mounted to Pat’s garage wall

There’s a big servo at the end of the carriage, which rotates the charging arm out when it’s needed. And an ultrasonic distance sensor ensures none of the home-made apparatus hits the car.

automatic tesla charger sensors
Big white thing on the left is the charging arm. Pat pointing to the little green Raspberry Pi camera module up top. And the yellow box at the bottom is the distance sensor

How does the charger find the charging port?

A Raspberry Pi Camera Module takes photos and sends them back to a machine learning model (Pat used TensorFlow Lite) running on his Raspberry Pi 4. This is how the charging arm finds its way to the port. You can watch the model in action from this point in the build video.

automatic tesla charger in action
“Marco!” “Polo!” “Marco!” “Polo!”

Top stuff, Pat. Now I just need to acquire a Tesla from somewhere so I can build one for my own garage. Wait, I don’t have a garage either…

The post Charge your Tesla automatically with Raspberry Pi appeared first on Raspberry Pi.

New Raspberry Pi 400 layouts

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/new-raspberry-pi-400-layouts/

Raspberry Pi 400 is now available with keyboard layouts for Portugal, Norway, Sweden, and Denmark. You can buy these four new variants from our lovely Raspberry Pi Approved Resellers. Happy Friday!

How many layouts are available?

Raspberry Pi 400 hasn’t even celebrated its first birthday yet (remember the launch in November?), but at only 249 days old, it already has ten variants to choose from.

At launch, users could choose between English (UK and US), French, Italian, German, and Spanish keyboard layouts, and the new variants support Portuguese, Danish, Swedish and Norwegian. With a variant for Japan coming soon, Raspberry Pi 400 will soon be available with the same range of layouts as our official keyboard.

Top view of a woman's hands using the Raspberry Pi 400 keyboard and official Raspberry Pi mouse
The nail varnish that shook the internet

Can we see?

Here are the keyboard layouts of the four new variants, so you can take a closer look.

Swedish keyboard

Raspberry Pi 400 Keyboard Print SE

Users in Sweden can buy Raspberry Pi 400 with the new Swedish keyboard layout from our resellers Electrokit and RaspberryPi.dk.

Portuguese keyboard

Raspberry Pi 400 Keyboard Print PT

If you’re in Portugal, you can buy a Portuguese Raspberry Pi 400 from the good people at Robert Mauser Ltd.

Norwegian keyboard

Raspberry Pi 400 Keyboard Print NO

If you’re looking to purchase Raspberry Pi 400 in our Norwegian layout, RaspberryPi.dk can help.

Danish keyboard

Raspberry Pi 400 Keyboard Print DK

And for those of you in Denmark, RaspberryPi.dk can ship you a Danish Raspberry Pi 400 too.

Let me see them ALL

All the keyboard layouts for Raspberry Pi 400 are available for your perusal from our Raspberry Pi Datasheets page.

That is a suspiciously neat desk

Which Raspberry Pi 400 do you have on your desk?

The post New Raspberry Pi 400 layouts appeared first on Raspberry Pi.

Collection of Raspberry Pi retro tech projects

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/collection-of-raspberry-pi-retro-tech-projects/

During lockdown, Stuart (aka JamHamster) wanted to keep busy whilst between jobs, and ended up building a mini empire of rescued retro systems. Cassette tapes, Game Boys, and floppy disks were all among the treasures he reclaimed.

All up and running on my 'shelf of deceit' where nothing is what it seems
Stuart calls this the “shelf of deceit” – where nothing is what it appears to be

Cassette tape starter

Stuart got started by fitting a TZXDuino tape loader into a cassette tape shell. Remember those? This allows him to load software onto a ZX Spectrum by inserting a tape into the tape deck, just as Nature intended. He has since improved the design (check out V2 on YouTube) and carefully documented it on GitHub, so people can build their own.

Here’s how the cassette tape project went down

With that first project in the bag and getting attention on a Facebook group (Spectrum for Everyone), Stuart went forth and sourced more retro tech to revive with tiny pieces of new technology.

Twitter lit up for Stuart’s retrofit cassette tape

Enter Raspberry Pi

Then Stuart discovered our tiny computer and realised there was heaps of scope for hiding them inside older tech. Although we can’t quite officially endorse Stuart’s method of “carefully” removing a port on his Raspberry Pi – it’ll void your warranty – we will say that we like people who go about intentionally voiding their warranties. It’s a cool video.

Here's the collection so far and I'm really pleased with how they worked out
You can see all the modern devices labelled alongside the retro tech they’re encased in

He has since created loads of retrofit projects with Raspberry Pi. Let’s take a quick look at a few of them.

Raspberry Pi 3 Game Boy build

Another gem of a build video from JamHamster on YouTube

First up is a Game Boy build with a Raspberry Pi 3 Model A+. Stuart built an aluminium chassis from scrap, and this sandwiches the Raspberry Pi to hold it in place inside the Game Boy enclosure, as well as acting as a heatsink. There’s a grille in the cartridge and he also added four rear buttons. The hardest part of this build, apparently, was soldering the custom HDMI cable.

Better-than-real CRT screen

Stuart liked the look of an old-fashioned CRT (cathode-ray tube) screen for playing retro games on, but they chew through energy and aren’t that portable. So he had the idea to make a space-efficient LCD system that sits on a desktop and just looks like a retro TV.

Wait for the heroes in half-shells at the end

This project features a 3.5-inch screen of the type that’s usually found on a car dashboard to help the driver to reverse. Stuart converted it to 5V, and added a cut-down Raspberry Pi 3 and a custom-machined chassis. A custom-ground curved lens makes it look like a real CRT, and he added ports on the back for two Atari joysticks, as well as an external composite input and USB.

The Pi 'CRT' has two onboard Atari Joystick ports and plenty of connectors for other machines
This Raspberry Pi-powered “CRT” display has two onboard Atari joystick ports and plenty of connectors for other machines

The build process for this project is also documented on Github. Here are some extra pictures.

Sega Game Gear build

Stuart’s sister gave him her Game Gear to fix, but the batteries leaked and killed it so he converted it to a Raspberry Pi 3B portable gaming system. And because it was for his sister, he went all out, spending six weeks refining it.

He also ended up rewriting elements of the Arduino Joystick library for responsiveness and ease of configuration. Here’s the Github link for those interested in that part of the build.

Check out the carnage that Stuart rescued with Raspberry Pi 3B

RetroPie cassette

Stuart’s latest cassette build features a Raspberry Pi Zero running RetroPie. He wanted to make one with a transparent case, so he encased the Raspberry Pi in a heatsink sandwich to hide the wiring. He added a full-size USB port and a 3.5 mm media connector for sound and visuals. Here are some shots of the inside.

I'm really pleased with the 80s green
I love the 80s green

Try new things, expect failure, enjoy the process

There were far too many cracking retro builds for us to list here, so follow Stuart on Twitter @RealJamHamster and subscribe to JamHamster on YouTube to properly check everything out.

They need hefty heatsinks but I like working with metal and had fun with some of the designs
They need hefty heatsinks, but Stuart likes working with metal and had fun with some of the designs

Makers, tinkerers, and crafters don’t always have a practical reason for embarking on projects, and Stuart is no different. Here’s what he had to say about why projects like this make him happy:

“I will be happy to admit that I have no clue what I’m doing most of the time, and I am by no means an expert, but I believe everyone should try new things as you never know what you’ll be good at. 9 out of 10 of my ideas don’t work but that tenth one is generally pretty good. I’ve been between roles during lockdown so I am building these out of scrap metal and whatever I have lying around, which is an extra challenge. My philosophy is to try new things, expect failure, learn to enjoy the process and that it’ll be done when it’s done.”

The post Collection of Raspberry Pi retro tech projects appeared first on Raspberry Pi.

HIIT Pi makes Raspberry Pi your home workout buddy

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/hiit-pi-makes-raspberry-pi-your-home-workout-buddy/

Has your fitness suffered during locked down? Have you been able to keep up diligently with your usual running routine? Maybe you found it easy to recreate you regular gym classes in your lounge with YouTube coaches. Or maybe, like a lot of us, you’ve not felt able to do very much at all, and needed a really big push to keep moving.

From James’s YouTube channel

Maker James Wong took to Raspberry Pi to develop something that would hold him accountable for his daily HIIT workouts, and hopefully keep his workouts on track while alone in lockdown.

What is a HIIT workout?

HIIT is the best kind of exercise, in that it doesn’t last long and it’s effective. You do short bursts of high-intensity physical movement between short, regular rest periods. HIIT stands for High Intensity Interval Training.

James’s model can detect how well you perform a burpee, as well as many other exercise movements

James was attracted to HIIT during lockdown as it didn’t require any gym visits or expensive exercise equipment. He had access to endless online training sessions, but felt he needed that extra level of accountability to make sure he kept up with his at-home fitness regime. Hence, HIIT Pi.

So what does HIIT Pi actually do?

HIIT Pi is a web app that uses machine learning on Raspberry Pi to help track your workout in real time. Users can interact with the app via any web browser running on the same local network as the Raspberry Pi, be that on a laptop, tablet, or smartphone.

HIIT Pi running software on server from ipad using raspberry pi
An iPad accessing a remote server running on James’s Raspberry Pi

HIIT Pi is simple in that it only does two things:

  • Uses computer vision to automatically capture and track detected poses and movement
  • Scores them according to a set of rules and standards
HIIT Pi running on Raspberry Pi and a Raspberry Pi camera module, propped up on a shelf
HIIT Pi is watching you via a Raspberry Pi camera module (top right)

So, essentially, you’ve got a digital personal trainer in the room monitoring your movements and letting you know whether they’re up to standard and whether you’re likely to achieve your fitness goals.

James calls HIIT Pi an “electronic referee”, and we agree that if we had one of those in the room while muddling through a Yoga With Adriene session on YouTube, we would try a LOT harder.

How does it work?

A Raspberry Pi camera module streams raw image data from the sensor roughly at 30 frames per second. James devised a custom recording stream handler that works off this pose estimation model and takes frames from the video stream, spitting out pose confidence scores using pre-set keypoint position coordinates.

HIIT Pi dashboard
HIIT Pi uses Dash, a laudable open source tool from the Plotly team

James’s original project post details the inner workings. You can also grab the code needed to create your own at-home Raspberry Pi personal trainer.

Get in touch with James here.

The post HIIT Pi makes Raspberry Pi your home workout buddy appeared first on Raspberry Pi.

Building a business with VNC Connect on Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/building-a-business-with-vnc-connect-on-raspberry-pi/

Our friends over at RealVNC are having a whale of a time with Raspberry Pi, so they decided to write this guest blog for us. Here’s what they had to say about what their VNC Connect software can do, and how Raspberry Pi can be integrated into industry. Plus, hear about a real-life commercial example.

What is VNC Connect?

RealVNC’s VNC Connect is a secure way for you to control your Raspberry Pi from anywhere, as if you were sat in front of it. This is particularly useful for Raspberry Pis which are running ‘headless’ without monitor connected. The desktop can instead be presented in the VNC Connect Viewer app on, say, a wirelessly-connected iPad, from which you have full graphical control of the Raspberry Pi. The two devices do not even have to be on the same local network, so you can take remote control over the Internet. Which is great for roaming robots.

real vnc overview
VNC Connect is all of these things

You can read more about RealVNC for Raspberry Pi here. It’s free to get started for non-commercial use.

Commercial potential

RealVNC have seen an increase in the use of Raspberry Pi in business, not just at home and in education. Raspberry Pi, combined with VNC Connect, is helping businesses both to charge for a service that they couldn’t previously provide, and to improve/automate a service they already offer.

We’ll get to the solar panels next… (this photo makes sense, honestly)

For example, Raspberry Pi is a useful, as well as a cost effective, “edge device” in complex hardware environments that require monitoring – a real IoT use case! Add VNC Connect, and the businesses which perform these hardware installations can provide monitoring and support services on a subscription basis to customers, building repeat revenue and adding value.

With VNC Connect being offered at an affordable price (less than the price of a cup of coffee per month for a single device), it doesn’t take these businesses long to make a healthy return.

A commercial example: monitoring solar panels

Centurion Solar provides monitoring software for home solar panels. Each installation is hooked up via USB to a Raspberry Pi-powered monitoring system, and access is provided both to the customer and to Centurion Solar, who run a paid monitoring and support service.

Monitoring solar panels online with Centurion Solar

Having every new system leave the factory pre-installed with VNC Connect allows Centurion Solar to provide assistance quickly and easily for customers, no matter where they are, or how tech-savvy they are (or aren’t).

The software is currently being used in over 15,000 systems across 27 countries, with more new users every week.

“We’ve gone from being in limp mode to overdrive in one easy step, using RealVNC as the driving force to get us there.”

Johan Booysen, Founder at Centurion Solar

You can read more here.

Possibilities across many sectors

There are many more industry sectors which could be considering Raspberry Pi as a lightweight and convenient monitoring/edge compute solution, just like Centurion Solar do. For example:

  • Energy
  • Manufacturing
  • Healthcare
  • Transport
  • Agriculture
  • Critical National Infrastructure
raspberry pi use in biological sciences jolle jolle
Remember this blog about how Raspberry Pi is a versatile tool for biological sciences?

The possibilities are only limited by imagination, and the folks down the road at RealVNC are happy to discuss how using Raspberry Pi in your environment could be transformative. You can reach us here.

From the engineers to the CEO, we’re all Raspberry Pi enthusiasts who love nothing more than sharing our experience and solving problems (our CEO, Adam, even publishes a popular bare-metal Raspberry Pi operating system tutorial on Github).

The post Building a business with VNC Connect on Raspberry Pi appeared first on Raspberry Pi.

Translate dog barks with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/translate-dog-barks-with-raspberry-pi/

I speak English. Super well. And I can read the rough, overall vibe of writing in French. I can also order beer and taxis in Spanish. Alas, my dog can do none of these things, and we are left in communication limbo. I try asking them (in English) why they’re so mean to that one Cockapoo who lives across the road, or why they don’t understand the importance of the eyedrops the vet insists I have to hold their eyelids open to administer. They just respond with a variety of noises that I cannot translate. We need to fix this, and thankfully NerdStroke has harnessed Raspberry Pi to build a solution.

NerdStroke’s YouTube channel is new, but good. Subscribe to it!
(Video features some bleeped-out strong language, as well as one unbleeped mild swear)

How does it work?

The dog wears a harness with a microphone that picks up its barks. The barks get processed through a device that determines what the dog is saying and then outputs it through speakers.

Raspberry Pi Zero is the affordable brain powering NerdStroke’s solution to this age-old human-and-pup problem. But writing code that could translate the multitude of frequencies coming out of a dog’s mouth when it barks was a trickier problem. NerdStroke tried to work it through on Twitch with fellow hobbyists, but alas, the original dream had to be modified.

dog bark translator hardware
The kit worked fine – it was the coding challenge that changed the course of this project

Spoiler alert: fast Fourier transforms did not work. You would need a clear, pure tone for that to work in a project like this, but as we said above, dogs bark in a rainbow of tones, pitches, and all the rest.

So what’s the solution?

Because of this, a time-based model was devised to predict what a dog is likely to be barking about at any given time of day. For example, if it’s early morning, they probably want to go out to pee. But if it’s mid-morning, they’re probably letting you know the postman has arrived and is trying to challenge your territory by pushing thin paper squares through the flap in your front door. It’s a dangerous world out there, and dogs just want to protect us.

Nerdstroke had his good friend record some appropriate soundbites to go with each bark, depending on what time of day it happened. And now, Nugget the dog can tell you “I want to cuddle” or “Why aren’t you feeding me?”

Same, Nugget, same

While the final project couldn’t quite translate the actual thoughts of a dog, we love the humour behind this halfway solution. And we reckon the product name, Holler Collar, would definitely sell.

Follow NerdStroke’s future projects

NerdStroke is all over the socials, so follow them on your platform of choice:

TWITCH – twitch.tv/nerdstoke
INSTAGRAM – instagram.com/nerdstoke
TWITTER – twitter.com/nerdstoke
GITHUB – github.com/nerdstoke
EMAIL – [email protected]

The post Translate dog barks with Raspberry Pi appeared first on Raspberry Pi.

Machine Learning made easy with Raspberry Pi, Adafruit and Microsoft

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/machine-learning-made-easy-with-raspberry-pi-adafruit-and-microsoft/

Machine learning can sound daunting even for experienced Raspberry Pi hobbyists, but Microsoft and Adafruit Industries are determined to make it easier for everyone to have a go. Microsoft’s Lobe tool takes the stress out of training machine learning models, and Adafruit have developed an entire kit around their BrainCraft HAT, featuring Raspberry Pi 4 and a Raspberry Pi Camera, to get your own machine learning project off to a flying start.

adafruit lobe kit
Adafruit developed this kit especially for the BrainCraft HAT to be used with Microsoft Lobe on Raspberry Pi

Adafruit’s BrainCraft HAT

Adafruit’s BrainCraft HAT fits on top of Raspberry Pi 4 and makes it really easy to connect hardware and debug machine learning projects. The 240 x 240 colour display screen also lets you see what the camera sees. Two microphones allow for audio input, and access to the GPIO means you can connect things likes relays and servos, depending on your project.

Adafruit’s BrainCraft HAT in action detecting a coffee mug

Microsoft Lobe

Microsoft Lobe is a free tool for creating and training machine learning models that you can deploy almost anywhere. The hardest part of machine learning is arguably creating and training a new model, so this tool is a great way for newbies to get stuck in, as well as being a fantastic time-saver for people who have more experience.

Get started with one of three easy, medium, and hard tutorials featured on the lobe-adafruit-kit GitHub.

This is just a quick snippet of Microsoft’s full Lobe tutorial video.
Look how quickly the tool takes enough photos to train a machine learning model

‘Bakery’ identifies and prices different pastries

Lady Ada demonstrated Bakery: a machine learning model that uses an Adafruit BrainCraft HAT, a Raspberry Pi camera, and Microsoft Lobe. Watch how easy it is to train a new machine learning model in Microsoft Lobe from this point in the Microsoft Build Keynote video.

A quick look at Bakery from Adafruit’s delightful YouTube channel

Bakery identifies different baked goods based on images taken by the Raspberry Pi camera, then automatically identifies and prices them, in the absence of barcodes or price tags. You can’t stick a price tag on a croissant. There’d be flakes everywhere.

Extra functionality

Running this project on Raspberry Pi means that Lady Ada was able to hook up lots of other useful tools. In addition to the Raspberry Pi camera and the HAT, she is using:

  • Three LEDs that glow green when an object is detected
  • A speaker and some text-to-speech code that announces which object is detected
  • A receipt printer that prints out the product name and the price

All of this running on Raspberry Pi, and made super easy with Microsoft Lobe and Adafruit’s BrainCraft HAT. Adafruit’s Microsoft Machine Learning Kit for Lobe contains everything you need to get started.

full adafruit lobe kit
The full Microsoft Machine Learning Kit for Lobe with Raspberry Pi 4 kit

Watch the Microsoft Build keynote

And finally, watch Microsoft CTO Kevin Scott introduce Limor Fried, aka Lady Ada, owner of Adafruit Industries. Lady Ada joins remotely from the Adafruit factory in Manhattan, NY, to show how the BrainCraft HAT and Lobe work to make machine learning accessible.

The post Machine Learning made easy with Raspberry Pi, Adafruit and Microsoft appeared first on Raspberry Pi.

Make your bike smart with Raspberry Pi

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/make-your-bike-smart-with-raspberry-pi/

Maker keanuDav was always forgetting to turn on his bike lights when riding out in the dark. He also never knew how fast he was going, or how long his rides were. So he created a shareable smart bike that automatically turns the lights on or off and keeps track of where you’ve ridden. The project uses a RFID scanner so somebody else can use the bike without messing with Keanu’s personal ride data.

Here in Cambridge, if you forget to take your clip-on lights off your bike when you lock it up, chances are they won’t be there when you go back. We reckon this Raspberry Pi-powered solution could work for us here in the UK’s leading cycling city too, since there’s nothing to easily unclip and walk away with.

Hardware

  • Raspberry Pi 3
  • GPS NEO 6M (to track speed and location)
  • Portable power battery
  • RFID RC522 (so guest data and Keanu’s data can be separated)
  • LCD screen (so you can see the IP address and display when a user scans in or out)
  • Elegoo Uno R3 Board

Keanu totted up the total price of the build, including wood and the light, at around €145.

How does it all fit together?

We’re not going to lie: the smart bike looks tricky to recreate. I mean, that is a lot of wires. And several bits of hardware. But it does perform multiple functions for the rider, so we can put up with a little fiddliness.

smart bike electrical parts wired up
So many wires. *Rocks back and forth* So many wires.

And don’t worry, Keanu is a hero and shared this Fritzing diagram on his instructable, which is handily set out in a twelve-step format so you can follow along easily.

smart bike fritzing diagram
See, it’s all simple once you know how

How do you collect all the data?

Keanu explains:

“The RFID scanner is used with the arduino. I read out the data from the scanner with the arduino and send it to the Raspberry Pi with Serial USB.

The GPS module is also using serial communication. The data the GPS sends to the Raspberry Pi is not that well formatted, so I used a library to parse the data and make it a lot easier to use.

The analog values from the LDR are converted using the mcp3008 (an adc), then I transform the value to a percentage.”

smart bike data loop

Keanu stores the data in a relational database in mySQL. Then the database and a python script run together on the Raspberry Pi. Here’s everything you need on GitHub.

Take a ride

On top of the impressive coding and electrical skills, Keanu is a dab hand at woodwork. You could use a pre-made box in another material if that’s not your thing. It just needs a hole for the LCD screen to show through.

smart bike parts wired together in the box mount

Make sure to check out maker Keanu’s step-by-step tutorial explaining how he made the smart bike.

The post Make your bike smart with Raspberry Pi appeared first on Raspberry Pi.

Raspberry Pi Zero makes a xylophone play itself

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/raspberry-pi-zero-makes-a-xylophone-play-itself/

When maker Stéphane (aka HalStar) set about building this self-playing xylophone, their goal was to learn more about robotics, and to get hands-on with some mechanical parts they had never used before, in this case solenoids.

They also wanted to experiment with Raspberry Pi to build something that reflected their love of music. This automated instrument, capable of playing hundreds of MIDI files, fits the brief.

Let me introduce you to Stéphane’s self-playing xylophone

Two factors constrained the design: Stéphane wanted to be able to do it all using parts from the local DIY store, and to use as many regular modules as possible. So, no breadboard or wires everywhere, and no custom PCB. Just something simple to assemble and neat.

This extra video goes into more detail about the build process

Hardware

Raspberry Pi Zero WH is the teeny tiny brain of the self-playing xylophone. And its maker’s build details video very helpfully labels all the parts, where they sit, and what’s connected to what.

self playing xylophone hardware
There we are (#4) working away to make the xylophone play

These three buttons select the tracks, set the tempo, and set the mode. Choose between playing all loaded tracks or just one. You can also decide whether you want all tracks to play on repeat in a loop, or stop after your selections have played through. A two-inch LCD screen shows you what’s going on.

self playing xylophone track selection buttons
Twist and click to choose your settings

The right notes

While there are thousands of MIDI files freely available online, very few of them could actually be played by the xylophone. With only 32 notes, the instrument is limited in what it can play without losing any notes. Also, even when a MIDI file uses just 32 consecutive notes, they might not be the same range of 32 notes as the xylophone has, so you need to transpose. Stéphane developed a tool in Python to filter out 32-note tunes from thousands of MIDI files and automatically transpose them so the xylophone can play them. And, yes, everything you need to copy this filtering and transposing function is on GitHub.

self playing xylophone hero
In all its glory

Now, Stéphane says that whenever friends or family visit their home, they’re curious and impressed to see this strange instrument play by itself. Sadly, we are not among Stéphane’s family or friends; fortunately, though, this project has an entire YouTube playlist, so we can still have a look and a listen to see it in action up close.

Wait, isn’t that a glockenspiel?

We know it’s technically a glockenspiel. Stéphane acknowledges it is technically a glockenspiel. But we are firm fans of their going down the xylophone route, because way more people know what one of those is. If you’re interested, the difference between a xylophone and the glockenspiel is the material used for the bars. A xylophone has wooden bars, whereas glockenspiel bars are metal.

The post Raspberry Pi Zero makes a xylophone play itself appeared first on Raspberry Pi.