Tag Archives: Brian Benchoff

Video: Electronic dice go random with AVR

A Maker named Walter recently created an entropy library for Atmel AVR microcontrollers (MCUs) to ensure a reliable source of truly arbitrary numbers.

As HackADay’s Brian Benchoff reports, the electronic dice generate random numbers by taking advantage of the watchdog timer’s natural jitter.

“[This isn’t] fast by any means but most sources of entropy aren’t that fast anyway,” Benchoff explains. “By sampling a whole lot of AVR chips and doing a few statistical tests, it turns out this library is actually a pretty good source of randomness, at least as good as a pair of dice.”

According to Benchoff, the circuit itself employs a pair of 8×8 LED matrices from Adafruit, an Atmel-based Arduino board and a pair of buttons.

Supported modes (11 total)?

  • 2d6
  • 2d4
  • 2d8
  • 2d10
  • 1d12
  • 1d20
  • Deck of cards
  • Single hex number
  • Single 8-bit binary number
  • 8 character alphanumeric password

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

Who’s talking about the Arduino Zero ?

The Atmel-powered Arduino Zero dev board was officially announced on May 15th, 2014. The board’s debut has already been covered by a number of prominent tech publications, including Ars Technica, HackADay, EE Times, Electronics Weekly, CNX SoftwareUberGizmoGeeky Gadgets, SlashGear, PC World, SemiWiki and Makezine.

Sean Gallagher, Ars Technica

“The Zero is a 32-bit extension of Arduino’s flagship Uno board, developed jointly by the Arduino team and Atmel, targeted at helping developers prototype smart devices. Based on the Atmel SAM D21 ARM Cortex-based microcontroller, the Zero includes Amtel’s Embedded Debugger—allowing developers to debug their projects without having to wire up another interface.


“It gives developers a huge boost in storage and memory over the Uno, providing 256KB of onboard Flash storage (compared to the Uno’s 32KB) and 32KB of static RAM (compared to the Uno’s 2KB). It can also emulate an Electronically Erasable Programmable Read-Only Memory (EEPROM) of up to 168KB, while the Uno only supported 1KB of EEPROM.”

Brian Benchoff, HackADay

“The Arduino Zero uses an Atmel ARM Cortex-M0+ for 256kB of Flash and 32k of RAM. The board supports Atmel’s Embedded Debugger, finally giving the smaller Arduino boards debugging support.

“The chip powering the Zero features six communications modules, configurable as a UART, I2C, or SPI. USB device and host are also implemented on the chip [and] there are two USB connectors on the board.”

Max Maxfield, EE Times

“I’ve become a huge supporter of the Arduino, from the concept to the hardware to the software (IDE) to the ecosystem. I’m now using Arduinos and Arduino-compatible platforms for all sorts of projects, including my Infinity Mirror, my Inamorata Prognostication Engine and my BADASS Display.

“Each Arduino and Arduino-compatible platform offers different features, functions, capacities, and capabilities, which makes it possible to select the optimal platform for the project at hand using criteria such as size, cost, performance, and number of input/output pins. As of this morning, there’s a new kid on the block – the Arduino Zero, which has been jointly developed by Atmel and Arduino.”

Alasdair Allan, MakeZine

“While it shares the same form factor as the Arduino Leonardo—with 14 digital and 5 analog pins—all of the digital pins except the Rx/Tx pins can act as PWM pins, and the analog pins have a 12-bit ADC instead of the Leonardo’s 10-bit ADC, giving significantly better analog resolution,” writes Makezine’s Alasdair Allan.

“The new board comes with 256KB of Flash memory, and 32KB of SRAM. While the new board doesn’t have EEPROM, it does support 16KB by emulation, so Arduino sketches relying on this feature will still run without issue.”

Arduino Zero – official specs:

  • Microcontroller ATSAMD21G18, 48pins LQFP
  • Operating voltage 3.3V
  • Digital I/O Pins 14, with 12 PWM and UART
  • Analog input pins 6, including 5 12bits ADC channels and one 10 bits DAC
  • DC current per I/O Pin 7 mA
  • Flash memory 256 KB
  • SRAM 32 KB
  • EEPROM up to 16KB by emulation
  • Clock speed 48 MHz

Interested in learning more? You can check out the official Arduino Zero page here.

IViny is an ATtiny85-powered DAQ

The Ivmech crew was recently in need of a small, inexpensive device capable of sensing analog values and toggling a few digital pins – all while logging everything to a PC.

Ultimately, the team decided to build the IViny DAQ, a mini data acquisition device powered by Atmel’s ATtiny85 microcontroller (MCU).

Aside from Atmel’s versatile ATtiny85 MCU, key project components include:

  • 2 channels 0 – 5V ve 0 – 3V digital input/output
  • 2 channels 0 – 5V 10 bit analog input
  • Channel maximum current 20 mA
  • USB power supply
  • V-USB based comms
  • PC user interface (UI)
  • 150 S/s (set to increase with future firmware upgrades)
  • 50 mm x 33 mm x 17 mm

