Analog output to Digital Input on Sensors
MarkDeSouza
Posts: 17
I am using a GEMS Sensor (#224508) to detect liquid level. I have connected it to the Basic Stamp 2 Board of Education USB board as follows
Sensor Red Wire - Vdd
Sensor Black Wire -Vcc
Sensor Blue Wire - P0
However I am not able to get the Basic Stamp 2 to detect High or Low,
When connected to a multimeter in Low condition I detect a voltage of 0.3V and in High I detect 5.1V. Shouldnt this change cause P0 / P1 to detect a HIGH / LOW condition?
When I use a sensor from Honeywell (LLE102101) I do not experience this problem.
Any idea? The only difference between the two sensors I see is the presence of a Schmitt Trigger in the Honeywell Version. Would adding a Schmitt Trigger to the Gems sensor help me get the Basic Stamp to recognize High / Low ?
http://www.gemssensors.com/~/media/GemsNA/InstructionBulletins/225480.ashx
http://sensing.honeywell.com/index.php?ci_id=50127
Sensor Red Wire - Vdd
Sensor Black Wire -Vcc
Sensor Blue Wire - P0
However I am not able to get the Basic Stamp 2 to detect High or Low,
When connected to a multimeter in Low condition I detect a voltage of 0.3V and in High I detect 5.1V. Shouldnt this change cause P0 / P1 to detect a HIGH / LOW condition?
When I use a sensor from Honeywell (LLE102101) I do not experience this problem.
Any idea? The only difference between the two sensors I see is the presence of a Schmitt Trigger in the Honeywell Version. Would adding a Schmitt Trigger to the Gems sensor help me get the Basic Stamp to recognize High / Low ?
http://www.gemssensors.com/~/media/GemsNA/InstructionBulletins/225480.ashx
http://sensing.honeywell.com/index.php?ci_id=50127
Comments
http://www.newark.com/texas-instruments/sn74ahc1g04dckr/ic-single-inverter-sc-70-5/dp/67K2818?ost=67K2818
Not being an electronic engineer, how would I go about selecting the right pull-up resistor ?
Hopefully someone will give you a real answer but my preferred method of selecting a pull-up is to use a 10K ohm resistor unless told otherwise.
On the Gems datasheet, second page, left side, under "Typical circuits" the middle one is the one you need. However, the diagram is very corrupt. At the bottom of that diagram it tells you to use a 4.7 K 1/4 watt resistor and it is connected between the red and blue wires of the sensor. If you look at the top diagram the resistor would be where the "load" box is. Just continue the blue wire to the Stamp input pin. Per the data sheet, use shielded cable or grounded metal conduit. You may or may not need a Schmitt trigger. It won't hurt but you will need to take into account that the Schmitt trigger is an inverter.
Now I can have crystal glass tipped sensors work to detect level instead of the polysulphone variety that do not wear well with solvents.