Skip to content

Commit 6fd36e1

Browse files
update README for Pico 2
1 parent 9e25cb4 commit 6fd36e1

4 files changed

Lines changed: 51 additions & 52 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
---
66

7-
**This is the latest hardware revision 4.1. For older revisions, please have a look at the [other branches](https://github.com/OpenGammaProject/Open-Gamma-Detector/branches). A comparison between the 4.0 and 3.x hardware can be found [here](https://hackaday.io/project/185211-all-in-one-gamma-ray-spectrometer/log/225597-revision-40-status-report).**
7+
**This is the latest hardware revision 4.2 using the Pico 2! For older revisions, please have a look at the [other branches](https://github.com/OpenGammaProject/Open-Gamma-Detector/branches). A comparison between the 4.0 and 3.x hardware can be found [here](https://hackaday.io/project/185211-all-in-one-gamma-ray-spectrometer/log/225597-revision-40-status-report).**
88

99
**This project is also on [Hackaday.io](https://hackaday.io/project/185211-all-in-one-gamma-ray-spectrometer), where I post important project updates and other announcements!**
1010

@@ -32,19 +32,19 @@ Here are some of the most important specs:
3232
- Can use SiPMs in the voltage range of 27.5 V to 33.8 V.
3333
- 4096 ADC channels with built-in 3 V voltage reference.
3434
- Energy resolution of up to 7% @ 662 keV possible; highly dependent on your SiPM/scintillator assembly.
35-
- Energy Mode: ~20 µs total dead time while measuring energy (default settings).
36-
- Geiger Mode: <5 µs total dead time without energy measurements (default settings).
37-
- Low power consumption: ~20 mA @ 5 V with default firmware at normal background.
35+
- Energy Mode: ~10 µs total dead time while measuring energy (default settings).
36+
- Geiger Mode: ~1 µs total dead time without energy measurements (default settings).
37+
- Low power consumption: ~15 mA @ 5 V with default firmware at normal background.
3838
- Built-in ticker (buzzer) for audible pulse count rate output.
3939
- Additional broken-out power pins and I2C, SPI and UART headers for custom parts (e.g. display, µSD card, etc.).
4040
- Simple OLED support out of the box (SSD1306 and SH110x).
4141
- Built-in True Random Number Generator.
4242

4343
## How To Get One
4444

45-
- For quick access and purchase of all the parts (PCB and BOM), you can use [Kitspace](https://kitspace.org/boards/github.com/opengammaproject/open-gamma-detector/) (may be outdated!).
45+
- For quick access and purchase of all the parts (PCB and BOM), you can use [Kitspace](https://kitspace.org/boards/github.com/opengammaproject/open-gamma-detector/) (**may be outdated!**).
4646
- Otherwise, use a PCB manufacturer and an electronics distributor of your choice and proceed on your own. All the files you'll need can be found in this repo.
47-
* If you don't want to deal with all of that, feel free to contact me. Just send me an e-mail if you want and we'll figure something out.
47+
- If you don't want to deal with all of that, feel free to contact me. Just send me an e-mail if you want and we'll figure something out.
4848

4949
**You will also need to buy a SiPM (e.g. the MICROFC-60035-SMT-TR) and scintillator (NaI(Tl) recommended) separately at a distributor of your choice.** You might also want to grab one of the countless SiPM breakout boards I made.
5050

@@ -62,9 +62,9 @@ Detailed information about the hardware of the detector as well as the potentiom
6262

6363
## Software
6464

65-
The software aims to be as simple as possible to understand and maintain. To achieve this I decided to use an off-the-shelf microcontroller - the [Raspberry Pi Pico](https://www.raspberrypi.com/products/raspberry-pi-pico/). This board can be programmed with the Arduino IDE over micro-USB and is powerful (dual core, fast ADC, plenty of memory, ...) enough for the purpose and also exceptionally cheap.
65+
The software aims to be as simple as possible to understand and maintain. To achieve this I decided to use an off-the-shelf microcontroller - the [Raspberry Pi Pico 2](https://www.raspberrypi.com/products/raspberry-pi-pico-2/). This board can be programmed with the Arduino IDE over micro-USB and is powerful (dual core, fast ADC, plenty of memory, ...) enough for the purpose and also exceptionally cheap.
6666

67-
To program the Pico and/or play around with the firmware, head to the [software directory](/software/). There you will also find documentation on the serial interface (!), display support, and much more.
67+
To program the Pico 2 and/or play around with the firmware, head to the [software directory](/software/). There you will also find documentation on the serial interface (!), display support, and much more.
6868

6969
## Troubleshooting and FAQ
7070

@@ -114,7 +114,7 @@ Spectrum (1h) of a small batch of Lutetium(III) oxide. It contains Lu-176 just l
114114

115115
## Known Limitations
116116

117-
1. The Raspberry Pi Pico's ADC has some pretty [severe DNL issues](https://pico-adc.markomo.me/INL-DNL/#dnl) that result in four channels being much more sensitive (wider input range) than the rest. For now the simplest solution was to discard all four of them, by printing a `0` when any of them comes up in the measurement (to not affect the cps readings). You can turn this behavior off by using the `set correction` command. This is by no means perfect or ideal, but it works for now until this gets fixed in a later hardware revision of the RP2040 (wish us luck!).
117+
1. ~~The Raspberry Pi Pico's ADC has some pretty [severe DNL issues](https://pico-adc.markomo.me/INL-DNL/#dnl) that result in four channels being much more sensitive (wider input range) than the rest. For now the simplest solution was to discard all four of them, by printing a `0` when any of them comes up in the measurement (to not affect the cps readings). You can turn this behavior off by using the `set correction` command. This is by no means perfect or ideal, but it works for now until this gets fixed in a later hardware revision of the RP2040 (wish us luck!).~~ Fixed by the Pico 2!
118118
2. The power supply is **not** temperature corrected itself, meaning changes in the ambient temperature with a constant voltage affect the gain of the SiPM. This will naturally result in a different DC bias, energy range and S/N ratio. This effect is negligible around room temperature, though. The temperature dependence of the gain is -0.8%/°C (21°C) for the MicroFC SiPMs. **The latest [MicroFC SiPM carrier board](https://github.com/OpenGammaProject/MicroFC-SiPM-Carrier-Board) has automatic temperature compensation on-board however! So use that if you want to get the best performance out of it.**
119119

120120
## Some Ideas

REFERENCE.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ If this isn't the case for you and it doesn't get recognized at all (even while
1616

1717
### Settings on the device are not saved
1818

19-
If you flashed it via the Arduino IDE be sure to select `Flash Size: "2MB (Sketch: 1984KB, FS: 64KB)"`. Without these 64 KB of flash assigned to the file system, the Pico is unable to create and save a settings file.
19+
If you flashed it via the Arduino IDE be sure to select `Flash Size: "4MB (Sketch: 1MB, FS: 3MB)"`. Without these 64 KB of flash assigned to the file system, the Pico is unable to create and save a settings file.
2020

21-
### I am seeing a sharp peak immediately around ADC channel 511
21+
### ~~I am seeing a sharp peak immediately around ADC channel 511~~
2222

23-
That is right, this is due to the DNL issues with the RP2040 ADC as described in the [Known Limitations](README.md#known-limitations) section of the readme.
23+
~~That is right, this is due to the DNL issues with the RP2040 ADC as described in the [Known Limitations](README.md#known-limitations) section of the readme.~~
2424

25-
This effect would have been much worse without some simple corrections in the firmware. Since there is currently no hardware fix, this is what we have to live with unfortunately. If you know about it, you can just ignore it since all the *real* peaks of the scintillator are much wider than that.
25+
~~This effect would have been much worse without some simple corrections in the firmware. Since there is currently no hardware fix, this is what we have to live with unfortunately. If you know about it, you can just ignore it since all the *real* peaks of the scintillator are much wider than that.~~ Fixed by the Pico 2.
2626

27-
### There is always a peak at ADC channel 0
27+
### ~~There is always a peak at ADC channel 0~~
2828

29-
That is intentional behavior of the device. For the same reason as above, four ADC channels are ignored for the energy measurement.
29+
~~That is intentional behavior of the device. For the same reason as above, four ADC channels are ignored for the energy measurement.~~
3030

31-
Since this would potentially highly influence the count rate, giving lower values than there actually are, these counts are added back to the spectrum to ADC channel 0.
31+
~~Since this would potentially highly influence the count rate, giving lower values than there actually are, these counts are added back to the spectrum to ADC channel 0.~~
3232

33-
This way, all the counts are registered, but since there is actually never a signal near channel 0, you can clearly distinguish between the "right" spectrum and the rest.
33+
~~This way, all the counts are registered, but since there is actually never a signal near channel 0, you can clearly distinguish between the "right" spectrum and the rest.~~
3434

35-
If you want to disable this behavior, you can do so by using the `set correction` command over the serial interface. This will still omit the ADC channel readings, but won't create another peak at 0. In geiger mode, there will always only be a channel `0` since this is how the current cps is calculated.
35+
~~If you want to disable this behavior, you can do so by using the `set correction` command over the serial interface. This will still omit the ADC channel readings, but won't create another peak at 0. In geiger mode, there will always only be a channel `0` since this is how the current cps is calculated.~~ Fixed by the Pico 2.
3636

3737
### There is always a peak near ADC channel 4095
3838

@@ -78,4 +78,4 @@ Instead of something like 8-10% energy resolution @ 662 keV (highly dependent on
7878

7979
### Notes on different microcontrollers
8080

81-
The Pico is readily available virtually everywhere and it's really cheap. This makes it ideal for use in this kind of "simple" and cheap project. There are a couple of reasons I like to use it. You can read more about it in the [discussions thread about switching to the ESP32](https://github.com/OpenGammaProject/Open-Gamma-Detector/discussions/43).
81+
The Pico 2 is readily available virtually everywhere and it's really cheap. This makes it ideal for use in this kind of "simple" and cheap project. There are a couple of reasons I like to use it. You can read more about it in the [discussions thread about switching to the ESP32](https://github.com/OpenGammaProject/Open-Gamma-Detector/discussions/43).

hardware/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Here are some very helpful in-depth datasheets about the particular MicroFC SiPM
1919

2020
The hardware consists of the main detector (hardware in this folder) which includes amplification, pulse detection and energy measurement. If you already have a SiPM/crystal assembly compatible with voltages around 30 V, you may use it with the detector board and connecting wires directly to the correct pads. Otherwise, you can use my [SiPM carrier board](https://github.com/OpenGammaProject/MicroFC-SiPM-Carrier-Board), which holds the SiPM and all the optional decoupling as well as a temperature compensation circuit for the SiPM. There is also a carrier board for the Broadcom SiPM.
2121

22-
The heart of the detector board is the Raspberry Pi Pico which uses its ADC to measure the pulse amplitude (i.e. the energy) immediately after an event occurs starting with an interrupt. I can really recommend you reading the datasheet or maybe also having a look at a deeper analysis of the Pico ADC, if you're interested:
22+
The heart of the detector board is the Raspberry Pi Pico 2 which uses its ADC to measure the pulse amplitude (i.e. the energy) immediately after an event occurs starting with an interrupt. I can really recommend you reading the datasheet ~~or maybe also having a look at a deeper analysis of the Pico ADC~~ (only relevant to Pico 1), if you're interested:
2323

24-
* [Raspberry Pi Pico](https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf)
25-
* [Characterizing the Raspberry Pi Pico ADC](https://pico-adc.markomo.me/)
24+
* [Raspberry Pi Pico 2](https://datasheets.raspberrypi.com/pico/pico-2-datasheet.pdf)
25+
* ~~[Characterizing the Raspberry Pi Pico ADC](https://pico-adc.markomo.me/)~~ (only relevant to Pico 1)
2626

2727
Here are some front and back side renders of the detector PCB. Size is about 120 x 50 mm. If you don't need the additional space to mechanically mount the SiPM/scintillator assembly to the rest of the detector board, you can just cut it off at the white line and you're left with an even smaller detector.
2828

@@ -32,23 +32,23 @@ Here are some front and back side renders of the detector PCB. Size is about 120
3232

3333
On the back side of the PCB there is also a jumper to connect the analog ground to the rest of the ground plane. You can solder that if you want to and you know exactly what you're doing. It's not needed, though, that's why it's open by default.
3434

35-
There are also broken-out pins for the power supply, I2C, SPI and UART connections. These can be used to modify the device, e.g. by adding a display or using a battery charger. You can have a look at the great [Raspberry Pi Pico datasheet](https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf) for more info on this.
35+
There are also broken-out pins for the power supply, I2C, SPI and UART connections. These can be used to modify the device, e.g. by adding a display or using a battery charger. You can have a look at the great [Raspberry Pi Pico 2 datasheet](https://datasheets.raspberrypi.com/pico/pico-2-datasheet.pdf) for more info on this.
3636

3737
Some more info on the peripheral headers can be found in the `software` section of this project.
3838

3939
## Pinout
4040

4141
![Header Pinout](../docs/pinout.png)
4242

43-
You can also put a little jumper from `VBUS` to `VSYS` if you **only** want to use the detector with the USB connection on the Pico. This bridges the diode on the Raspberry Pi Pico and saves you a couple of mW.
43+
You can also put a little jumper from `VBUS` to `VSYS` if you **only** want to use the detector with the USB connection on the Pico. This bridges the diode on the Raspberry Pi Pico 2 and saves you a couple of mW.
4444

4545
As for the **SiPM connections**, there is a female 2.54mm pin header on the board and also two MCX jacks. The pin headers are just a very easy way to get everything up and running and are fine if you're not really touching them and the scintillator is mounted very close to the header (i.e. on the PCB).
4646

4747
If you want to have a more secure and more importantly shielded way of connecting the SiPM, use MCX cables and the corresponding jacks on the board. There are special MCX breakout cables that have the connectors on one end and then terminate to some stranded copper wire on the other side. You can use this to solder the cable directly to the SiPM breakout board and then have the plug on the other side. However, because you need two cables (one for power and one for signal), be sure to keep them as close together as possible (e.g. twist them together) as to not create a huge ground loop area.
4848

4949
## Potentiometers
5050

51-
Here is a helpful image about the potentiometer settings for revision 4.0:
51+
Here is a helpful image about the potentiometer settings for revision 4.x:
5252

5353
![Potentiometer Controls](../docs/controls.png)
5454

@@ -58,7 +58,7 @@ As you can see it is pretty simple to set the required voltage and threshold. **
5858

5959
There are two buttons on the device:
6060

61-
* A small one on the Raspberry Pi Pico itself that is only used to reboot the device into bootloader mode. This is handy if you want to change or update the firmware of the device.
61+
* A small one on the Raspberry Pi Pico 2 itself that is only used to reboot the device into bootloader mode. This is handy if you want to change or update the firmware of the device.
6262
* A larger one next to the Pico that is used to toggle between spectrum and Geiger mode by **short-pressing** (<1 second) and toggling the buzzer by **long-pressing** (>=1 second) it.
6363

6464
![Potentiometer Controls](../docs/buttons.jpg)
@@ -79,8 +79,8 @@ Two sources of new NaI(Tl) scintillators are:
7979

8080
| Brand | Location | Comment |
8181
|-------|----------|---------|
82-
|[OST - Photonics](https://www.ost-photonics.com/products/scintillation-crystal/encapsulated-scintillator/standard-type-naitl-scintillator/)| China | Can purchase directly from website |
83-
| [Epic-Crystal](https://www.epic-crystal.com/) | China | Also sold by [GammaSpectacular](https://www.gammaspectacular.com/)
82+
| [OST - Photonics](https://www.ost-photonics.com/products/scintillation-crystal/encapsulated-scintillator/standard-type-naitl-scintillator/) | China | Can purchase directly from website |
83+
| [Epic-Crystal](https://www.epic-crystal.com/) | China | Also sold by [GammaSpectacular](https://www.gammaspectacular.com/) |
8484

8585
**Since this is a fixed-gain device, I can only highly recommend you to get a scintillator that fits on the PCB and is of a comparable volume as the scintillators I tested.** I am using an 18 x 30 mm crystal for most of the spectra that you can see here and it works great. Also, due to the small size of the SiPM in comparison to the scintillator opening, try to use narrower crystals than wider ones if you can. That way, there aren't many light losses to the SiPM. In general, just be sure the volume/size is not orders of magnitue larger or smaller. If that's not possible, consider using the array board. **The array board works great with a 1" x 1" NaI(Tl) with this detector for example. There is also an optional trim pot for the gain on the Rev. 4 boards that you can solder and use to change the preamp gain.**
8686

@@ -139,12 +139,12 @@ The four screw holes on the PCB's actual detector part are connected to the circ
139139

140140
As some level of protection against EMI, the peak and hold capacitor is periodically discharged as to avoid it being charged ever so slightly by interference and the feedback path. This takes place every millisecond by default and cannot be switched on or off via a serial command. This adds less than 1% of additional dead time (~2.5 µs per reset every ms), so should be completely negligible.
141141

142-
## Raspberry Pi Pico W
142+
## Raspberry Pi Pico 2 W
143143

144-
Since the Pico W has functionally the exact same size and pinout, it can be a trivial replacement for the standard Pico. This can be a great place to start experimenting with connecting to the Open Gamma Detector via Bluetooth or WiFi, there are endless possibilities what you can do with that.
144+
Since the Pico 2 W has functionally the exact same size and pinout, it can be a trivial replacement for the standard Pico 2. This can be a great place to start experimenting with connecting to the Open Gamma Detector via Bluetooth or WiFi, there are endless possibilities what you can do with that.
145145

146-
If you switch to the Pico W, though, you will need to modify the stock firmware slightly since internal pins like the input voltage pin are changed.
146+
If you switch to the Pico 2 W, though, you will need to modify the stock firmware slightly since internal pins like the input voltage pin are changed.
147147

148-
There is also no firmware build for the Pico W and I don't plan to make one in the near future, since I'm busy enough with the stock firmware, hardware and Gamma MCA, to start building yet another Bluetooth- or WiFi-connected app or whatever.
148+
There is also no firmware build for the Pico 2 W and I don't plan to make one in the near future, since I'm busy enough with the stock firmware, hardware and Gamma MCA, to start building yet another Bluetooth- or WiFi-connected app or whatever.
149149

150150
I'll happily accept PRs if you make something like that, though, so let me know! ;)

0 commit comments

Comments
 (0)