710 likes | 1.6k Views
Arduinos in the Ham Shack. James Michener K9JM k9jm.com. DO NOT TAKE NOTES!!! . This presentation will be available at http://k9jm.com. This talk will… Answer these questions. Landscape – (30,000 foot view) What is an Ardunio? Why Arduino? How do you program them?
E N D
Arduinos in the Ham Shack James Michener K9JM k9jm.com
DO NOT TAKE NOTES!!! • This presentation will be available at • http://k9jm.com
This talk will…Answer these questions • Landscape – (30,000 foot view) • What is an Ardunio? • Why Arduino? • How do you program them? • What have other hams done with Ardunios? • What has the author done with Ardunios? • What advice to newbies? • What could I do with an Arduino?
Landscape of computers BIG COMPUTERS: Super computers – eg IBM Watson Cluster computers – eg Server Farms Server computers Desktop computers – eg Win 7 / Mac Tablets / Smart phones • NOT THE TOPIC OF THIS PAPER
Landscape of computers We will frame the Arduino in the landscape of small computers • Embedded Linux • Micro controllers Arduino • Nano controller Attributes: • Dedicated function • Limited extensive graphical user interface • Often communications oriented
Key Concept • OPEN SOURCE HARDWARE Building block of fully disclosed hardware and enabling software that permits anyone from putting the blocks together in new forms and advanced functionality.
Embedded Linux Small console based Linux devices • Commercial Examples: • Set-top boxes • Cable/DSL Routers • WiFi access units • Technology: • ARM Processor – 32 bit 500MHz – 1.5GHz • Large Flash based storage • DDR memory >64megs
Embedded Linux • Open Source Hardware Examples: • Beagle Bone -- http://beagleboard.org/bone/ • Beagle Board -- http://beagleboard.org/bone/ • Raspberry Pi -- http://www.raspberrypi.org/ • These are the Arduino “big brother”
Beagle Bone • 750MHz ARM • Micro SD Flash up to 16GB • 256 Megs of memory • 4 Serial Ports • 100 base-T Ethernet • 12bit A/D converter • USB – host / client • Runs most Linux distros • Draws less than a watt at 5 volts • Many GPIO lines • $79 dollars on amazon
Beagle Bone Ham shack applications: Complex web services Apache, NTP, sendmail … Expandable with “capes” http://circuitco.com/support/index.php?title=BeagleBone_Capes Serial, VGA, Prototype, camera, weather, audio, wi-fi, radar, touch screen LCD, GPS Programmable in any language supported by Linux… which is any language on this planet. Fortran, C, C++, python, lisp, Java.....
Beagle Bone Weak in: • Slow in bit manipulation • Requires proficiency in Linux to get to to get started • Poor low level library support: eg • GPIO • I2C / SPI • Interrupts • Timers
Nano controllers • Arduino smaller brother • Small limited I/O • Single special interface • 1K or less program, 256 or less RAM • Typical applications • Remote keyless entry • “Smart” keys / RF ID tags • Timers • Remote Control • Small appliances • Keyers -- K1EL
The micro controller • Technology • 8 or 16 bit technology • 8K to 256K flash • 1K to 64K RAM • Multiple interfaces • 10 to 100 Million instructions per second • Commercial examples • Thermostats • Major appliances – Microwave, washing machine, dish washer Intelligent remote controls
Arduino competition • Sierra Radio - HamStack http://www.hamstack.com/hamstack.html PIC processor based. 64MHz 64K Flash 3K RAM $60 • Parallax / Basic Stamp
‘Larger’ Arduinos • ARM base processors • 32 bit processor / ~100MHz • More RAM / More flash / more money • Built in Ethernet MAC • Examples • Netduino - http://netduino.com/ • Arduino Due ( real soon now)
What is ARDUNIO?? • Designed as a teaching tool • Masters thesis project (2005) • Names after Massimo Banzi favorite college bar .. Bar di Re Arduino. • Names after King Arduin, 1002 Goals: • Get going FAST • Students up and running after one class • Low cost modern processor - $25 • ‘Open source hardware’ • Standard expansion interface ..”shield”
What Arduino gives the user • General purpose micro controller • Large library to interface most anything • Hundreds of ‘open source’ shields • Low cost of entry • Free development tools on any platform • Many development environments
Ardunio Today • Today: • Dozens of Companies Making Arduino Products and compatible “shields” • More than 200,000 boards per month • More than 100,000 developers • Available World Wide • Used by thousands of colleges / universities • Rapid growth • Large library of routines • Available everywhere… even Radio Shack
Companies making Arduino • http://www.sainsmart.com/ • http://robocraft.ru/blog/RoboCraft/97.html • http://www.dfrobot.com/index.php • http://store.nkcelectronics.com/ • http://www.liquidware.com/shop/show/ILLI/Illuminato::Genesis • https://metalab.at/wiki/Metaboard • http://jt5.ru/arduino/cosmo-black-star/ • http://seeedstudio.com/depot/seeeduino-v221-atmega-168p-p-690.html • http://shop.cqpub.co.jp/hanbai/books/12/12551.html • http://otonanokagaku.net/magazine/vol27/ • http://www.freetronics.com/products/twentyten#.UDGe26PcCjs • http://appliedplatonics.com/volksduino/ • http://timewitharduino.blogspot.com/ • http://arduino-direct.com/sunshop/index.php?l=product_detail&p=225
Companies making Arduino • http://www.logos-electro.com/zigduino/ • http://www.droids.it/cmsvb4/content.php?279-990.023-Luigino328-User-Manual-EN • http://brasuino.holoscopio.com/ • http://www.evilmadscientist.com/2010/diavolino/ • http://avr.tavir.hu/ • http://www.sunduino.neth.pl/ • http://multiplo.org/make-diy/electronics/ • The ORIGINAL: • http://arduino.cc/ I like to support the Ardunio guys, so they will continue to innovate.
What is the Arduino Processor • There are two processors: • Small = Arduino Uno = ATmega328 • Large = Arduino Mega = ATmega2560 • Common properties: • 16MHz Clock – Single clock per instruction, no FPU • 8 bit data / 16 bit ( 2 byte) instruction • On chip Flash with protected “boot sector” • 10 bit A/D – 15 KHz sampling rate • 40ma I/O pins - 1.8v to 5.5v operation • I2C and SPI interface • Multiple ‘Analog out’ using 8 bit PWM • Watchdog Timer • Low Power Modes • Internal / External oscillator
ATmega328 = Uno Features • 32K of Program / Data Flash • 2K of SRAM • 1K of EEPROM • 1 Hardware Serial Port • 2 External Interrupts • 14 GPIO Digital Lines • 6 channel analog multiplexer • 3 Timers • 1 Analog comparator • 14 Digital I/O Pins
Atmega2560 = ‘Mega’ Features • 256K of Program / Data Flash • 8K of SRAM • 4K of EEPROM • 4 Hardware Serial Ports • 5 SPI & 1 I2C • 5 external interrupts • 16 channel analog multiplexer • 6 Timers • 4 Analog compare • 54 Digital I/O pins
Arduino Boards Contain • USB to serial interface • Automatic switching power supply switching between USB and external • Regulator for external power • Expansion connectors for a shield • Power LED • Program controlled LED
Arduino Uno Board • 2.7 x 2.2 inches
Arduino Mega Board • 4.0 x 2.2 inches
Arduino Variants • There are hundreds of variants of each • Different power supplies • Different serial interfaces (RS-232 etc) • Adding other features to the CPU board • Ethernet • Ethernet + POE • Motor controllers
The Power of open source The real ‘power’ of Ardunio: • Libraries – all the common stuff is done • Shields – Add anything else – comes with libraries • Simplified Development System
Basic Libraries • Bootloader • General Purpose I/O – “Wires” • A/D converter • Interrupts • Interrupt driven hardware serial • PWM – Analog output • Time / Delay • Timers
Shields - Hundreds • There are hundreds of different shields • http://shieldlist.org/ • They all come with their own example code and library. A great “starting point”
Shields - Examples • Ethernet – Wired / WiFi • Text – LCD displays • Graphic LCD display • Touch screens • Weather shields • Motor/ stepper motor driver • LED / Light Controllers • Relay Interfaces • Compass • GPS • Prototype shields
Simplified Development Environment • Up and running fast • Universal way to show examples
Programming Language • GNU GCC – C, C++, assembly • Currently avr gcc 4.3.2 (2008) • Inline assembly • Templates • GCC 4.7.0 full C++ 11 available http://andybrown.me.uk/wk/2012/04/28/avr-gcc-4-7-0-and-avr-libc-1-8-0-compiled-for-windows/ • Price = $0.00
Visual Studio + Visual Microhttp://www.visualmicro.com/ • Serious IDE • Free add on for Visual Studio • You can get VS IDE for Free • Excellent
Eclipse & Arduinopluginhttp://arduino.cc/playground/Code/Eclipse • Free • Complex Setup http://andybrown.me.uk/wk/2010/10/24/your-first-avr-project-in-eclipse/
AVR Studiohttp://www.atmel.com/microsite/avr_studio6/ • Free VS IDE and use Visual Micro • Not Arduino • Free
Arduino in the HamshackWhat Other’s have done • WA5ZNU’s Waterfall display Cascata Talks was Saturday at Pacificon
nanoKeyerhttp://radioartisan.wordpress.com/arduino-cw-keyer/ • K3NG -- Goody • Does Morse and Hellscreiber • K1EL Emulation • Keyboards, LCD • … and much more • Arduino Uno based
DTMF Signaling • Mike Szczys • Google “arduino ham radio” and get a million other examples.
K9JM -- Your’s trulyExample for the rest of the paper • CI-V Router – Web based ++++ • NTP locked station clock • General purpose Control Panel • Keyer -- Very special - ARRL CP Runs • Auto tune a Johnson KW Matchbox
Necessity – Mother of invention There is a Gremlin in my ham shack! It is the Icom CI-V bus, a one wire serial protocol bus. Contest program ( eg N1MM ) + Icom PW-1 + Icom IC-756Pro2 = COLLISION = HAVOC
Complain to Icom… and Do not do it!
Search the Web for a solution • Found that hundreds of people have the same problem http://groups.yahoo.com/group/ic-PW1/ Larry, K8UT had tore into the problem http://www.k8ut.com/tiki-index.php?page=Riding+the+CI-V+Bus
How to build it? • Go to Dayton 2011, someone suggests, what about an Arduino. First time I heard the word. • Found that the Arduino Mega256 has 4 serial ports and a library for buffered/interrupt hardware I/O • “All” I have to do is write the message handler. It’s just software… • Bought the Mega and a proto ‘shield’. • Programmed a “CI-V” sniffer in 10 minutes
Started writing the CI-V Router • As a “first” project, this is VERY aggressive. • Code in a dozen modules, needed a better IDE. Discovered Visual Micro + Visual Studio. • Posted the code and schematics on my web page. Four people build one. Many requests for finished solution.
Six Months later http://k9jm.com/CIV_Router/CI-V%20Router.html More than 50 units sold world wide Another 50 who have rolled their own Growing list of features Word of mouth marketing Hundreds of pages of documentation
Wow that was easy…. Now what? I was in love… what other things are out there?
A CI-V Router for my station • Tricked out with added features • Band decoding Antenna Selection • Ham Shack Power Control Center • Ethernet control / Ethernet Reporting • Station battery monitoring and charge controller