Tag Archives: microcontroller

ATtiny85 powers this posture sensor

Anyone who stares at a computer screen for 8 hours a day probably has learned the hard way that posture does indeed matter. 

Enter Wingman’s posture sensor, a device that monitors the position of your head (relative to the chair) and reminds you to sit upright.

As HackADay’s Nick Conn reports, the posture detection platform is powered by Atmel’s versatile ATtiny85 micrcontroller (MCU), paired with the HC-SR04 ultrasonic distance sensor.

“Rather than going down the wearable route, which has its own drawbacks, Wingman decided to attach his sensor on the back of his chair,” Conn explained. 

”The best part is that the sensor is not mounted directly on the chair, but rather on a piece of fabric allowing it to be easily moved when needed.”

There are basically three modes on the software side:

  • Configuration
  • Watch (monitoring) mode
  • Standby

“The configuration-mode waits until the user holds his head still and saves the distance of a comfortable position. After this the watch-mode starts, what compares the current distance to the saved distance,” Wingman wrote in a recent blog post.

“If your head is too far away it will sound an alarm. If you get your head back the alarm will stop immediately. If not the device beeps a few times and then mutes. After some time it enters standby-mode. This is meant for leaving the device alone, the sensor reads the distance only every few seconds during this to save energy. If you get back to your chair the configuration-mode starts again.”

Unsurprisingly, the project can be easily expanded simply by adding multiple sensors in various locations – allowing the angle of the back and possibly the neck to be determined. This configuration would likely provide a more accurate indicator of poor posture.

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

Reactor Core is an AVR programmer

The Reactor Core – which recently surfaced on Kickstarter – is a hardware programming platform for Arduino boards and stand-alone AVR-based microcontrollers (MCUs). 

Designed by Frank Fox, the Reactor Core is powered by Atmel’s ATmega328P MCU and an FT232R for USB to serial communication.

“The Arduino IDE has a fantastic option of directly programming microcontrollers using ISP [and] we included a ATmega328P (equivalent to an Arduino Uno board) on the programmer,” Fox explained.

“This allows you to program compatible blank ATmega microcontrollers with the Arduino bootloader. Once the bootloader is installed, then they are ready for use with the Arduino software. You can then switch back to the USB/serial connection to upload your sketches.”

The Reactor Core also includes an integrated ZIF socket for a number of Atmel’s ATtiny chips.

“To make  programming easier, we built in a ZIF socket. You setup the Reactor Core as an ISP, place your ATtiny chip in the ZIF socket, select the type of chip in the Board option, upload the sketch and then remove to install into your circuit,” said Fox.

“With the ZIF we will have support for both the ATtiny84 and ATtiny85. Using the ISP header you can connect to other compatible microcontrollers.”

As Fox notes, Makers can use the platform to self-replicate the bootloader to a blank microcontroller, thereby creating a cloned MCU.

“We think of this process like the chain reaction in a nuclear power plant. Once the first reaction happens, additional reactions are triggered. You can have dozens of projects all powered by the microcontrollers you programmed yourself. The Reactor Core is a device to empower you to make more reactions happen,” he added.

“The Reactor Core is also a way to simplify your life. Instead of having an Arduino, a programmer shield and a USB to serial converter, you only need the Reactor Core for all of these processes. This way if your Arduino is tied up on a project, you can still prototype another.”

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

AT90USB128 MCU powers three-in-one mouse

Solid Art Labs has debuted the King’s Assembly – a unique device that packs a high-precision laser mouse, full mechanical keyboard and an analog joystick into a single platform.

Key features include 30 keys for each hand, finger key rows angled for fast access and a two-axis analog joystick for each thumb.

“We challenged ourselves to find a way to move a mouse quickly and accurately without using fingers or thumbs. We designed a contoured palm rest that comfortably anchors your palm and enables you to drive the mouse without moving a single digit,” a Solid Arts Labs rep wrote in a recent Kickstarter post.

“The palm rest is designed to allow unobstructed movement of your fingers and thumb while still providing enough leverage in all directions to maintain precise mouse control. With fingers and thumbs liberated we put controls within easy reach so you can type, use hotkeys, hold buttons down and manipulate joysticks while accurately controlling the mouse.”

The mouse cursor is controlled by a high-end Avago (now Pixart) 9800 optical laser sensor. When coupled, a full King’s Assembly will have 2x optical laser inputs (one for each hand) that are recognized as a single pointer input (mouse cursor) with the motion from both lasers added together. Teflon pads act as feet for slick sliding, while both the vertical and horizontal mouse scroll wheels can be controlled by the thumb joysticks.

