Panteltje's gm_pic2 page

Panteltje's gm_pic2 page

This project is released under the GPL license, violaters will be procecuted

A solar powered Geiger Mueller radiation detector with USB RS232 interface, GPS, and logging to SDcard.
This one uses a SI-29BG GM tube.
The unit is powered from a 3.7 V Lipo battery, and has a solar cell to charge the battery.
There is a small OLED display that shows location, speed, altitude, counts per minute, battery voltage, record number, and some other settings.
An audible alarm is provided with different signals for radiation level, accumulated dose, and low battery situations.
Alarm levels can be set via RS232.
NEW: use terminal program at 4800 Bd to /dev/ttyUSB*, this uses a cheap (99 cents) ebay USB to RS232 adaptor board that also provides the power to charge the battery, eliminating the RS232 D connector and USB licensing.
There is a volume control too so you can use it silently.
The unit will still work when no GPS signal is present, then it simply logs radiation versus time (build in clock).
In case no SDcard is inserted the unit can log for more than 24 hours to its build in 24LC1025 EEPROM.

This project was build in the housing of a switch mode DC adaptor that I scrapped because of the bad RF interference in caused.
That thing was stil cheaper than a suitable project box, the OLED fits where the european AC connector was..
The solar panel is from a solar flashlight from ebay, these small solar panels are available from other sources too.
I used some of the parts of that thing, left out the radio and flashlight part.
The OLED module is ebay object number 171069574803.
Note that you have to change the solder bridges on that module so it reads 010 for I2C, its default is 8080 mode.
The HV transformer is a small 1:10 audio transformer from
I am using the 3.7 to 5 V switcher from the ebay flashlight to power a EM-411 GPS module from, and it also powers the SDcard at 3.3V via a series regulator.
The level shifting diodes at the SDcard are BAT15-099 Schottkys.
There is an on/off switch at the volume control wheel, and a select switch for GPS, when GPS is set to off, then you can talk to the unit via RS232 at 4800 Bd.
You can download the logged data via RS232, or take out the card and display the data with read_gmp_card on a PC.
Current consumption is between 80 mA when Lipo is at 4.2 V, and up to 150 mA with Lipo at 3.1 V and audio alarm on, with GPS on, about 30 mA when GPS is off, used as alarm it clock runs >20 hours on a charge
There is also a small current peak once a minute when data is written to the SDcard.
The battery (from the original flashlight) is likely 1 Ah, it runs >7 hours with GPS and GM tube on and logging,
even more if only logging to internal 24LC1025 EEPROM.
I have no high hopes of the solar cell charging the Lipo within a reasonable time except perhaps in the desert sun.
Work in progress.

I have changed the OLED reset line, and it is now permanently connected to +3.8V.
This frees up a PIC pin, and used that to add a button that when pressed cycles through display modes GPS, clock with date, and huge clock.
The OLED seems to work just fine at power up that way.
Added a display mode switch.

The circuit diagram:
gm_pic2-0.8 circuit diagram

The hardware, PCB top:
gm_pic2 PCB top

The hardware, the PCB bottom:
gm_pic2 PCB bottom

The OLED display in GPS mode:
gm_pic2 OLED display in GPS mode

What you see (looks a bit messy, protection foil I left on the OLED until final mounting), top line down, is counts per minute (big),
the alarm settings for counts per minute and accumulated counts, these flash if exceeded, sounds different alarm tones too,
latitude, (I blanked out the location (of the precious uranium ore).. and we want no drones...)
altitude, and battery voltage in millivolts (flashes if below some level, unit switches off at an even lower level), there is an audio warning possible for low battery too.
time (UTC), and heading in degrees,
the record number (next log number), and the speed in km/h.

Logging is done once per minute.

The OLED display in clock mode, with date:
OLED display in clock mode, with date

Time zone can be set, and when the blue button is pushed the GPS module is powered and the clock is synchronized to GPS,
after that the blue button can be released and the clock will keep running with programmable accuracy, to save current, extent battery life.

The OLED display in huge clock mode, for at night as alarm clock:
The OLED display in huge clock mode, for at night as alarm clock

The asm source,
note there are a lot of #defines at the top for preferred settings, for I/O assignment see further down in the source:
This asm code was assembled with gpasm-0.13.7 beta, and programmed with jppp18pi (see my website), code developed on a Raspberry Pi (ssh -Y from PC with real keyboard):

This simple C program will display the data logged on a SDcard (MMC) by gm_pic2 on a PC, compile it with gcc -Wall -o read_gmp_card read_gmp_card.c,
version 0.3 now also can display the location on google maps in firefox if you use the -m command line flag, use -h for help:

The data format
Data in the 24LC1025 EEPROM is stored in 64 byte blocks, one block per entry.
No filesystem is needed on the SDcard, I am storing inefficient by using one sector of 512 bytes at the time for a data entry.
The card will always write 512 bytes anyways, and there is no free 512 byte RAM available in the PIC.
I could have used the 24LC1025 as data buffer for 8 64 byte entries though, but even without that a 1 GB SDcard will store years of data...
So maybe some other time (would wear out EEPROM too).
In Linux on the PC you can just read sectors from the /dev/sdb or whatever and that is how read_gmp_card works,
this because in Unix (Linux) everything IS a file, even a device,
and this way I do not use a patents polluted system like MS FAT with all its overhead.

The menu when connected to RS232 at 4800Bd:
Panteltje (c) gmp-0.8

AnnnnENTER cpm alarm level, 0-65535, default 100
B beep on low battery
b no beep on low battery, default
C clock mode on
c clock mode off
DnnENTER clock alarm hour
dnnENTER clock alarm minutes
F full size clock
GnnnnnENTER no GPS clock speed, 0-65535, default 3035
h help (this)
HnnENTER hours
KnnnENTER contrast, 0-255, default 127
LnnnnENTER accumulated dose alarm ticks, 0-2147483647, default 65537
MnnENTER minutes
PnnnENTER maximum PWM value, 0-255, default 143
R reset accumulated dose
rnnnnENTER display data record nnnn
S tick on GM pulse on, default
s tick on GM pulse off
v print status
TnnENTER GM tube voltage, 0-31, check actual voltage with v, default 20
UnnnnENTER set data record pointer
WnnnnENTER write data record n, sets data pointer to n+1
X dump records from MMC if present, else from 25LC1025 EEPROM
YnnENTER time zone, -24 to +24, default 0
Z9194ENTER enter test mode, enables commands U , W and X, not saved
z disable test mode, default

It is amazing that even with the HV generator and also a switcher right next to the GPS module, plus a solar cell above it,
it still gets a fast lock (usually within a minute).

Front viev in case:
Frnt view in case

View of the other side with solar panel:
solar panel view

Slides nicely in your pocket.

Click here for some more Microchip PIC based projects

Click here for some programs I make available under the GPL.

Click here to send mail