james michener k9jm k9jm.com. this presentation will be available at

71
James Michener K9JM k9jm.com

Upload: benjamin-reilly

Post on 26-Mar-2015

224 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: James Michener K9JM k9jm.com. This presentation will be available at

James Michener K9JMk9jm.com

Page 2: James Michener K9JM k9jm.com. This presentation will be available at

This presentation will be available at

http://k9jm.com

Page 3: James Michener K9JM k9jm.com. This presentation will be available at

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?

Page 4: James Michener K9JM k9jm.com. This presentation will be available at

BIG COMPUTERS:Super computers – eg IBM WatsonCluster computers – eg Server FarmsServer computers Desktop computers – eg Win 7 / MacTablets / Smart phones

NOT THE TOPIC OF THIS PAPER

Page 5: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 6: James Michener K9JM k9jm.com. This presentation will be available at

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.

Page 7: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 8: James Michener K9JM k9jm.com. This presentation will be available at

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”

Page 9: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 10: James Michener K9JM k9jm.com. This presentation will be available at

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.....

Page 11: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 12: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 13: James Michener K9JM k9jm.com. This presentation will be available at

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 washerIntelligent remote controls

Page 14: James Michener K9JM k9jm.com. This presentation will be available at

Sierra Radio - HamStackhttp://www.hamstack.com/hamstack.html

PIC processor based. 64MHz 64K Flash 3K RAM $60

Parallax / Basic Stamp

Page 15: James Michener K9JM k9jm.com. This presentation will be available at

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)

Page 16: James Michener K9JM k9jm.com. This presentation will be available at

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”

Page 17: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 18: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 19: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 20: James Michener K9JM k9jm.com. This presentation will be available at

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.

Page 21: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 22: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 23: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 24: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 25: James Michener K9JM k9jm.com. This presentation will be available at

2.7 x 2.2 inches

Page 26: James Michener K9JM k9jm.com. This presentation will be available at

4.0 x 2.2 inches

Page 27: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 28: James Michener K9JM k9jm.com. This presentation will be available at

The real ‘power’ of Ardunio:

1.Libraries – all the common stuff is done2.Shields – Add anything else – comes with

libraries3.Simplified Development System

Page 29: James Michener K9JM k9jm.com. This presentation will be available at

Bootloader General Purpose I/O – “Wires” A/D converter Interrupts Interrupt driven hardware serial PWM – Analog output Time / Delay Timers

Page 30: James Michener K9JM k9jm.com. This presentation will be available at

There are hundreds of different shields◦ http://shieldlist.org/

They all come with their own example code and library. A great “starting point”

Page 31: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 32: James Michener K9JM k9jm.com. This presentation will be available at

Up and running fast

Universal way to show examples

Page 33: James Michener K9JM k9jm.com. This presentation will be available at

GNU GCC – C, C++, assembly Currently avr gcc 4.3.2 (2008)

◦ Inline assembly◦ Templates

GCC 4.7.0 full C++ 11 availablehttp://andybrown.me.uk/wk/2012/04/28/avr-gcc-4-7-0-and-avr-libc-1-8-0-compiled-for-windows/

Price = $0.00

Page 34: James Michener K9JM k9jm.com. This presentation will be available at

Serious IDE

Free add on for Visual Studio

You can get VS IDE for Free

Excellent

Page 35: James Michener K9JM k9jm.com. This presentation will be available at

Free Complex

Setuphttp://andybrown.me.uk/wk/2010/10/24/

your-first-avr-project-in-eclipse/

Page 36: James Michener K9JM k9jm.com. This presentation will be available at

Free VS IDE and use Visual Micro

Not Arduino

Free

Page 37: James Michener K9JM k9jm.com. This presentation will be available at

WA5ZNU’sWaterfall display

Cascata

Talks was Saturday at Pacificon

Page 38: James Michener K9JM k9jm.com. This presentation will be available at

K3NG -- Goody

Does Morse and Hellscreiber K1EL Emulation Keyboards, LCD … and much more

Arduino Uno based

Page 39: James Michener K9JM k9jm.com. This presentation will be available at

Mike Szczys

Google “arduino ham radio” and get a million other examples.

Page 40: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 41: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 42: James Michener K9JM k9jm.com. This presentation will be available at

Do not do it!

Page 43: James Michener K9JM k9jm.com. This presentation will be available at

Found that hundreds of people have the same problem

http://groups.yahoo.com/group/ic-PW1/

Larry, K8UT had tore into the problemhttp://www.k8ut.com/tiki-index.php?page=Riding+the+CI-V+Bus

Page 44: James Michener K9JM k9jm.com. This presentation will be available at
Page 45: James Michener K9JM k9jm.com. This presentation will be available at

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

Page 46: James Michener K9JM k9jm.com. This presentation will be available at

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.

Page 47: James Michener K9JM k9jm.com. This presentation will be available at
Page 48: James Michener K9JM k9jm.com. This presentation will be available at

http://k9jm.com/CIV_Router/CI-V%20Router.html

More than 50 units sold world wideAnother 50 who have rolled their ownGrowing list of featuresWord of mouth marketingHundreds of pages of documentation

Page 49: James Michener K9JM k9jm.com. This presentation will be available at

