LowPowerLab Forum

Hardware support => General topics => Topic started by: cwavontuur on November 09, 2013, 06:24:33 AM

Title: EE-SY310 breakout
Post by: cwavontuur on November 09, 2013, 06:24:33 AM
Hi

Starting my first steps on assembling a watermeter with a EE-SY310 breakout I cannot get the out pin to switch from high to low.

inserted a Led/resistor on pin out and a second Led/resistor on ground to check if current is flowing.

First used 3,3 volt and now a 9 volt battery on Plus

Both leds keep nicely lit where I expected the Out pin Led to darken when I hold something black in front of the sensor.

Must be doing something wrong.
Anybody a good suggestion what to do?

Rgds
cwavontuur
Title: Re: EE-SY310 breakout
Post by: Felix on November 09, 2013, 09:30:48 AM
You should not need more than 5V to get it working.
Wiring external resistors + LEDs is not a good indicator whether the sensor is working or not. Remember the OUT is pulled up to VCC through a 10K resistor.
You should use the sample sketch here to see the change in counting: https://github.com/LowPowerLab/WaterMote/blob/master/WaterMote.ino
You can hover over a white paper on which you make a black dot with a marker, move back and forth over the black dot. The sketch is going to start counting. For testing purposes you can remove all the radio logic from the sample code. This sample uses interrupt 1 (D3) as input from the sensor (connect OUT to D3 directly, VCC to VIN of Moteino).
Title: Re: EE-SY310 breakout
Post by: cwavontuur on November 09, 2013, 10:40:37 AM
Felix,

Thanks for the feedback. I will go through the sample sketch and will try to work out a way forward. I need to do so without use of an Arduino/Moteino as I don't posses one.

I introduced the external resistor + LED and 9volt battery as my original setup with Raspberry PI  / GPIO - Python test was not successful in changing the OUT state as I waved the white paper / dark dot in front of the sensor.

So I tried to make things simpler by removing Raspberry with it's 3.3V GPIO and introduce 9 volt, which cannot directly be connected to the 3.3V GPIO. Hence my idea to use resistor and LED.

My first test was connecting Raspberry 3.3 V to plus, out to GPIO24 and minus to Raspberry ground.
To monitor the GPIO24 I used a python script to continuously read the GPIO24 state.

out signal kept being high as long as I fed 3.3V to the plus.

And the python nicely changed the printed message every time I did so, so I would think that is working correctly.

What ever paper / object I wave in front of the sensor it does not change its state.

Most likely I'm doing something wrong but cannot find it.

Sofar I have not found a source which tells me if the emitted light is visible to the naked eye.
But I have not seen any light sofar.

What signal should appear on the EE-SY310 breakout pin out if I put 3.3V on plus pin?
My expectation was a continuous 3.3V voltage but maybe that is my mistake.

Brgds,
cwavontuur
Title: Re: EE-SY310 breakout
Post by: Felix on November 09, 2013, 06:15:25 PM
Please see the datasheet to better understand how this sensor works and its electrical specs. It is an infrared emitter detector so don't expect to see light coming out of it, except if you take a video with a digital camera.
The onboard IR led is driven by a 280ohm resistor. So by you adding an external resistor you are making that current much smaller so I'm not very surprised if the detector doesn't work.
The OUT can drive up to 16mA of current (abs MAX) so you could probably just hook up a LED directly to that.

Your dark object should be at most 5mm away from the face of the sensor. It will detect differences between white and black for instance. Some users said they could not detect a red hand on a white dial, maybe because of how the red plastic reflects the IR.
Title: Re: EE-SY310 breakout
Post by: cwavontuur on November 09, 2013, 06:53:45 PM
Thanks Felix,

I'm going to give it a try,
Rgds
Cwavontuur
Title: Re: EE-SY310 breakout
Post by: Felix on November 09, 2013, 09:11:45 PM
Here's how I tested one right now:
(http://farm6.staticflickr.com/5546/10769207174_48e1bf7f6b_o.jpg) (http://www.flickr.com/photos/15304611@N03/10769207174/)
EE-SY310 application (http://www.flickr.com/photos/15304611@N03/10769207174/) by FelixRusu (http://www.flickr.com/people/15304611@N03/), on Flickr
Title: Re: EE-SY310 breakout
Post by: cwavontuur on November 10, 2013, 10:45:15 AM
Hi Felix,

Many many thanks for your detailed and monkey proof demo.

So I took the 9 volt battery and hooked up the sensor as explained by you.

A small but noticeable light did ignite in the LED so the out pin was high.

What ever I tried I couldn't get it in low, LED off, state.

Used a blue and a black pencil, no luck.

Took a few pictures to show my slightly different EE-SY310 version.
No SMD mounted electronics, 10K ohm and 270ohm,
and the angle of the pins is 180 degrees versus your 90 degrees.

Brgds
Joep
Title: EE-SY310 breakout
Post by: cwavontuur on December 06, 2013, 04:04:41 AM
I still didn't manage to get things working.

Used 5 volt / ground from raspberry PI.
Under all circumstances the led keeps being on.
it does not require a reflective white paper to stay on.

I can't find the error in my setup.

Is there a schematics of the EE-SY310 breakout available?

Brgds
Cwavontuur
Title: Re: EE-SY310 breakout
Post by: Felix on December 06, 2013, 08:40:11 AM
There's just a 10K pullup on the OUT and a 270Ohm on the IR LED. Not much else.
Check the solder points, it's possible there's a cold or missing solder joint? I don't test these, I just solder them since there's very little chance they could be bad.