Tool Writes Your PWM Code For You

The good thing about computers is they do your work for you, right? If you are a programmer, that doesn’t always seem to be a true statement. [Runtimemicro] has the answer, at least if you are writing PWM code for the Arduino. Their free application lets you set a few parameters, visually see the results, and then generates code for you. You can see a video of the tool in operation, below.

According to their site, the tool works for timers 1 through 5 on an Arduino Nano, Uno, or Mega2560. The app appears to work on Windows, but it doesn’t look like it would have any trouble running under Wine on other platforms.

Continue reading “Tool Writes Your PWM Code For You”

Flicker Detector Lets You Hear What You Can’t See

Have you ever looked at modern LED lighting and noticed, perhaps on the very edge of your perception, that they seemed to be flickering? Well, that’s because they probably are. As are the LEDs in your computer monitor, or your phone’s screen. Pulse width modulation (PWM) is used extensively with LEDs to provide brightness control, and if it’s not done well, it can lead to headaches and eyestrain.

Looking to quantify just how much flashing light we’re being exposed to, [Faransky] has created a simple little gadget that essentially converts flashing light into an audio tone the human ear can pick up. Those LEDs might be blinking on and off fast enough to fool our eyes, but your ears can hear frequencies much higher than those used in common PWM solutions. In the video after the break, you can see what various LED light sources sound like when using the device.

The electronics here are exceptionally simple. Just connect a small solar panel to an audio amplifier, in this case the PAM8403, and listen to the output. To make it a bit more convenient to use, there’s an internal battery, charger circuit and USB-C port; but you could just as easily run the thing off of a 9 V alkaline if you wanted to build one from what’s already in the parts bin.

Who knows? If you carry this thing around long enough, you might even hear the far less common binary code modulation in action (but probably not).

Continue reading “Flicker Detector Lets You Hear What You Can’t See”

OpenDog: Adding Force Sensitive Feet

[James Bruton] OpenDog remains one of the most impressive home-built robotics projects we’ve seen here on Hackaday, and it’s a gift that just keeps on giving. This time he’s working on adding force sensing capabilities to OpenDog’s legs to allow for more dynamic movement control.

The actuators in the legs are three-phase outrunner motors that drive ball-screws via a belt. This configuration is non-backdrivable, meaning the legs cannot be moved when an external force is, which could lead to mechanical failures. He as tested other backdrivable leg configurations with other robots, but did not want to rebuild OpenDog completely. The solution [James] went with is a redesigned foot with an inbuilt switch, to confirm that the foot is touching the ground, and a load cell attached in the middle of the bottom leg segment. The load cell is bolted rigidly onto the leg segment, which allows it to sense when the leg is carrying load, without damaging the load cell itself.

Unfortunately all the serial ports on OpenDog’s main Teensy 3.6 controller are already used, so he converted the signal from the load cell to PWM, to allow it to be read by a normal GPIO pin. This works well in isolation, but when [James] switches on the motors, the PWM signal from the load sensor gets flooded by interference, making it unreadable. To solve this problem, he wants to implement a CAN bus, which will allow for more inputs and outputs and hopefully solve the interference problem. However, [James] has no experience with the CAN protocol, so learning to use it is going to be a project on its own.

OpenDog is turning into a very lengthy, time-consuming project, [James] says that the lessons learned from it have been invaluable for a number of other projects. This is something to keep in mind with everything we tackle. Choose projects were the experience gained and/or relationships developed are worth it on their own, even when the project fails in a conventional sense. This way you can never really lose.

Proprietary Fan Blows, Gets PWM Upgrade

Proprietary components are the bane of anyone who dares to try and repair their own hardware. Nonstandard sizes, lack of labeling or documentation, and unavailable spare parts are all par for the course. [Jason] was unlucky enough to have an older Dell computer with a broken, and proprietary, cooling fan on it and had to make some interesting modifications to replace it.

The original fan had three wires and was controlled thermostatically, meaning that a small thermistor would speed up the the fan as the temperature increased. Of course, the standard way of controlling CPU fans these days is with PWM, so he built a circuit which essentially converts the PWM signal from the motherboard into a phantom thermistor. It’s even more impressive that it was able to be done with little more than a MOSFET and a Zener diode.

Unfortunately, there was a catch. The circuit only works one way, meaning the fan speed doesn’t get reported to the motherboard and the operating system thinks the fan has failed. But [Jason] simply disabled the warning and washed his hands of that problem. If you don’t want to use a CPU fan at all, you can always just dunk your entire computer in mineral oil.

