31
Personal Beacons, Arduinos and Raspberry Pi’s -An On-going Project Brian Flynn GM8BJF

-An On-going Project

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: -An On-going Project

Personal Beacons, Arduinos and Raspberry Pi’s

-An On-going Project

Brian Flynn GM8BJF

Page 2: -An On-going Project

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.

Page 3: -An On-going Project

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.

Page 4: -An On-going Project

Location of GM3WOJ

Page 5: -An On-going Project

Path Profile

Page 6: -An On-going Project

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

Page 7: -An On-going Project

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.

Page 8: -An On-going Project

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

Page 9: -An On-going Project

The Gorse Green Sky Dish

Page 10: -An On-going Project

Discreetly Installed Dish!

Page 11: -An On-going Project

Inside Briain’s Cellar

Page 12: -An On-going Project

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.

Page 13: -An On-going Project

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!

Page 14: -An On-going Project

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.

Page 15: -An On-going Project

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)

Page 16: -An On-going Project

Raspberry Pi R3

Page 17: -An On-going Project

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"

Page 18: -An On-going Project

Classic Arduino Uno

Page 19: -An On-going Project

Arduino Nano

Page 20: -An On-going Project

Arduino Data Logger

Page 21: -An On-going Project

Data Logger Hardware

Page 22: -An On-going Project

Complete Set-up

Page 23: -An On-going Project

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!)

Page 24: -An On-going Project

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 ()

Page 25: -An On-going Project

Calibration of the Arduino ADC

Page 26: -An On-going Project

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)

Page 27: -An On-going Project

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

Page 28: -An On-going Project

Sample of data

Page 29: -An On-going Project

Web Page from Raspi

Page 30: -An On-going Project

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!

Page 31: -An On-going Project

Questions ??