Roll Your Own Arduino PWM

Most projects are built on abstractions. After all, few of us can create our own wire, our own transistors, or our own integrated circuits. A few months ago, [Julian Ilett] found a problem using the Arduino library for PWM. Recently, he revisited the issue and used his own PWM code to fix the problem. You can watch the video below.

Of course, neither the Arduino library nor [Julian’s] code is actually producing PWM. The Atmel CPU’s hardware is doing the work. The Arduino library gives you a wrapper called analogWrite — especially handy if you are not using an Atmel CPU where the same abstraction will do the same work. The issue arose when [Julian] broke the abstraction to invert the PWM output.

Continue reading “Roll Your Own Arduino PWM”

DIY Pyrography Power Supply

Ever wanted to try your hand at wood burning? If you already threw away your first soldering iron—you know the one: plugged straight in to the wall, no temperature control, came with a thick piece of tin foil to rest it on—don’t despair. Pyrography pens don’t cost that much. The variable power supply they plug into, though: that’s another story. Those cost more than they probably should.

[td0g] took the plunge into pyrography a while back, and wanted to build his own controller from an old ATX power supply. Why not? It should be more than capable of doing the job. Even the most heavy-duty pyrography pens only draw 10A, and the 3.3V line showed to be rated for 30A. All [td0g] had to do was add a PWM with a MOSFET and a ‘Tiny85.

The project nearly became Fail of the Week fodder after [td0g] saw huge voltage spikes across the MOSFET. A 47kΩ resistor took care of those, and a heat sink salvaged from the junk bin will prolong the transistor’s life. [td0g] added a push button that cycles through five heat settings, and an LED to show the status. After that, all he had to do was add a male RCA input to connect the pens he already has.

Okay, so you wouldn’t be caught dead dropping money on some fancy power supply for this new hobby. Don’t want to buy pens, either? Roll your own from a plasma arc lighter.

FoTW: LED Strips Make Awful Servo Drivers

We must all have at some time or another spotted a hack that seems like an incredible idea and which just has to be tried, but turns out to have been stretching the bounds of what is possible just a little too far. A chunk of our time has disappeared without trace, and we sheepishly end up buying the proper part for the job in hand.

[Orionrobots] had a conversation with a YouTube follower about LED strips. An LED strip contains a length of ready-made PWM drivers, they mused. Wouldn’t it be great then, if each of the drivers on a strip could be connected to a servo, making the strip a ready-made single-stop SPI servo driver. With a large multi-servo robot to build, he set to work on a strip of WS2801s.

If you are in the Soldering Zone and have elite skills at the iron, then soldering a wire to a surface mount driver chip is something entirely possible. For mere mortals though it’s a bit of a challenge, and he notes just how much extra time it’s added to the project. The fun starts though when the servo is hooked up, the best that can be said is that it vibrates a bit. On paper, the LED drivers should be able to drive a servo, because they can create the correct waveform. But in practice the servo is designed to accept a logic level input while the driver is designed to sit in series with an LED and control its current. In practice therefore the voltages required for a logic transition can’t quite be achieved.

He concludes by recommending that viewers splash out on a servo driver board rather than trying an LED strip. We applaud him for the effort, after all it’s a hack any of us might have thought of trying for ourselves.

Continue reading “FoTW: LED Strips Make Awful Servo Drivers”

Repurposing Moving Coil Meters To Monitor Server Performance

Snazzy analog meters can lend a retro flair to almost any project, but these days they often seem to be retasked as indicators for completely different purposes than originally intended. That’s true for these Vu meters repurposed as gauges for a Raspberry Pi server, and we think the build log is as informative as the finished product is good-looking.

As [MrWunderbar] admits, the dancing needles of moving-coil meters lend hipster cred to a project, but getting his Vu meters to cooperate and display network utilization and disk I/O on his Raspberry Pi NAS server was no mean feat. His build log is full of nice details on how to measure the internal resistance of the meter and determine a proper series resistor. He also has a lengthy discussion of the relative merits of driving the meters using a PWM signal or using a DAC; in the end, [MrWunderbar] chose to go the DAC route, and the video below shows the desired rapid but smooth swings as disk and network usage change. He also goes into great depth on pulling usage parameters from psutil and parsing the results for display on the meters.

Looking for more analog meter goodness? We saw a similar CPU load meter a few months back, and there was this mash-up of Nixies and old meters for a solar energy CEO’s desk.

Continue reading “Repurposing Moving Coil Meters To Monitor Server Performance”

Control Thy LED

In a previous article, I discussed LEDs in general and their properties. In this write-up, I want to give some examples of driving LEDs and comparing a few of the most commonly used methods. There is no “one size fits all” but I will try and generalize as much as possible. The idea is to be able to effectively control the brightness of the LED and prolong their life while doing it. An efficient driver can make all the difference if you plan to deploy them for the long-haul. Let’s take a look at the problem and then discuss the solutions. Continue reading “Control Thy LED”

Know The Load With This Simple Microcontroller CPU Meter

How do you tell how much load is on a CPU? On a desktop or laptop, the OS usually has some kind of gadget to display the basics. On a microcontroller, though, you’ll have to roll your own CPU load meter with a few parts, some code, and a voltmeter.

We like [Dave Marples]’s simple approach to quantifying something as complex as CPU load. His technique relies on the fact that most embedded controllers are just looping endlessly waiting for something to do. By strategically placing commands that latch an output on while the CPU is busy and then turn it off again when idle, a PWM signal with a duty cycle proportional to the CPU load is created. A voltage divider then scales the maximum output to 1.0 volt, and a capacitor smooths out the signal so the load is represented by a value between 0 and 1 volt. How you display the load is your own choice; [Dave] just used a voltmeter, but anything from an LED strip to some kind of audio feedback would work too.

Still just looking for a load meter for your desktop? Take your pick: an LED matrixold-time meters, or even Dekatrons.

The Silence Of The Fans

The good thing about using a server-grade machine as your desktop is having raw computing power at your fingertips. The downside is living next to a machine that sounds like a fleet of quadcopters taking off. Luckily, loud server fans can be replaced with quieter units if you know what you’re doing.

Servers are a breed apart from desktop-grade machines, and are designed around the fact that they’ll be installed in some kind of controlled environment. [Juan] made his Dell PowerEdge T710 tower server a better neighbor by probing the PWM signals to and from the stock Dell fans; he found that the motherboard is happy to just receive a fixed PWM signal that indicates the fans are running at top speed. Knowing this, [Juan] was able to spoof the feedback signal with an ATtiny85 and a single line of code. The noisy fans could then be swapped for desktop-grade fans; even running full-tilt, the new fans are quieter by far and still keep things cool inside.

But what to do with all those extra fans? Why not team them up with some lasers for a musical light show?