Beat The Streets With This Text Spraying Robot

In the midst of striking for climate change awareness, you may need some extra hands. That’s what [Anred Zynch] thought when they built Strettexter, the text-spraying writing robot that sprays onto streets.

The machine is loaded with 8 spray cans placed into a wooden box (a stop line with a wooden ledge to prevent the cans from falling out) and is fixed on top of a skateboard. It uses a PWN/Servo shield soldered onto an Arduino Uno connected to 8 servo motors (TowerPro SG90s) to control each of the spray bottles. A table converts every character into 5×8 bit fonts to fit the size of the spraying module. The device also includes a safety switch, as well as an encoder for measuring the horizontal distance traveled.

The Strettexter is activated by pulling on the skateboard once it’s been set up and connected to power (for portability, it uses a 8000mAh power bank). In its current configuration, the words stretch out pretty long, but some additional testing will probably lead to better results depending on the constraints of your canvas. The shorter the words, the more difficult it is for the white text to be legible, since there is significant spacing between printed bits.

We don’t condone public vandalism, so use this hack at your own discretion.

Continue reading “Beat The Streets With This Text Spraying Robot”

FM Signal Detection The Pulse-Counting Way

Compared to the simple diode needed to demodulate AM radio signals, the detector circuits used for FM are slightly more complicated. Wrapping your head around phase detectors, ratio detectors, discriminators, and quadrature detectors can be quite an exercise. There’s another demodulation method that’s not so common, but thankfully it’s also pretty easy to understand: the pulse counting detector.

As [Allan (W2AEW)] notes in the video below, pulse counting is a bit of a misnomer. Pulse counting works by generating a narrow, fixed-width square wave pulse at a set point in the received FM signal’s waveform, usually at the zero-crossing point. Since the frequency of the modulated carrier changes, the duty cycle of the resulting pulse train varies. That means there will be a fixed number of pulses, but by taking the average voltage of the pulse train, we can tease out the original audio frequency signal.

Simple in theory is often more complicated in practice, and [W2AEW] goes into some detail about those complications, such as needing to use a down-converter to make the peak-to-peak frequency deviation in the pulse train more easily detectable. As is his style, he walks us through a test circuit to prove that the theory works in practice. A simple two-transistor circuit generates the pulses at the zero-crossing point, a low-pass filter cleans up the signal, and a cheap audio amplifier reproduces the original audio. It’s a crude circuit to be sure, relying on the stray capacitance of the breadboard to work, but it proves the point and serves as a jumping-off point for further experiments – perhaps using an Arduino to count the pulses?

We always enjoy [W2AEW]’s videos and learn a lot from them. Not long ago we featured another of his videos talking about the mysteries of RF modulation; SSB, anyone?

Continue reading “FM Signal Detection The Pulse-Counting Way”

Twelve Channels Of LEDs Give RRRRGGGGBBBB Light

If you’ve ever searched Mouser or Digikey for LEDs parametrically, you won’t find just one red in your LEDs. You won’t find one green. There is quite literally an entire rainbow of colors of LEDs, and this rainbow goes into infrared and ultraviolet. You can search LEDs by frequency, and an RGEB LED is right at your fingertips. The ‘E’ stands for Emerald, and it’s better than a Bayer filter.

[ayjaym] over on Instructables realized anyone could buy a dozen frequencies of high-power LEDs, and the obvious application for this is to turn it into a tunable light source. The Angstrom is twelve LEDs, all different colors, and all controlled by PWM and piped down a single optical fiber. It’s an RRRRGGGGBBBB LED, ideal for microscopy, forensics, colorimetry, and seeing octoreen.

The heart of this device are twelve 3W star LEDs, with the following wavelengths: 390, 410, 440, 460, 500, 520, 560, 580, 590, 630, 660, and 780 nm. That’s deep red to almost ultra violet, and everything inbetween. These are powered by a 5 V, 60 W power supply, and controlled via a Raspberry Pi with 12 PWM channels in a circuit that’s basically just a bunch of MOSFETs. Proper heatsinking is required.

The impressive part of this build is the optics. A 3D printed mount holds and connects optical fibers and sends them into an optical combiner that is basically just a square acrylic rod. This is output to another optical fiber that will shine on just about anything. A webpage running on a Raspberry Pi sets the PWM channels of all the LEDs, and the resulting output shows up at the end of an optical fiber. It’s great if you want to look at something in a specific frequency of light. It also looks really cool, so that’s a bonus.