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”
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.
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?”
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.
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”
How many times have you wished for a pocket-sized multimeter? How about a mini microcontroller-based testing rig? Have you ever dared to dream of a device that does both?
Multiduino turns an Arduino Nano into a Swiss Army knife of portable hacking. It can function as an analog multimeter to measure resistance, voltage drop, and continuity. It can also produce PWM signals, read from sensors, do basic calculator functions, and display the health of its rechargeable battery pack.
Stick a 10kΩ pot in the left-side header and you can play a space shooter game, or make line drawings by twisting the knob like an Etch-A-Sketch. Be sure to check out the detailed walk-through after the break, and a bonus video that shows off Multiduino’s newest functions including temperature sensing, a monophonic music player for sweet chiptunes, and a virtual keyboard for scrolling text on the OLED screen. [Danko] has a few of these for sale in his eBay store. They come assembled, and he ships worldwide. The code for every existing function is available on his site.
More of a maximalist? Then check out this Micro-ATX Arduino.
Continue reading “Pocket-Sized Multiduino Does it All”
You know the saying: “Dogs have people, cats have servants.” This is especially true when your feline overlord loses track of time and insists on being fed at oh-dark-thirty. You’re tempted to stay in bed feigning death, but that’s a tall order with the cat sitting on your chest and staring into your soul.
An automatic cat feeder would be nice at moments like these, but off-the-shelf units are pricey. [Mom Will Be Proud] decided to roll his own cat feeder, and the results are pretty impressive for what amounts to a trash can build. Two old food cans form the body — a Pringles can on top to hold the food and a nut can below for the servo. The metal ends of the cans nest together nicely, and with a large section removed from each, an aperture opens every time the hopper rotates, dropping food down a chute. A BeagleBone Black controls the servo, but anything with PWM outputs should do the trick. We’d lean toward the ESP8266 ecosystem for WiFi support for remotely controlling feedings, and we’d probably beef up the structure with PVC tube to prevent unauthorized access. But it’s a simple concept, and simple is a good place to start.
You shall not want for pet feeder builds around these parts. Take your pick — snazzy Steampunk, super cheap, or with an Archimedean twist.
Continue reading “Eat Some Pringles, Feed the Cat”