Building your own special-purpose embedded system gadget.

Similar documents
University of Hull Department of Computer Science C4DI Interfacing with Arduinos

An open-source hardware+software project. For design files and additional documentation, please visit:

1/Build a Mintronics: MintDuino

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

Digital Pins and Constants

ATTiny84/85 AVR adapter kit building and usage instructions

keyestudio Keyestudio MEGA 2560 R3 Board

Building and using JasperMIDI

ARDUINO UNO REV3 Code: A000066

Freeduino USB 1.0. Arduino Compatible Development Board Starter Guide. 1. Overview

Omega MP. Multi-Programming Shield for Atmel Microcontrollers. User Manual

Atmega Fuse Repair Programmer Schematic

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

Building the RGBW LED Controller

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

Introducting Itsy Bitsy 32u4

ARDUINO LEONARDO ETH Code: A000022

RFX 328p dev/deployment board - Assembly instructions (long version, v1.3, Feb 12, 2015)

Module 003: Introduction to the Arduino/RedBoard

ARDUINO MEGA 2560 REV3 Code: A000067

IME-100 Interdisciplinary Design and Manufacturing

ARDUINO LEONARDO WITH HEADERS Code: A000057

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

Atmel Microprocessor Programming With AVRISPmkii

JeeNode V2. A small *duino-ish MPU board with a wireless RF module. Jean-Claude Wippler jeelab.equi4.com March 2009

3 pyro output datalogger altimeter with an ATmega 328 microcontroller Kit assembly instructions

Goal: We want to build an autonomous vehicle (robot)

Arduino 05: Digital I/O. Jeffrey A. Meunier University of Connecticut

How to Use an Arduino

IDUINO for maker s life. User Manual. For IDUINO development Board.

ARDUINO MINI 05 Code: A000087

Uzebox Kit Assembly Guide

Shack Clock kit. U3S Rev 2 PCB 1. Introduction

Physics 364, Fall 2012, Lab #9 (Introduction to microprocessor programming with the Arduino) Lab for Monday, November 5

EasyAVR6 Development System

Arduino ADK Rev.3 Board A000069

ARDUINO MICRO WITHOUT HEADERS Code: A000093

Alessandra de Vitis. Arduino

PARTS LIST 1 x PC Board 36 x 5mm Red LED 36 x 12mm LED Standoff 36 x NPN Transistor 36 x 10kΩ Resistor OTHER PARTS YOU MAY NEED

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Building the Super-VMW CPU Meter by Vincent M. Weaver 18 May 2011

EK307 Lab: Microcontrollers

Educato. Assembly Instructions

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

Breeze Board. Type A. User Manual.

Mioduino Guide. Breadboard Your Own Arduino Compatible. by Daniel M. Porrey Version 1.0.4

About SunFounder Preface SunFounder is a technology company focused on Raspberry Pi and Arduino open source community development. Committed to the pr

Stand-alone programming AVRs using CircuitPython

Phi-panel backpack assembly and keypad options Dr. John Liu 12/16/2012

ARDUINO MEGA ADK REV3 Code: A000069

Uzebox Kit Assembly Guide

ARDUINO M0 PRO Code: A000111

MAKE SURE TO TURN OFF YOUR TRS-80 BEFORE ATTACHING NEWKEY/80 KEYBOARD RIBBON CABLE AND POWER CABLE.

XNUCLEO-F030R8, Improved STM32 NUCLEO Board

Introduction to Arduino

Lab 2.2 Ohm s Law and Introduction to Arduinos

Proper Debugging of ATSAMD21 Processors

Microcontrollers for Ham Radio

MP3 audio amplifier. Build Instructions. Issue 2.0

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

Blinking an LED 1 PARTS: Circuit 2 LED. Wire. 330Ω Resistor

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

Shack Clock kit PCB Revision: QCU Rev 1 or QCU Rev 3

Thursday, September 15, electronic components

Lesson 8: Digital Input, If Else

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

um-fpu64 Floating Point Coprocessor 28-pin Breakout Board Introduction Bare um-fpu64 28-pin Breakout Board

Part 2: Building the Controller Board

Procedure: Determine the polarity of the LED. Use the following image to help:

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

Lab 0: Wire Wrapping Project: Counter Board

Assembly Guide. LEDs. With these assembly instructions, you can easily build your own SWT16. All required components are included in this kit.

An FTDI connection: The ATtiny microcontrollers don t have a hardware UART External Crystal header pins for an optional crystal

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

Make Kits and Casemods

Adafruit DS3231 Precision RTC Breakout

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail

Arduino Dock 2. The Hardware

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

USER MANUAL ARDUINO I/O EXPANSION SHIELD

Button Code Kit. Assembly Instructions and User Guide. Single Button Code Entry System

