We use an Arduino to program other ATmega without bootloader . This technique allows you to use all flash memory for code and make boards using new ATmega, cheaper than those with bootloader.
The qualities that have made the success of Arduino are undoubtedly the open-source software, many libraries, a good hardware and a virtually infinite Reference that explains each possible use of the platform.
But if we use Arduino for a specific use, we can integrate it into a specific circuit and program the micro in a way that performs a single firmware. We may so remove the bootloader and leave to the firmware the entire program memory.
The ATmega328 has 32 Kbytes of flash, that when the chip is mounted on Arduino are not all available, as a portion is reserved to the bootloader, the purpose of which is to communicate with the IDE Arduino to load programs (sketch) to be performed. The same bootloader, on each power on or reset of Arduino, verifies the presence of a sketch in flash memory and executes it. The bootloader occupies a space of 512 bytes, in the case of Arduino UNO.
Arduino ISP and stand-alone circuits - [Link]
This is a very basic Atmega328 development kit It includes:
- Atmega 328 8 bit microcontroller with 20 MHz crystal resonator
- PCB board with place for external components
- Power circuit that allows powering Atmega directly(2.7-5.5 V), or through a L7805 voltage regulator(8-35 V). L7805 circuit includes a thermal fuse.
- 10 pin ISP connection for programming.
Atmega328 Development Kit Guide - [Link]
Goal is to replace this Ikea super cheap timer that works … well, as good as something manual that you paied less than 200 JPY (less than 2 euro). Not precise, sometimes doesn’t ring, or ring just the blink of an eye, so easy to miss…
The new timer will:
- Have a graphical LCD (bought one one year ago, never used it, needed a pretext, so…)
- Work on battery (1x 9v battery)
- Play music when it’s time
- Use a speaker and amp
- Possibly use a YMZ294 ?
- In fact something else but much better…
- Have an on/off system with a push-button, not a open/close switch In fact a tilt switch
- No arduino, but a simple atmega 328 (more than sufficient)
- Keep me busy a few days while allowing me to use some parts I bought long time ago and create a un-reasonable and out of price kitchen timer
Arduino KitchenTimer - [Link]
Back in July I was contacted by Nikki of fizzPop Hackspace in Birmingham about making very low cost Arduino clones on stripboard. I hadn’t really given it much thought until I realised how easy it would be to make an Arduino compatible device on stripboard (or breadboard) for something less than a fiver!
I’ve tried to standardise the design, to make use of the ATmega328 pin-out – which lends itself for an efficient layout.
Here’s a couple of recent boards – one is a controller for a spark ignition system, and the other is a general purpose layout – just the Arduino in the corner of a vast expanse of prototyping board.
Below is the prototype spark ignition controller. It is based on the Atmel ATmega328 microcontroller and uses the standard FTDI USB to serial cable as a means of
Arduinoids – The Rise of the Machines - [Link]
follower presents his project using a USB accessory to create a “dual screen” Nexus One with SMS notification & time display. Besides the Nexus One phone, the hardware consists of an Arduino Duemilanove with ATmega328, a SparkFun USB Host Shield and 2×16 LCD display. This hack is made possible by Android’s Open Accessory API. [via]
The sketch listens for bytes sent over the USB connection and displays them on the LCD–it special-cases two values to determine which row of the display text should be displayed on.
The Android App is invisible and starts automatically when you connect the accessory. (You probably need to approve the running of the application within a few seconds or the accessory may time out.) A background service is started which displays a notification of the accessory found, listens for new text messages and starts sending the current time to the accessory for display. You can use your phone as normal while the service is running in the background.
When the accessory is disconnected the notification is removed and the background service cleans up after itself before stopping.
Full source code and further details are available at follower’s labradoc webpage.
Dual-screen Nexus One – [Link]
The AVRJazz Mega168 board from ermicro is designed to be used both as the AVR microcontroller learning and development board. The AVR Jazz Mega168 board is stand alone microcontroller module equipped with the latest Atmel high performance low power technology AVR ATMega168 or ATMega328 microcontroller that can be used for wide range of applications including embedded controller, remote data logger, robotics and much more.
AVRJazz Mega168/328 Learning and Development Board – [Link]
emonTx stands for Energy Monitoring Transmitter. It’s a small, open source wireless energy monitoring node. It’s based on the Arduino (Atmega328) and is fully compatible with the Arduino IDE and programmed via an FTDI to USB cable.
It’s designed to take inputs from multiple CT sensors, optically from a pulse-output utility meter and from multiple one-wire temperature sensors, and interface via RF with the Nanode which then makes the data available over the Internet. The emonTx is designed to be powered by 2x AA batteries or 5V USB. [via]
Openenergymonitor – [Link]
Some time ago I published a short tutorial concerning the use of the internal EEPROM belonging to the Atmel ATmega328 (etc.) microcontroller in our various Arduino boards. Although making use of the EEPROM is certainly useful, it has a theoretical finite lifespan – according to the Atmel data sheet (download .pdf) it is 100,000 write/erase cycles.
One of my twitter followers asked me “is that 100,000 uses per address, or the entire EEPROM?” – a very good question. So in the name of wanton destruction I have devised a simple way to answer the question of EEPROM lifespan. We will write the number 170 (10101010 in binary) to each EEPROM address, then read each EEPROM address to check the stored number. The process is then repeated by writing the number 85 (01010101 in binary) to each address and then checking it again. The two binary numbers were chosen to ensure each bit in an address has an equal number of state changes.
After both of the processes listed above has completed, then the whole lot repeats. The process is halted when an incorrectly stored number is read from the EEPROM – the first failure. At this point the number of cycles, start and end time data are shown on the LCD.
The result? 1,230,163 write/read cycles (per address) before failure. That’s an order of magnitude+ beyond Atmel’s specs, though Atmel does tend to be conservative with their numbers.
EEPROM Destroyer - [Link]
Mike Chambers writes:
Here is how it works. I have an Arduino Duemilanove with ATMega328 which has two photo-resistors connected (with a 10k pull down resistor). I set up two laser pointers to shine a laser directly onto the photo-resistor (which is enclosed within a dark box). The Arduino monitors the values returned from the light sensor, and watches for any changes that indicate that the laser bean has been broken. When both laser beams are broken, the Arduino calculates the amount of time between when each sensor was tripped. It then sends that value to the Adobe AIR based client, which is connected to the Arduino via USB / Serial port and a serial port proxy (in the case, TinkerProxy).
Arduino based speed detector with a Flash! – [Link]
Jaroslaw Lupinski designed the Senpai (Shield for Extra Nimble Programming of Arduino) shield, to make it easy to program AVR microcontrollers using an Arduino: [via]
If you want to take your device to the next level, you’ll need to program a bare AVR chip to run the code you’ve developed. If you want to build around the ATMega328 chip (the same chip that’s inside the Arduino), you can even program the bare chip with the same code as the Arduino sketch. A great sketch has been written by an Arduino user that lets you turn your Arduino into an AVR programmer. It’s great if you just need to program one chip and be done with it, but sometimes you want to develop code while a chip is socketed on a board, to program surface mount components, or to program lots of chips in a short amount of time. Using the shield I developed, you can use the ZIF socket to quickly swap out chips to be programmed (it supports 3 device families), or use the Atmel standard ICSP protocol to program chips that are already in-circuit with the ICSP header.
Program AVR microcontrollers using your Arduino and the Senpai shield – [Link]