“The IViny features two digital channels and two 10 bit analog channels, just like you’d find in any ATtiny85 project,” writes HackADay’s Brian Benchoff.

“Power is supplied over USB, and a connection to a computer is provided by V-USB. There’s also a pretty cool Python app that goes along with the project able to plot the analog inputs and control the digital I/O on the device.”

As Benchoff notes, the device doesn’t exactly run at light speed, with the firmware currently supporting 100 samples per second.

“[However], an upcoming firmware upgrade will improve that. Still, if you ever need to read some analog values or toggle a few pins on the cheap, it’s a nice little USB Swiss army knife to have,” he adds.

Interested in learning more about IViny, the ATtiny85-powered DAQ? You can check out the project’s GitHub page here.

Atmel-based BASIC computer

 makes us nostalgic

BASIC, or Beginner’s All-purpose Symbolic Instruction Code, is a series of general-purpose, high-level programming languages that emphasizes ease of use. According to Wikipedia, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire way back in 1964.

Multiple dialects of BASIC were written over the years, with the TinyBASIC variant capable of fitting into as little as 2 or 3 KB of memory. This small size made it quite useful in the early days of microcomputers (the mid-1970s), when typical memory size weighed in at 4–8 KB.

Recently, a Maker named Dan decided to design a simple, tiny 8-bit computer to run the succinct TinyBASIC.

As HackADay’s Brian Benchoff reports, the computer is built around the Arduino Uno (ATmega328) and a custom-made AVR-based shield, using TinyBASIC, the TVout library and the PS/2 keyboard library.

“After piecing together a little bit of code, the Arduino IDE alerted Dan to the fact the TVout and PS/2 libraries were incompatible with each other,” Benchoff explained. 

”This inspired Dan to use the ATmega328 as a coprocessor running the TVout library, and using the capacious ATmega1284P as the home of TinyBASIC and the PS/2 library.”

Subsequently, Dan used Fritzing to design a circuit using minimal components, with a custom PCB milled out of copper board.

“After the board was tinned, [Dan] had a beautiful minimalist retro computer with nearly 14kB of RAM free and an RCA display,” added Benchoff. 

The final setup comprises the shield, an Arduino UNO, PS/2 keyboard, RCA capable display (such as an LCD TV), RCA cable and a power source (such as a wall mounted PSU).

Future iterations of the Atmel-powered TinyBASIC computer will likely be based around the stalwart Arduino Mega (ATmega1280), facilitating a TV resolution of 720×480. Additional features could include an SD card slot, LEDs, pots and perhaps even headers for I2C and SPI.

Interested in learning more?

You can check out the project’s official Instructables page here.

Video: Building a smart cocktail shaker

Adafruit’s Tony DiCola has created a smart cocktail shaker capable of dispensing classy drinks with nothing less than accurate precision.

“The smart cocktail shaker is a project to help you easily mix drinks using an Arduino, a load cell from a cheap kitchen scale and an Android application,” DiCola explained in a detailed Adafruit tutorial.

“By measuring the weight of a cocktail shaker, an Arduino can send the amount of poured liquid to an Android application over a USB or bluetooth connection in real time. Making a drink is as easy as following the steps on screen – no more guessing or fumbling with measurements.”

As HackADay’s Brian Benchoff notes, DiCola connected a INA125 instrument amplifier to the load cell, instead of trying to interface with the electronics in the scale.

“[Meanwhile] an [Atmel-based] Arduino Micro (ATmega32u4) measures the weight on the load cell… With the known densities of gin, vermouth and Kahlua, Tony can get a very good idea of how much liquid is in the cocktail shaker.”

On the software side, Tony wrote an Android app for his tablet that communicates with the Arduino via Adafruit’s Bluefruit adapter.

“The app receives the current weight on the load cell, displays the current amount of liquor in the cocktail shaker and provides step-by-step instructions for making any cocktail,” Benchoff added.

Interested in learning more? You can check out Adafruit’s detailed build tutorial here.

Arduboy is an uber-mini game console

A Maker by the name of Kevin has created an uber-mini handheld game console using Atmel’s ATmega328p microcontroller (MCU).

As HackADay’s Brian Benchoff notes, the Arduboy build utilizes a number of unique design techniques.

“The inspiration for this project began when [Kevin] dropped an SMD resistor into a drill hole on a PCB. This resistor fell right through the hole, giving him the idea creating a PCB with milled cutouts made to fit SMD components,” Benchoff explained.

“With a little experimentation, [Kevin] found he could fit a TQFP32 ATmega328p MCU in the Arduino – in a custom square cutout. [Additional] components – including a CR2016 battery and OLED display- use the same trick. The rest of the design involved taking Adafruit and Sparkfun breakout boards, modifying the individual circuits until something broke.”