I was in love… what other things are out there?

Page 50: James Michener K9JM k9jm.com. This presentation will be available at

Tricked out with added features◦ Band decoding Antenna

Selection◦ Ham Shack Power Control

Center◦ Ethernet control /

Ethernet Reporting◦ Station battery monitoring

and charge controller

Page 51: James Michener K9JM k9jm.com. This presentation will be available at

Router knows the frequency. Map Frequency to Antenna Selection.

◦ Resolution = 1KHz Decode to drive an Array Solution Six Pak

Software module available for the CI-V Router

Page 52: James Michener K9JM k9jm.com. This presentation will be available at

Qty 10 switchable 13.8 volt @ 10 amp output to turn on and off accessories, or AC power relays.

Page 53: James Michener K9JM k9jm.com. This presentation will be available at

Using either simple HTML commands, or by serving simple web pages… do the following:

Observe and control of ham shack power Observe and control of radio

Page 54: James Michener K9JM k9jm.com. This presentation will be available at

link available at http://k9jm.com/

Page 55: James Michener K9JM k9jm.com. This presentation will be available at
Page 56: James Michener K9JM k9jm.com. This presentation will be available at

Simple serial like interface Supports a limited number of connections -

four Easy to do simple clients Easy to do simple single connection servers Easy to simple HTML Get/Put exchanges Difficult to do complex things.

◦ Not Apache.◦ Not easily multi-tasking◦ Not much RAM available = slow or small

Page 57: James Michener K9JM k9jm.com. This presentation will be available at

Using HTML protocol plus small GET/PUT commands, plus serving small web pages gives powerful simple control over a small device.

Small web pages are great for mobile/tablet browsing.

Architectural Concept:Use a Beaglebone / Linux host Apache server

to route/present the Arduino based devices.

Page 58: James Michener K9JM k9jm.com. This presentation will be available at

Arduino combo boards◦ http://arduino.cc/en/Main/ArduinoBoardEthernet◦ Wiznet W5100 controller

Page 59: James Michener K9JM k9jm.com. This presentation will be available at

Arduino Ethernet Shield◦ http://arduino.cc/en/Main/ArduinoEthernetShield◦ Both have built in Micro SD Flash interfaces for

complex web pages

Page 60: James Michener K9JM k9jm.com. This presentation will be available at

Microchip ENC28J60 ◦ http://www.mdfly.com/index.php?

main_page=product_info&cPath=9_41&products_id=109&zenid=fu6d934f20994ovv3jv9i9an77

◦ https://github.com/turicas/Ethernet_ENC28J60/

Very low cost, simple 100 base T Ethernet interface

Hint: Mdfly.com ( Richmond, CA ) has many low

cost modules

Page 61: James Michener K9JM k9jm.com. This presentation will be available at
Page 62: James Michener K9JM k9jm.com. This presentation will be available at

Ethernet Four serial ports to communicate with other

devices… eg antenna rotator, 160m inverted L antenna tuner

Keyer Menu driven control, knob/push button

interface When “inactive” it is an NTP synchronized

station clock.

Page 63: James Michener K9JM k9jm.com. This presentation will be available at

What should one use to communicate between pieces of equipment in your ham shack?1. RS-2322. RS-4223. Ethernet4. Wire per function

Wish there was standard and protocol. In technology; never bet against Ethernet

Page 64: James Michener K9JM k9jm.com. This presentation will be available at
Page 65: James Michener K9JM k9jm.com. This presentation will be available at
Page 66: James Michener K9JM k9jm.com. This presentation will be available at

External Arduino controller. Speaks I2C to motor driver / positional

feedback .. Mounts on back of tuner 12V NEMA stepper motors. 1.8

degrees/step When power is removed, operator can turn

knobs Frequency based tuning table Fine tweak with SWR measurement. http://www.youtube.com/watch?v=UJ3uADluTY4

Page 67: James Michener K9JM k9jm.com. This presentation will be available at

Prototype Arduino auto tuning controller

Arduino UnoLCD Display with push button controls

Page 68: James Michener K9JM k9jm.com. This presentation will be available at

K6YR / K6KPH / K9JM shares W6OWP’s ARRL West Coast Code Proficiency Runs◦ http://www.arrl.org/qualifying-run-schedule◦ Keyer with crystal controlled speed accuracy◦ Perfect control / synchronization with a computer◦ Seamlessly speed changes – on the fly◦ ARRL “Official” Farnsworth Spacing

◦ Solution – Arduino Uno using the hardware timer interrupt library.

Page 69: James Michener K9JM k9jm.com. This presentation will be available at

Arduino Cookbook◦ Collection of projects and

examples, largely from the internet

Arduino Internals◦ Experts guide, hints and tricks

Page 70: James Michener K9JM k9jm.com. This presentation will be available at

Head First C◦ C programming 101

K & R THE reference manual for CNot a teaching text

"A C program is like a fast dance on a newly waxed dance floor by people carrying razors.“ - Waldi Ravens.

Page 71: James Michener K9JM k9jm.com. This presentation will be available at

Bjarne Stroustrup◦ Reference manual◦ Not a teaching text

Warning◦ “C let's you easily shoot in

your foot, C++ let's you reuse the bullet.”