Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Personal Beacons, Arduinos and Raspberry Pi’s
-An On-going Project
Brian Flynn GM8BJF
Acknowledgements
• Project has been a cooperative exercise
– Chris Tran GM3WOJ houses the transmitter on one of his towers.
– Briain Wilson GM8PKL who houses the receiver set-up and controls my lack of internet security awareness. More on that later! He also keeps the Rx and audio stream “tweaked” on a day to day basis.
Background
• Beacon building has been a long term interest.
– GB3EDN, 70 cm GB3ANG, 3cm beacons GM8BJF, GM8FFX and GM3WOJ.
• Recently completed a rebuild of the GM3WOJ 3cm beacon.
• Simplified the hardware to make it more reliable.
• Upon completion of the rebuild Chris ‘WOJ suggested that it would be good to try an develop some “experiment” around the beacon.
Location of GM3WOJ
Path Profile
Path Profile
• Path is far from L0S
• There are interesting propagation effects
• Rainscatter
• Aircraft reflections
• Refraction and diffraction effects
• Signal is always audible (as long as Tx is on!)
• Sometimes only with Spectran
Signal Monitoring
• For the about past 3 years we have monitored the signal and streamed the audio onto the internet with Icecast and Darkice.
• Streaming audio of GM3WOJ/B
• Spurred on by Chris’s suggestion of a “more scientific” experiment it was decided to attempt to log the signal strength over a period of time and make the data available.
The Receiver
• Antenna is a re-purposed Sky dish with a modified LNB whose LO is frequency locked to a good 10 MHz reference.
• The receiver is a Yaesu FT790RII on the 70cm IF.
• At present the audio is streamed via a USB sound dongle connected to a Raspberry Pi running as an “internet radio station”.
The Gorse Green Sky Dish
Discreetly Installed Dish!
Inside Briain’s Cellar
Back to the Experiment
• The goal is to record the signal level by measuring the AGC voltage in the receiver.
• Digitise the AGC level and record (say) every 30 seconds.
• Make the information available as data files on a small web site.
The Hardware Implememtation
• Use Raspberry Pi as webserver, (already one there)
• Use Arduino as ADC and USB interface to Raspi.
• Also first line data storage to SD card. 32 G SD card holds a lot of numerical data!
• Why not use Raspi to do data conversion? No ADC!
The Hardware Implememtation
• The Raspi is a small computer running Linux with an operating system – Linux - Great !
• The Arduino is a programmable microcontroller with no operating system. Only does one thing.
• Both easy to interface over USB
• No need to solder up an ADC and get it working and Arduino Nano board is about the same cost as an ADC chip.
Raspberry Pi 3 Brief Specification
• SoC: Broadcom BCM2837 CPU: 4× ARM Cortex-A53, 1.2GHz GPU: Broadcom VideoCore IV RAM: 1GB LPDDR2 (900 MHz) Networking: 10/100 Ethernet, 2.4GHz 802.11n wireless Bluetooth: Bluetooth 4.1 Classic, Bluetooth Low Energy Storage: microSD GPIO: 40-pin header, populated Ports: HDMI, 3.5mm analogue audio-video jack, 4× USB 2.0, Ethernet, Camera Serial Interface (CSI), Display Serial Interface (DSI)
Raspberry Pi R3
Arduino Nano Specifications
• Microcontroller ATmega328 • Operating Voltage (logic level): 5 V • Input Voltage (Recommended): 7-12 V • Input Voltage (limits): 6-20 V • Digital I/O Pins : 14 (of which 6 provide PWM Output) • Analog Input Pins: 8 10 bit ADC 1024 levels • DC Current per I/O Pin: 40 mA • Flash Memory 32 KB (ATmega328) of which 2 KB used by
bootloader • SRAM: 2 KB (ATmega328) • EEPROM: 1 KB (ATmega328) • Clock Speed: 16 MHz • Measurements: 0.73" x 1.70"
Classic Arduino Uno
Arduino Nano
Arduino Data Logger
Data Logger Hardware
Complete Set-up
Raspberry Pi Software
• Install Apache2
– apt-get install apache2
• Save the USB data stream on /dev/ttyUSB0
– sudo cat /dev/ttyUSB0 >> data.txt &
• Very straightforward. (If it all works!)
Calibration of the Arduino ADC
0
200
400
600
800
1000
1200
-160 -140 -120 -100 -80 -60 -40 -20 0
AD
C V
alu
e
Input signal power (dBm
ADC output
Linear ()
Calibration of the Arduino ADC
Extracting a Relative dB Value
Excel regression formula (straight line)
y = 7.6x +1404
Arduino C code to convert adc value to dB
int sensorValue = analogRead(0); // Read analogue pin A0
float dB = (sensorValue - 503) / 7.6; //Convert to dB scale
logFile.println(dB);
(503 ADC value = 0 dB)
Data Format
• Data output once per 30 seconds • Stored on SD Card and to file on the Rpi. (32 G
card stores a lot of numerical data!) • Date • Time (Hrs:Mins:Secs) • UnixTime - Good for graph plotting! • Raw ADC value • Relative signal level in dB. • Use comma separated variable (*.csv) format. • Good for spreadsheets
Sample of data
Web Page from Raspi
Where next?
• Hardware side is mostly complete.
• Plan to run both the audio stream and the data server on the Pi3 along with monitoring a GPSDO frequency reference for the Rx.
• Get it installed and up and running
• Not to be under-estimated!
• No doubt there will be teething issues.
• I am a pessimistic old Engineer!
Questions ??