Tuesday, July 3, 2012

uLab40AVR, the ATmega1284P for Solderless Breadboard

Project Objective: The uLab40AVR is designed to be functional similar to the uLab28AVR.

Introduction: This PCB is designed to be a mate to the Daiduino except that it uses the Sanguino pin designations. This will not cause a problem because of the Arduino IDE pin maping. For example, if you connect a LED/resistor to D13 on the uLab40AVR and the Daiduino, then select the appropriate board in the Arduino IDE, the blink sketch will work.

Specifications:

  1. Use of thru hole parts except for regulators
  2. Dual regulators for 5V and 3.3V
  3. Use a breakout boards for serial communication, USB or RS232
  4. Power switch
  5. Use jumpers for selecting power source.
  6. 36 pin header for signals and two separate pin sets for powering the SLBB.




Note: The design is not complete. 7/3/12

uLab28AVR, Arduino for Solderless Breadboard

Project Objective: To transpose the Arduino to a solderless breadboard plugin.

Introduction: This board has all the features of the GMduino, Arduino clone, shown on another post. The digital and analog pin designations are identical to the GMduino and, therefore, the Duemilanove. In addition, the ATmega328P pin designations are also shown.

Specifications:
  1. Use of thru hole parts except for regulators
  2. Dual regulators for 5V and 3.3V
  3. Use a breakout boards for serial communication, USB or RS232
  4. Power switch
  5. Use jumpers for selecting power source.
  6. 25 pin header for signals and two separate pin sets for powering the SLBB.




GMduino, a Buildable Clone

Project Objective: Design a Arduino clone that is easy to assemble for clubs and beginners

Introduction: With the criteria of ease of assembly, the first problem is the FTDI USB chip which even for the experienced assembler is not an easy mounting task, but the availability of small FTDI breakout boards solves the problem. I am using the BUB II by Modern Devices since they leave the connector for you to assemble which I add underneath the board.. Adafruit has the Friend, but it is pre-assembled with the connector on the top.

The standard 7805 type regulator is real-estate hungry and two will be needed, so surface mount LDO regulators are used. These are three pin devices and mounting is not difficult. Low drop out, LDO, devices are used to limit heat dissipation. In fact, we use a 6V wall power supply which at low current has a 8.5VDC output where a 9V wart is at 12VDC.

The commercial Arduino uses a circuit for switching between external power, wart, and USB which can take up surface space unless smd parts are used. Further, it would be nice if RS232 serial communiction could also be used which means the clone would need to supply power to that breakout. So we opted for jumpers for both power selection and board voltage. In addition a power switch was added for convenience during development and if not wanted can be jumpered out.

Finally, a vertical reset switch is placed at the front of the board as well as the LED's. This means that with a shield mounted on the Arduino the reset button is still accessible and the LED's can be seen.

Specifications:
  1. Use of thru hole parts except for regulators
  2. Dual regulators for 5V and 3.3V
  3. Use a breakout board for serial communiction
  4. Place LED's and reset switch at front of board
  5. Add power switch
  6. Use jumpers for selecting power source.

GMduino with BUB II. Note the mounting position of BUB II connector.






Friday, June 22, 2012

GMduino II, Arduino Clone with RTC and EEPROM

Project Objective: To design an Arduino clone with through hole parts for easy assembly. The clone also includes an on board real time calendar clock with battery backup and an EEPROM. The board should operate at 5V and 3.3V including the RTC.

Specifications:
  1. Arduino clone with stacking connectors
  2. MCU: ATmega328P with Optiboot
  3. Through hole parts, except for regulators
  4. Serial communication using breakout boards
  5. Dual ldo regulators for 5V and 3.3V
  6. Power :input:  6V to 9V wart or USB jumper selectable
  7. Power switch
  8. Auto reset defeat switch
  9. On board I2C, EEPROM and RTC with battery backup.
  10. Vertical reset and ISP at front
Introduction: The project is an outgrowth of the Rainwater Monitoring System , RMS. The original development was done with the uLab28 PIC, then resulting in the Picduino. The RMS is basically a water tank level data logger with LCD display and keyboard.






