Scott Swaaley On High Voltage

If you were to invent a time machine and transport a typical hardware hacker of the 1970s into 2018 and sit them at a bench alongside their modern counterpart, you’d expect them to be faced with a pile of new things, novel experiences, and exciting possibilities. The Internet for all, desktop computing fulfilling its potential, cheap single-board computers, even ubiquitous surface-mount components.

What you might not expect though is that the 2018 hacker might discover a whole field of equivalent unfamiliarity while being very relevant from their grizzled guest. It’s something Scott Swaaley touches upon in his Superconference talk:  “Lessons Learned in Designing High Power Line Voltage Circuits” in which he describes his quest for an electronic motor brake, and how his experiences had left him with a gap in his knowledge when it came to working with AC mains voltage.

When Did You Last Handle AC Line voltages?

If you think about it, the AC supply has become something we rarely encounter for several reasons. Our 1970s hacker would have been used to wiring in mains transformers, to repairing tube-driven equipment or CRT televisions with live chassis’,  and to working with lighting that was almost exclusively provided by mains-driven incandescent bulbs. A common project of the day would have been a lighting dimmer with a triac, by contrast we work in a world of microcontroller-PWM-driven LEDs and off-the-shelf switch-mode power supplies in which we have no need to see the high voltages. It may be no bad thing that we are rarely exposed to high-voltage risk, but along the way we may have lost a part of our collective skillset.

Scott’s path to gaining his mains voltage experience started in a school workshop, with a bandsaw. Inertia in the saw kept the blade moving after the power had been withdrawn, and while that might be something many of us are used to it was inappropriate in that setting as kids are better remaining attached to their fingers. He looked at brakes and electrical loads as the solution to stopping the motor, but finally settled on something far simpler. An induction motor can be stopped very quickly indeed by applying a DC voltage to it, and his quest to achieve this led along the path of working with the AC supply. Eventually he had a working prototype, which he further developed to become the MakeSafe power tool brake.

Get Your AC Switching Right First Time

The full talk is embedded below the break, and gives a very good introduction to the topic of switching AC power. If you’ve never encountered a thryristor, a triac, or even a diac, these once-ubiquitous components make an entrance. We learn about relays and contactors, and how back EMF can destroy them, and about the different strategies to protect them. Our 1970s hacker would recognise some of these, but even here there are components that have reached the market since their time that they would probably give anything to have. We see the genesis of the MakeSafe brake as a panel with a bunch of relays and an electronic fan controller with a rectifier to produce the DC, and we hear about adequate safety precautions. This is music to our ears, as it’s a subject we’ve touched on before both in terms of handling mains on your bench and inside live equipment.

So if you’ve never dealt with AC line voltages, give this talk a look. The days of wiring up transformers to power projects might be largely behind us, but the skills and principles contained within it are still valid.

Continue reading “Scott Swaaley On High Voltage”

Antenna Rotation Arduino Style

Back in the days when you didn’t pay for your TV programming, it was common to have a yagi antenna on the roof. If you were lucky enough to have every TV station in the area in the same direction, you could just point the antenna and forget it. If you didn’t, you needed an antenna rotator. These days, rotators are more often found on communication antennas like ham radio beams. For terrestrial use, the antenna only needs to swing around and doesn’t need to change elevation. However, it does take a stout motor because wind loading can put a lot of force on the system.

[SP3TYF] has a HyGain AR-303 rotator and decided to build an Arduino-based controller for it. The finished product has an LCD and is able to drive a 24 V motor. You can control the azimuth of the antenna with a knob or via the computer.

Continue reading “Antenna Rotation Arduino Style”

Roomba Now Able to Hunt Arnold Schwarzenegger

Ever since the Roomba was invented, humanity has been one step closer to a Jetsons-style future with robots performing all of our tedious tasks for us. The platform is so ubiquitous and popular with the hardware hacking community that almost anything that could be put on a Roomba has been done already, with one major exception: a Roomba with heat vision. Thanks to [marcelvarallo], though, there’s now a Roomba with almost all of the capabilities of the Predator.

