day/night sensor


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90

    Default day/night sensor

    Whats the option for a day/night sensor to be used as a input for a 16f630.
    using PBP
    this is for a joint hobby project with a out of state friend.
    I'm programming the chip he's building the board
    I have used the "pot" command with a LDR and cap which has most of the calibration in the program. I added a cal. pot but it has little effect. and I would hate have to mail the chip back and forth to get the cal. were we need it.
    I've used a LDR, pot, voltage divider& transistor set up but this project is battery operated and I think it could be hard on battery life.
    just wondering if there is a better option.
    as always thanks

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Look at the Panasonic PNA4603H.

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi grounded,

    Why don't you post your schematic here?


    --------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    dhouston I did a search for panisonic could not find much.
    sayzer here is a schematic
    Sorry I'm a not a pro on this just a hobbist.
    I guess in a nut shell what I need is a simple,cheap light sensor that has a wide range on the cal. pot, and is easy on the battery.
    Attached Images Attached Images  
    Last edited by grounded; - 6th October 2006 at 00:59.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by grounded
    dhouston I did a search for panisonic could not find much.
    What do you need besides the PNA4603H data sheet which the first few hundred Google responses point to?

  6. #6
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    the smarts to understand them
    sorry dhouston not trying to be a smart (*&(& . but I'm just a hobbist
    I did look at the data sheet but that all greece to me. I'm not even shure what it or does
    i need examples, people telling how they work ,why they work what they are.
    schematics
    sorry

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    grounded,

    Are you sure your LDR is 10K-33K ? did you measure it under complete dark and full light with an ohmmeter?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  8. #8
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    sayzer its was a 16-33k digi-key pvd-p8103-nd this was from a project that I did last year with a 12f629. the PBP manuel says to use a 5-50k &.1cap this had the greatest span and along with a 5k cal pot was still under the 50k as per the manuel. it worked but the pot had little effect. I just added this to the schematic I posted. which is the new project. this is the code I used with the 12f629.

    Pot GPIO.4,100,DN
    IF DN<140 Then
    GoTo CHECKPIR
    Else
    GoTo MOVIE
    EndIF
    but If I can get a a greater span from the pot this project can be used for multiple things
    thanks

  9. #9
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    I can say that the POT command with LDR type of fast changing resistive devices is not quite precise.

    Do you have any chance of using a PIC with ADC ?

    Or have you tried your circuit with a PIC with ADC?


    Also, POT command with 5K gives the best result as what I have experienced so far. Any value above 5K has not been working well for me (only with POT command though - even 10K was not good).

    Also, why are you using a scale of 100? What was the reason?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  10. #10
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    The PNA4603H (available from Digikey) outputs a voltage that is proportional to the light level. Its sensitivity and wavelength are similar to that of the human eye.

    Use it on an ADC pin or use it on one input to the comparator and use a potentiometer on the other input to the comparator.

    If you supply it with +5V using a PIC pin and use ADC, you can turn it off between readings to minimize battery drain.

  11. #11
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    thank you both
    In my short time "playing" with the PIC I have not tried any of the adc stuff
    the 16f676 is the sister chip to the 630 about the same but with adc
    is this the way I need to go?

    the 100 scale well I worked for 6 hr. before I got some thing that would work
    (on the other project) started with 255 but did not have any luck ajusted both # and until 100 and it worked.

Similar Threads

  1. Need a cheap touch sensor idea.. here it is
    By mister_e in forum Code Examples
    Replies: 20
    Last Post: - 16th April 2016, 22:42
  2. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  3. PICBASIC PRO-coding for wireless sensor node
    By syazila in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2009, 00:05
  4. Replies: 6
    Last Post: - 18th January 2008, 08:17
  5. RH/Temp Sensor Example Code
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 15th June 2006, 15:55

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts