Circuit VR: An (Almost) Practical Buck Converter

In the last installment of Circuit VR, we walked around a simplified buck converter. The main simplification was using a constant PWM signal. The result is that the output voltage is a fixed fraction of the input voltage. For a regulator, the pulse width will need to depend on the output voltage so that any changes in the output are self-correcting. So this time, we’ll make a regulator, although we’ll still use a few Spice elements you’d have to replace in a practical design. In particular, we’ll assume you can generate a triangle wave, which is easy enough, and produce a stable 2.5 V reference.

The idea is to take a voltage reference and compare it to the output. We’ll think of the difference between the two as an error voltage, and use a comparator combined with a triangle wave generator to produce a PWM signal that is proportional to the error, and thus works to hold the output voltage constant.

Continue reading “Circuit VR: An (Almost) Practical Buck Converter”

Arduino Powered Arcade Button Lighting Effects

As if you already weren’t agonizing over whether or not you should build your own arcade cabinet, add this one to the list of compelling reasons why you should dedicate an unreasonable amount of physical space to playing games you’ve probably already got emulated on your phone. [Rodrigo] writes in to show off his project to add some flair to the lighted buttons on his arcade controller. (Google Translate)

The wiring for this project is about as easy as you’d expect: the buttons connect to the digital inputs on the Arduino, and the LEDs on the digital outputs. When the Arduino code sees the button getting pressed, it brings the corresponding LED pin high and starts a fade out timer using the SoftPWM library by [Brett Hagman].

It’s worth noting that the actual USB interface is being done with a stand-alone controller, so the Arduino here is being used purely to drive the lighting effects. The more critical reader might argue that you could do both with a single microcontroller, but [Rodrigo] was in a classic “Use what you’ve got” situation, and already had a USB controller on hand.

Of course, fancy lit arcade buttons won’t do you much good without something to put them in. Luckily we’ve covered some fantastic looking arcade cabinets to get you inspired.

Continue reading “Arduino Powered Arcade Button Lighting Effects”

Behind The Pin: How The Raspberry Pi Gets Its Audio

Single board computers have provided us with a revolution in the way we approach computing as hardware creators. We have grown accustomed to a world in which an entire microcomputer has become a component in its own right rather than a complex system, and we interface to them as amorphous entities through their exposed interfaces. But every pin or socket on a single board computer has something behind it, so following up on a recent news-inspired item in which we took a look at what lies behind the Ethernet jack on a Raspberry Pi, we’d like to continue that theme by looking behind more pins and interfaces. So today we’ll stay with the Raspberry Pi, and start with an easy target by taking a look down its audio jack.

All the main Raspberry Pi board releases since 2012 with the exception of the Pi Zero series, have featured a 3.5mm jack carrying line-level audio. The circuits are readily accessible via the Raspberry Pi website, and are easy enough to understand because of course all the really hard work is done within the silicon of the Broadcom system-on-chip. Looking at the audio circuitry, we’ll start by going back to the original Pi Model B from 2012 (PDF) because though more recent models have seen a few changes, this holds the essence of the circuitry.

Continue reading “Behind The Pin: How The Raspberry Pi Gets Its Audio”

555 Ways To Speed Control A DC Motor

The 555 timer IC is a handful of active components all baked into one beautifully useful 8 pin package. Originally designed for timing purposes, they became ubiquitous parts that can achieve almost anything. In this case, they’re being used to create a  basic PWM motor controller.

The trick is to set the 555 up in astable mode, and use diodes and a potentiometer in the charge/discharge loop. By hanging a diode off either side of a potentiometer, leading to the charge and discharge pins, and connecting the center lug to the main capacitor, you can vary the resistance seen by the capacitor during charge and discharge. By making charging take longer, you increase the pulse width, and by making discharge take longer, you reduce the pulse width. The actual frequency itself is determined largely by the capacitor and total resistance of the potentiometer itself.