Note: Layout complete ready for BatchPCB, GMduino.03C

Under construction

Thursday, June 14, 2012

Daiduino, an Arduino form with the ATmega1284P

Project Objective:
Wouldn't you like to have an Arduino that had 4 times the code capacity, more IO pins and used standard shields, but was only slightly larger? So would I. Further, I would like it to use through hole parts, so that it could be assembled as a kit. By the way, dai is a japanese word that means great or big. So Daiduino is a big Arduino but not a mega Arduino.

Discussion:
I started my Google search, looking at the Sanguino which uses the ATmega644P and has 64k bytes of code space, but soon found the ATmega1284P which has the same pinouts and 128k code space. As a matter of fact the Atmega1284P can be used on the Sanguino pcb. Another interesting item is that there is only 6 cent difference in price. Update: Downloading the Sanguino ZIP file indicated that the ATmega1284P is also included in their design.

Maniacbug site has the most useful data for this project and, in particular, have integrated the ATmega1284P into the Arduino IDE 1.0 environment. So the next step is to determine board size and pin assignments. Since I have already designed a through hole Arduino clone, transfering the power section to the Daiduino will be the first step. That process created a board 3.4" by 2.1".

For pin assignments, there are two designs on the Web to look at, Calunium and Bobuino.. Of the two the Calunium can use a standard shield, but is only USB powered. There is limited information on the Bobuino, but Maniacbug includes it in his zip file.

Specifications:
  1. Same width as the Arduino but longer, 2.1" by 3.5"
  2. Basic set of stacking connectors, UNO
  3. Dual regulators for 3.3V and 5V
  4. Power source: USB or wart
  5. USB interface on a plug in, such as a BUB II
  6. Through hole parts with the exception of the regulators.
  7. LED's, reset switch and ISP at front of the board
  8. Jumpers A4, A5 to I2C for UNO compatibility
  9. Jumper Auto Reset
Note: First version PCB ready for Batchpcb, 06/18/12. Ordered 06/19/12

Working

Friday, May 18, 2012

Bootloaders: How they Work.

Micro controller units are devices which contain a processing unit, programming and data memory and I/O. Early MCU's could not modify its program memory only the data memory. The program memory of present day MCU's can be modified with an in circuit programmer - ISP or ICSP - thru designated pins on the device or by the processor using special instructions.

A bootloader  is firmware, usually written into upper memory, which is executed when the MCU is reset. Typically, on reset, the bootloader waits for data to be input on the serial port and if this does not happen in a few seconds the bootloader jumps to the previously loaded code. If the data does start flowing, it is checked for correct protocol and loaded into program memory. The Atmel ATmega and the Microchip 18F MCU's handle bootloaders in a similar way.

A bootloader PC application interfaces with the MCU using the serial port. Before using the pc app to download the hex code, the reset switch at the MCU must be pressed. This sequence can be simplified by the PC application first triggering the serial port's DTR signal which at the MCU is connected to the reset pin. On the Arduino this is called auto reset.


Sunday, May 13, 2012

Programming the Optiboot into the ATmega328

I have been using the PicKit2 and a ZIF socket to program the 18F series of MCU. This setup is inexpensive and handy. I would like to have a similar setup for use with the Atmel mcu's.

USBasp: The least expensive ATmega in circuit programmer, ISP,  I have come across is the USBasp which is sold on many sites and all seem to be by different unknown manufacturers. The USBasp sold by HobbyKing for $4.50 had good reviews and a cable with both 10 pin and 6 pin connectors. The Arduino boards, as well as my designs, use a 6 pin ISP connector. I also located 28 pin, 0.3" ZIF sockets made by Textool,  # 228-3341, which I cannot find in the Textool datasheets since it has been discontinued.  I ordered and have received 2 sockets and they indeed have that number. Here are some sources for the USBasp:
  1. HobbyKing of HK: USBasp programming device for Atmel processors
  2. XHeli: KK control board USBasp
  3. Fun4diy: USBasp kit
  4. ProtoStack: USBasp AVR Programmer
