Presentation on theme: "Arduinos in the Ham Shack"— Presentation transcript:
1 Arduinos in the Ham Shack James Michener K9JMk9jm.com
2 DO NOT TAKE NOTES!!! This presentation will be available at
3 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?
4 Landscape of computers BIG COMPUTERS:Super computers – eg IBM WatsonCluster computers – eg Server FarmsServer computersDesktop computers – eg Win 7 / MacTablets / Smart phonesNOT THE TOPIC OF THIS PAPER
5 Landscape of computers We will frame the Arduino in the landscape of small computersEmbedded LinuxMicro controllers ArduinoNano controllerAttributes:Dedicated functionLimited extensive graphical user interfaceOften communications oriented
6 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.
7 Embedded Linux Small console based Linux devices Commercial Examples: Set-top boxesCable/DSL RoutersWiFi access unitsTechnology:ARM Processor – 32 bit 500MHz – 1.5GHzLarge Flash based storageDDR memory >64megs
8 Embedded Linux Open Source Hardware Examples: Beagle Bone --Beagle Board --Raspberry Pi --These are the Arduino “big brother”
9 Beagle Bone 750MHz ARM Micro SD Flash up to 16GB 256 Megs of memory 4 Serial Ports100 base-T Ethernet12bit A/D converterUSB – host / clientRuns most Linux distrosDraws less than a watt at 5 voltsMany GPIO lines$79 dollars on amazon
10 Beagle Bone Ham shack applications: Complex web services Apache, NTP, sendmail …Expandable with “capes”Serial, VGA, Prototype, camera, weather, audio, wi-fi, radar, touch screen LCD, GPSProgrammable in any language supported by Linux… which is any language on this planet. Fortran, C, C++, python, lisp, Java.....
11 Beagle Bone Weak in: Slow in bit manipulation Requires proficiency in Linux to get to to get startedPoor low level library support: egGPIOI2C / SPIInterruptsTimers
12 Nano controllers Arduino smaller brother Small limited I/O Single special interface1K or less program, 256 or less RAMTypical applicationsRemote keyless entry“Smart” keys / RF ID tagsTimersRemote ControlSmall appliancesKeyers -- K1EL
13 The micro controller Technology Commercial examples 8 or 16 bit technology8K to 256K flash1K to 64K RAMMultiple interfaces10 to 100 Million instructions per secondCommercial examplesThermostatsMajor appliances – Microwave, washing machine, dish washerIntelligent remote controls
15 ‘Larger’ Arduinos ARM base processors Examples 32 bit processor / ~100MHzMore RAM / More flash / more moneyBuilt in Ethernet MACExamplesNetduino -Arduino Due ( real soon now)
16 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, 1002Goals:Get going FASTStudents up and running after one classLow cost modern processor - $25‘Open source hardware’Standard expansion interface ..”shield”
17 What Arduino gives the user General purpose micro controllerLarge library to interface most anythingHundreds of ‘open source’ shieldsLow cost of entryFree development tools on any platformMany development environments
18 Ardunio TodayToday:Dozens of Companies Making Arduino Products and compatible “shields”More than 200,000 boards per monthMore than 100,000 developersAvailable World WideUsed by thousands of colleges / universitiesRapid growthLarge library of routinesAvailable everywhere… even Radio Shack
20 Companies making Arduino The ORIGINAL:I like to support the Ardunio guys, so they will continue to innovate.
21 What is the Arduino Processor There are two processors:Small = Arduino Uno = ATmega328Large = Arduino Mega = ATmega2560Common properties:16MHz Clock – Single clock per instruction, no FPU8 bit data / 16 bit ( 2 byte) instructionOn chip Flash with protected “boot sector”10 bit A/D – 15 KHz sampling rate40ma I/O pins - 1.8v to 5.5v operationI2C and SPI interfaceMultiple ‘Analog out’ using 8 bit PWMWatchdog TimerLow Power ModesInternal / External oscillator
22 ATmega328 = Uno Features 32K of Program / Data Flash 2K of SRAM 1K of EEPROM1 Hardware Serial Port2 External Interrupts14 GPIO Digital Lines6 channel analog multiplexer3 Timers1 Analog comparator14 Digital I/O Pins
23 Atmega2560 = ‘Mega’ Features 256K of Program / Data Flash8K of SRAM4K of EEPROM4 Hardware Serial Ports5 SPI & 1 I2C5 external interrupts16 channel analog multiplexer6 Timers4 Analog compare54 Digital I/O pins
24 Arduino Boards Contain USB to serial interfaceAutomatic switching power supply switching between USB and externalRegulator for external powerExpansion connectors for a shieldPower LEDProgram controlled LED
36 AVR Studio http://www.atmel.com/microsite/avr_studio6/ Free VS IDE and use Visual MicroNot ArduinoFree
37 Arduino in the Hamshack What Other’s have done WA5ZNU’sWaterfall displayCascataTalks was Saturday at Pacificon
38 nanoKeyer http://radioartisan.wordpress.com/arduino-cw-keyer/ K3NG -- GoodyDoes Morse and HellscreiberK1EL EmulationKeyboards, LCD… and much moreArduino Uno based
39 DTMF Signaling Mike Szczys Google “arduino ham radio” and get a million other examples.
40 K9JM -- Your’s truly Example for the rest of the paper CI-V Router – Web based ++++NTP locked station clockGeneral purpose Control PanelKeyer -- Very special - ARRL CP RunsAuto tune a Johnson KW Matchbox
41 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
45 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
46 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.
48 Six Months laterMore 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
49 Wow that was easy…. Now what? I was in love… what other things are out there?
50 A CI-V Router for my station Tricked out with added featuresBand decoding Antenna SelectionHam Shack Power Control CenterEthernet control / Ethernet ReportingStation battery monitoring and charge controller
51 Feature: Band decoding Router knows the frequency.Map Frequency to Antenna Selection.Resolution = 1KHzDecode to drive an Array Solution Six PakSoftware module available for the CI-V Router
52 Feature: Ham shack power control Qty 10 switchable amp output to turn on and off accessories, or AC power relays.
53 Feature: EthernetUsing either simple HTML commands, or by serving simple web pages… do the following:Observe and control of ham shack powerObserve and control of radio
56 Arduino and Ethernet Simple serial like interface Supports a limited number of connections - fourEasy to do simple clientsEasy to do simple single connection serversEasy to simple HTML Get/Put exchangesDifficult to do complex things.Not Apache.Not easily multi-taskingNot much RAM available = slow or small
57 Arduino and EthernetUsing 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.
62 Arduino soft control panel EthernetFour serial ports to communicate with other devices… eg antenna rotator, 160m inverted L antenna tunerKeyerMenu driven control, knob/push button interfaceWhen “inactive” it is an NTP synchronized station clock.
63 Question:What should one use to communicate between pieces of equipment in your ham shack?RS-232RS-422EthernetWire per functionWish there was standard and protocol.In technology; never bet against Ethernet
66 Auto tuning: Johnson KW Matchbox External Arduino controller.Speaks I2C to motor driver / positional feedback .. Mounts on back of tuner12V NEMA stepper motors degrees/stepWhen power is removed, operator can turn knobsFrequency based tuning tableFine tweak with SWR measurement.
67 Auto tuning: Johnson KW Matchbox Prototype Arduino auto tuning controllerArduino UnoLCD Display with push button controls
68 Simple KeyerK6YR / K6KPH / K9JM shares W6OWP’s ARRL West Coast Code Proficiency RunsKeyer with crystal controlled speed accuracyPerfect control / synchronization with a computerSeamlessly speed changes – on the flyARRL “Official” Farnsworth SpacingSolution – Arduino Uno using the hardware timer interrupt library.
69 366 Arduino Books Arduino Cookbook Arduino Internals Collection of projects and examples, largely from the internetArduino InternalsExperts guide, hints and tricks
70 22,538 C programming books Head First C K & R C programming 101 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.
71 5,774 C++ books Bjarne Stroustrup Warning Reference manual Not a teaching textWarning“C let's you easily shoot in your foot, C++ let's you reuse the bullet.”