• Tag Archives arduino
  • Trinket powered geiger counter

    Lately I have been messing around a bit with microprocessor powered geiger counters. One smart guy came up with the idea of generating high voltage using PWM signals from the microprocessor itself. With some additional external parts a HV supply and negative going pulse suitable for microprocessors is easy to make. Here is a schematic I came up with:

    gm counter interface

    The circuit works as follows: A ~1 Khz squarewave turns the MPSA44 high voltage transistor on and off, generating high voltage when the  inductors current is shut off. The voltage depends on the pulse width of the square wave which can be tweaked in software. The 1N4007 diode rectifies this voltage, and the HV cap removes most of the ripple on this voltage. The resistor limits current to the GM tube. The current pulses from the tube generate a voltage drop over the 100K resistor which turns on the BC546. When this happens the voltage through the 10K resistor is pulled to ground, generating a negative going pulse each time the GM tube detects an ionizing ray or particle.

    To drive this circuit I used my new Adafruit Trinket, a small board with a Attiny85 microprocessor. Using the tutorials on the Adafruit website it is easy to work with from the Arduino environment. Here is the code:

    void setup() {
     analogWrite(0, 30); //starts PWM on pin 0, generates about 400V
     analogWrite(1, 255); // needed to get LED to full brightness
     attachInterrupt(0,countPulse,FALLING); // attach interrupt to pin 2
     }
    void loop() {
     //nothing much really
     }
    void countPulse(){
     //pulse led
     digitalWrite(1, HIGH);
     delay(100);
     digitalWrite(1,LOW);
     }

    And here is a video of the setup in use:

     

    Of course it is rather wasteful to only use the microprocessor to generate PWM and flash a LED. I plan on implementing counting and serial output in software later. Unfortunately the Trinket does not have native serial USB capability but bit banging a serial signal on one of the pins should work fine according to several sites. Then it is just a matter of adding a cheap PL2303 serial to USB adapter.

    Update 18/4/2014

    Added serial logging capability. Using a tx only software serial library, the Trinket outputs the measurements in CPM each 10 seconds on pin 4. New code:

    // Trinket GM counter by Johan/dynode.nl
    
    //counting vars
    long count = 0;
    long countPerMinute = 0;
    
    // init softserial only tx on pin 4
    #include <SendOnlySoftwareSerial.h>
    SendOnlySoftwareSerial mySerial (4);
    
    void setup() {
      mySerial.begin(9600); // init serial 9k6
      analogWrite(0, 30); //starts PWM on pin 0, generates about 400V
      analogWrite(1, 255); // needed to get LED to full brightness
      attachInterrupt(0,countPulse,FALLING); // attach interrupt to pin 2
      mySerial.println ("Trinket GM counter starting..."); 
    }
    
    void loop() {
      delay(10000); //the count is incrementing during this delay
      countPerMinute = 6 *count;
      mySerial.println (countPerMinute);
      count=0; //reset the count
    }
    
    void countPulse(){
        count++;
        //pulse led when count is increased
        digitalWrite(1, HIGH);
        delay(100);
        digitalWrite(1,LOW);
      }

    Example serial output using cheap eBay USB<>TTL serial adapter:

    Trinket GM counter starting...
    84
    12
    6
    0
    402        <--- thorium bearing mantle held next to GM tube
    996
    1218
    1146
    1074
    1104
    
    

    There still need to be some tweaking done, the circuit is quite susceptible to electromagnetic interference which causes erroneous counts.


  • Arduino environment monitor

    Above is a picture of my recently (practically ) finished project. It is a sort of weather station which measures light, temperature, relative humidity, atmospheric pressure, and of course radioactivity!

    The core of this setup is the excellent DIY Geiger Counter PCB by [Brohogan]. This kit is a geiger counter circuit combined with a standalone Arduino circuit. Most people buy this kit, connect an LCD and put it in a nice box. Because the Atmega328 pins are broken out via handy pin sockets it is very easy to connect any additional components and/or sensors to this PCB. Continue reading  Post ID 1377


  • Some tech frustrations

    Just some venting,

    Why on earth is every interesting technical discussion forum on Yahoo Groups? I absolutely loathe its design. When requesting the main forum it presents you with unthreaded, ungrouped messages by date. To group messages by thread you have to click a link, and even then you have to click each message separately just to view it. It’s 2012 damnit, stupid threaded message boards should be a thing of the past! Continue reading  Post ID 1377


  • Arduino/Cacti Geiger counter update

    My online geiger counter which I described earlier has been offline for some time. During that time I experimented with a standalone Arduino with the goal of making a dedicated board for the setup. I have now completed the board shown in the picture below.

    In the picture you can see the HV generator on the top of the board, on the lower left the Arduino standalone parts along with a MAX232 as a level converter for easy serial hookup and on the right two tubes connected in parallel, a SI-29BG (beta and gamma) and a SI-12B for added alpha sensivity. Also shown are the USB>Serial adapter and a separate USB connector to provide 5V to the board. Continue reading  Post ID 1377


  • Online geiger counter using Arduino and Cacti

    I have always had an above average interest in radioactivity.  It’s a subject with political, sociological and scientific aspects. I have been mostly interested in the scientific part, but I also closely follow any news and other developments. With the earthquake in Japan and the following nuclear disaster the discussion about nuclear energy has  been fired up after being quite silent for years. In the Netherlands there was talk about building a new reactor next to the existing plant in Borssele. Well, I guess it will be a bit harder now to get support for this plan…

    To be honest, watching the developments with the damaged reactors in Japan got me thinking again. Is nuclear energy a proper way of generating electricity? Sure,  for the immediate surroundings it is very clean. There are virtually no CO2 emissions and with proper shielding and maintenance you’ll need some pretty advanced equipment to measure any radioactivity coming from a reactor. Still, uranium mining is not very nice for the environment and there is no clear solution for storage of waste. And, if a reactor malfunctions there is the possibility of widespread contamination as currently seen in Japan. So, while I am not against nuclear energy my support for it has weakened somewhat.

    Anyway, enough rambling, how to monitor radiation with your computer!

    Update 18/4: Guess I am not the only one doing some monitoring: http://radgoes.blogspot.com

     

    Continue reading  Post ID 1377