Community
OpenEnergyMonitor

OpenEnergyMonitor Community

More than one optical pulse on an emonTX/emonPI

Hello
I hope this is the correct place for this question…
I’ve read in the OEM docs that on an emonPI/emonTX, only one optical pulse sensor can be used due to hardware limitations…anyway, the atmega328 has two digital pins with interrupts (D2/INT0 and D3/INT1 - the emonTX uses D3 if I am correct)
So in theory, two optical pulse sensors could be implemented (with PCB and firmware modification…) or do I misunderstand the problem ?
best regards
Alex

One interrupt pin is used for the RFM69CW radio, the other for the pulse input. So you do indeed need a hardware modification. You’d need to add external logic to present each incoming pulse to its dedicated ordinary digital input and to the only available interrupt pin, and that would need to be 'or’ed across all the pulse inputs. In software, on receiving the interrupt, you’d need to poll the other inputs to see which pulse triggered the interrupt. So you need access to other digital inputs too, which sadly is hard.

OK thanks Robert, I understand
This is quite challenging and complex…
I’ve seen the arduino IONO from sfera labs


maybe It could do the job…

An optical pulse sensor can be directly connected to the Pi, using a spare GPIO. This might help:
. Directly connecting to Optical Pulse Counter with RPi?