RISC OS and GPS
What's on show?
At the show I'll be exhibiting the latest version of my SatNav application now running in a 4″ x 3″ x 1½″ box with a small internal battery which can float charge itself if an external battery or other 5V power source is attached. Although I will have a monitor connected to this device at the show showing a full RISC OS desktop with both SatNav and RiscOSM running, the unit is designed to provide sufficient information on an OLED display and an electronic-ink display.
The box is now pocket-sized.
A trip from Bristol to Milton Keynes was recorded using SatNav in GPX format and then passed to RiscOSM for analysis. The logging included information in the format below:
<trkpt lat="51.48479185" lon="-2.612334261"><time>2017-10-06T09:18:18.56Z</time><extensions><satnav:odo>2183</satnav:odo><satnav:dxy>10/26</satnav:dxy></extensions></trkpt>
<trkpt lat="51.48522501" lon="-2.611908333"><time>2017-10-06T09:18:29.00Z</time><extensions><satnav:odo>2240</satnav:odo><satnav:dxy>29/48</satnav:dxy></extensions></trkpt>
Development
The development of this project has been described in Archive magazine:
- Part 1 (Archive 24:2) described a Raspberry Pi that could be carried around: instead of a mouse and monitor it had a touchscreen that just plugged in to the HDMI and USB sockets. It had a GPS module sending position data to the mapping application RiscOSM by means of URI_Dispatch messages generated by my !Satnav application.
- Part 2 (Archive 24:3) described version 1.08 of Satnav, which could control a small text display or an OLED display and could talk to RiscOSM using Wimp messages.
- Part 3 (planned for Archive 24:4) adds a Witty Pi for control of power consumption. Satnav is at version 1.40 and can control an ‘electronic ink’ display (PaPiRus).
The power boost board allows an internal 3.3V LiPo battery to be float charged by an external 5V powerbank or mains adapter. It produces an output of 5.2V from either the internal battery (3.3V) or the external power supply (5V), whichever is the higher voltage and will float charge the internal battery from the external source. If the internal battery becomes discharged or the external ENABLE line goes low, the unit will turn off.
The power control circuitry on the ProtoPAL board. The ‘on’ and ‘off’ buttons cause q and /q to change state. The ‘on’ button forces /q to go high (provided the ‘off’ button is open circuit, q will then stay low forcing ENABLE high). This turns on the power. During the boot process GPIO 4 is set to active output high. Holding the ‘on’ button down causes GPIO 19 to be low (which can be read by software, for example to download the log) and will light the LED if Vs is 5V - i.e. if there is an external power supply connected.
The ‘off’ button forces q to go high (provided the ‘on’ button is open circuit, /q will then stay low, which can be read in software via GPIO 26). With q high, this allows GPIO 4 to control the ENABLE signal: unless GPIO 4 is active output high, ENABLE will go low, turning off the power.
Once the ‘off’ button has been pressed, GPIO 26 will remain low, will be read by software, logging will be completed, the displays updated and a shutdown/restart cycle will be initiated. This updates the CMOS ‘last on’ time so that any subsequent start up will be with a time and date no earlier than this. The restart cycle resets the ROM modules, returning GPIO 4 to inactive and thus removes the power.
Making the breakout board is a bit fiddly. The first step is to wire up the board and test for shorts:
then carefully solder on the 74HC00 chip:
The ProtoPAL board now plugs onto a Pi model A+ and has a header for a PaPiRus display. Five flying leads, plus power and ground, are then soldered as in the diagram below:
the wiring diagram for the ProtoPAL board.