Homemade counter - to to interface to PyRadmon

More
9 years 7 months ago #977 by switchingpower
Hello,
New to the forum
I have a SBM19 based counter that currently connects to a Pi via a GPIO Pin - whats the input for PyRadmon? Any signal conditioning ? My counter outputs a 85us positive pulse width 0 to +3 volt square wave - will this work?
Thanks for any help

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #979 by mw0uzo
Hi switching power, welcome to the forums!
I think pyradmon supports serial and audio method at the moment. A modification for GPIO should be easy. Thimo should be able to help, particularly if you give him the single line of code required (and possibly the library to include) to read the pin of GPIO.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #980 by mw0uzo
Would you like to register for data submission? PM me a unique, unimportant password or alternatively I can give you a random one.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago - 9 years 7 months ago #982 by Vinkx
The pulse from my counter is a negative (low) pulse about 70us.

To catch a 85us pulse in python you probably will have to work with a interrupt. Otherwise you risk missing pulses.
I decided not to use pyradmon because i already had my PI counting and logging on its own with a C++ program, but i did came acros this example wich should be easy to adapt.
Its for a button press , but it should also work for a pulse from the counter.

The eventhandler in this example is called "buttonEventHandler" but that is just a name, you can rename that to "pulseEventHandler" for clarity.

http://raspberrywebserver.com/gpio/using-interrupt-driven-gpio.html
Last edit: 9 years 7 months ago by Vinkx.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #986 by switchingpower
thanks -
Will give it a try

Please Log in or Create an account to join the conversation.

Moderators: Gamma-Man
Time to create page: 0.155 seconds
Powered by Kunena Forum
Everything's free. Please support us by considering a donation. Log in first!
Solar powered Raspberry Pi 4 server stats: CPU 43% Memory 22% Swap 70% CPU temp=50.6'C Uptime 72 Days