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.