Skip to content

Commit

Permalink
update reference
Browse files Browse the repository at this point in the history
  • Loading branch information
NuclearPhoenixx committed Dec 2, 2023
1 parent 346cbce commit 922607f
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### My device freezes or crashes periodically

Make sure that the threshold setting is not set too low! If that's the case you should see the ACTivity LED blinking heavily or even staying on solid. In this case, noise is probably overwhelming the detector and forcing it to reset.
Make sure that the threshold setting is not set too low! If that's the case you should see the ACTivity LED blinking heavily or even staying on solid. The buzzer might also give you a great indication of the correct count rate setting. In this case, noise is probably overwhelming the detector and forcing it to reset.

If this is not the case for you, reflash the firmware, reset all the settings and reboot the device. If the problem persists, please feel free to open an issue on GitHub.

Expand All @@ -22,7 +22,7 @@ If you flashed it via the Arduino IDE be sure to select `Flash Size: "2MB (Sketc

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.

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.
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.

### There is always a peak at ADC channel 0

Expand All @@ -34,6 +34,10 @@ This way, all the counts are registered, but since there is actually never a sig

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.

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

The ADC reference voltage is set to 3 Volts. Anything larger than that gets clipped, because the ADC cannot read higher voltages, meaning all pulses larger than 3V accumulate at the maximum ADC channel -- in this case 4095. That is completely normal behavior.

---

## FAQ
Expand All @@ -50,17 +54,11 @@ If you want to *just* count pulses (i.e. **not** measure pulse energy), plastic

### How do I change the gain?

Since hardware revision 3 the gain is fixed on all boards and cannot be changed without any hardware modifications. This makes it **much** easier to provide a device that has a high chance of working out of the box without much fiddling around with pot settings or additional components.

A downside of this is that different scintillator sizes, while working most of the time now, provide slightly different energy ranges and therefore bin per energy resolutions. This shouldn't be a problem, though.

If you want to change the gain for whatever reason, you can do so by changing resistor values on the board. These three resistors close to the preamp set the non-inverting gain of the board: R7, R11, R16.
Since hardware revision 3 the gain is fixed on all boards and cannot be changed without any hardware modifications. This makes it **much** easier to provide a device that has a very high chance of working out of the box without much fiddling around with pot settings or additional components.

This formula sets the voltage gain G:
A downside of this is that different scintillator sizes, while working most of the time now, provide slightly different energy ranges and therefore bin per energy resolutions. Normally, this shouldn't be a problem, though.

$$G = 1 + \frac{R7 + R11}{R16}$$

You will need 0603 size resistors with a tolerance of 1% or less if possible.
If you want to change the gain for whatever reason, you can do so by soldering the optional trim pot on the board (R20) with a [compatible pot (e.g. 5k)](https://www.lcsc.com/product-detail/Variable-Resistors-Potentiometers_BOURNS-3314J-1-502E_C58391.html). Be sure to also remove the existing 0605 resistors R7 and R11 in that case. You can then change the gain from roughly 1 to 6 on the fly.

### How do I calibrate the device?

Expand All @@ -77,3 +75,7 @@ Of course, you could use transimpedance or charge-sensitive preamplifiers, howev
If you wanted to go the maximum-performance route, you'd also need to use a different microcontroller with a much better ADC, and maybe even consider using 4-layer boards with additional ground and power planes. Essentially, you'd have to re-design the whole board at this point.

Instead of something like 8-10% energy resolution @ 662 keV (highly dependent on your SiPM/scintillator assembly), you'd then maybe get as much as 6% if you're lucky, which is the limit for most NaI or CsI scintillators anyways. That would come at a much higher cost, though. In my opinion, you get to a point of diminishing returns quickly, especially when designing an entry-level device such as this.

### Notes on different microcontrollers

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).

0 comments on commit 922607f

Please sign in to comment.