Category Archives: Design Tips & Tricks

Designing an Arduino-based programmable load

A programmable load is defined as a type of test equipment or instrument tasked with emulating DC or AC resistance loads normally required to perform functional tests of batteries, power supplies or solar cells.

According to Wikipedia, the platform allows tests such as load regulation, battery discharge curve measurement and transient tests to be fully automated – while load changes for these tests can be made without introducing switching transient that might alter the measurement or operation of the power source under test.

Recently, a Maker by the name of Jasper designed an Arduino-based programmable electric load using an Atmel-powered Nano (ATmega328 MCU).

“The load can be programmed, and the voltage and current are measured. You can set a constant current (CC), a constant power (CP), or a constant resistance (CR) load by simply typing it in to the Arduino Serial Monitor,” Jasper explained in a detailed blog post.

“The circuit is designed for up to 30V, 5A, and 15W. An opamp, a mosfet, and a small sense resistor form the constant current circuit. The current is set using a DAC. Two other opamps measure the power supply voltage and the current. The circuit is powered from the Arduino USB voltage.”

Aside from the Atmel-based Arduino Nano, key project components include:

  • Custom designed PCB ($23)
  • 2x 15pins 0.1″ pitch female header connectors ($2)
  • AD8608 Rail-to-rail opamps ($3)
  • MCP4725 DAC ($3)
  • IRLZ44Z N-channel MOSFET ($2)
  • SK 129 38mm Heat sink ($1)
  • 0603 resistors and capacitors ($2)
  • Screw terminal ($1)

“I chose to use an Arduino Nano board because it is small, cheap, easily interchangeable, it has a power supply that can be used to supply other circuits, and it can easily be programmed with the Arduino IDE,” Jasper continued.

“The Arduino is placed on female header connectors on the board. I chose to use the same DAC as on Adafruit and Sparkfun DAC breakout boards. The DAC can be supplied from 5V and the the output voltage is rail-to-rail. A description for using the MCP4725 DAC and library with Arduino can be found here on the Adafruit website. The DAC connects to the Arduino using I2C.”

On the software side, Jasper uses the the Arduino Serial Monitor to set the mode and value.

“For example, you can type ‘cc100’ to set a 100mA current, ‘cp1000’ to set a 1000mW power, and ‘cr100’ to set a 100 Ohm resistance. In overload condition, when the nominal power supply voltage drops, the CC circuit tries to maintain the current. This leads to an even further voltage drop and finally in a short circuit. In CP mode, the Arduino measures the voltage and adjusts the current so that the power remains constant,” he added.

“This is handy for testing power supplies designed to deliver a constant power. In CR mode, the Arduino measures the voltage and adjusts the current so that the resistance remains constant. This is handy if you want to simulate a resistor connected to the power supply – especially if you don’t have a box of power resistors of all kinds of values.”

Interested in learning more? You can check out Jasper’s Electric Load here.

$2.6 billion for wearable (animal) tech



Analysts at IDTechEx recently highlighted the lucrative potential of wearable tech for animals. Example such technology for pets and livestock include ultrasound-delivering treatment patches, electronic saddle optimization for horses, as well as collars capable of tracking, identifying and diagnosing.

“Multi-functionality is a trend as with the human equivalents, both facing the challenge of ‘do more but stay simple to use.’ Increased sophistication of function is the order of the day and now mobile phones can often access the data, replacing costly infrastructure, again mimicking the situation with human equivalents,” an IDTechEx analyst explained.

“[We] forecast that the global market for wearable animal tech will reach $2.6 billion in 2025. IDTechEx [also] predicts that during the next decade expenditure on medical diagnosis devices will increase in value market share from 11% to 23% and medical treatment (such as heating, cooling, ultrasound and drug delivery) will increase from a mere 1% to 13%.”

According to the analyst, a percentage of RFID tagging will ultimately be subsumed by diagnostic devices that look the same, such as newly available stomach boluses, collars and implants.

“[The] legal push is in two directions, from requiring tagging of many forms of livestock in certain jurisdictions for disease control and quality improvement to some seeking to ban sale of ‘inhumane’ dog training collars that administer electric shocks,” the analyst added.

“Cameras on pets are surprisingly popular and a dog’s bark can now be interpreted and radioed to the owner when away. The number of protected fish tagged already runs into millions, tagging racing pigeons is a big business too and even bees are being tagged nowadays.”

Interested in learning more? You can check out the full IDTechEx report on wearable technology for animals here.

Transforming fashion with tech



17-year-old Ella DiGregorio recently introduced a line of “Transforming Beauty” gowns that literally change from long skirts to short with the touch of a button.

As Mari Grigaliunas of MySuburbanLife reports, DiGregorio’s sample dress uses threads that run from the bottom hem to the waist of the garment to shorten the skirt when she pushes the button of an Atmel-based Arduino board hidden in the back of the dress.

