Geiger counter settings
Moderators: grovkillen, Stuntteam, TD-er
Geiger counter settings
Please help to connect Geiger counter to NodeMCU v3 with ESPEasy Mega.
I use noname Geiger counter with 5v logic, logic convertor and NodeMCU v3.
Schema
Geiger counter ----- Converter ----- NodeMCU
GND ------------------ GND | GND --- GND
5V -------------------- 5V | 3,3V ------ 3,3V
VIN ------------------- A4 | B4 --------- D3
There is no any counts in Device page.
I tryed different Debounce Time and Mode Type settings.
Geiger counter is work fine with Arduino Uno.
I use noname Geiger counter with 5v logic, logic convertor and NodeMCU v3.
Schema
Geiger counter ----- Converter ----- NodeMCU
GND ------------------ GND | GND --- GND
5V -------------------- 5V | 3,3V ------ 3,3V
VIN ------------------- A4 | B4 --------- D3
There is no any counts in Device page.
I tryed different Debounce Time and Mode Type settings.
Geiger counter is work fine with Arduino Uno.
- Attachments
-
- Снимок5.PNG (9.98 KiB) Viewed 19037 times
-
- Снимок4.PNG (25.72 KiB) Viewed 19037 times
-
- Снимок3.PNG (116.15 KiB) Viewed 19037 times
-
- Снимок2.PNG (222.18 KiB) Viewed 19037 times
-
- Снимок.PNG (511.71 KiB) Viewed 19037 times
Re: Geiger counter settings
Can anybody help?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Geiger counter settings
Have you tried any other mode except "LOW"?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Geiger counter settings
100 msec debounce time does sound a bit long.
I can imagine the pulses of this Geiger counter are short, maybe a bit too short for the ESP to detect properly.
You could add a flipflop in between the ESP and the Geiger counter. Then every blip will trigger a status switch on the flipflop output, which will result in a up- or low-level period which is a lot longer.
Every detected level change reflects a count.
I can imagine the pulses of this Geiger counter are short, maybe a bit too short for the ESP to detect properly.
You could add a flipflop in between the ESP and the Geiger counter. Then every blip will trigger a status switch on the flipflop output, which will result in a up- or low-level period which is a lot longer.
Every detected level change reflects a count.
Re: Geiger counter settings
hi,
i have the same project : connect a cheap Geiger counter to Domoticz with a wemos and Espeasy on it .
Did you finally found a solution to connect them together ? and want to share it ?
thanks a lot
Belgo
i have the same project : connect a cheap Geiger counter to Domoticz with a wemos and Espeasy on it .
Did you finally found a solution to connect them together ? and want to share it ?
thanks a lot
Belgo
Re: Geiger counter settings
hi to all,
Finally i dont find anything already done and then i'll make it myself
i use a Wemos ( ESP 8266) , a cheap geiger counter with J305 tube and a LCD 4 X 20 chars.
the ESP send data to Domoticz with JSON http instruction.
here the result .
on domoticz:
see you
Belgo
Finally i dont find anything already done and then i'll make it myself
i use a Wemos ( ESP 8266) , a cheap geiger counter with J305 tube and a LCD 4 X 20 chars.
the ESP send data to Domoticz with JSON http instruction.
here the result .
on domoticz:
see you
Belgo
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Geiger counter settings
That is really cool! Thanks for sharing.
Please enlighten us with more info on the setup.
Please enlighten us with more info on the setup.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Geiger counter settings
i'll try to take a little time to make a schematics and share my code ..
there is some little bugs to correct , i am not a good coder
but someone else could probably help me to fine tune it
see you soon
Belgo
there is some little bugs to correct , i am not a good coder
but someone else could probably help me to fine tune it
see you soon
Belgo
Re: Geiger counter settings
Hi all ,
here the schematics of my geiger counter to Domoticz .
the code will follow
Belgo
here the schematics of my geiger counter to Domoticz .
the code will follow
Belgo
Re: Geiger counter settings
here is my code .
they a re probably some bugs on it but it's working ..
if someone wants to improve it, plz share your modification with the community .
i am waiting your feedback
Belgo
/*************ARDUINO SKETCH FOR GEIGER COUNTER******************
Author: Belgo
*****************************************************************
This sketch was writen for geiger counter cajoe to send data to domoticz ( json http )
*****************************************************************
LCD I2C Connection:
LCD SDA -> D5
LCD SCL -> D6
VCC to +5V and ground
USB powered
V-in geiger counter to D2 pin from nodemcu
****************************************************************/
// include the library code:
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#define LOG_PERIOD 15000 //Logging period in milliseconds, recommended value 15000-60000.
#define MAX_PERIOD 60000 //Maximum logging period without modifying this sketch
#define PERIOD 60000.0 // (60 sec) one minute measure period
// Conversion factor - CPM to uSV/h
#define CONV_FACTOR 0.00812
const char* ssid = "your_ssid_wifi";
const char* password = "your_wifi_password";
const char* host = "192.168.1.100"; // ip of your domoticz server
const int port = 8080; // ip port of your domoticz server
const int watchdog = 60000; // Fréquence d'envoi des données à Domoticz - Frequency of sending data to Domoticz
//unsigned long previousMillis = millis();
volatile unsigned long CNT; // variable for counting interrupts from dosimeter
unsigned long counts; //variable for GM Tube events
unsigned long cpm; //variable for CPM
unsigned int multiplier; //variable for calculation CPM in this sketch
unsigned long previousMillis; //variable for time measurement
unsigned long dispPeriod; // variable for measuring time
unsigned long CPM; // variable for measuring CPM
float radiationValue = 0.0;
const int inputPin = 4; // pin D2 is VIN on geiger counter
// initialize the library with the numbers of the interface pins
LiquidCrystal_I2C lcd(0x27,16,2);
HTTPClient http;
void setup() { // setup
Wire.begin(D5,D6); // pins SDA and SCL of your i2c LCD screen
Serial.begin(115200);
lcd.begin(20, 4);
lcd.backlight();
lcd.home();
lcd.setCursor(3, 0); // Move the cursor at origin
lcd.print("Geiger Counter");
lcd.setCursor(0, 2);
lcd.print("CPM = ");
lcd.setCursor(0, 1);
lcd.print("Pulse = ");
lcd.setCursor(0, 3);
lcd.print("uSv/h = ");
Serial.println("Connecting Wifi...");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.print(WiFi.localIP());
CNT = 0;
CPM = 0;
dispPeriod = 0;
attachInterrupt(digitalPinToInterrupt(inputPin), GetEvent, FALLING); // Define interrupt D2 on falling edge
Serial.println("Start counter");
}
int value = 0;
void loop() { // main loop
if (millis() >=dispPeriod + PERIOD) { // If one minute is over
cleanDisplay(); // Clear LCD
lcd.setCursor(9, 1);
lcd.print(" ");
CPM = CNT;
if(WiFi.status() != WL_CONNECTED) {
Serial.println("WiFi not connected !");
} else {
Serial.println("Send data to Domoticz");
String url = "/json.htm?type=command¶m=udevice&idx=73&nvalue=0&svalue=";
url += String(CPM); url += ";";
sendDomoticz(url);
}
lcd.setCursor(9, 2);
lcd.print(CPM); //Display CPM
Serial.println("Start counter");
Serial.println(CPM);
radiationValue = CPM * CONV_FACTOR;
lcd.setCursor(9, 3);
lcd.print(radiationValue); //Display usvr/h
CNT = 0;
dispPeriod = millis();
}
}
ICACHE_RAM_ATTR void GetEvent(){ // Get Event from Device
CNT++;
lcd.setCursor(9, 1);
lcd.print(CNT); //Display CNT
}
void cleanDisplay (){ // Clear LCD routine
}
void sendDomoticz(String url){
Serial.print("connecting to ");
Serial.println(host);
Serial.print("Requesting URL: ");
Serial.println(url);
http.begin(host,port,url);
int httpCode = http.GET();
if (httpCode) {
if (httpCode == 200) {
String payload = http.getString();
Serial.println("Domoticz response ");
Serial.println(payload);
}
}
Serial.println("closing connection");
http.end();
}
they a re probably some bugs on it but it's working ..
if someone wants to improve it, plz share your modification with the community .
i am waiting your feedback
Belgo
/*************ARDUINO SKETCH FOR GEIGER COUNTER******************
Author: Belgo
*****************************************************************
This sketch was writen for geiger counter cajoe to send data to domoticz ( json http )
*****************************************************************
LCD I2C Connection:
LCD SDA -> D5
LCD SCL -> D6
VCC to +5V and ground
USB powered
V-in geiger counter to D2 pin from nodemcu
****************************************************************/
// include the library code:
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#define LOG_PERIOD 15000 //Logging period in milliseconds, recommended value 15000-60000.
#define MAX_PERIOD 60000 //Maximum logging period without modifying this sketch
#define PERIOD 60000.0 // (60 sec) one minute measure period
// Conversion factor - CPM to uSV/h
#define CONV_FACTOR 0.00812
const char* ssid = "your_ssid_wifi";
const char* password = "your_wifi_password";
const char* host = "192.168.1.100"; // ip of your domoticz server
const int port = 8080; // ip port of your domoticz server
const int watchdog = 60000; // Fréquence d'envoi des données à Domoticz - Frequency of sending data to Domoticz
//unsigned long previousMillis = millis();
volatile unsigned long CNT; // variable for counting interrupts from dosimeter
unsigned long counts; //variable for GM Tube events
unsigned long cpm; //variable for CPM
unsigned int multiplier; //variable for calculation CPM in this sketch
unsigned long previousMillis; //variable for time measurement
unsigned long dispPeriod; // variable for measuring time
unsigned long CPM; // variable for measuring CPM
float radiationValue = 0.0;
const int inputPin = 4; // pin D2 is VIN on geiger counter
// initialize the library with the numbers of the interface pins
LiquidCrystal_I2C lcd(0x27,16,2);
HTTPClient http;
void setup() { // setup
Wire.begin(D5,D6); // pins SDA and SCL of your i2c LCD screen
Serial.begin(115200);
lcd.begin(20, 4);
lcd.backlight();
lcd.home();
lcd.setCursor(3, 0); // Move the cursor at origin
lcd.print("Geiger Counter");
lcd.setCursor(0, 2);
lcd.print("CPM = ");
lcd.setCursor(0, 1);
lcd.print("Pulse = ");
lcd.setCursor(0, 3);
lcd.print("uSv/h = ");
Serial.println("Connecting Wifi...");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.print(WiFi.localIP());
CNT = 0;
CPM = 0;
dispPeriod = 0;
attachInterrupt(digitalPinToInterrupt(inputPin), GetEvent, FALLING); // Define interrupt D2 on falling edge
Serial.println("Start counter");
}
int value = 0;
void loop() { // main loop
if (millis() >=dispPeriod + PERIOD) { // If one minute is over
cleanDisplay(); // Clear LCD
lcd.setCursor(9, 1);
lcd.print(" ");
CPM = CNT;
if(WiFi.status() != WL_CONNECTED) {
Serial.println("WiFi not connected !");
} else {
Serial.println("Send data to Domoticz");
String url = "/json.htm?type=command¶m=udevice&idx=73&nvalue=0&svalue=";
url += String(CPM); url += ";";
sendDomoticz(url);
}
lcd.setCursor(9, 2);
lcd.print(CPM); //Display CPM
Serial.println("Start counter");
Serial.println(CPM);
radiationValue = CPM * CONV_FACTOR;
lcd.setCursor(9, 3);
lcd.print(radiationValue); //Display usvr/h
CNT = 0;
dispPeriod = millis();
}
}
ICACHE_RAM_ATTR void GetEvent(){ // Get Event from Device
CNT++;
lcd.setCursor(9, 1);
lcd.print(CNT); //Display CNT
}
void cleanDisplay (){ // Clear LCD routine
}
void sendDomoticz(String url){
Serial.print("connecting to ");
Serial.println(host);
Serial.print("Requesting URL: ");
Serial.println(url);
http.begin(host,port,url);
int httpCode = http.GET();
if (httpCode) {
if (httpCode == 200) {
String payload = http.getString();
Serial.println("Domoticz response ");
Serial.println(payload);
}
}
Serial.println("closing connection");
http.end();
}
Re: Geiger counter settings
Cool, consider uploading your data to Radmon https://radmon.org
This is mine: https://radmon.org/radmon.php?function= ... fluppie007
This is mine: https://radmon.org/radmon.php?function= ... fluppie007
Code: Select all
http://www.radmon.org/radmon.php?function=submit&user=RADMONUSERNAME&password=RADMONPOSTPASSWD&value=CPMVALUE&unit=CPM
You have to change:
RADMONUSERNAME
RADMONPOSTPASSWD
CPMVALUE
Re: Geiger counter settings
I get similar functionality using ESPEasy with counter plugin and single gpio. Data is uploaded to mqtt broker every minute, then processed in Node-Red and visualised in Grafana.
Re: Geiger counter settings
Bonjour Belgo,
J'ai acheté le même matériel que vous pour remonter les infos du compteur geiger vers Domoticz et évidement utilisé votre code et votre schéma de raccordement (merci d'avoir partagé).
Pouvez-vous m'expliquer maintenant ce qu'il faut faire du coté Domoticz ?
Merci pour votre patience !
Cordialement,
Dudule.
J'ai acheté le même matériel que vous pour remonter les infos du compteur geiger vers Domoticz et évidement utilisé votre code et votre schéma de raccordement (merci d'avoir partagé).
Pouvez-vous m'expliquer maintenant ce qu'il faut faire du coté Domoticz ?
Merci pour votre patience !
Cordialement,
Dudule.
Re: Geiger counter settings
Can you share the settings U used? get it working with the small scripts I can find on the internet but not with ESPeasy or Tasmota.I get similar functionality using ESPEasy with counter plugin and single gpio. Data is uploaded to mqtt broker every minute, then processed in Node-Red and visualised in Grafana.
Re: Geiger counter settings
Hi, below is my pulse counter plugin screen. My geiger cirquit produce short positive pulses, no debounce, and they just get registered by the plugin.
Re: Geiger counter settings
Hi,
I managed to get working the geiger kit RadiationD-v1.1(Cajoe) under EspEasy. I used the plugin "Generic - Pulse counter" with the following configuration: Note that the "Mode Type" should be Rising (or Falling) to avoid counting twice each event. Also I fixed the inteval to 10 seconds. This value can be decreased to obtain values more frequently or increased if you prefer to measure values less frequently.
Then I define a dummy device using the "Generic - Dummy Device" plugin to allocate the variables which will contain the measurements in cpm (counts per minute): Finally I assign the values to the variables in the dummy device using rules: The factor 6 comes from the fact that we are using cpm, but measuring at 10 seconds, then we have to multiply by 6 to get the counts per minute. Actually this factor is calculated as 60/interval. If for example we choose 5 seconds for the interval, then the factor would be 12. Also there are two quantities which should give the same value: Total/Time, which the total number of counts divided by the time that the board is on (%unixtime%), and also the average value of the instant measurements. The use of the variable %unixtime" is not a good choice when the time is larger, since this variable cannot accommodate big numbers. I just included it for checking purposes.
Cheers!
Jose.
I managed to get working the geiger kit RadiationD-v1.1(Cajoe) under EspEasy. I used the plugin "Generic - Pulse counter" with the following configuration: Note that the "Mode Type" should be Rising (or Falling) to avoid counting twice each event. Also I fixed the inteval to 10 seconds. This value can be decreased to obtain values more frequently or increased if you prefer to measure values less frequently.
Then I define a dummy device using the "Generic - Dummy Device" plugin to allocate the variables which will contain the measurements in cpm (counts per minute): Finally I assign the values to the variables in the dummy device using rules: The factor 6 comes from the fact that we are using cpm, but measuring at 10 seconds, then we have to multiply by 6 to get the counts per minute. Actually this factor is calculated as 60/interval. If for example we choose 5 seconds for the interval, then the factor would be 12. Also there are two quantities which should give the same value: Total/Time, which the total number of counts divided by the time that the board is on (%unixtime%), and also the average value of the instant measurements. The use of the variable %unixtime" is not a good choice when the time is larger, since this variable cannot accommodate big numbers. I just included it for checking purposes.
Cheers!
Jose.
Re: Geiger counter settings
Great
Just curious, what is your occupation, or where do you live that a Geiger counter is usable?
Just curious, what is your occupation, or where do you live that a Geiger counter is usable?
Re: Geiger counter settings
I live in Chile. I am planning to make an indoor environment station which includes a dust sensor, a CO2 sensor, temperature and humidity sensors and radioactivity detector, just for fun. The geiger counter can be purchase here:
https://es.aliexpress.com/item/32822477320.html and the data can be sent to https://radmon.org/index.php. I am physicist, by the way.
https://es.aliexpress.com/item/32822477320.html and the data can be sent to https://radmon.org/index.php. I am physicist, by the way.
Re: Geiger counter settings
Ah didn't know that site.
Nice idea to have a global map for radioactivity.
If we ever get another Chernobyl or Fukushima, or some government tries to do experiments, we can 'track' them.
I'll think I will order one just for the fun of it.
Nice idea to have a global map for radioactivity.
If we ever get another Chernobyl or Fukushima, or some government tries to do experiments, we can 'track' them.
I'll think I will order one just for the fun of it.
Re: Geiger counter settings
Could you post the rules in a [ code ] [ /code ] block (without the spaces), so it is a bit easier to copy them without typos
/Ton (PayPal.me)
Re: Geiger counter settings
Code: Select all
on System#Boot do
let,1,0 // total number of cpm's
let,2,1 // number of measurements
endon
On Geiger#Total do
TaskValueSet 5,1,[Geiger#Total]*60/%unixtime%
endon
On Geiger#Count do
TaskValueSet 5,2,[Geiger#Count]*6
Let,1,[var#1]+[Geiger#Count]*6
TaskValueSet 5,3,[var#1]/[var#2]
Let,2,[var#2]+1
endon
Yes!! That's the idea. There aren't commercial nuclear plants in Chile, but there are in Argentina or Brazil, and any leak could travel by air anywhere.
Re: Geiger counter settings
Yep can imagine one may not believe everything the Brazilian government tells via the official news media, with the current president.
Measuring is knowing.... as long as you know what you're measuring. (In Dutch: Meten is weten als je weet wat je meet)
I still remember in '86 that Tsjernobyl caused even more concerns by the fact the information was held back at first.
Measuring is knowing.... as long as you know what you're measuring. (In Dutch: Meten is weten als je weet wat je meet)
I still remember in '86 that Tsjernobyl caused even more concerns by the fact the information was held back at first.
Re: Geiger counter settings
We are installing Espeasy-based geiger counters in Belarus where we have twice the trouble: 25% of the territory contaminated by remains of Chernobyl, and a freshly built nuclear power plant which nobody beleives is safe. It is always good to know the truth even if someone goes panic.
Who is online
Users browsing this forum: Google [Bot] and 1 guest