Tag Archives: EEPROM

Sensly is a smart gas monitoring device


Sensly not only monitors pollution levels, but helps keep your home and workplace safe. 


Created by UK-based startup Altitude Tech, Sensly is a portable pollution sensor capable of detecting and collecting information on various harmful gases present in your environment. This data is then fed directly to your smartphone for real-time updates.

photo-original

Sensly uses a series of industrial sensors to ensure accurate readings, and can be powered one of two ways: either via microUSB or through battery. Being cognizant of these gas levels allows you to take action and bring the pollution levels down. For instance, should the unit detect a carbon monoxide leak in your house, it will immediately alert you over your smartphone, prompting you to take the necessary precautions.

Aside from CO, others things that Sensly can recognize include benzene, formaldehyde, nitrogen dixodie, polycyclic aromatic hydrocarbons, sulphur oxide, ammonia, and soon particulate matter like secondhand smoke and pollen. If the team is able to successfully meet its stretch goal, it will even be able to sense radiation.

bcfa413a7897f2ab8e33dd74d342d4ad_original

To get started, all you need to do is connect your Sensly to the Internet and watch the data stream to your device. With intelligent alerts, your Sensly will send you a notification when spikes in gases are discovered inside your home, workplace or just about anywhere else, and provide you with reports on how your environment has changed over time. Using its accompanying mobile app and web interface, you can even share your readings with others.

And that’s not all. Designed with the Maker crowd in mind, its creators have also developed a Raspberry Pi HAT for those looking to build and customize their own version of Sensly and begin conducting experiments with their gadget.

Interested? Head over to its official Kickstarter campaign, where the Altitude Tech team is currently seeking $15,699. Delivery is set for August 2016.

This Arduino-based device notifies you of an external IP address change


Maker uses Arduino with an Ethernet shield to send you an email whenever your external IP address changes. 


A Maker by the name of “Bayres” has devised a pretty slick project using an Arduino with an Ethernet shield that is capable of obtaining an external IP address of your Internet connection and then notifying you of any changes by email.

ExternalIp

The idea was first conceived after his father bought a video camera system to remotely monitor their rural property. Unfortunately, given the area, the only reasonable Internet connection that he was able to get was DSL. As you can imagine, the service wasn’t too stable which caused the external IP address to fluctuate quite frequently. Once this happened, there was no way to know what the address was changed to and no way to access the camera system unless he had local access to the network.

“I looked into DDNS services but most require a client running on a PC 24/7. This is undesirable because of power consumption and if the power goes out, which occurs frequently, the PC will shut off,” Bayres explains.

The Maker’s solution to the problem consisted of using an Atmel based Arduino with an Ethernet shield to acquire the web connection’s external IP address and monitor it periodically. In the event that it were to vary, an email is sent via SMTP, indicating the new IP address. Bayres decided to add a shell that was accessible via the Arduino’s Serial port, thereby letting a user enter their own parameters that are then stored in the board’s EEPROM. From there, the Arduino starts and enters the setup() function.

IP

“The serial port is initialized then the existing parameters are read from the EEPROM and copied into string variables. Since the parameters vary in length the starting address for each parameter in EEPROM is dynamic. To address this, the first seven bytes of EEPROM contain the length of each parameter. The length of each parameter is first read out of EEPROM. Then the start address of each parameter is calculated and stored in RAM so the Arduino know what portion of EEPROM each parameter occupies.”

The program compares the current and previous values. Should there be any disparity between the two, it uses the Sendmail() function to establish a connection with the SMTP server and send an email alert. Once the message is sent, the connection to the SMTP server is severed.

Meanwhile, the system includes a small LCD as well, which is attached to the Arduino and driven by a 74HC595 shift register, that displays the current IP address output. This also makes it super easy for a user to check up on the connection. To enable this, the Maker turned to the Textfinder Arduino library that was tasked with searching through the returned string and identifying the address.

Intrigued? Head over to the project’s official page to learn more.

Using Arduino to catch Pokémon


Gotta catch ‘em all but have no one to play with? Luckily, there’s Arduino. 


If you’re looking to “catch ’em all,” you’re going to need to have two Game Boys, two copies of the same game and, of course, someone else to play along with. Those not lucky enough to score all three, Pepijn de Vos has devised a solution.

“Sadly, not a whole lot of people own a Game Boy, a Pokémon game, and a link cable. So I decided to get creative and trade Pokémon with my Arduino,” the Maker writes.

De Vos has created an Atmel based system that acts as a Game Boy, storing a single Pokémon in EEPROM. This enables a user to trade between first-generation games using only a single console.

GameBoy

How it works is pretty simple. Compatible with both Pokémon Red and Blue versions, users connect their Game Boy, Game Boy Color or Game Boy Advance to the Arduino via a Game Link Cable, inserting the cartridge to the desired game and complete the trade. Meanwhile, the data is saved in the Arduino’s EEPROM — made possible through the on-board Atmel MCU.

