Simultaneous AP & Client On The Pi Zero W

The Raspberry Pi Zero W is a great platform for IoT projects, with a smattering of GPIO and onboard WiFi. However, security is an important consideration when it comes to the Internet of Things and it can be beneficial to keep your IoT devices on a separate network for safety’s sake. [Albert] wanted to do this all on board the Pi Zero W, and figured out how to get it acting as an access point and a client all at the same time.

[Albert] starts off with a fresh install of Raspbian Stretch, and sets the Pi up in OTG mode. This allows access to the Pi over a USB serial terminal. This is great for productivity when working on headless networking projects, as it can be frustrating trying to work with an SSH session that keeps dropping out when you change settings.

After creating a second named device (ap0) to go along with the one created automatically by the kernal (wlan0), DNSmasq is installed to act as a DHCP server for the AP. Hostapd is then installed to control the AP settings. Following this, like anything in Linux, a flurry of configuration files are edited to get everything humming along and starting up automatically after a reboot. For some reason, things don’t start up smoothly, so [Albert] has a cron job that fires 30 seconds after bootup and toggles the interfaces off and on again, and that’s done the trick.

It’s a useful hack, as it allows the Pi Zero to act as a hub for IoT devices, while also creating a bridge between them and the internet. Traffic can be managed to stop random internet users flicking your lights on and off and overspeeding your dishwasher.

We’ve seen the Pi Zero used for just about everything under the sun so far. If you’re just starting your own IoT build, perhaps you’d like to use the Pi Zero as a streaming camera?

 

Classic British Phone Gets A Google Makeover

It may seem like an odd concept to younger readers, but there was once a time when people rented their phones rather than buying them outright. Accordingly, these phones were built like tanks, and seeing one of these sturdy classics of midcentury modern design can be a trip down memory lane for some of us. So retrofitting a retro phone with a Raspberry Pi and Google’s AIY seems like a natural project to tackle for nostalgia’s sake.

The phone that [Alasdair Allan] decided to hack was the iconic British desk telephone, the GPO-746, or at least a modern interpretation of the default rental phone from the late 60s through the 70s. But the phone’s looks were more important than its guts, which were stripped away to make room for the Raspberry Pi and Google AIY hat. [Alasdair] originally thought he’d interface the Pi to the rotary dial through DIOs, until he discovered the odd optical interface of the dialer — a mask rotates over a ring of photoresistors, one for each digit, exposing only one to light from an LED illuminated by a microswitch on the finger stop. The digital interface brings up the Google voice assistant, along with some realistic retro phone line sounds. It’s a work in progress, but you can see where [Alasdair] is in the video below.

If stuffing a Google Pi into a retro appliance sounds familiar, it might be this vintage intercom rebuild you have in mind, which [Alasdair] cites as inspiration for his build.

Continue reading “Classic British Phone Gets A Google Makeover”

8-Channel ADC For The Raspberry Pi

The Raspberry Pi is a powerful embedded computing platform. However, for all its Linux-based muscle, it lacks one thing that even the simplest 8-bit microcontrollers usually have – analog-to-digital conversion. There are a great many ways to rectify this shortcoming, and [Chris Burgess] has brought us another – with an 8-channel ADC for the Raspberry Pi.

For the ADC, [Chris] chose the MCP3008, for its low cost and availability. In this configuration it offers 10-bit resolution and a maximum sampling rate of 200 kilosamples per second. Adafruit has a great guide on working with the MCP3008, too. With such a useful resource to hand, [Chris] was able to spin up a PCB to interface the chip to the Raspberry Pi using SPI. [Chris] took care to try to make the board to the official HAT specifications. As far as the physical aspects go, the board is to spec, however [Chris] omitted the EEPROM required for auto-configuration purposes. That said, the pads are on the board if someone wants to take the initiative to install one.

It’s a tidy build that provides something sorely missing from the Raspberry Pi, for a reasonable cost. [Chris]’s goal was to build something that would enable the measurement of analog sensors for a robot project; we’d love to hear your ideas for potential uses in the comments!

Arduino And Pi Breathe New Life Into Jukebox

What do you do when someone gives you a Wurlitzer 3100 jukebox from 1969, but keeps all the records? If you are like [Tijuana Rick], you grab an Arduino and a Rasberry Pi and turn it into a really awesome digital music player.

We’ll grant you, making a music player out of a Raspberry Pi isn’t all that cutting edge, but restoration and integration work is really impressive. The machine had many broken switches that had been hastily repaired, so [Rick] had to learn to create silicone molds and cast resin to create replacements. You can see and hear the end result in the video below.

[Rick] was frustrated with jukebox software he could find, until he found some Python code from [Thomas Sprinkmeier]. [Rick] used that code as a base and customized it for his needs.

