Dimming AC Lights The Hard Way

It’s that time of year again where the thermometer drops, the sun sets earlier, and we try to warm our hearts with the solstice festival that is common in our own respective cultures. Of course we all need a few strings of lights, but wouldn’t it be great if we had PWM controlled dimmable lights?

When he started out on his PWM-controlled, AC-powered light box, [Waterbury] immediately realized that relays were not going to be an optimal solution. The best way out of the mess he dug himself into would be via zero crossing. After getting a transformer wired up to a transistor for the detection circuit, a short bit of code was written in the wee hours of the morning and a proof of concept was had.

With the control box complete, [Waterbury] hacked up a quick VB app and piped the output of a WinAmp visualizer into the lights via serial. The Inception demo was great, but finer-grain control was needed. After seeing a Hack a Day post on a nice equalizer chip, the seven band output on IC were converted to UART.

[Waterbury] took his seven-band AC-controlled light box to a Halloween party with his synth and the results looked awesome. You can check that out after the break, but we’re really waiting to see his Christmas decorations this year.

Continue reading “Dimming AC Lights The Hard Way”

Follow Up: Star Wars Tree Gets An Upgrade

star-wars-tree-sound

We asked, and [Zach] listened.

Earlier this week, we featured a circuit he built which allowed his tiny Star Wars Christmas tree to visually replicate the series’ theme song. Several of you, along with myself, thought it would be far cooler if the tree also played the music to accompany the light show, so [Zach] set off to add that functionality.

Worried that the music would get annoying if it played along with the lights constantly, he tweaked his circuit design to incorporate a piezo buzzer that could be easily switched on and off. After wiring it to the MSP430 driving the light show, he tweaked the program to output signals to both the light string and buzzer simultaneously.

While the light show accurately represented the song, he initially ignored flat and sharp notes as they would be indistinguishable to the eye. In audio form however, the missing notes would be glaringly obvious, so he re-transcribed the sheet music resulting in the video you see below.

If you happened to follow [Zach’s] lead and put one of these together in your own house, be sure to swing by his site and grab the latest code, complete with audio track.

Continue reading “Follow Up: Star Wars Tree Gets An Upgrade”

The Force Is Strong With This Christmas Tree Light Show

star-wars-christmas-tree

[Zach] is a huge Star Wars fan, and in addition to the array holiday decorations that adorn his house, he says that his wife is nice enough to let him put up a Christmas tree full of Star Wars ornaments. For the past few years, the tree sat in the corner of the room unlit, but his wife thought that it should have some lights this year.

His wife came home with a small string of battery-operated lights, but [Zach] wanted something with a bit more geek cred. He decided to program the lights to play the Star Wars theme song, translating the tune’s pitch to light intensity.

He dug through his bin of electronics and found an MSP430 along with a small target board that would do the job nicely. He sat down with some sheet music, translating the notes to PWM values, resulting in the light show you see below.

While his wife provided a lovely violin accompaniment to the tree, we think that a small audio module would make a great addition to the tree next year.

Continue reading “The Force Is Strong With This Christmas Tree Light Show”

Motor Drivers: Half H-bridge With Brake And More

Here’s a nice little circuit that will drive a motor and allow you to stop its rotation, giving your robot a set of brakes. It’s part of [JM’s] post about the in’s and out’s of building microcontroller friendly motor controllers (translated).

This particular setup is a half H-bridge. It allows you to drive the motor in one direction only. The MOSFET used on the ground-side of the motor doesn’t actually need to be there. This is the brake which let you electronically stop the motor from spinning. Without it, the motor will keep turning under its own momentum when the half-bridge is shut off. Depending on the application this can be a big problem. There’s a great demonstration of the circuit braking a fast spinning motor in the video clip below the fold.

It is possible to use this driver with PWM, but [JM] has some warnings about inbuilt functions like FastPWM. Make sure you read his admonition, and if you need a refresher don’t miss this Hackaday video segment.

Continue reading “Motor Drivers: Half H-bridge With Brake And More”

Detailed Tutorial Shows How To Unleash Your Inner [Michael Knight]

developing_a_larson_scanner

Our own [Mike Szczys] recently sat down and put together a great tutorial on building a Larson Scanner. The ubiquitous circuit is usually one of the first few projects on a budding hackers list of things to build, since they are just so darn fun.

Simple versions of the scanner sweep back and forth lighting the LEDs without any sort of transition between them. The configuration most familiar to us all as featured in Knight Rider and Battlestar Galactica are a bit more complex, and have a fading trail of light that follows behind the leading edge of the sweep. [Mike] notes that this fading is traditionally accomplished through the use of capacitors, which cause the light to gradually fade as the animation sweeps across the LED array. He decided to take a different route with his circuit, relying on PWM control of the LEDs instead.

Mike put together a simple circuit using an ATmega168, a handful of resistors, and of course, an array of LEDs. Utilizing interrupts and PWM, he was able to accurately recreate the iconic light sweep without the use of any capacitors. One big benefit to his design aside from the lower component count is the fact that he can easily adjust the speed of the sweep as well as the fading properties with a few small code tweaks.

Be sure to check out his blog at some point, where he shares his code, some circuit diagrams, and plenty more details on how his scanner was built. In the meantime, take a look at the video below to see the result of [Mike’s] work.

Continue reading “Detailed Tutorial Shows How To Unleash Your Inner [Michael Knight]”

Converting PWM To DC Signaling For More Precise Fan Control

pwm_to_dc_fan_control

[hedgehoginventions] wrote in to share a little modification he made to his video card in order to keep it from overheating during strenuous 3D tasks. Having swapped out the stock cooler on his Nvidia 9600GT graphics card, he found that it did not need to utilize the fan while doing mundane things like checking email, but that it still required extra air flow while playing games.

He figured he get the fan to shut off by tweaking the PWM signal, but he found that he could not get the duty cycle under 20% using software, which still caused the fan to run at all times. The circuit he built takes the PWM signal output by the card, cleaning it up before converting it to a corresponding DC voltage. The fan then runs at the same speed it would if driven directly by the PWM signal, though it can now turn off completely when not required.

It’s a nice way to do automatic fan control when you can’t otherwise get your GPU fan to shut off. Nice work!

An Introduction To DC Boost Converters

simple_boost_converter

If you are planning on creating some sort of Nixie tube display, you will undoubtedly need to find yourself a high voltage DC power supply. If you don’t want to add a transformer to your project, you can always opt to build a boost converter instead. [Andrew Moser] shows us just how easy it is to build one, discussing the theory behind simple boost converters along the way.

Boost converters are often driven by dedicated ICs, but in this case the PWM signal from an Arduino does the job just fine. [Andrew] covers the process of choosing the proper components for the circuit, discussing duty cycles and components to avoid lest your boost converter die an untimely death.

He shows us how to implement a feedback system to get a more precise output voltage, but as Lady Ada has shown us, an open loop works pretty well too.

For the beginners that want to just get things up and running, his instructions and code should be sufficient, but [Andrew] provides plenty of reference links for those looking to delve deeper into the subject.