Kevin’s unconventional PCB design approach ultimately resulted in a handheld game console that measures only 1.6 millimeters thick – and boasts capacitive touch sensors for controls.

So what’s next for the Arduboy? Well, Kevin says he wants to release the design files and source code under a fully open source license and launch a crowd sourcing campaign.

“I also would like to sell [Arduboy] kits on my site and on Tindie,” Kevin wrote on the project’s page.

“[Plus], I would like to design the board with four layers and place the circuit traces entirely on the board interior. This would allow for test points to be placed in standard ISCP and FTDI configuration, eliminating the need for an otherwise custom bed-of-nails programming interface.”

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

More RAM with the Teensy++ 2.0

So, you’ve decided to use the Atmel-powered Teensy++ 2.0 (AT90USB1286) in your latest Maker project.

Want to know how you can access more memory? 

Well, you’re in luck, because xxxajk recently came up with a library that allows the use of significant RAM expansion with the Teensy++ 2.0.

As HackADay’s Brian Benchoff notes, xxxajk’s latest library is actually a port of XMEM2, an earlier project that added RAM expansion and multitasking to the Arduino Mega (ATmega1280). 

As expected, XMEM2 works with Rugged Circuits QuadRAM and MegaRAM expansions for the Arduino Mega as well as Andy Brown‘s 512 SRAM expansion.

“Up to 255 banks of memory are available and with the supported hardware, the Teensy can address up to 512kB of RAM,” Benchoff explained. 

”XMEM2 also features a preemptive multitasking with up to 16 tasks, the ability to pipe messages between tasks and all the fun of malloc().”

Interested in learning more? You can check out xxxajk/xmem2 on Github here, QuadRAM here, MegaRAM here and the 512 SRAM expansion here.

Driving alphanumeric LCDs with three wires

Writing for HackADay, Brian Benchoff notes that the HD44780 LCD controller is currently the de-facto method of choice for adding a small text display to Maker projects.

“If you need a way to display a few variables, a few lines of text, or adding a small user interface to a project, odds are you’ll be using one of these parallel LCDs,” says Benchoff.

“These displays require at least six control lines, and if you’re using a small microcontroller (MCU) or are down to your last pins, you might want to think about controlling an LCD with a shift register.”

Indeed, a Maker by the name of Matteo recently chose the ubiquitous ’595 shift register configured as a serial to parallel converter to drive his LCD, a method which requires only three pins on an Atmel-based Arduino board. 

On the software side, Matteo modded the stock Arduino LiquidCrystal library and posted it on Gitbub.

“Most of the functions are left untouched, but for this build the LCD can only be used in its four bit mode,” Benchoff adds.

“That’s not a problem for 99% of the time, but if you need custom characters on your LCD you can always connect another shift register.”

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

Ben Heck’s glue gun has Atmel under the hood

It’s probably safe to say that most Makers have experienced bad glue gun days. You know, the kind of day that start off nicely enough, only to be ruined by incessant dripping all over the workbench and basement floor. Some of us have even muttered “I bet this doesn’t happen to Ben Heck” under our collective breaths.

As it turns out, master modder Ben Heck probably hasn’t suffered from a bad glue gun day since designing an innovative device that HackADay’s Brian Benchoff describes as “more like an extruder from a 3D printer” than your typical dispenser.

“By far, the most difficult part of this project was the glue stick extruder. For this, Ben used a DC motor with a two-stage planetary gear system,” Benchoff explained.

“This drives a homemade hobbed bolt, just like the extruder in 99% of 3D printers. The glue stick is wedged up against the hobbed bolt with a few 3D printed parts and a spring making for a very compact glue stick extruder.”

On the electronics side, Ben included an Atmel-based AVR board, a thermistor attached to the hot end of the glue gun, a solid state relay for the heater and analog controls for speed /temperature settings.

“The finished product is actually pretty nice. It lays down consistent beads of hot glue and thanks to a little bit of motor retraction won’t drip,” Benchoff added.

We couldn’t agree more!

Video: Building touch-sensitive furniture

A Maker by the name of Tinkering Techie has designed a beautiful touch-sensitive nightstand powered by an Atmel-based Arduino Fio (ATmega328P).

Additional key project specs include a number of LEDs, magnetic reed switch for drawer sensing, a PowerSSR Tail for lamp control and a 1000 mAh Lithium Ion Battery for backup power. The nightstand itself is built out of mahogany, with three Kapton-covered copper clad boards placed along the front and side edges (under the top of the nightstand).

As the HackADay crew notes, the sensing boards are connected to the Arduino Fio which is tasked with turning on a night light (one tap) or lamp (two taps).

“The electronics are powered by a small USB charger with a battery backup all hidden underneath the top of the nightstand,” explained HackADays Brian Benchoff. “Inside the drawer, a magnetic reed switch turns on an RGB LED whenever the drawer is opened.”

Interested in learning more about the Atmel-Arduino powered touch-sensitive nightstand? You can check out the project’s official page here.