Raspberry Pi Camera With Smarts — Cloud Or Local?

[Mark West] gave an interesting presentation at last year’s GOTO Copenhagen conference. He shows how he took a simple Raspberry Pi Zero webcam and expanded it with AI. He actually added the intelligent features in two different ways: on in the Amazon cloud and another using the Intel Modvidius NCS USB stick directly connected to the USB. You can see the video below.

Local motion detection uses some open source software. You simply configure it using a text file and it even handles the video streaming. However, at that point, you just have a web camera — not amazing, nor very cost effective. However, you get a lot of false alarms with the motion detection software. A random cat walking past, clouds, trees, or even rain would push [Mark] an email and after 250 alert e-mails a day, [Mark] decided to make something better.

Continue reading “Raspberry Pi Camera With Smarts — Cloud Or Local?”

Balena Introduces DIN-Capable Pi Compute Module Carrier Board

Although you don’t hear about it very much over the clamor of emulating old video game systems, one of the biggest uses of the Raspberry Pi outside its educational roots is in industry. The Pi makes for a great industrial control system, and if you mount it to a DIN rail, you’re golden. This is the biggest reason the Pi foundation is still making the Pi 1, and it’s one of the big motivations behind the Pi Compute Module.

Now that the Pi Compute Module 3 and 3+ have been out for a while, it’s only fitting that these modules get a great carrier board. The balenaFin 1.1 is out now, and it’s the perfect carrier board for the Pi compute module.

Balena (formerly resin.io) is a software stack designed for managing fleets of Linux devices, and there’s no better example of that than a factory filled with Pis fiddling relays and such. Balena has found its way from tracking sea turtles to monitoring oil rigs, and with that comes a need for a developer kit. The Pi compute module is supposed to have a very long support life, so the obvious solution is to make a great carrier board for this fantastic module.

Features of note include two camera connectors, PoE (with a Hat), USB headers, an RGB indicator LED, an industrial temperature range, and a case designed for a DIN rail. So far, so goo, but there’s also a microcontroller with a Bluetooth radio that can operate without the compute module being turned on, and an RTC for time-based operation. There’s a mini PCI express slot designed for cellular modems, and a SIM card slot just for fun.

While most Pi builds we see could make use of these features, they are assuredly one-off builds. You’re not going to be deploying hundreds of Pis if you need to 3D print an enclosure for each one. That’s when actual engineers need to get involved, and if you’re doing that, you might as well go with the Raspberry Pi compute module. If you’re looking for a fleet of Pis, you could do worse than to look at this very nice compute module carrier board.

Leigh Johnson’s Guide To Machine Vision On Raspberry Pi

We salute hackers who make technology useful for people in emerging markets. Leigh Johnson joined that select group when she accepted the challenge to build portable machine vision units that work offline and can be deployed for under $100 each. For hardware, a Raspberry Pi with camera plus screen can fit under that cost ceiling, and the software to give it sight is the focus of her 2018 Hackaday Superconference presentation. (Video also embedded below.)

The talk is a very concise 13 minutes, so Leigh flies through definitions of basic terms, before quickly naming TensorFlow and Keras as the tools she used. The time she saved here was spent on explaining what convolutional neural networks are and how they work, just enough to prepare the audience. But all of that is really just background, the meat of the talk is self-contained examples that Leigh has put together and made available online. I love to see that since it means you go beyond just watching and try it out for yourself. Continue reading “Leigh Johnson’s Guide To Machine Vision On Raspberry Pi”

Hack My House: Raspberry Pi As A Touchscreen Thermostat

Your thermostat is some of the oldest and simplest automation in your home. For years these were one-temperature setting and nothing more. Programmable thermostats brought more control; they’re alarm clocks attached to your furnace. Then Nest came along and added beautiful design and “learning features” that felt like magic compared to the old systems. But we can have a lot more fun. I’m taking my favorite single-board computer, the Raspberry Pi, and naming it keeper of heat (and cool) by building my own touchscreen thermostat.

Mercury thermostats started it all, and were ingenious in their simplicity — a glass capsule containing mercury, attached to a wound bi-metal strip. As the temperature changes, the contraption tilts and the mercury bead moves, making or breaking contact with the wiring. More sophisticated thermostats have replaced the mercury bead with electronics, but the signaling method remains the same, just a simple contact switch.

This makes the thermostat the prime target for an aspiring home automation hacker. I’ve had this particular project in mind for quite some time, and was excited to dive into it with simple raw materials: my Raspberry Pi, a touchscreen, and a mechanical relay board.