Except for the HobbyKing unit all the USBasp above have 10 pin cables so that a 10 pin to 6 pin adapter will be needed. If you are good at making IDC cables you can make a cable similar to HobbyKing's.

EMS ISP Shield:  Evil Magic Science makes a Arduino shield kit that contains a ZIF socket and can be used with the Arduino ISP sketch to program bootloaders into ATmega MCU's. Adafruit sells a similar kit. The bare pcb from the EMS kit, which is sold separately, could be used as a standalone ZIF board with the USBasp to do the same thing.

OptiLoader: This sketch, which can be found here, turns a Arduino board into a stand alone optiboot programmer. The sketch contains images of OptiBoot hex files for several ATmega devices. When the reset switch is pressed, OptiLoader looks at the attached ATmega device to determine what it is and then programs it with the correct OptiBoot. While doing this, sequence data is sent out the serial port which can be monitored with the Arduino IDE serial communication tool.

For a setup using solderless breadboards look here. My setup will use a modified Evil Mad Science ISP shield, purchased as a bare pcb, and an Arduino Duemilanove

AdaLoader: This sketch, which can be found here, is based on the OptiLoader, but uses LED's and a beeper as progress feed back. The AdaLoader sketch has only one bootloader image and the LadyAda site describes how to change the image. The AdaLoader uses LED's for PROG and ERROR connected to pins A0 and D8, respectively, and a beeper to indicate program completion at pin A3. To program the bootloader press reset after loading the ATmega into the ZIF socket assuming your using the ISP shield.

ArduinoISP: This sketch which is part of the Arduino IDE download and can be found in the Examples folder turns an Arduino board into and AVRISP programmer. The ArduinoISP uses LED's for PROG, ERROR and HEARTBEAT connected to pins D7, D8 and D9, respectively.

ArduinoISP2: This sketch which is available at LaydAda is based on the ArduinoISP sketch, but has been modified to work with Arduino IDE 1.0. The ArduinoISP2 uses LED's for PROG and ERROR using A0 and D8. A beeper connected to A3 signals program complete. To program the ATmega328P device, first, dowmload the ArduinoISP2 sketch to the Arduino, then using the IDE do Tools > Burn Bootloader > w/Arduino as ISP. The green LED will light indicating the bootloader is being loaded. When loading is complete the green light will go out and the IDE will show "Done burning bootloader".

EMS ISP Shield Modifications:
Changes
  1. Cut land from reset switch and connect switch to Arduino Reset pin.
  2. Cut land from anode of Hello LED and connect to A0 pin.
  3. Add beeper and connect to pin A3.


New ISP Loader Shield
Project Objective: To design a shield which can be used with all of the above sketches.


Specification List:
  1. 28 pin ZIF socket
  2. Reset switch paralleling Arduino board reset switch
  3. Power switch for socket
  4. Both 6 and 10 pin ISP connectors with target power jumper
  5. LED's for PROG, ERROR and HEARTBEAT
  6. Beeper
  7. Serial LCD connector
The PCB for the new ISP shield has been received and assembled. The shield was plugged into a Duemilanove, the Arduino IDE 1.0 loaded, the Arduino ISP compiled and downloaded. Using the Tool menu, Burn Bootloader was selected and got a AVRdude sync error. I shifted to IDE 0023 with same results. From reading the web, this is a Auto reset problem. At this point I substituted my home grown Arduino clone, GMduino, described elsewhere in this blog. The only real difference between my clone and the commercial boards is the use of a .1uf capacitor for the auto reset circuit and a switch to disable auto reset.. The commercial boards use a resistor. Using the IDE 0023 I programmed ATmega328P device right off. Not only that, disabling auto reset was not necessary. Is it the capacitor? More testing.


ISPL Shield Rev A
Schmatic:

ISP Loader Shield Rev B

Problems with AutoReset: Normally, before a sketch is downloaded to the Arduino the serial port DTR signal  triggers which cause a reset and the bootloader to execute. AVRdude when it connects to the Arduino board also triggers DTR on the serial port causing an Auto Reset.


Still working on this. 6/6/12