This is a very old-school way to generate a PWM signal, which could be used to vary intensity of a light or make noise on a buzzer. However, in this case, the output of the 555 is connected to a MOSFET which is used to vary the speed of a computer fan motor.

It’s an excellent way to learn about both PWM motor control and the use of 555 timers, all with a very low parts cost and readily available components. We’ve seen such setups before, used as easy-to-build dimmer switches, too.

Need A Thousand Extra PWM Pins?

If your Arduino runs out of I/O lines, you can always add one of the several I/O expander chips that takes a serial interface to set its several pins. Or perhaps you could buy something like an Arduino Mega, with its extra sockets to fulfil your needs. But what would you do if you really needed more pins, say a thousand of them? Perhaps [Brian Lough] has the answer. OK, full disclosure: If you really need a thousand, the video isn’t exactly for you, as he shows you how to add up to 992 PWM outputs. The chip he uses works with any microcontroller (the video shows an ESP8266), and we suppose you could use two daisy chains of them and break the 1,000 barrier handily.

We like how short the video is (just two minutes; see below) as it gets right to the point. The PCA9685 chip gives you 16 12-bit PWM channels via an I2C interface. You can daisy chain up to 62 of the boards to get the 992 outputs promised.

Continue reading “Need A Thousand Extra PWM Pins?”

Dumb Down Your Xiaomi Smart Lamp With A Custom Firmware

Undoubtedly, the ESP8266’s biggest selling point is its WiFi capability for a ridiculously low price. Paranoid folks probably await the day its closed-source firmware bits will turn against humanity in a giant botnet, but until then, hobbyists and commercial vendors alike will proceed putting them in their IoT projects and devices. One of those devices is the Yeelight desk lamp that lets you set its color temperature and brightness via mobile app.

[fvollmer] acquired such a lamp, and while he appreciated its design and general concept, he wasn’t happy that it communicates with external servers. So he did the only reasonable thing and wrote his own firmware that resembles the original functionality, but leaves out the WiFi part. After all, the ESP8266 has still a lot to offer in its core essence: a full-blown 32-bit microcontroller with support for the most common, hobbyist-friendly SDKs.

The lamp’s color temperature and brightness are set with a rotary encoder / push button combo switch, and the LEDs themselves are controlled via PWM. All things considered, it’s a rather straightforward endeavour, for which [fvollmer] chose the standalone C SDK. And in the end, it’s not like he’s unreasonably cautious to keep some control over his household items.

LED Illusion Makes Colorful Water Drops Defy Gravity

The 60s and 70s were a great time for kitschy lighting accessories. Lava lamps, strobes, color organs, black light posters — we had it all. One particularly groovy device was an artificial rain display, where a small pump dripped mineral oil over vertical monofilament lines surrounding a small statue, with the whole thing lighted from above in dramatic fashion. If it sounds appalling, it was, and only got worse as the oil got gummy by accumulating dust and debris.

While this levitating water drops display looks somewhat similar, it has nothing to do with that greasy lamp of yore. [isaac879]’s “RGB time fountain” is actually a lot more sophisticated and pretty entrancing to watch. The time fountain idea is simple — drip water from a pump nozzle to a lower receptacle along a path that can be illuminated with flashing LEDs. Synchronizing the flashes to the PWM controlling pump speed can freeze the drops in place, or even make them appear to drip up. [isaac879] took the time fountain idea a step further by experimenting with RGB illumination, and he found that all sorts of neat effects are possible. The video below shows all the coolness, like alternating drops of different colors that look like falling — or rising — paint drops, and drops that merge together to form a new color. And behold, the mysterious antigravity cup that drips up and yet gets filled!

Allowances must be made for videos of projects that use strobes, of course. The effect of this time fountain and similar ones we’ve featured before is hard to capture, but this one still looks great to us.

Continue reading “LED Illusion Makes Colorful Water Drops Defy Gravity”