Arduino & Raspberry Pi Special Interest Group Presents… Platforms March 5, 2015 ARDUINO PLATFORM Designer: Dan Simpson, AE7IH Designer: Chuck Zappala, KE7SA The Arduino Platform • Micro-controller • Many types, scalable • Programmable, IDE - Integrated Development Environment • Analog & Digital I/O • I/O add on components • Add on circuit boards (Shields) • Open source hardware and software • Low cost, typically less than $40 • Available through many outlets Arduino Types and Sizes Arduino Uno Version 3 Very Large Assortment of Sensors Many Development Kits An Arduino Shield (add on board) adding Bluetooth Wireless Capability Shields and Modules are Stackable Interactive Development Environment Standard Libraries • • • • • • • • • • • • • EEPROM - reading and writing to "permanent" storage Ethernet - for connecting to the internet using the Arduino Ethernet Shield Firmata - for communicating with applications on the computer using a standard serial protocol. GSM - for connecting to a GSM/GRPS network with the GSM shield. LiquidCrystal - for controlling liquid crystal displays (LCDs) SD - for reading and writing SD cards Servo - for controlling servo motors SPI - for communicating with devices using the Serial Peripheral Interface (SPI) Bus SoftwareSerial - for serial communication on any digital pins. Version 1.0 and later of Arduino incorporate Mikal Hart's NewSoftSerial library as SoftwareSerial. Stepper - for controlling stepper motors TFT - for drawing text , images, and shapes on the Arduino TFT screen WiFi - for connecting to the internet using the Arduino WiFi shield Wire - Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors. Controlling a Stepper Motor Fritzing Diagram C++ Code is called a “Sketch” • • // Controlling a servo position using a potentiometer (variable resistor) // by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> • • • • • • • • • • • • • • • • • • • #include <Servo.h> Servo myservo; // create servo object to control a servo int potpin = 0; // analog pin used to connect the potentiometer int val; // variable to read the value from the analog pin void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() { val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023) val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180) myservo.write(val); // sets the servo position according to the scaled value delay(15); // waits for the servo to get there } Parts and Resources • • • • • Adafruit.com arduino.cc Yourduino.com tronixstuff.com opensourcehardwaregroup.com ARDUINO IN ACTION Designer: Russ Sherwin, AD6ZL Demonstrating a Few Ideas for Arduino 1. Two Arduinos, one passing data to the other 2. Use of various color displays 3. Implementation of a touchscreen display 4. How Arduino and custom PCB can be stacked 5. Use of interrupts; the dual function generator is entirely interrupt driven. The LOOP statement is empty 6. An optically isolated (to 500v) RS-232 link 7. Using Arduino to pass data to PC USB port 8. Using PC to display data in lieu of or in addition to the small color displays. Function Generators, Two Versions • Top: Dual Function Generator with touchscreen based on Arduino Mega • Bottom: Early single output version, LCD screen using Arduino UNO. Arduino-based Function Generator • Based on an Arduino Mega, this incorporates a touch screen front panel to control two separate function generators, each capable of sine, square, triangle wave generation from sub-Hz to about 13 Mhz. Two custom designed PCBs are used for the frequency generation; the Arduino does all of the touch screen work. • Since the generators are completely independent, one can be used to modulate the other in either AM or FM mode. • In addition, it has external inputs that can be used to measure and display frequency. Function Generator, Inside view • Board stack: Arduino Mega left; two sig gen boards, then touchscreen display board. Solar Monitor Display • Based on a 5” 800 x 480 pixel display, this system uses two “Ardweeny” modules, one for measurement and the other for display management linked by RS232 Solar Monitoring System A/D & Amps • This is the measurement end. It does the A/D conversion and ships the result over to the display end via RS-232. It’s optically coupled for isolation. Solar Monitoring System Display • The display end showing the back of the display driver board and the display logic PCB with the “Ardweeny” in the lower right. Solar Monitoring System, PC Display • This is more or less the same display running on a PC using Processing 2 language, similar to Visual Basic. The Ardweeny passes data to the PC via USB. Both displays can run simultaneously and output data to an Excel file. RASPBERRY PI PLATFORM Designer: Tom Azlin, W7SUA The Raspberry Pi Platform • Low cost credit-card sized computer • Uses various Linux based kernel OS, on board, GUI • Uses ARM1176JZF-S (ARMv6k) 700 MHz CPU, system on a chip • 256 MB up to 512 MB • Uses an external computer monitor, keyboard and mouse • Needs a 5 volt micro USB power supply • Uses the Scratch, Python, C, C++, Java, and Ruby languages • Does just about everything a full PC does • Driver APIs for expandability • Costs typically less than $40 • Widely available through many outlets The Raspberry PI Model B+ Board The Raspberry PI Model A Board The Raspberry PI Compute Module Connections I/O Pins Demos • R-Pi Digital Voice Hotspot using DV Adapter – 10miliwatt UHF transceiver – AMBE VOCODER not needed – Works with 1600 ircDDB and US Trust repeaters • R-Pi DVB-T GNU VHF-UHF Receiver and Spectrum Display (show) • R-Pi Digital Modes Terminal with fldigi (show) – Used either USB SignaLink or Sound daughter card • R-Pi Digital Voice MODEM (show) – AMBE Daughter Card R-Pi based D-STAR Hotspot Software Defined Receiver!!! …and it works!!! Smaller Version R-Pi Links for Further Reading • • • • • • • • • • • www.raspberrypi.org – Main Site http://www.raspbian.org/ - R-Pi optimized Debian http://www.elinux.org/RPi_Hub - Information on R-Pi http://dvmega.auria.nl/ - Plug in radios http://maryland-dstar.org/ht ml/raspiberry.html - using radios http://www.canakit.com/raspberry-pi getting an R-PI https://groups.yahoo.com/neo/groups/Raspberry_Pi_4Ham_RADIO - R-Pi ham radio apps http://www.irlp.net/pi/ - R-Pi based IRLP node http://villazeebries.krbonne.net/hamstuff/?p=341 EchoLink R-Pi node http://garethhayes.net/gnu-radio-for-raspberry-pi/ using DVB-T dongle for a Pi Radio http://www.ultratechie.com/2012/10/pigate/ - APRS Thanks for attending our presentation! Stop by at our demo table to see our projects up close and ask questions. The SIG is welcoming new members to help you get started and share information and ideas.