Sierra Radio Systems. Making a Keyer with the. HamStack. Project Platform

Construction Construction Instructions

AVRminiV3.1 Manual. 1. AVRminiV3.1 Overview. 2. AVRminiV3.1 Features and Specifications Standard Features: 2.2. Optional Features:

HUB-ee BMD-S Arduino Proto Shield V1.0

Propeller Proto Board (#32212) Propeller Proto Board USB (#32812) Proto Board Accessory Kit (# )

Solder the Harlequin, Revision F, March Solder the Harlequin - please read carefully (also the addendum!) before starting

AVR Intermediate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Getting Started with the LPC810

Post Tenebras Lab. Written By: Post Tenebras Lab

How to Become an IoT Developer (and Have Fun!) Justin Mclean Class Software.

Microcontrollers and Interfacing week 8 exercises

AAZ-0914A USB, Blue tooth and Graphic CPU 50MHZ Antenna Analyzer

ME 3210: Mechatronics Signal Conditioning Circuit for IR Sensors March 27, 2003

Dwarf Boards. DB057 : 40-pin controller board

SK18A. 18 Pins PIC START-UP KIT. User s Manual V1.1. Dec 2007

BUILDING YOUR KIT. For the Toadstool Mega328.

Arduino - DigitalReadSerial

REN816XB David Haberle 2010 (Dirknerkle)

BS2p40tm OEM Module. Surface mount/through hole kit By Robert L. Doerr. Manual Revision.5

Transcription:

Bare-duino Building your own special-purpose embedded system gadget. Saves a little money. You can configure the hardware exactly the way that you want. Plus, it s fun! bare-duino 1

Arduino Uno reset I/O connectors blinky LEDs oscillator crystal USB ICSP Atmega 328 power (9 V + regulator) I/O connectors bare-duino 2

Bare-duino Boil the hardware down to the bare minimum Atmega 328 voltage regulator (to run off a 9-V battery) crystal for the clock pull-up resistor on the reset pin. Everything else is gone. The main issue then is programming the chip. bare-duino 3

What s the cost? Part Digi-Key Price Comment proto-board 1738-1000-ND 1.50 inexpensive! Atmega 328 ATMEGA328P-PN 1.79 not programmed 28-pin socket ED3050-5-ND 0.315 good enough 7805 regulator 497-1443-5-ND 0.375 5-V linear 0.33 µf capacitor 445-5263-ND 0.225 for regulator 0.1 µf capacitor BC2665CT-ND 0.0932 for regulator crystal CTX1085-ND 0.30 16 MHz 22 pf capacitors BC1005CT-ND 0.282 for crystal 10 kω (2) resistor CF14JT10K0CT-ND 0.029 for re-set pin red LED 160-1853-ND 0.177 for blinking! 150 Ω resistor CF14JT150RCT-ND 0.029 for LED battery strap 36-84-4-ND 0.532 for 9-V battery 5.65 Note the you will also need a 9-V battery to serve as the DC voltage source. These are the prices if buying in large quantities. Buying one or two at time will be about 10% more expensive. bare-duino 4

Programming If you have an Arduino, the easiest thing to do is to use the Arduino IDE to develop your program on the Arduino board on then transfer the Atmega chip to the other circuit. (Be careful when removing the chip from the socket.) Of course, you will need replacement controllers. To use the Arduino IDE, the micro controller must have a boot loader installed on it. The boot loader is a bit of firmware that runs when the controller is powered on and allows for interfacing with a computer through an more convenient interface (like USB). https://en.wikipedia.org/wiki/booting http://arduino.cc/en/hacking/bootloader?from=main.bootloader https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader You can buy the Atemga328 with the boot loader already installed. (It costs a bit more.) Otherwise you must install the boot loader onto a fresh Atmega328 prior to using the Arduino IDE. This requires either an external programmer or using an Arduino board to the do the job. To use the Arduino to install the boot loader, see this link: http://arduino.cc/en/tutorial/arduinotobreadboard or the spark fun link above. bare-duino 5

External programmer You can buy an external programmer provided by Atmel (AVRISP) or there are many third-party programmers. I used the USBtinyISP from Adafruit. It costs about $12 to $22, depending on where you buy them. Some come as a kit that you solder together. (More fun!) The advantage to having a programmer is that you can use it to program the controller directly without need for a bootloader, if you provide extra pins for connecting the programmer. Also, it will work with any Atmel AVR controller, so you can branch out from the Atmega328. (Maybe we can have follow-up tutorial for using a programmer.) bare-duino 6

Step 1 - Install the simple blink sketch to your Arduino it s in the examples. Or write your own sketch from scratch, if you want something a bit more exciting than a simple blinking LED, // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 13 as an output. pinmode(13, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalwrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalwrite(13, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second } The world s most boring movie. bare-duino 7

Bread-boarding It s always a good idea to bread-board your hardware before soldering together a prototype. It s much easier to de-bug a bread board than a soldered circuit. Gather your parts. bare-duino 8

Set up the power. The battery provides approximately 9 V and the 7805 regulator in turn gives a steady 5 V. The input is 9 V and the output is 5 V. The capacitors provide stability 0.33 µf between the input and ground and 0.1µF between the output and ground. The red lead of the battery connector is the positive input voltage and the black lead goes to ground bare-duino 9

It s a good idea to test the regulator output before going too far. bare-duino 10

Add the controller. We need a pin mapping so we know how Arduino translates into Atmega328. Note: Atmega328 has same pin configuration as Atmega 168. bare-duino 11

Basic power connections Move the Atmega328. Make sure the power is off and carefully pry the chip out of Arduino socket. Install it into the proto board and hook up the power pins. Pins 8 & 22 ground (green wires) Pins 7 & 20 5 V (yellow wires) Pin 1 5 V through a 10 kω resistor. (This is the reset pin. Probably optional.) bare-duino 12

Oscillator crystal and the rest Add the oscillator crystal. Crystal goes between pins 9 & 10, and there are two 22 µf capacitors one from each pin to ground. bare-duino 13

Apply power and check the oscillator waveform. Note that it is 16 MHz, as expected for the crystal used. bare-duino 14

And the LED and the pull-up resistor. LED (pick your favorite color) connected to chip pin 19 (Arduino output 13) through a limiting resistor. bare-duino 15

Fire it up! Apply the power. (Attach the battery lead.) If everything was connected properly, the sketch should start up and the light should blink. Bare-duino It blinks! bare-duino 16

Perf board version - step by step Front (component side) Back (solder side) Solder the 28-pin socket to the perfboard. It can be placed anywhere on the board, depending on the other components that you might be connecting. For this simple application, placing it in the center is just fine. bare-duino 17

Front Out (5 V) In (9 V) ground Solder in the 5-V regulator (7805). It can go anywhere. Again, if you have many other components that will be added, Then add the capacitors and battery strap. Solder connections for the regulator and capacitors. Back bare-duino 18

Connect pins 7 and 20 to 5 V for power. The wires are soldered to the pins on the back side. bare-duino 19

ground line connected to regulator ground ground line solder blobs between ground line and chip ground connections Connect pins 8 and 22 to ground. 8 is connected to 22 on the back side. I made a ground line running down the center. Then did solder blobs to the two ground connections on the chip. bare-duino 20

Add the pull-up resistor for the reset from pin 1 to 5 V. (Any 5 V node is fine.) bare-duino 21

Front Back The crystal goes between pins 9 and 10. bare-duino 22

Connections to crystal ground via green wire Front Back And the two 22-pF capacitors from pin 9 to ground and pin 10 to ground. bare-duino 23

Resistor to pin 19 Resistor to LED LED to ground line Front Back Finally, add the LED. For our overly simple application of a blinker (using the canned example program): a 150-Ω limiting resistor is connected to pin 19 (which is known as pin 13 in Arduino code) and the LED then connects from the resistor to ground. Get the LED polarity correct! (It s easily checked. Loosely connect the LED to the resistor don t solder it. Then apply 5 V (or the 9 V battery) to the combination, positive on the resistor side and negative on the diode. If you lights up, you re good. If it stays dark, you have a problem.) bare-duino 24

Plug in the programmed chip and hook up the battery. If all the connections are good, it should work! bare-duino 25

A few extra thoughts It cannot be emphasized enough: prototype your system before soldering things together. Of course, the Arduino board itself is the ultimate prototyping tool. It s whole purpose is to make it easy change both hardware and software. But once you have settled on a design and want to make it permanent, you don t want to tie up your (relatively) expensive Arduino to do something mundane like measuring the temperature and operating a switch. Or blinking an LED on and off. You can buy Atmega328 chips that have a boot loader already installed, saving you the trouble of installing yourself. (Not that much trouble, really.) Many places offer them, but they tend to cost around $5 per chip, which is a pretty big markup. (Or so it seems to me.) Adafruit sells some nice stickers that can be affixed to the top of the chip to indicate the Arduino names for each of the pins. You can get 10 stickers for $3.00. https://www.adafruit.com/products/554. Or just make your own. There are nicer perf-boards available that might make building the circuit easier. The ones used here were super-cheap. I can put together a list of perf-boards that I like to use. Two ways to extend on what we learned with the bare-duino exercise: (1) moving to other controller chips, either bigger or smaller and (2) switching to the Atmel programming tools rather than using the (somewhat limited) Arduino software IDE. bare-duino 26