DIY Clapper Is 1980s Style With Raspberry Pi Twist

Home automation isn’t all that new. It is just more evolved. Many years ago, a TV product appeared called the Clapper. If you haven’t heard of it, it was basically a sound-operated AC switch. You plug, say, a lamp into the device and the clapper into the wall and you can then turn the lamp on or off by clapping. If you somehow missed these — and you can still get them, apparently — have a look at the 1984 commercial in the video below. [Ash] decided to forego ordering one on Amazon and instead built her own using a Raspberry Pi.

[Ash’s] prototype uses an LED and could — in theory — drive anything. If you wanted to make a real Clapper replacement you’d need a relay or some other kind of AC switch suitable for the load. The actual clap detection software is from [nikhiljohn10] and simply waits for two loud noises. No fancy machine learning to differentiate between a clap and a cat knocking over a vase. Just a threshold and some timing.

Continue reading “DIY Clapper Is 1980s Style With Raspberry Pi Twist”

Oreo Construction: Hiding Your Components Inside The PCB

In recent months, the ability to hide components inside a circuit board has become an item of interest. We could trace this to the burgeoning badgelife movement, where engineers create beautiful works of electronic art. We can also attribute this interest to Bloomberg’s Big Hack, where Jordan Robertson and Michael Riley asserted Apple was the target of Chinese spying using components embedded inside a motherboard. The Big Hack story had legs, but so far no evidence of this hack’s existence has come to light, and the companies and governments involved have all issued denials that anything like this exists.

That said, embedding components inside a PCB is an interesting topic of discussion, and thanks to the dropping prices of PCB fabrication (this entire project cost $15 for the circuit boards), it’s now possible for hobbyists to experiment with the technique.

But first, it’s important to define what ‘stuffing components inside a piece of fiberglass’ is actually called. My research keeps coming back to the term ’embedded components’ which is utterly ungooglable, and a truly terrible name because ’embedded’ means something else entirely. You cannot call a PCB fabrication technique ’embedded components’ and expect people to find it on the Internet. For lack of a better term, I’m calling this ‘Oreo construction’, because of my predilection towards ‘stuf’, and because it needs to be called something. We’re all calling it ‘Oreo construction’ now, because the stuf is in the middle. This is how you do it with standard PCB design tools and cheap Chinese board houses.

Continue reading “Oreo Construction: Hiding Your Components Inside The PCB”

Ben Heck Can Program The Smallest Microcontroller

Microcontrollers are small, no one is arguing that. On a silicon wafer the size of a grain of rice, you can connect a GPS tracker to the Internet. Put that in a package, and you can put the Internet of Things into something the size of a postage stamp. There’s one microcontroller that’s smaller than all the others. It’s the ATtiny10, and its brethren the ATtiny4, 5, and 9. It comes in an SOT-23-6 package, a size that’s more often seen in packages for single transistors. It’s not very capable, but it is very small. It’s also very weird, with a programming scheme that’s not found in other chips from the Atmel/Microchip motherbrain. Now, finally, we have a great tutorial on using the ATtiny10, and it comes from none other than [Ben Heck].

The key difference between the ATtiny10 and other AVRs is that the tiny10 doesn’t use the standard AVR ISP protocol for programming. Instead of six pins for power, ground, MISO, MOSI, SCK, and RST, this is a high-voltage programming scheme that needs 12 Volts. The normal AVR programmer can do it, but you need to build an adapter. That’s exactly what [Ben] did, using a single-sided perf board, a lot of solder, and some headers. It looks like a lot, but there’s really not much to this programmer board. There’s a transistor and an optocoupler. The only thing that could make this programmer better is an SOT-23 ZIF socket. This would allow bare tiny10s to be programmed without first soldering them to a breakout board, but ZIF sockets are expensive to begin with, and the prices on SOT-23 sockets are absurd.

Programming the device was a matter of loading Atmel Studio and going through the usual AVR rigamarole, but Ben was eventually able to connect a light sensor to the tiny10 and have it output a value over serial. This was all done on a device with only 32 Bytes of RAM. That’s impressive, and one of the cool things about the smallest microcontroller you can buy.

Continue reading “Ben Heck Can Program The Smallest Microcontroller”

Hacking Hackaday.io From CircuitPython

If you’ve ever engaged in social media, you’re familiar with the little thrill you receive when your post, tweet, or project gets a like. But, if logging in feels like too much overhead to obtain your dopamine reward, [pt’s] CircuitPython Hackaday portal may be just what you’re looking for. This project creates a stand-alone counter to display the number of “skulls” (aka likes) received by a project on hackaday.io, and of course, it’s currently counting its own.

The code is running on a SAMD51 (Cortex M4) microcontroller and serving up the skulls on 240×320 TFT display. For WiFi connectivity, the project uses an ESP-32 controlled through the usual AT command set. All the gory details of this interaction are abstracted away by a CircuitPython library, which is great because that code really isn’t something you want to write for every project. The program accesses the hackaday.io API to retrieve the number of skulls for the project, but could be easily modified to interface with any service that returned a JSON result.

We’ve been seeing a lot of CircuitPython code lately. Just in case you’re not familiar with it, CircuitPython is Adafruit’s version of Micropython, a python language targeted at embedded processors. While it sounds like something concocted purely to make old-school embedded-C programmers grumble, it’s actually powerful and convenient for embedded prototyping and development. Fueled by the speed of the latest inexpensive microcontrollers and a rapidly growing set of libraries that take the sting out of using integrated peripherals and common hacker-friendly parts, it offers a solid alternative to older embedded frameworks. There are lots of examples around if you want to get started, and we’re maintaining our own list of CircuitPython projects over on hackaday.io that you can check out.

You can see a video of the display after the break. It’s not a live stream, so you won’t see your like appear on the display, but rest assured, [pt] will!

Continue reading “Hacking Hackaday.io From CircuitPython”