connecting TSL257 optical pulse sensor to EmonTx v3


Just trying to get my head around optical pulse sensing with the following sensor:

I've read a bunch of pages but still a little confused about connecting the sensor to an emonTx v3.

The shop picture shows the sensor with a 3 core cable and 3.5mm jack, but all pages I've read talk about connecting wires to input pins.

I'm a little confused.

So should I solder the 3 core wire, 3.5mm jack and sensor together, then plug the 3.5mm jack into one of the EmonTx v3 sensor input ports (if yes, which one)?

... or do I forget about the 3.5mm jack, and use the 3-core wire to solder the sensor directly onto the board?

If someone could post a pic of this working, I'd really appreciate it.

Thanks in advance!

Robert Wall's picture

Re: connecting TSL257 optical pulse sensor to EmonTx v3

I see your problem. The shop page refers only to the emonTx V2, which has a 3.5 mm jack socket for the pulse input connection. On your emonTx V3, you have a terminal block.

You need to forget the jack plug, and wire the sensor into the terminal block:
VDD - 3.3V
OUT - Dig 3 / IRQ1

The data sheet (download from the shop page) identifies the TSL257 connections, and the terminal block connections are on the underside of the board.

There's a sketch here:

but a mistake (not converted from the V2!):
In the comments: port 4 should be IRQ1 / Dig 3
and a little further down:
  attachInterrupt(0, onPulse, FALLING);
should be
  attachInterrupt(1, onPulse, FALLING);

I haven't got a TSL257 to test.

acollins's picture

Re: connecting TSL257 optical pulse sensor to EmonTx v3

Awesome. Thanks!


Comment viewing options

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