EmonTH optical pulse counting

Does anyone know if i can connect the optical pulse kit (either TSL261R or TSL257) directly to the GND, 5V and DIG2/IRQ0 ports of the EmonTH and use the same code examples that exists for EmonTX V3?

The EmonTH webpage says "An optical sensor can be added for interfacing with a pulse-output utility meter or a relay board could be connected for controlling an appliance.", but the page also mentions an optional pull-down resistor for pulse counting, is this pull-down resistor something i need with SL261R/TSL257?

Best regards, David

 

 

 

Robert Wall's picture

Re: EmonTH optical pulse counting

What does the TSL261R data sheet tell you? According to Fig 8, a pull-up resistor is beneficial: "Pullup resistor extends linear output range to near VDD with minimal (several millivolts typical) effect on VDARK; particularly useful at low VDD (3 V to 5 V)" but Fig.9 shows it without, so the pull-up is not essential. But bear in mind that the emonTH operates on two cells of nominally 1.5 V each, so your battery life down to 2.7 V, the minimum voltage of the TSL261R, won't be all that good, not helped by the 1.1 mA that the sensor takes.

David L's picture

Re: EmonTH optical pulse counting

Thanks for your quick reply, i will consider using an external 5 volt power supply.

Would it make any difference if i connect the power supply to the USB +5V/GND or use the pins 1 and 3 on the front of the board?

/ David

Robert Wall's picture

Re: EmonTH optical pulse counting

If you look at the circuit diagram and PCB layout on Solderpad (link in the Wiki), it looks to me as if they are all the same. You can very, very easily check with a multimeter.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.