There’s not much “how to” detail about the castings for the switches, but there are lots of photos and the results were great. We wondered if he considered putting fake 45s in the machine so it at least looked like it was playing vinyl.

Of course, you don’t need an old piece of hardware to make a jukebox. Or, you can compromise and build out a replica.

Continue reading “Arduino And Pi Breathe New Life Into Jukebox”

Table-Top Self Driving With The Pi Zero

Self-driving technologies are a hot button topic right now, as major companies scramble to be the first to market with more capable autonomous vehicles. There’s a high barrier to entry at the top of the game, but that doesn’t mean you can’t tinker at home. [Richard Crowder] has been building a self-driving car at home with the Raspberry Pi Zero.

The self-driving model is trained by first learning from the human driver.

[Richard]’s project is based on the EOgma Neo machine learning library. Using a type of machine learning known as Sparse Predictive Hierarchies, or SPH, the algorithm is first trained with user input. [Richard] trained the model by driving it around a small track. The algorithm takes into account the steering and throttle inputs from the human driver and also monitors the feed from the Raspberry Pi camera. After training the model for a few laps, the car is then ready to drive itself.

Fundamentally, this is working on a much simpler level than a full-sized self-driving car. As the video indicates, the steering angle is predicted based on the grayscale pixel data from the camera feed. The track is very simple and the contrast of the walls to the driving surface makes it easier for the machine learning algorithm to figure out where it should be going. Watching the video feed reminds us of simple line-following robots of years past; this project achieves a similar effect in a completely different way. As it stands, it’s a great learning project on how to work with machine learning systems.

[Richard]’s write-up includes instructions on how to replicate the build, which is great if you’re just starting out with machine learning projects. What’s impressive is that this build achieves what it does with only the horsepower of the minute Raspberry Pi Zero, and putting it all in a package of just 102 grams. We’ve seen similar builds before that rely on much more horsepower – in processing and propulsion.

Remote Controlled Streaming Speakers

For want of a better use of a spare Raspberry Pi Zero W and a set of LogitechZ-680 surround sound speakers, [Andre van Kammen] hacked them together to make them stream music playing from his phone.

It was stumbling across the Pi Music Box distribution that really got the ball rolling, and the purchase of a pHAT DAC laid the foundation. Cracking open the speakers’ controller case, [Kammen] was able to get 5V of power off some terminals even when the speakers were on standby — awesome! — which the Pi could use. Power and volume are controlled via the Pi’s GPIO pins with a diode to drop the voltage and prevent shorts.

Now, how to tell whether the speakers are on or off? Well, a pin on the display connector changes to 4.3V when it’s on, so wiring a 10k resistor and a diode to said pin is a hackable solution. Finishing off the wired connections, it proved possible to cram the pHAT DAC inside the controller case with the GPIO header sticking out the back to mount the Pi upon with no other external wires — double awesome!

Continue reading “Remote Controlled Streaming Speakers”

The World’s Thinnest Raspberry Pi 3

We’ve become used to readily available single board computers of significant power in form factors that would have seemed impossibly small only a few years ago. But even with a board the size of a credit card such as a Raspberry Pi, there are still moments when the available space is just too small to fit the computer.

The solution resorted to by enterprising hardware hackers is often to remove extraneous components from the board. If there is no need for a full-size USB port or an Ethernet jack, for example, they can safely be taken away. And since sometimes these attempts result in the unintended destruction of the board, yonder pirates at Pimoroni have taken viewers of their Bilge Tank series of videos through the procedure, creating in the process what they describe as “The World’s Thinnest Raspberry Pi 3“.

The USB and Ethernet ports, as large through-hole components, were the easiest to tackle. Some snipping and snapping removed the tinware and plastic, then the remains could be hand-desoldered. The GPIO pins resisted attempts to remove their plastic for easy desoldering, so for them they had to resort to a hot air gun. Then for the remaining camera, HDMI, and display ports the only option was hot air. Some cleaning up with desoldering braid, and they had their super-thin Pi. They weren’t quite done though, they then took the reader through modifying a Raspbian Lite distribution to deactivate support those components that have been removed. This has the handy effect not only of freeing up computer resources, it also saves some power consumption.

You might point out that they could have just used a Pi Zero, which with its SD card on the top surface is even a little bit thinner. And aside from the question of extra computing power, you’d be right. But their point is valid, that people are doing this and not always achieving a good result, so their presenting it as a HOWTO is a useful contribution. We suspect that a super-thin Pi 3 will still require attention to heat management though.

Take a look at the video, we’ve put it below the break.

Continue reading “The World’s Thinnest Raspberry Pi 3”