“[In terms of key mapping and programmability], we use the beefy Atmel AT90USB128 microcontroller in each hand of the King’s Assembly for maximum horsepower, dedicated inputs for all controls and a network endpoint to allow web browser configurability,” the rep explained.

“A default preset bank and customizable preset banks available to save programming, [with] programming stored on the device’s Atmel MCU. [The programming is] browser-based, so there are no software or drivers to install.”

Indeed, any key can be mapped to any keyboard key, mouse button, or joystick button, while a special register key (that can also be re-mapped) allows keys on the device to have a second set of assignments – easily accessible by holding down the register key. This effectively expands the number of key mappings from 70 up to 139.

On the joystick side, each controller boasts one analog thumb-joystick that can act either as a standard analog joystick or mouse scroll wheels. However, a Solid Art Labs programming goal ultimately envisions a D-pad mode for both joysticks.

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

Xronos Clock keeps time with the ATmega644p



The Xronos Clock Kit (v2.1) – which recently hit the virtual store shelves at Adafruit – is an open source, hackable and customizable device powered by Atmel’s ATmega644p microcontroller (MCU).

Aside from Atmel’s ATmega644p MCU, key hardware specs include:

  • 

256MB microSD card
  • 22Khz 16-bit Mono uncompressed WAV (audio support)
  • 32×16 Red/Green LED matrix (capable of producing 3 colors: red green and orange)
  • 3x 24mm arcade buttons
  • DS1307 based RTC w/ LIR2032 battery
Digital DS18B20 temperature sensor (-55°C to +125°C)
  • RFM12B (915 Mhz or 434 Mhz) only available in V2 as option
  • USB programming w/ optional FTDI adapter/cable (not included)
  • 6-12 VDC (positive tip) Power Supply
  • 1-3 Watt draw (aprox., depends on Color and Brightness)
  • 7.5″ x 4.75″ x 3.75″ (aprox), 1 lb 8 1/4 oz (687g) w/o external Power supply

The talking clock is equipped with an internal backup battery, while all settings are saved to flash memory (EEPROM). Meaning, alarm setting and preferences will be preserved during a power outage. 

Since all audio files are kept on SD card inside, users can change alarm tones, or replace voice prompts with their own.

Additional features include:

  • Dual custom alarms
  • 10 alarm tones, such as melodies or special effects like trains, thunder or police sirens
  • Change display color to green, red or orange
  • 12 or 24 hour mode
  • Celsius or Fahrenheit selection for temperature sensor
  • Ambient light sensor automatically adjusts display brightness
  • Easy access to micro SD card, backup batter and FTDI

The Atmel-powered Xronos Clock Kit (v2.1) is currently available on the official Adafruit store for $215.

ATmega328P + ARM Cortex-A7 = Akarel

Akarel – which recently surfaced on Indiegogo – is a hardware development kilt that integrates Atmel’s ATmega328P microcontroller (MCU) and a 1GHz Allwinner A20 dual-core ARM Cortex-A7 processor (CPU) on a single board with a touch screen.

As Akarel creator Karel Kyovsky notes, the platform is targeted at devs and Makers who require a touch screen interface to implement their respective projects.

The development platform is currently available in two iterations: Akarel 7 (7-inch display) and Akarel22 (22-inch display). The former features an industrial grade projected capacitive multi touch connected via I2C, while the latter is equipped with a USB-linked capacitive single touch.

“Some development kits are missing displays or touch, [while] others use obscure software stacks. Imagine implementing your hack ideas within hours instead of days like you’ve been doing until now,” Kyovsky explained.

“Akarel integrates Android OS running on [the] ARM Cortex A7 via UART, with Arduino software running on [Atmel’s] ATmega328P MCU. Integration and connection of both chips on [a single] PCB [offers a number of] advantages.”

According to Kyovsky, these include:

  • 

Graphics and UI capabilities of Google’s flagship Android OS
  • Optimized environment for application development
  • Seamless network connectivity via WiFi or Ethernet
  • Access to extensive Arduino community libraries

Kyovsky says he envisions Akarel being used to develop smart home automation and security systems, kiosks/payment terminals, along with Internet of Things (IoT) devices and appliances.

On the software side, the Akarel kit offers Makers and developers access to a Git repository stocked with Uboot source code, Linux kernel source (3.4.39), fine-tuned Android OS sources (4.2.2), Arduino firmware sources, Arduino tools (i.e. avrdude) and example apps.

“We want you to concentrate on writing an application not on spending time to make the basic things work. We have done it for you already. And if you want to dive deeper and modify the Linux kernel or Android OS…Why not? You have all the sources available for you to change and compile,” Kyovsky added.

