Monitoring blinking LED for home power usage

Monitoring Power By Counting Blinks

What do you do when you want to add a new feature to some electronics but you can’t or don’t want to tear into the guts? You look for something external with which you can interface. We like these hacks because they take some thinking outside the box, literally and figuratively, and often involve an Aha! moment.

[Simon Aubury’s] big household load was electric heating and his ancient heaters didn’t provide any way to monitor their usage. His power meters weren’t smart meters and he didn’t want to open them up. But the power meters did have an external LED which blinked each time 1 Wh was consumed. Aha! He could monitor the blinks.

Home power usage graph
Maximum is white, average is orange, and minimum is blue.

Doing so was simple enough. Just point photoresistors at the two meter’s LEDs and connect them and capacitors to a Raspberry Pi’s GPIO pins. Every time a pulse is detected, his Python code increments the LED’s counter and every fifteen minutes he writes the counters to an SQL database. Analysing his data he saw that nothing much happens before 5 AM and that the lowest daytime usage is around noon. The maximum recorded value was due to a heater accidentally being left on and the minimum is due to a mini holiday. Pretty good info given that all he had to go on was a blinking light.

Where else are there LED indicators which you can tap into? Here’s an only slightly more invasive usage where a washing machine’s “end of cycle” LED  was removed and the power going to it was rerouted to an Arduino for remote monitoring.

Sushi-Snarfing Barbie Uses Solenoid To Swallow

The view from America has long seen French women as synonymous with thin and/or beautiful. France is well-known for culinary skill and delights, and yet many of its female inhabitants seem to view eating heartily as passé. At a recent workshop devoted to creating DIY amusements, [Niklas Roy] and [Kati Hyyppä] built an electro-mechanical sushi-eating game starring Barbie, American icon of the feminine ideal. The goal of the game is to feed her well and inspire a happy relationship with food.

Built in just three days, J’ai faim! (translation: I’m hungry!) lets the player satiate Barbie one randomly lit piece of sushi at a time. Each piece has a companion LED mounted beneath the surface that’s connected in series to the one on the game board. Qualifying sushi are determined by a photocell strapped to the underside of Barbie’s tongue, which detects light from the hidden LED. Players must race against the clock to eat each piece, taking Barbie up the satisfaction meter from ‘starving’ to ‘well-fed’. Gobble an unlit piece, and the score goes down.

The game is controlled with a lovely pink lollipop of a joystick, which was the main inspiration for the game. Players move her head with left and right, and pull down to engage the solenoid that pushes her comically long tongue out of her button-nosed face. Barbie’s brain is an Arduino Uno, which also controls the stepper motor that moves her head.

[Niklas] and [Kati] wound up using cardboard end stops inside the box instead of trying to count the rapidly changing steps as she swivels around. The first motor they used was too weak to move her head. The second one worked, but the game’s popularity combined with the end stops did a number on the gears after a day or so. Click past the break to sink your teeth into the demo video.

Barbie can do more than teach young girls healthy eating habits. She can also teach them about cryptography.

Continue reading “Sushi-Snarfing Barbie Uses Solenoid To Swallow”

Headlight Mod For An Audi A3

If you have a car that is getting on in years, it may be missing some of the latest frills and features that the latest models sport. [Muris] has a slightly dated Audi A3 8P which did not have an AUTO setting for the headlights. In the newer models, this feature turns on the headlights when the ambient light falls below a threshold level (overcast conditions or when going through a tunnel), or when the windshield wipers are turned on. The light sensor is integrated behind the rear view mirror in a special mount, requiring an expensive windshield upgrade if he were to opt for the factory retrofit. Instead, he decided to build his own Automatic Headlights Sensor upgrade for his Audi A3.

His local regulations require the car headlights to be on all the time when the vehicle is in motion. So adding this feature may seem moot at first sight. But [Muris] programmed the headlights to be powered at 70% during daytime conditions and switch to 100% when his sensor detects low ambient light conditions. In the power save mode, all of the other non-essential lights (number plate, tail light) are also turned off to hopefully extend their life. He achieved this by using the VCDS (VAG-COM Diagnostic System) – a widely used aftermarket diagnostics tool for VW-Audi Group vehicles. His tiny circuit switches the lights between the two power settings.

His plan was to install the device without disturbing the original wiring or light switch assembly in any way. The low-powered device consists of a PIC micro-controller, an LDR (light dependent resistor) for light sensing and a low current relay which switches between the two modes. Setting the threshold at which the circuit switches the output is adjusted by a variable trimpot acting as a voltage divider with the LDR. [Muris] wired up a short custom harness which let him install this circuit between the default light switch and the car electronics. After switching on power, he has 15 seconds to enable or disable his unit by toggling the light switch five times, and that status gets stored in memory. The tiny board is assembled using SMD parts and is protected with a heatshrink sleeve. The circuit would work equally well with a lot of other cars, so If you’ve got one which could do with this feature upgrade, then [Muris] has the Eagle CAD files and code available for download on his blog.

