Homemade counter - to to interface to PyRadmon

More
7 years 4 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
7 years 4 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
7 years 4 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
7 years 4 months ago - 7 years 4 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.

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

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

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

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

Time to create page: 0.163 seconds
Powered by Kunena Forum
Solar powered Raspberry Pi 4 server stats: CPU 62% Memory 14% Swap 20% CPU temp=75.4'C Uptime 63 Days