Additional designs sketched by the teen arrange the threads in various designs to create completely different looks including a high-low skirt, a layered look and an Angelina Jolie inspired slit that disappears.

“I really like the idea of technology and fashion. There’s so many possibilities.” DiGregorio said.

“I’m kind of use to hiding things in clothing,”

As we’ve previously discussed on Bits & Pieces, quite a lot of wearable activity is currently centered around companies like Arduino and Adafruit. Both offer wearable electronic platforms powered by versatile Atmel microcontrollers (MCUs).

“Building electronics with your hands is certainly a fun brain exercise, but adding crafting into the mix really stretches your creativity,” says Becky Stern, Adafruit’s director of wearable electronics.

“Sewing is fun and relaxing, and adorning a plush toy, prom dress, or hat with a circuit of tiny parts can make you feel like you’re some kind of futuristic fashion designer. Playing with sensors and conductive textiles breaks electronics out of their hard shells and makes them more relatable.”

Just like their IoT DIY Maker counterparts, the soft electronics community has adapted various Atmel-powered platforms specifically for wearables, including the Arduino Lilypad (ATmega328V) (developed by MIT Media Lab professor Leah Buechley) and Adafruit’s very own Flora (ATmega32u4), which can be easily daisy chained with various sensors for GPS, motion and light.

Interested in learning more? You can check out our wearables article archives here.

Creating a 3D printer for under $100

Tarkun Gelstronic has created a 3D printer for under $100.

Aptly dubbed the Poor Man’s 3D Printer, the device includes a heat bed and is capable of printing with multiple materials.

Key components purchased by Gelstronic include:

As 3DPrint’s Monica Aderholt notes, one of the major ways Gelstronic was able to keep the price so low was by recycling old computer and printer parts.

“Tarkun obtained four stepper motors from old DVD and Blu-ray drives, a power supply from an old PC, a NEMA 17-like stepper motor from an old printer and a modified gear from an old Hewlett Packard printer, which was used for the bowden extruder,” Aderholt explains.

“Of course, he had to use a bunch of screws, washers, nuts, wires, etc., but these were things that he and a lot of people would have lying around in their garages. For the frame of the printer, he did cheat slightly, and used some aluminum sheet metal that he had lying around. However, he points out that this could be replaced with wood.”

All told, Tarken ended up spending only 49 Euros, or approximately $67 on all purchased items, which isn’t bad for a 3D printer that offers the following features:

  • Fused deposition modeling ABS/PLA
  • Heat bed
  • Use of open source firmware – a modified version of Tonokip
  • Free host software, Repetier-Host
  • Bowden-extruder
  • Max. build size 40mm x 40mm x 40mm
  • Resolution 0.08mm

Interested in learning more? You can check out the project’s Instructables page here.

Video: 3D printing houses in Minnesota



Andrey Rudenko is developing a 3D cement printer capable of printing medium-sized homes with concrete insulated walls.

The printer – powered by an Atmel-based Arduino Mega (ATmega1280 MCU) – is built to withstand real-world conditions.

“The next generation is currently in development and will be able to print homes on mountainous/hilly terrain, where traditional construction is more challenging,” Rudenko explained. 

”I’m looking to collaborate with fellow architects, designers, builders and interested individuals worldwide, including students in these respective fields. I’m open to suggestions, discussions and new ideas. ”

It should be noted that Rudenko’s 3D cement printer was recently featured on Engadget by Daniel Cooper, who writes:

“In order to make [the 3D printer] affordable to more than just a select few, the creator is using a cheap cement-and-sand mix, which is layered out 20mm at a time, holding its shape long enough for an operator to add-in some steel reinforcement before it hardens… Rudeno is planning to make a splash with the tech later in the summer, as he’s working on building both a small playhouse to test out the concept, before finding a plot of land upon which we can cook up a full two-story house.”

Building a wormhole actualization machine



A wormhole, also known as an Einstein–Rosen bridge, is a hypothetical topological feature of spacetime that would fundamentally be a “shortcut” through spacetime.

As Wikipedia points out, a wormhole is much like a tunnel with two ends each in separate points in spacetime.

Various representations of wormholes have been depicted on sci-fi shows like Sliders and Stargate, although most of us are (presumably) still wondering what it is really like to travel at hypersonic speeds through a wormhole.

Enter the wormhole actualization machine – a rather impressive Arduino-based (ATmega2560) psychedelic spacetime visualizer built by Alan Watts.

WAM – which was recently featured on BoingBoing – boasts 120 LEDs, an infinity mirror and some old-school NASA-inspired hardware.

The Wormhole Actualization Machine is currently on display at Northern-Southern in Austin.

Interested in learning more? You can check out a detailed project breakdown here.

Simple soldering – Arduino PID control

A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in industrial control systems. 

According to Wikipedia, a PID controller calculates an error value as the difference between a measured process variable and a desired setpoint.