“In order to save you from the hell of installing all the toolchain (correct version of gcc, libs, headers, automake, make, java, you name it) we have also prepared a Ubuntu virtual machine for you which may be downloaded and which has [the entire] toolchain preinstalled so that you can start recompiling your complete stack within a few minutes.”

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

SquareWear goes mini with Atmel’s ATmega328 MCU


Back in November, Rayshobby Shop officially launched SquareWear 2.0, an open-source, wearable board powered by Atmel’s ATmega328 MCU.

The board – which runs at at 3.3V and 12MHz – is equipped with large pin holes to allow conductive thread to be stitched through. Makers can also solder wires directly, or solder snaps for quick attachment and detachment from textiles.

This week, Rayshobby Shop rolled out a smaller version of SquareWear, along with a chainable color LED matrix and an interactive design tool. Similar to SquareWear 2.0, the SquareWear Mini is built around Atmel’s versatile ATmega328 microcontroller.

Key specs include a USB port, power switch, pushbutton, buzzer, temperature sensor, light sensor, MOSFETs, lithium battery jack and lithium battery charger. Plus, the pins boast enlarged sizes for sewing with conductive threads, soldering sew-on snaps and touch sensing.

“How did I shrink it to be smaller than the original SquareWear? Well, by removing the on-board rechargeable coin battery and color LED, [while] routing some pins to the side,” Ray explained in a recent blog post.

“With the space saved, I was even able to add a 16KB I2C EEPROM for storing extra data. These changes were made because SquareWear designed specially to be attached to a chainable color LED matrix. This will enable a whole new set of exciting projects, as you can see [in] the video above.”

In terms of the LED matrix, each contains 35 WS2812B color LEDs arranged on a 5×7 grid with 8mm spacing.

“These are great because the LED has a built-in chip that allows you to daisy chain them in bulk and still be able to individually set the color of any LED with only one MCU pin,” Ray continued.

Adafruit calls them Neopixels. No matter how many LEDs you have, you only need 3 pins to get them to work, namely the VCC, GND and DATA_IN pins.”

More specifically, the pins are strategically mapped out at the back of the LED matrix, with the locations matching up to the VCC, GND and digital D10 pins on SquareWear Mini. Meaning, Makers can easily link the SquareWear Mini with the LED matrix by either soldering some sew-on snaps or directly soldering the two boards together.

On the software side, Ray said he re-worked the SquareWear software library to include LED matrix demos, which run on both the original SquareWear 2.0 and SquareWear Mini. The demos – included in the pre-configured software package – are also available for download individually at the SquareWear Github repository.

Interested in learning more? You can check out Ray’s original SquareWear Mini blog post here.

ATmega16 MCU powers Oktopod dev platform

Oktopod Studio is an open source development platform for mechatronics, robotics and automation.

The platform – which is powered by Atmel’s ATmega16 micrcontroller (MCU) – allows Makers to more easily create low voltage electronic devices, models and home applications.

“We designed Oktopod Studio to be as user friendly as possible, [as it] features plug-and-play analog outputs, digital inputs, DC and Servo motor drivers [as well as a] graphical user interface for PC and Andriod devices,” an Oktopod rep explained.

“You don’t need to be a programmer or an electronic expert to use Oktopod Studio and make your own robotic projects.”

The Oktopod platform consists of two primary components linked via Bluetooth or USB:

  • Hardware – Oktopod Board
  • Software – Oktopod Control App

The Oktopod Board offers Makers a Programmable Logic Controller (PLC), along with plug and play inputs and outputs for connecting a wide range of low voltage electronic devices, including LED lights, DC/servo motors, buzzers, electromagnets, switches, as well as photo-, thermo- and magnetic sensors.

Aside from Atmel’s ATmega16 MCU, key hardware specs include:

  • 

8x Analog output (up to 3A)
  • 2x DC motor driver
  • 3x Servo motor driver
  • 4x Digital inputs
  • USB/Bluetooth communication module
  • Power supply input 6-12 V (reverse polarity protected), on-board 3A fuse

In terms of software, the Oktopod Control app (PC and Android) allows Makers to assume manual control of the hardware via sliders and buttons.

oktopod

Meanwhile, the board is programmed by creating a so-called “wishList” of output operations using an intuitive virtual dashboard.

Interested in learning more about the ATmega16-powered Oktopod? You can check out the project’s official page here.

Building a Mini 7-Segment Clock (V2)



Kevin Rye recently re-designed his already impressive Mini 7-Segment Clock using an SMD version (instead of 28-pin DIP) of the ATmega328 microcontroller (MCU) and a custom PCB.

“I moved the switches a little off-center to the right and shuffled everything else around in order to fit the SMD ATmega,” Rye explained in a recent blog post.

