Custom Firmware for the FS2011/YT203B Geiger Counter
by gissio in Circuits > Microcontrollers
3103 Views, 17 Favorites, 0 Comments
Custom Firmware for the FS2011/YT203B Geiger Counter
I recently got an FS2011 radiation meter/Geiger counter, whose hardware is actually quite good, but has an awful firmware. So I decided to write my own, called Rad Pro. In this instructable we'll flash this custom firmware to the FS2011. It should also work with the YT-203B.
With Rad Pro, your FS2011 will be able to:
- Measure instantaneous radiation rate.
- Measure average radiation rate for performing surveys.
- Measure cumulative dose.
- Set up user-adjustable rate and dose alarms.
- Plot radiation rate history (10 minutes, 1 hour and 24 hours).
- Log data to the built-in flash memory or live on a computer, optionally sending the data to the gmcmap.com, radmon.org and safecast.org radiation monitoring websites.
- Generate true random data: secure passwords (alphanumeric, full ASCII), random hexadecimal and decimal numbers, dice throws (4-sided, 6-sided, 8-sided, 12-sided and 20-sided) and coin flips.
Supplies
To install Rad Pro on your FS2011 or YT-203B Geiger counter, you will need the following tools and components:
- An ST-LINK V2 USB dongle (or clone)
- A 4-pin header
- A Philips screwdriver
- Optional: A soldering iron and solder
- If you use Windows, the ST-LINK driver
Open the Device
Follow these steps to start installing Rad Pro:
- Turn off the device.
- Remove the battery cover and batteries.
- Remove the screws holding the back case and open the device.
The board should look like in the photos above (the tube may be different). If it does not, you may have a different hardware revision. In this case, Rad Pro may not function properly.
If your board looks different and Rad Pro does not work, create an issue.
Connect the Programmer
Now, follow these steps:
- Optional: Solder the 4-pin header to the XS1 pads of the board.
- If you use Windows, install the ST-LINK driver.
- Connect the ST-Link V2 device to the XS1 pads. The pins, from top to bottom, are:
- GND
- SWCLK
- SWDIO
- +3.3V
Make sure the electrical connections are correct. You may break your device if the connections are not correct.
Flash the Firmware
Now, download the latest radpro-flashtool from the Rad Pro releases.
- Tp install from Windows, go to the fs2011 folder and start fs2011-[mcu]-[type].bat.
- To install from macOS or Linux, go to the fs2011 folder and start fs2011-[mcu]-[type].sh.
[mcu] is the type of microprocessor on your board: stm32f051c8, gd32f150c8 or gd32f103c8.
[type] is the type of installation: install or update. Note that not all releases support updating.
The installation will automatically create a backup of the original firmware in the backup folder, so you can recover your device if something goes wrong. Make sure you keep the backups safe, so you can always return to the original firmware. To flash a backup, drag it onto fs2011-[mcu]-install.bat (Windows) or fs2011-[mcu]-install.sh (macOS/Linux).
Before closing the device, take note of the type of Geiger tube: the markings on the glass should be either J321, J305, M4011 or J614. If you have an unmarked tube measuring 55 or 65 mm long, you probably have a J614 or J613 tube, respectively.
Configure Your Device
Start your device and go to Rad Pro's settings, select “Geiger tube”, “Conversion factor”, and select the option that matches the Geiger-Müller tube installed in your device.
Within the “Geiger tube” settings, select “HV Profile” and choose an appropriate HV profile: “Energy-saving” is best for measuring background levels of radiation, while “Accuracy” consumes more power but allows measurement of higher radiation levels; “Factory default” is the profile from the original firmware and consumes considerably more power.
Last, read the user's manual for learning how to use Rad Pro.
Optional Mods
- Add USB connectivity. You'll need: an 3.3 V USB serial converter and wire-wrap. Important: do not use batteries when powering from USB. Follow these instructions:
- Set up the serial converter for 3.3 V.
- Connect the serial converter's GND and 5V pins to the FS2011 board's 0V and 5V pads, respectively.
- Connect the PA2 pin of the microprocessor to the serial converter's RX pin.
- Connect the PA3 pin of the microprocessor to the serial converter's TX pin.
- Add a vibrator (which you can recycle from an old cellphone). Solder it to the output of the Q5 transistor.
- For easier access to XS1, use a file to extend the hole for the battery holder clip so that a 4-pin header connector can fit. Solder four cables between XS1 and the 4-pin header. Using a glue gun, attach the header to the inside of the back case, so you can access the header with the battery case open.
- On some FS2011 devices, the tube is not aligned to the holes of the back case. For improved measurement, align the tube to the holes using a heat gun/glue gun. Be careful, as the tube's glass is very delicate.
- Some AA rechargeable batteries have low-profile caps that don't make electrical contact with the battery holder. Fix this problem by applying solder on the battery holder's pads.
- To increase the buzzer's volume, drill holes on the back case, in front of the buzzer.
Get Involved
If you like Rad Pro, consider watching the project to get notified when new releases are out. Also, show your support by starring the project on GitHub.
Hardware Specific Notes
The keys are mapped as follows:
- Power on/off: long hold of the power key.
- Switch measurement mode: the up and down keys.
- Switch measurement secondary view: the play/pause or power key.
- Reset measurement: long hold of the play/pause key.
- Enter settings: the menu/ok key.
- Go up/down: the up and down keys.
- Select option: the menu/ok or power key.
- Go back: the play/pause key.
On the FS2011, Rad Pro can store up to 27351 data points. At normal radiation levels (20 cpm), this allows for 569 days of data at 60-minute intervals, 94 days at 10-minute intervals, almost 19 days at 1-minute intervals, 3 days at 10-second intervals and 7 hours at 1-second intervals.
The FS2011 includes two Zener diodes that limit the maximum voltage to 440 V (nominal).
The FS2011 HV profile settings are:
- Factory default: 40 kHz frequency and 50% duty cycle.
- Accuracy: 2.5 kHz frequency and 6.5% duty cycle.
- Energy-saving: 2.5 kHz frequency and 3.0% duty cycle.