“The Game Boy communicates over what is essentially a 5v SPI bus that can act both as a master and a slave. At 8KHz it is slow enough to bit-bang, so it works on any 3 GPIO pins,” the Maker explains. “I salvaged a connector from a GBA wireless adapter, and hooked it up to three Arduino pins with 1KΩ series resistors to be sure. Because both ends can in theory drive the clock line, I don’t want to short them out.”

All in all, the project will enable multiple trades in one session, and allow you to cancel them as well. What’s more, you can easily swap Pokémon between the different versions of the game by initiating a trade, swapping out cartridges, and re-trading. However, de Vos does advise users to remember to reset the Arduino when resetting the Game Boy, or else “bad things will happen.”
Ready to attain all 151 Pokémon? You can find all the necessary code for the project here.

https://www.youtube.com/watch?v=XlqMkfmCZfM

New shields for Arduino



Arduino has debuted two new shields for use with the company’s wildly popular lineup of Atmel-based boards.

First up is a USB host shield based on the MAX3421E. This USB peripheral/host controller contains the digital logic and analog circuitry required to implement a full-speed USB peripheral or a full-/low-speed host compliant to USB specification rev 2.0.

The shield can be used with the “USB Host Library for Arduino” hosted by Lauzus from circuits@home on GitHub (click to download zip).

Next up is the ArduinoISP (AVR-based in-system programmer) based on David Mellis’ project FabISP and useful to anyone needing more space on their Arduino board.

Interested in learning more? For more details about using the Arduino ISP please visit the Getting Started page. You can also learn how to program an ATtiny and read your Arduino built-in EEPROM using ArduinoISP on Scuola here.

Counting prime numbers with the ATtiny13A

Dave M. has created a prime number machine – TinyPrime – powered by Atmel’s ATtiny13A microcontroller (MCU).

“The ATtiny13A is a neat chip: AVR with 1K of flash, 64 bytes of RAM and 64 bytes of EEPROM,” Dave wrote in a recent blog post.

“I programmed it using a Teensy-2.0-based waldo running Ward Cunningham’s TXTZYME. Every time you push the button, the AVR retrieves the currently-displayed number (which is stored in EEPROM), and then increments it, clicks the counter and tests for primality.”

If the number isn’t prime, says Dave, the machine increments and clicks again.

“When a prime number is reached, it stops and waits for another button press,” he added.

Interested in learning more? You can check out TinyPrime’s official project 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.

Building a three-phase PMSM sensorless FOC with Atmel

A three-phase Permanent Magnet Synchronous Motor (PMSM) sensorless FOC (Field Oriented Control) is typically found in a number of home appliances such as washing machines, dishwashers, dryers, refrigerators, air conditioners and pumps.

atmelxmegamotor

Key design considerations for a three-phase PMSM sensorless FOC include power efficient and acoustically quiet motor operation to meet governmental efficiency standards, low BOM cost and a compact, scalable FOC form factor.

“And that is precisely why Atmel’s XMEGA AVR (D or E series), coupled with our AVR1636 reference design, offers developers versatile integration capabilities along with comprehensive application support – facilitating FOC implementation that allows power efficient and acoustically quiet motor control application,” an Atmel engineering rep told Bits & Pieces.

“More specifically, there are three 16-bit timer/counters with up to four output compare or input capture channels, a high-resolution extension and advanced waveform extension (AWeX), an 8-channel Event System which allows peripherals to directly send, receive and react to synchronous or asynchronous events in a short, guaranteed response time.”

Additional integrated features include a feature-rich 300KS/s 12bit ADC with programmable gain amplifier up to 64x – with temperature, supply voltage and reference inputs; EEPROM for configuration parameters storage; two USART, one SPI and one I2C Serial Interfaces for system communication.

In terms of software and application support, Atmel offers AVR1636 reference design hardware; a firmware and PC configuration utility; AVR1610 pre-certified Class B library and design guide; Atmel Studio 6; Atmel Software Framework; Atmel Gallery; and free software libraries of production-ready source code.

Interested in learning more about building a three-phase PMSM sensorless FOC with Atmel’s AVR XMEGA? Be sure to check out some of the links below.

Simply AVR: 8-bit ideas with Atmel

Vegard Wollan, co-inventor of AVR microcontroller (MCU) architecture, says AVR “was born from the combination of advanced computer science coupled with proven Flash memory manufacturing techniques.”

Indeed, AVR architecture offers both engineers and Makers robust performance, low power, high-speed, connectivity and easy system integration. Based on a single-cycle RISC engine that deftly combines a rich instruction set, AVR MCUs are capable of delivering close to 1 MIPS (Million Instructions Per Second) per megahertz – as they are optimized for minimum code size and maximum computing performance.

Perhaps most importantly, Atmel makes it possible to create smaller footprint designs, as our AVR MCUs offer a high level of integration with on-chip Flash, SRAM, EEPROM, pull-up resistors, precision oscillator, watchdog timer, brownout detector and GPIO/PWM (pulse-width modulation) pins for application use. Advanced on-chip analog capabilities include an internal temperature sensor, analog comparators, multiple 10-bit and 12-bit ADC (analog-to-digital converter) input channels and a programmable-gain analog amplifier.

