Shop OBEX P1 Docs P2 Docs Learn Events
Light Sensor LS100 — Parallax Forums

Light Sensor LS100

djh82ukdjh82uk Posts: 193
edited 2007-09-06 22:29 in General Discussion
Heya

Can anyone tell me how to hook this up to an SX?

There is a diagram on the pdf but where do I hook up the IO Pin?

http://www.rapidonline.com/netalogue/specs/58-0120.pdf

Help appreciated

DJH

Comments

  • BeanBean Posts: 8,129
    edited 2007-07-19 15:52
    In the PDF Fig 2 connect the point labeled "Vs" to an I/O pin configured for input.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-19 16:02
    Thanks Bean

    I cannot se a Vs in fig 2 do you mean Vo?

    DJH
  • JonnyMacJonnyMac Posts: 9,216
    edited 2007-07-19 16:53
    If you look in figure 2 you'll see that the sensor is connected in series with a 5K resistor and the voltage at the top of the resistor is what gets monitored. According to the docs you should see 2.5 volts at the junction, so make sure the I/O pin is set to TTL level (default).
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-19 20:37
    Thank you, im really not that stupid, im just struggling to get back into things (honest) [noparse]:)[/noparse]

    DJH
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-19 21:54
    hmm, vdd on the protoboard is 6.3V while between the resistor and the light sensor I get 5.7V nowhere near 2.5v as expected. Im using a 5.8K resistor (All I had around)

    I basically have VSS -> resistor -> Light Sensor -> VDD

    and between the resistor and light sensor is where I have the i/o pin on the SX, and this is also where the voltage is 5.7V

    Between the resistor and ground i get 0.1V

    HMM
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-07-19 22:56
    djh82uk said...
    vdd on the protoboard is 6.3V…
    Are you sure you are not connected to Vin instead of Vdd? Vdd should be very close to 5.0V.

    - Sparks
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-20 13:13
    hmm, Vin is at 9.6V and CDD in deffo 6V something

    My Wall Wart is set to 6V but is giving out 9.7V

    bit strange, the SX key is also getting rather hot when left on, is that normal?

    Voltage reg is cold though

    DJH
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-23 13:42
    any ideas?

    Just cannot get this to work, and yet it should be simple.

    If not how could I use a standard LDR?

    Thanks for all your help

    DJH
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-30 19:57
    anyone?

    What would you reccomend? an ldr or the light sensor?

    i still don't know why the voltages seem way off [noparse]:([/noparse]

    DJH
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-07-30 21:07
    I recommend that you get your voltage situation understood.· Let's stop guessing and do some troubleshooting.

    Why these wild voltages?· Does your voltmeter need a new battery?· How accurately does it measure a separate battery (new, AA = 1.5V)?

    When powered with +5 and GND (Vss), but otherwise disconnected from the SX, what's the LS100 output like?··Does it get dark enough to turn off and get light enough to turn on (looks like HI w/light, LO w/dark)?
    200 x 276 - 6K
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-30 22:19
    ok

    I tried 2 handheld multimeters plus a mains powered ex-military multimeter (huge waterproof thing for submarines, very nice [noparse]:)[/noparse] )the voltage was the same on all 3 give or take 0.1V

    i don't like this wall wart giving out funny voltages so I will try it on my bench psu which I know to be accurate.

    I will also double and triple check the resistor, it is meant to be 5.8K but I wish I had an LCR.

    Also pin 2 the short leg I presume is also the side with flat bit (Like an led), correct?

    I will check all this and get back to you

    thanks for the pointers, i think i just needed a little push
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-07-31 03:26
    Pin 2, the cathode, is by the flat on the circumference.· This unit gets "reverse biased."

    5.8K (red-grey-red) (green-grey-red)·should be OK (if it's 58K, that's too much.)

    What're you using here, an SX28 ProtoBoard, a breadboard?


    Post Edited (PJ Allen) : 7/31/2007 1:16:40 PM GMT
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-31 09:53
    hmm im getting green - blue - black on the resistor

    im using an SX48 Protoboard

    DJH
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-07-31 13:13
    I wrote red-grey-red.· Whoops.· That should be green-grey-red (5, 8, and·two 0s).

    Green-blue-black is 56ohms (5, 6, and·zero 0s.)· Not enough resistance.
  • djh82ukdjh82uk Posts: 193
    edited 2007-07-31 14:55
    ha ha, stupid multimeter (user), i'll have a little look later, i really need and lcr, im useless with resistors

    Thanks

    DJH
  • djh82ukdjh82uk Posts: 193
    edited 2007-09-06 00:14
    been a while, but still not tried to sort this out, it's still sitting untouched, multimeter is fine, reads pretty much the same as what my variable psu says it is putting out.

    the resistor I have connected is green - Blue - Red - Gold

    Which i take to mean 5.6K 10% Correct?

    The Wall Wart has been playing around, so I have a new one now

    DJh
  • djh82ukdjh82uk Posts: 193
    edited 2007-09-06 00:28
    ok Wallwart seems to have fixed one of the voltage probs, now getting 4.8V @ VDD and 12V at Vin

    I get 4.8V going into the sensor, 4.32V coming out, and 0v at the resistor, it's as if the resistor is too strong.

    wierd thing is, If i put the probes on both of the sensors legs, I get 0.63V but at reversed polarity compared to when I check the leg against ground

    hmm

    DJH
  • djh82ukdjh82uk Posts: 193
    edited 2007-09-06 22:29
    umm, ok

    The resistor was connected between then vss and the cathode of the sensor (flat edge, short pin), and nothing worked, turned the sensore around so it was wired up wrong, and the damn thing works.

    Im totally confused now

    DJH
Sign In or Register to comment.