Hackaday Prize Semifinalist: Playing With PIDs

PID control loops are everywhere, found in flight controllers for drones and the temperature control code for 3D printers. How do you teach PID control loops? [Tim] has a great demonstration for this, and it’s also a semifinalist for the Hackaday Prize.

[Tim]’s Sab3t is an educational tool designed to illustrate how PID control loops work. It’s a robotic table on which a large ball bearing sits perfectly balanced. On this table is a resistive touch screen from a display providing feedback for the location of the ball bearing. By adjusting PID values, the ball bearing either sits stationary on the table or flails wildly around, depending on the values in the PID algorithm being used.

As a teaching tool, it’s great; with a python script displaying a log of the PID values and the position of the ball on the plate, anyone can easily visualize how oscillations happen, what a well-tuned control loop looks like, and have some fun moving the ball bearing around to different locations.

The 2015 Hackaday Prize is sponsored by:

Continue reading “Hackaday Prize Semifinalist: Playing With PIDs”

Simple USB Power Meter

The USB interface is being increasingly used as a power supply and charging port for all kinds of devices, besides data transfer. A meter to measure the electrical parameters of devices connected to a USB socket or charger would be handy on any hacker workbench. The folks at [electro-labs] designed this simple USB power meter which does just that.

The device measures voltage and current and displays them, along with the calculated power, on the small 0.5″ OLED display. The circuit is built around an ATmega328. To keep the board size small, and reduce component count, the microcontroller is run off its internal 8MHz clock. A low-resistance shunt provides current sensing which is amplified by the LT6106 a high side current sense amplifier before being fed to the 10 bit analog port of the ATmega. A MCP1525 precision voltage reference provides 2.5V to the Analog reference pin of the microcontroller, resulting in a 2.44mV resolution. Voltage measurement is via a resistive divider that has a range of up to 6V. An Arduino sketch reads voltage and current data on the analog ports and displays measurements on the display. The measured data is averaged to filter out noise.

The OLED display has a SPI interface and requires the u8glib library. The project uses all SMD parts, but is fairly easy to assemble by hand and could be a nice starter project if you want to wet your feet on surface mount assembly techniques. It’s designed using SolaPCB EDA software, and the source files for schematic and board layout are available as a ZIP archive. Download the BoM and Arduino code and you have everything needed to build this nifty device.

Thanks to [Abdulgafur] for sending in this tip. And if you are looking for a more comprehensive solution, check the awesome Friedcircuits USB Tester which we reviewed earlier and is available in the Hackaday Store.

Understanding Surface Mount

Do you know what a MELF is (and, yes, it is safe for work to Google it)? What’s the difference between a QFP, and LCC, and a PLCC package? Do you need a 0603 resistor or a 1206 resistor?

If you are an old hand at surface mount devices (SMDs) you probably know the answers to most of these questions. But if you’ve done most of your work with through hole, it is a confusing mess of acronyms and numbers. Sure, you can Google and find out that at 0603 resistor is .06 inches by .03 inches. [TopLine] has a great booklet that pulls many common definitions in one place available for download that can help you make sense of different SMD nomenclature.

Continue reading “Understanding Surface Mount”

Managing An Unmanaged Switch

Network switches come in two different flavors: managed, where you have some interface to configure and monitor the equipment, and unmanaged where the device just does what it is supposed to do and you can’t really control it. [Tiziano Bacocco] wanted to manage his cheap unmanaged switch, so he did what any good hacker would do: he opened it up.

Inside the Digicom 10/100 switch he found an IP178CH controller IC and a quick search turned up a data sheet. [Tiziano] noticed there were three ways to configure the switch: Some hardware pins could control very basic functions; an EEPROM (absent on the PCB) could configure the device; or the chip would accept commands via a synchronous serial port.

Since the datasheet covered the protocol required, [Tiziano] commandeered an Arduino Pro Mini and used it to send commands to configure the switch. A few resistors and some quick code allowed him to control VLAN and other functions on the switch via the USB port. Of course, he mentioned you could use a Raspberry Pi if you wanted a network interface–or maybe that’s a good excuse to use one of those Ethernet shields you got on clearance at Radio Shack.

Continue reading “Managing An Unmanaged Switch”

Brick Laying Robot Does It Better

Meet SAM, the Semi Automated Mason. SAM can lay bricks three times faster than a normal brick layer. SAM isn’t planning on taking away any jobs yet though — it still needs a human mason following behind to clean up the mortar.

The robot consists of a standard 6-axis industrial robot arm mounted to a track system with a conveyor belt style feeder of bricks. It picks up each brick, covers the side with mortar, and places it next to the last brick it laid. A mason still has to do the tricky parts, like corners and aesthetics — but SAM is getting better — it can very easily follow a pixelated map of an image and place bricks up to half an inch in or out from the wall, to create a embossed image.

Continue reading “Brick Laying Robot Does It Better”

The Rise Of The Rural Hacker

On the far side of the Boso peninsula lies Kamogawa. This isn’t the Japan of LEDs, Otaku and maid cafes, or that of wage slave salarymen collapsing from exhaustion. This is the Japan of rice farmers and fields, fresh fish and wild boar, electron microscopes and gigabit fiber, SMD assembly and 500Mhz 5 Gigasample oscilloscopes.

The world has changed. In the 20th century the life of a rural hacker was a constant hunt for technological innovation. We scratched around for whatever we could find. A (usually national) periodical would give its monthly injection of technological curios. And knowledge was locked tight within expensive textbooks, which even if you could afford them might take weeks to arrive.

So, as had been the case for the preceding 1000 years, innovation clustered around technological hubs, San Francisco, Cambridge, and Tokyo among others. And Hackers flocked to these centers where innovation flourished while Hackers exchanged knowledge and tools.

But then the world of the rural Hacker began to expand. The technological hubs that so many rural hackers had migrated to began to connect the world. Young Hackers could learn to program (as I learned C) from textfiles posted on BBSs and exchange knowledge linking national communities. Shortly after that the Internet came bringing its Eternal September. Hackers across the world, regardless of location could communicate.

On the flip-side tech centers were changing too. Venture capital, rather than bootstrapping became the norm. With the influx of cash the demand for skilled Hackers rose, increasing wages and further focusing tech talent around these hubs. But rents and expenses rose too. And Hackers became locked into their expensive lifestyles; eyes firmly focused on the promised million dollar payoff and the eternal dream of an “exit”.

For some though, the freedom to Hack is more important than that million dollar exit and so a new model is emerging. Groups of Hackers in rural communities with low cost lifestyles and access to the world’s best technical talent and equipment that would put the best startups to shame.

Continue reading “The Rise Of The Rural Hacker”

Using LTSpice To Measure Total Harmonic Distortion

Audiophiles spend a lot of time and effort worrying about audio specs like Total Harmonic Distortion (THD). Makes sense, because THD affects the quality of audio reproduction. However, THD can also affect interference from radio signals and even losses in power transfer systems. A simplified definition is the THD is the ratio of the sum of the power of all harmonic frequencies to the power of the fundamental frequency.

If a circuit produced a perfect sine wave, there would be no harmonics. There are many ways to measure THD in practice, but [Michael Jackson] has an interesting video showing how he easily visualizes THD using LTSpice. Assuming you already have the system in question in LTSpice (or you could use another simulation tool, if you prefer) it is fairly straightforward.

Continue reading “Using LTSpice To Measure Total Harmonic Distortion”