Continue reading “Hack My House: Raspberry Pi As A Touchscreen Thermostat”

A Modern Solution To Tea Bag Inventory Management

Britain is famously known as a land of manners and hospitality. Few situations could make an Englishman’s stiff upper lip quiver, short of running out of tea bags while entertaining house guests. Thankfully, [The Gentleman Maker] is here and living up to his name – with a helpful tea monitor to ensure you’re never caught out again.

The Intelli-T, as it has been dubbed, monitors tea inventory by weight. An Arduino Uno combined with a HX711 IC monitors a load cell mounted under a canister, with a reed switch on the lid. Upon the canister being open and closed, the Arduino takes a measurement, determining whether tea stocks have dipped below critical levels. If the situation is dire, a Raspberry Pi connected over the serial port will sound an urgent warning to the occupants of the home. If there is adequate tea, the Raspberry Pi will instead provide a helpful tea fact to further educate the users about the hallowed beverage.

It’s a fun project, and one that has scope for further features, given the power of the Raspberry Pi. A little more work could arrange automatic ordering of more tea online, or send alerts through a service like IFTTT. We’ve seen [The Gentleman Maker]’s uniquely British hacks before, such as the umbrella that tells you the weather. Video after the break.

Continue reading “A Modern Solution To Tea Bag Inventory Management”

Python Script Sends Each Speaker Its Own Sound File

When it comes to audio, the number of speakers you want is usually governed by the number of tracks or channels your signal has. One for mono, two for stereo, four for quadrophonic, five or more for surround sound and so on. But all of those speakers are essentially playing different tracks from a “single” audio signal. What if you wanted a single audio device to play eight different songs simultaneously, with each song being piped to its own speaker? That’s the job [Devon Bray] was tasked with by interdisciplinary artist [Sara Dittrich] for one of her “Giant Talking Ear” installation project. He built a device to play multiple sound files on multiple output devices using off the shelf hardware and software.

But maybe a hack like this could be useful in many applications other than just art installations. It could be used in an Escape room, where you may want the various audio streams to start in synchronicity at the same time, or as part of a DJ console, sending one stream to the speakers and another to the head phones, or a game where you have to run around a room full of speakers in the right sequence and speed to listen to a full sentence for clues.

His blog post lists links for the various pieces of hardware required, although all of it is pretty generic, and the github repository hosts the code. At the heart of the project is the Sounddevice library for python. The documentation for the library is sparse, so [Bray]’s instructions are handy. His code lets you “take a directory with .wav files named in numeric order and play them over USB sound devices attached to the host computer over and over forever, looping all files once the longest one finishes”. As a bonus, he shows how to load and play sound files automatically from an attached USB drive. This lets you swap out your playlist on the Raspberry Pi without having a use a keyboard/mouse, SSH or RDP.

Check the video after the break for a quick roundup of the project.

Continue reading “Python Script Sends Each Speaker Its Own Sound File”

Hack My House: Garage Door Cryptography Meets Raspberry Pi

Today’s story is one of victory and defeat, of mystery and adventure… It’s time to automate the garage door. Connecting the garage door to the internet was a must on my list of smart home features. Our opener has internet connection capabilities built-in. As you might guess, I’m very skeptical of connecting a device to the internet when I have no control over the software running on it.

The garage door is controlled by a button hung on the garage wall. There is only a pair of wires, so a simple relay should be all that is needed to simulate the button press from a Raspberry Pi. I wired a relay module to a GPIO on the Pi mounted in the garage ceiling, and wrote a quick and dirty test program in Python. Sure enough, the little relay was clicking happily– but the garage door wasn’t budging. Time to troubleshoot. Does the push button still work? *raises the garage door* yep. How about the relay now? *click…click* nope.

You may have figured out by now, but this garage door opener isn’t just a simple momentary contact push button. Yes, that’s a microcontroller, in a garage door button. This sort of scenario calls for forensic equipment more capable than a simple multimeter, and so I turned to Amazon for a USB oscilloscope that could do some limited signal analysis. A device with Linux support was a must, and Pico Technology fit the bill nicely.

Searching for a Secret We Don’t Actually Need

My 2 channel Picotech oscilloscope, the 2204A, finally arrived, and it was time to see what sort of alien technology was in this garage door opener. There are two leads to the button, a ground and a five volt line. When the button is pressed, the microcontroller sends data back over that line by pulling the 5 V line to ground. If this isn’t an implementation of Dallas 1-wire, it’s a very similar concept.

Continue reading “Hack My House: Garage Door Cryptography Meets Raspberry Pi”