On the low power side, Atmel has developed picoPower technology, which enables AVR microcontrollers to reduce power consumption in both sleep and active mode, thereby achieving the industry’s lowest power consumption with 500nA @ 1.8V with RTC running and 100nA with full SRAM retention.

In terms of software, AVR MCUs are designed with ease of use in mind, from peripherals to datasheets to tools. To be sure, we offer a high-quality, easy-to-use tool chain for the full range of our AVR families. Available for free, Atmel Studio enables code development in C or Assembly by providing cycle-accurate simulation – and integrating seamlessly with AVR starter kits, programmers, debuggers, evaluation kits and reference designs.

This makes AVR microcontrollers ideal for a broad range of applications including industrial control, ZigBee and RF, medical and utility metering, communication gateways, sensor control, white goods and portable battery-powered products. Last, but certainly not least, both Makers and developers can benefit from a robust community following of over 300,000 engineers, with AVR Freaks offering a centralized location where participants frequently interact with each other in various AVR MCU forums.

Designing UL/IEC/EN60730-compliant appliances with Atmel

UL/IEC/EN60730 are a comprehensive set of safety standards for various household appliances, such as washing machines, stoves and refrigerators.

On a hardware level, key design considerations for UL/IEC/EN60730-compliant appliances include POR, BOD, RAM, Flash, EEPROM, WDT, ADC, clock/zero cross detector as well as immunity from noise, EMC and humidity. Software features typically comprise a 60730 code library, spread spectrum and FMEA (Failure Mode and Effects Analysis).

compliantappliances2

A number of current-gen Atmel components can be used to design UL/IEC/EN60730-compliant appliances, including ATxmega MCUs, AT42QT14811, AT42QT1244/1245, AT42QT2640 and UL/IEC/EN60730 certified touch controllers.

“Simply put, megaAVR and AVR XMEGA – with application notes (AVR998 and AVR1610) – provide proven solutions to address household appliance design requirements,” an Atmel engineering rep told Bits & Pieces.

“An Atmel-powered platform offers developers access to the most efficient 8-bit microcontroller core; POR, BOD and watchdog with an independent oscillator; integrated RC oscillators, RTC, EEPROM, ADC Converter/Comparator; 25×4 and 40×4 segment LCD driver options, as well as certification of the XMEGA code library.”

compliantappliances3

In terms of electrical performance, Atmel offers a high current sink and source for GPIO, temperature range from 850C up to 1500C and EMC robustness (low emissions). On the touch side, Atmel provides pre-certified capacitive touch controllers and Failure Mode Effects Analysis (FMEA) module for improved safety.

As noted above, devs can access Atmel application notes for AVR998 and certified AVR1610, including safety related code. Last but certainly not least, manufacturers have easy access to Atmel Studio 6 and its Integrated Development Environment (IDE).

Interested in learning more about designing UL/IEC/EN60730-compliant appliances with Atmel? Be sure to check out the following links below:

Adafruit’s Gemma has Atmel under the hood

Adafruit has debuted Gemma, a tiny wearable platform board packed in a 1″ diameter package. The device – powered by Atmel’s versatile Attiny85 – is easily programmable with an Arduino IDE over USB.

“We wanted to design a microcontroller board that was small enough to fit into any project, and low cost enough to use without hesitation,” Adafruit’s Limor Fried (aka LadyAda) explained in a recent blog post. “Gemma is perfect for when you don’t want to give up your Flora and aren’t willing to take apart the project you worked so hard to design. It’s our lowest-cost sewable controller!”

Fried described the Attiny85 as a “fun processor” because despite being so small, the device boasts 8K of flash and 5 I/O pins, including analog inputs and PWM ‘analog’ outputs.

“We designed a USB bootloader so you can plug it into any computer and reprogram it over a USB port just like an Arduino (it uses 2 of the 5 I/O pins, leaving you with 3),” Fried continued. “In fact we even made some simple modifications to the Arduino IDE so that it works like a mini-Flora. Perfect for small and simple projects – the Gemma will be your go-to wearable electronics platform.”

In addition to Atmel’s ATtiny85, key hardware specs include:

  • 1.1″ / 28mm diameter and 0.28″ / 7mm thick.
  • Easy-to-sew or solder pads for embedding in wearable projects.
  • 8K of flash, 512 byte of SRAM, 512 bytes of EEPROM.
  • Internal oscillator runs at 8MHz.
  • Ultra low power, only 9 mA while running.
  • USB bootloader with LED indicator programmable with the Arduino IDE
  • Mini-USB jack for power and/or USB uploading
  • Rugged and foolproof bootloader process
  • ~5.25K bytes available for use (2.75K taken for the bootloader)
  • On-board 3.3V or 5.0V power regulator with 150mA output capability and ultra-low dropout.
  • Up to 16V input, reverse-polarity protection, thermal and current-limit protection.
  • Power with either USB or external output (such as a battery) – it’ll automatically switch over
  • On-board green power LED and red pin #1 LED; reset button for entering the bootloader or restarting the program.
  • 3 GPIO – The 3 independent IO pins have 1 analog input and 2 PWM output as well.
  • Hardware I2C capability for breakout and sensor interfacing.

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