PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
- switchingpower
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
9 years 7 months ago #981
by switchingpower
Replied by switchingpower on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Can someone help me with interfacing my counter (based on SBM19 tube) to a GPIO pin on the Pi. My counter supplies a 0-3V square wave pulse ( so compatible with Pi logic levels). I'm a hardware engineer so can provide any required signal conditioning. Not sure if a build of PyRadMon already has this capability - thanks for any help. Looking forward to getting on the network.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- ThibmoRozier
- Offline
- Elite Member
9 years 7 months ago #985
by ThibmoRozier
PyRadmon is a piece of code that handles the serial input from a usb interface and translates the hexadecimal values to integers before uploading it to radmon.org
for that we would need to re-create a full application specific code that handles the counts the pulses on a gpio pin.
Could be possible, just haven't had a chance to properly test this scenario.
And I thought gpio(x, high) was 5v?
Does the counter only give the feedback on a binary level {0/1} or does it change the voltage according to the reading?
If it is a binary system I could fiddle around with it, if not you'd need a firmware expert.:/
Replied by ThibmoRozier on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Actually not..Can someone help me with interfacing my counter (based on SBM19 tube) to a GPIO pin on the Pi. My counter supplies a 0-3V square wave pulse ( so compatible with Pi logic levels). I'm a hardware engineer so can provide any required signal conditioning. Not sure if a build of PyRadMon already has this capability - thanks for any help. Looking forward to getting on the network.
Thanks
PyRadmon is a piece of code that handles the serial input from a usb interface and translates the hexadecimal values to integers before uploading it to radmon.org
for that we would need to re-create a full application specific code that handles the counts the pulses on a gpio pin.
Could be possible, just haven't had a chance to properly test this scenario.
And I thought gpio(x, high) was 5v?
Does the counter only give the feedback on a binary level {0/1} or does it change the voltage according to the reading?
If it is a binary system I could fiddle around with it, if not you'd need a firmware expert.:/
Please Log in or Create an account to join the conversation.
9 years 7 months ago #987
by mw0uzo
Replied by mw0uzo on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
I think it might work ... take the audio code, strip out the buffer stuff and use the gpio as the detect event. Or maybe butcher the audio code and shoehorn in the gpio event. Lots of this type of stuff goes on in RadLog. Imagine the pulse detection code... but worse
Please Log in or Create an account to join the conversation.
9 years 7 months ago - 9 years 7 months ago #995
by Vinkx
Replied by Vinkx on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Don't connect 5 V to the PI GPIO pins , you will have a burned PI.
I just made a test script in python 2 on a raspbery PI 2
It counts for one minute and then prints out the CPM
I tested it with a button hooked up from the 3.3V pin to the GPIO 17 pin .
If this works for you then its trivial to send the CPM to radmon.org after the count.
Or you can count longer and the divide the result by the number of minutes counted if you do not want to send every minute.
you also might want to reduce or remove the bouncetime , its there to prevent button bounce effects.
I just made a test script in python 2 on a raspbery PI 2
It counts for one minute and then prints out the CPM
I tested it with a button hooked up from the 3.3V pin to the GPIO 17 pin .
If this works for you then its trivial to send the CPM to radmon.org after the count.
Or you can count longer and the divide the result by the number of minutes counted if you do not want to send every minute.
you also might want to reduce or remove the bouncetime , its there to prevent button bounce effects.
#!/usr/bin/env python
import time
import RPi.GPIO as GPIO
cpm = 0
# handle the button event
def pulseEventHandler (pin):
print "I just saw a pulse ...."
global cpm
cpm=cpm+1
# main function
def main():
# tell the GPIO module that we want to use
# the chip's pin numbering scheme
GPIO.setmode(GPIO.BCM)
# setup pin 17 as an input and pull it down
GPIO.setup(17,GPIO.IN,pull_up_down = GPIO.PUD_DOWN)
# tell the GPIO library to look out for an
# event on pin 17 and deal with it by calling
# the EventHandler function
GPIO.add_event_detect(17,GPIO.RISING,callback=pulseEventHandler,bouncetime=500)
# main loop
global cpm
while True:
cpm=0
print "i started counting , i will let you know in 1 minute"
time.sleep(60)
print "cpm =",cpm
GPIO.cleanup()
if __name__=="__main__":
main()
Last edit: 9 years 7 months ago by Vinkx.
Please Log in or Create an account to join the conversation.
- ThibmoRozier
- Offline
- Elite Member
9 years 7 months ago #996
by ThibmoRozier
If this works you could combine it with the web part I made, or I could include it, perhaps into a special gpio pi edition.
Let us know, You have my permission to fiddle around with the web class, as long as it stays within Radmon.org and it has the license comments in it, referring to PyRadmon, as stated in the original license agreements.
If you need help just give me a shout, sorry about the bad commenting job within the script, it's to force away stuff like unwanted forking.
Let's hope it works.
Replied by ThibmoRozier on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Don't connect 5 V to the PI GPIO pins , you will have a burned PI.
I just made a test script in python 2 on a raspbery PI 2
It counts for one minute and then prints out the CPM
I tested it with a button hooked up from the 3.3V pin to the GPIO 17 pin .
If this works for you then its trivial to send the CPM to radmon.org after the count.
Or you can count longer and the divide the result by the number of minutes counted if you do not want to send every minute.
you also might want to reduce or remove the bouncetime , its there to prevent button bounce effects.
#!/usr/bin/env python import time import RPi.GPIO as GPIO cpm = 0 # handle the button event def pulseEventHandler (pin): print "I just saw a pulse ...." global cpm cpm=cpm+1 # main function def main(): # tell the GPIO module that we want to use # the chip's pin numbering scheme GPIO.setmode(GPIO.BCM) # setup pin 17 as an input and pull it down GPIO.setup(17,GPIO.IN,pull_up_down = GPIO.PUD_DOWN) # tell the GPIO library to look out for an # event on pin 17 and deal with it by calling # the EventHandler function GPIO.add_event_detect(17,GPIO.RISING,callback=pulseEventHandler,bouncetime=500) # main loop global cpm while True: cpm=0 print "i started counting , i will let you know in 1 minute" time.sleep(60) print "cpm =",cpm GPIO.cleanup() if __name__=="__main__": main()
If this works you could combine it with the web part I made, or I could include it, perhaps into a special gpio pi edition.
Let us know, You have my permission to fiddle around with the web class, as long as it stays within Radmon.org and it has the license comments in it, referring to PyRadmon, as stated in the original license agreements.
If you need help just give me a shout, sorry about the bad commenting job within the script, it's to force away stuff like unwanted forking.
Let's hope it works.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #1144
by tcall
Replied by tcall on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Hi,
I ran my system fine for a few months with no problem but recently started getting "Error communicating with server gieiger 1
Errorno --3 Temp Failure in Name Res
I used to get this when first switching on, but it usually cleared after a few tries. Has anyone any ideas please?
Regards,
Paul
I ran my system fine for a few months with no problem but recently started getting "Error communicating with server gieiger 1
Errorno --3 Temp Failure in Name Res
I used to get this when first switching on, but it usually cleared after a few tries. Has anyone any ideas please?
Regards,
Paul
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
Time to create page: 6.998 seconds