J.F.Drew © 2000-2017

Projects by John F Drew Site map

Mobile menus

VK5DJ

Remote power management of a remote amateur repeater site

The Raspberry Pi 2W is a very inexpensive computer on a board. It has a dual core RP2350 microprocessor,2.4GHz WIFI and Bluetooth 5.2, a 150MHz clock speed, 520kB of SRAM and 4MB of on board flash memory. It has a full speed USB 1.1 host/device controller and 26 GPIO pins.


With ideas from the “Geoffg.net” Watering system controller project featured in August 2023 Silicon Chip Magazine I have created a wifi server that allows remote monitoring of the voltage and current of both the loads and the solar charger at The Bluff, site of VK5RMG. This repeater system is the centre of the South East Radio Group’s repeater network covering the Lower South East of South Australia and into SW Victoria.


Using an INA226 board readily available from many Internet shops to measure the readings from a shunt resistor we are able to monitor the load (a 2m voice repeater, a 70cm C4FM repeater, three UHF links to other sites, Echolink, and a packet radio system supporting APRS and a Marine tracking system) plus solar.

The critical part is the software and it depends on “MMBASIC for the Picomite”. This software provides for the establishment of a WIFI connection, a TCP server, TELNET service and USB.


Under normal ‘computer’ operation the Rpi PICO is provided with power and MMBASIC. However in this project I access the WIFI functions and use I2C to access the INA226 board that enables the shunt to be read for current and voltage (up to 36V). It’s a natty little board and comes with its own shunt resistor for twenty amps. However our current can be above 20A (maybe up to 25A peak) so I have made use of a commercial 0.0025 ohm shunt resistor.


The shunt to the left is a 30A device that provides 75mV at 30A for detection  by the INA226. At 15A it provides 37mV etc. This has negligible impact on the load voltage drop. The load current at VK5RMG currently peaks at about 20ish amps. The INA226 outputs via I2C.

I have created a circuit a little more complex than originally planned as the device is sitting at a remote site and access is difficult. Because the MMBASIC software (or the PICO itself) may fall over after a week or so, I have added a PIC16F1827 as an external watchdog. It works by monitoring a pulse from the PICO and, additionally, has a 2 day timer. The idea is that if the pulse stops because of a program glitch, or if two days has expired, the PICO is reset. This external device is in addition to the internal watchdog and monitoring for loss of the WIFI connection.


The software saves the existing older data whenever there is a 3 hr update. On restart the program recovers the data from “settings.dat” thus providing a continuous record of the last 24 hours.


Every two days the external watchdog automatically shuts down and restarts the PICO irrespective of its condition ensuring there are always clear buffers. The system is unavailable for about 1 minute.


I have added a Temperature/Humidity Sensor (DHT22) as a plug in option. This needs to be mounted external to the box for obvious reasons.

The image to the left shows test output from LAN access of the PICO on my shack computer. Only the Load ANA226 is connected, hence the blank Solar readings.


The previous readings are showing the input load volts and current into a test dummy load (set low for the sake of my dummy load resistors). The latest 6:00AM, 9:00AM, Midday, 3:00PM, 6PM, 9:00PM reading replaces that from the day before to show the last 24 hours.


The top data line and temperature/humidity updates automatically every 10 seconds.


I’m still waiting on the DHT22 to be delivered. When it arrives I’ll activate the software for it. Currently there are dummy results such as:


Hut temperature 25C, humidity 60%



The PICO pinouts - same as WIFI version.

The software will run on the PICO -W or the PICO 2W

VoltageCurrent Circuit KiCad.jpg

Click image to view a larger view.


The PICO is driven with 5V provided by the LM7805 regulator. In turn the PICO provides 3V3 for its internals and also has a 3V3 output at up to 200mA to power the rest of the circuit and peripherals. By using 3V3 the problem of matched voltage levels on inputs disappears.


The PICO-2W on the right of the circuit does the majority of the work.


The PIC16F1827 or PIC16LF1827 is essentially a watchdog that controls the PICO via its RESET pin 30 (labelled RUN)

Download: Circuit  Download zip of PICO files


Download: PIC16F1827 (or PIC16LF1827 the 3V3 version). When programming, power from circuit not programmer.