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”

Very Clever 555 Bassline Synth/Sequencer

If we had a dime for every 555-based noisemaker circuit we see… But this one’s got a twist.

[Tristan] does two things that elevate his sawtooth-wave noisemaker above the norm. First, he gets a clean sawtooth wave out of it so that it sounds about right. Then he manages to make it more or less playable. It’s a refined version of a classic hack.

555sawtoothosc2

The first trick is a matter of putting a constant current supply upstream of the timing capacitor. The usual 555-timer circuit just charges the capacitor up from the power rails through a resistor. This is fine if all you care about is timing. But because the current is proportional to the constantly dropping voltage difference, the voltage on the capacitor is an exponential function over time.

A simple transistor current source linearizes the waveform in no time. Raw sawtooth waves are “rich in harmonics” which is synth-geek code for “a bit grating”, but it will surely do well with a little filtering. The Javascript suggests that he’s already thinking in that direction, but we’re going to need video proof!

The second cool trick up [Tristan]’s sleeve is the light-dependent resistor (LDR) that determines the pitch. Yeah, we’ve all made those before — the light-dependent “Theremin”. But [Tristan] took the extra step and wrote up a Javascript application that makes his monitor brighter and darker, enabling him to get musical pitches out of the gizmo.

We’ve always wanted to implement LED-to-LDR control while writing the Logic Noise series, but never found a reliable way to make it work. It’s cool to see [Tristan]’s efforts. Maybe we’ll pull a 555 out of the junk box in his honor.

Greet The Sun With A 555 Flute

Here’s an interesting implementation of a classic: the 555 timer as astable multivibrator for the noble purpose of making weird music. [pratchel] calls this a Morgenflöte or morning flute, indicating that it is best played in the morning. It would certainly wake up everyone in the house.

Instead of using LDRs in straight-up Theremin mode and waving his hands about, [pratchel] mounted one in each of several cardboard tubes. One tube is small and has just a few holes; this is intended to be used as a flute. [pratchel] cautions against locating holes too close to the LDR, because it will overpower the others when left uncovered. A larger tube with more holes can be used as a kind of light-dependent slide whistle with another holey tube that fits inside. We were disappointed to find that the giant tube sitting by the amplifier hasn’t been made into a contrabass flute.

Continuing the theme of astability, [pratchel] went completely solderless and built the circuit on a breadboard. The LDR’s legs are kept separate by a piece of cardboard. This kind of project and construction is fairly kid and beginner-friendly. It would be a good one for getting your musically inclined friends and family members into electronics. Here’s a 555 player piano built by Hackaday’s own [Steven Dufresne] that might be a good second step. Check out [pratchel]’s performance after the break.

Continue reading “Greet The Sun With A 555 Flute”