“I rotated the ATmega 45 degrees. I think chips look cooler when they’re rotated, but in all seriousness, it is easier to run a trace from one side of the board to the far side of the chip when it’s rotated.”

Rye also moved most of the (PCB) text from the front to the back. However, with the exception of the ICP and FTDI headers, the board layout remained the same.

 After receiving his new PCBs, Rye decided to kick off a limited test of his new design.

“I didn’t want to put the whole thing together and find out that it didn’t work, [so] I decided to only solder in the ATmega, the 16MHz crystal, and the supporting caps and resistors – just enough so I could test loading the bootloader onto the ATmega and upload a sketch,” said Rye.

“I configured my Arduino Uno (ATmega328) as an ISP and attached the Mini Clock’s 6-pin ICP header to the Arduino via a ribbon cable and some jumpers. I then jumped into the Arduino IDE and burned the bootloader for an Uno.”

After successfully running the bootloader, Rye connected the FTDI adapter and uploaded the blink sketch, jamming an LED into the PCB and watching the LED blink. Last, but certainly not least, Rye validated the ICP and FTDI functions and soldered in the rest of the components.

Interested in learning more about version two of Kevin’s Mini 7-Segment Clock? You can check out his detailed project blog post here and download the source files here.

This Pi-Bot is powered by an ATmega328 MCU


STEM Center USA has debuted the Atmel powered Pi-Bot (ATmega328), a hands-on robotic learning platform for both students and professional engineers. 

According to STEM Center USA CEO Melissa Jawaharlal, the team designed the Pi-Bot from the ground up to optimize functionality and ensure affordability.

“We continue to work with students to make our designs appealing and work with experts in the area of robotics to improve our designs,” Jawaharlal wrote in an official Kickstarter post.

“We field tested our Pi-Bots with a small group of high school and college students. The response has been remarkable. This is the kit we wish we had growing up.”

Aside from the ATmega328 MCU which powers the Pi Bot’s STEM Board, key platform features and specs include:

  • Modular platform for interchangeable sensors
  • Standardized Arduino C programming
  • Novel chassis design minimizes weight while maintaining strength
  • Slide in battery pack
  • Additional microprocessors can be used, simply by replacing the support plate
  • Pi-shaped acrylic chassis (made locally in the US)
  • USB cable
  • Motor controller
  • Gearbox
  • Wheels
  • Ball-bearing castor
  • Ultrasonic distance sensor
  • Line tracking sensor
  • Mini-breadboard
  • LEDs and resistors
  • Wireset and jumpers
  • Power switch
  • Mounting brackets
  • 4-AA battery holder
  • Spacers and fasteners
  • Easy to follow instructions, no soldering required

“Our laser-cut chassis ensures high precision and durability. The unique ‘Pi’ shape is optimized to minimize weight with high strength,” said Jawaharlal.

“We give you the flexibility to design your own projects with included line following and ultrasonic distance sensors. The modular chassis allows sensors to be moved and positioned for your convenience. [In addition], we are currently developing an assortment of new sensors and motors for even more capabilities in the future.”

Interested in learning more about the Atmel-powered Pi-Bot? You can check out the project’s official page here.

Generating random numbers with an ATtiny45

A HackADay forum member by the name of Karl wanted a hardware-based random number generator. His two primary criteria? Keeping costs low and ensuring sufficient generation of arbitrary numbers.

The solution? Atmel’s ATtiny45 microcontroller (MCU), paired with a USB/serial converter, three wires and a DIP socket.

“Some projects either require expensive parts (geiger tube), are quite big (lava lamp), or are not random enough. Also most of the projects require some soldering experience, which can be a problem for newbies,” Karl explained in a HackADay forum post.

“I was not happy with the options I found. Luckily I stumbled upon the Entropy library for AVR’s. I checked the results from authors’s web site. I also did a few tests on my own by creating a 1mb sample of random data. I was pleased with the quality of the random numbers.”

As HackADay’s Brian Benchoff explains, the AVRentropy uses the watchdog timer’s jitter in AVR microcontrollers to provide cryptographically secure random numbers.

“Setting up the circuit was easy – an ATtiny45 microcontroller was connected to an [inexpensive] USB to serial converter. Three wires, and the circuit is complete. The code was simple as well; it’s just a call to initialize the entropy and write the bits to the serial port,” Benchoff added.

“There are a few drawbacks to this build. Because the entropy library must wait until enough entropy is gathered, it can only produce about two 32-bit numbers per second. That’s all Karl needed for his application, though, and with an enclosure made from a wine cork and marble, he has the prettiest and smallest random number generator around.”

Interested in learning more about a hardware-based platform to generate numbers based with an ATtiny45? You can check out the original forum post here.