Check out the video below where he runs a demo, describes his circuit in detail and then proceeds to assemble the PCB without using a vise or a third hand to hold the PCB. That’s a fancy watch he’s sporting at 00:50 s down the video.

Continue reading “Headlight Mod For An Audi A3”

Pulling Music Out Of Thin Air With A Raspberry Pi

Pianos are great instruments, but being rather heavy and requiring a fair amount of space they are certainly not known for their convenience. Sure, there are more portable varieties available, but they rarely resemble the elegance and classiness of a grand piano. One option is of course to build a downscaled version yourself — and since you’re already customizing the instrument, why stop at the way you play it. [2fishy] didn’t stop there either and ended up with a wooden, space friendly, light controlled piano housing a Raspberry Pi.

Inspired by the concept of a laser harp, [2fishy] followed the same principle but chose a simpler and safer alternative by using LEDs instead. For each playable tone, a LED is mounted opposite a light dependent resistor, creating an array of switches that is then connected to the Raspberry Pi’s GPIO pins. A Python script is handling the rest, polling the GPIO states and — with a little help from pygame, triggering MIDI playback whenever the light stream is interrupted.

There are enough LED/LDR pairs to play one full octave and have some additional control inputs for menu and octave shifting. This concept will naturally require some adjustments to your playing — you can get an idea of it in the demonstration video after the break. And if this design is still not the right size for you, or if you prefer to play in total darkness, this similar MIDI instrument using ultrasonic distance sensors could be of interest.

Continue reading “Pulling Music Out Of Thin Air With A Raspberry Pi”

Teensy Laser Harp Has Big Sound

[Johan] has slipped down the rabbit hole of making musical instruments. His poison? Laser harp MIDI controllers. Having never made one before, he thought he would start small and then iterate using what he learned. Fortunately for us, [Johan] documented the process over on .io, essentially creating a step-by-step guide for building a simple but powerful 16-note laser harp.

Laser Harp I is built around a Teensy 3.2 and, of course, lasers pointed at LDRs. [Johan] used fairly low-power laser modules, which are slightly less blinding if you accidentally look at them for a second, but should still be taken seriously. He added four potentiometers to control the sensitivity, scale, octave, and the transposition. The sensitivity pot essentially accounts for the ambient light in the room. Although it only has 16 notes, Laser Harp I is ready to rock with over 30 different scales to choose from. Check out the brief demo that [Johan] put up on his Instagram.

If you try to build your own laser harp and get lost trying to follow [Johan]’s instructions, don’t worry. His well-commented code and lovely schematic will undoubtedly save you. Then you can move on to open-beam designs.

Homemade E-Drums Hit All The Right Notes

In our eyes, there isn’t a much higher calling for Arduinos than using them to make musical instruments. [victorh88] has elevated them to rock star status with his homemade electronic drum kit.

The kit uses an Arduino Mega because of the number of inputs [victorh88] included. It’s not quite Neil Peart-level, but it does have a kick drum, a pair of rack toms, a floor tom, a snare, a crash, a ride, and a hi-hat. With the exception of the hi-hat, all the pieces in the kit use a piezo element to detect the hit and play the appropriate sample based on [Evan Kale]’s code, which was built to turn a Rock Band controller into a MIDI drum kit. The hi-hat uses an LDR embedded in a flip-flop to properly mimic the range of an actual acoustic hi-hat. This is a good idea that we have seen before.

[victorh88] made all the drums and pads out of MDF with four layers of pet screen sandwiched in between. In theory, this kit should be able to take anything he can throw at it, including YYZ. The crash and ride cymbals are MDF with a layer of EVA foam on top. This serves two purposes: it absorbs the shock from the sticks and mutes the sound of wood against wood. After that, it was just a matter of attaching everything to a standard e-drum frame using the existing interfaces. Watch [victorh88] beat a tattoo after the break.

If you hate Arduinos but are still reading for some reason, here’s a kit made with a Pi.

Continue reading “Homemade E-Drums Hit All The Right Notes”

Automatic Resistance: Resistors Controlled By The Environment

Resistors are one of the fundamental components used in electronic circuits. They do one thing: resist the flow of electrical current. There is more than one way to skin a cat, and there is more than one way for a resistor to work. In previous articles I talked about fixed value resistors as well as variable resistors.

There is one other major group of variable resistors which I didn’t get into: resistors which change value without human intervention. These change by environmental means: temperature, voltage, light, magnetic fields and physical strain. They’re commonly used for automation and without them our lives would be very different.

Continue reading “Automatic Resistance: Resistors Controlled By The Environment”