Essentially, the controller attempts to minimize the error by adjusting the process through use of a manipulated variable.

Recently, a DangerousPrototypes forum member by the name of carlazar designed a simple soldering iron driver (SSID) with Arduino Uno (Atmel ATmega328 MCU) PID control.

Key features include:

  • Minimal number of components.
  • Additional control mode – on-off controller (+ PID PWM).
  • External power supply.
  • Fits into a 90mm x 110mm x 45mm (WxDxH) box.
  • Easy assembly.

“The HQ soldering iron HQ20/HQ30 (24V, 48W) was used [for this project],” carlazar wrote in a recent DangerousPrototypes post.

“It has the E-type thermocouple built in (68uV/degC) but you can change that value in software according to the soldering iron that is used (for example K-type is 41uV/degC).”

In terms of actual use, the SSID features:

  • UP and DOWN buttons, changes set-point temperature by 5 degC.
  • Button SET cycle through set-point temperature presets: 0 – 150 – 280 320 -350 degC.
  • Buttons UP and DOWN simultaneously, change the operating controller mode (PID control/on/off control).

Interested in learning more? You can check out carlazar’s original Dangerous Prototype page here.

Adafruit Narrative teardown reveals AT91SAM9G25



The Narrative Clip is a tiny, automatic 5 megapixel camera paired with an app that offers users access to a “photographic memory” which is both searchable and shareable.

NarrativeClip-001

Weighing in at 20 grams (0.7 oz) and measuring 36x36x9 mm (1.42×1.42×0.35 inches), Narrative boasts a storage capacity of 4,000 pictures and a two-day battery life. The device also features a double-tap function to more easily capture images, automatic sleep upon being placed face down, a specially coded companion smartphone app (iOS/Android) and cloud storage options.

Recently, the Adafruit crew conducted a detailed teardown of the device — confirming it is indeed powered by Atmel’s AT91SAM9G25 ARM-based microprocessor (MPU).

Additional confirmed specs include:

  • SanDisk SDIN7DU2-8G Flash card
  • Linear LTC3557 USB power manager with Li-Ion charger and three step-down regulators
  • ST LIS3DH 3-axis accelerometer
  • CellGuide ACLYS GPS module
  • TI LC07A hex level shifter
  • 125mAh lipoly battery

Interested in learning more about the $279 Narrative? You can check out the product’s official page here.

Capacitive sensing with ancient keyboards



The Model M keyboard is a designation for a group of computer keyboards manufactured by IBM, Lexmark, Unicomp and MaxiSwitch, starting in 1984.

According to Wikipedia, the many variations of the keyboard have their own distinct characteristics, with the vast majority boasting a buckling spring key design and many having fully swappable keycaps.

As the venerable M keyboards are understandably ancient, there really is no easy method of connecting the device to a modern system. This unfortunate fact prompted a modder by the name of xwhatsit to ultimately build his own controller.

According to Hackaday’s Brian Benchoff, the beam spring keyboards use capacitive switches.

“With 122 keys, the usual method of reading capacitance – putting a capacitor in an oscillator – would be far too slow to be of any use in a keyboard. There is another method of reading capacitance: measuring the current going through the capacitive switch. This can easily be accomplished with an LM339 comparator,” he explained.

“xwhatsit‘s keyboard controller uses this capacitive sensing circuit to read the four rows of keys, with a few shift registers taking care of the columns. Atmel’s ATMega32u2 MCU is the brains of the outfit, running LUFA to translate the key presses to USB.”

Interested in learning more? Well, you’re in luck, because xwhatsit is selling Atmel based controllers for the Model M as well as the Model F using the same basic circuit.

Catching drops of water with an ATmega48P

Drops of water are often captured in perfectly timed photographs with the help of an optointerrupter, light source and air gap flash.

As HackADay’s James Hobson notes, this configuration is typically expensive or difficult to put together.

Fortunately, a Maker by the name of Michal has come up with a viable alternative using an array of LEDs to illuminate the drops.

“He [uses] a IR diode, a photo-resistor, a few spacers, some plastic and a bunch of hot glue to make up his optointerrupter. When the droplet passes through the IR beam it breaks the signal from the photo-resistor which then triggers his Atmel ATmega48P [MCU],” says Hobson.

“It waits 80 milliseconds and then turns on the LEDs for approximately 50 microseconds. Meanwhile, [the Canon] camera is watching the whole event with a shutter-speed of a few seconds.”

As Michal explains in a detailed blog post, one of the nice things about using an LED configuration is that it boasts rise and fall times considerably shorter than traditional camera flash, which lights up for approximately 1-2 milliseconds, rather than 50 microseconds.

“That’s why most of the motion-stopping photography relies on more exotic air-gap flash units,” Michal concludes.

Interested in learning more? You can check out the project’s official page here.