The Roomba isn’t just sporting an infrared camera, though. This Roomba comes fully equipped with a Raspberry Pi for wireless connectivity, audio in and out, video streaming from a webcam (and the FLiR infrared camera), and control over the motors. Everything is wired to the internal battery which allows for automatic recharging, but the impressive part of this build is that it’s all done in a non-destructive way so that the Roomba can be reverted back to a normal vacuum cleaner if the need arises.

If sweeping a just the right time the heat camera might be the key to the messy problem we discussed on Wednesday.

The only thing stopping this from hunting humans is the addition of some sort of weapons. Perhaps this sentry gun or maybe some exploding rope. And, if you don’t want your vacuum cleaner to turn into a weapon of mass destruction, maybe you could just turn yours into a DJ.

Anti-Cogging Algorithm Brings Out the Best in your Hobby Brushless Motors

Cheap, brushless motors may be the workhorses behind our RC planes and quadcopters these days, but we’ve never seen them  in any application that requires low-speed precision. Why? Sadly, cheap brushless motors simply aren’t mechanically well-constructed enough to offer precise position control because they exhibit cogging torque, an unexpected motor characteristic that causes slight variations in the output torque that depend rotor position. Undaunted, [Matthew Piccoli] and the folks at UPenn’s ModLab have developed two approaches to compensate and minimize torque-ripple, essentially giving a cheap BLDC Motor comparable performance to it’s pricier cousins. What’s more, they’ve proven their algorithm works in hardware by building a doodling direct-drive robotic arm from brushless motors that can trace trajectories.

Cogging torque is a function of position. [Matthew’s] algorithm works by measuring the applied voltage (or current) needed to servo the rotor to each measurable encoder position in a full revolution. Cogging torque is directional, so this “motor fingerprint” needs to be taken in both directions. With these measured voltages (or currents) logged for all measurable positions, compensating for the cogging torque is just a matter of subtracting off that measured value at any given position while driving the motor. [Matthew] has graciously taken the trouble of detailing the subtleties in his paper (PDF), where he’s actually developed an additional acceleration-based method.

Hobby BLDC motors abound these days, and you might even have a few spares tucked away on the shelf. This algorithm, when applied on the motor controller electronics, can give us the chance to revisit those projects that mandate precise motor control with high torque–something we could only dream about if we could afford a few Maxon motors. If you’re new to BLDC Motor Control theory, check out a few projects of the past to get yourself up-and-running.

Continue reading “Anti-Cogging Algorithm Brings Out the Best in your Hobby Brushless Motors”

Pulse Density Modulation

[esot.eric] was trying to drive a motor and naturally thought of using pulse width modulation (PWM) to control the motor speed. However, he found that even with a large capacitor, his underpowered power supply would droop before the PWM cycles were complete. So instead of PWM he decided to experiment with pulse density modulation.

The idea is to use smaller pulses over a longer period of time and make the average power equal to the percentage motor speed desired. With a PWM system, for example, if the time period is T, a 50% PWM drive would have the  drive high for T/2 and low for the other half of the cycle. With pulse density, each pulse might be T/10 (as an example) and then the output would be on for 1/10, off for 1/10, on for 1/10 and so on, until by time T you’d still get to 50%. The advantage is the output capacitor gets a kick more often and has less opportunity to droop.

Continue reading “Pulse Density Modulation”

NXP’s ARM Micros With Motor Controllers

motor

It’s still relitavely early in the year, and all those silicon manufacturers are coming out with new toys to satiate the engineer and hobbyist for years to come. NXP’s offering is the LPC1500, a series of ARM microcontrollers optimized for motor and motion-control applications.

The specs for the new chips include an ARM Cortex-M3 running at 72MHz, up to 256kB Flash, 36kB SRAM, USB, CAN, 28 PWM outputs, an a real-time clock. There are options for controlling brushless, permanent magnet, or AC induction motors on the LPC1500, with dev boards for each type of motor. Each chip has support for two Despite NXP’s amazing commitment to DIP-packaged ARM chips, the LPC1500 chips are only available in QFP packages with 48, 64, and 100 pins.

Don’t think the LPC1500 would be a perfect chip for a CNC controller – the chips only support control of two motors. However, this would be a fantastic platform for building a few robots, an electric car, or a lot of the other really cool projects we see around here.