Help, urgent help needed - LDR comparator, Vref

Status
Not open for further replies.

random15

New Member
Hi,
as many are so am I, a total newbie in the world of electronics. I have a Friday hand-in where I need to prove that my project is working, at least only part of it and I ran out of time.
So what is my project? it's supposed to be a mini weather station made of two boards: one (motherboard) with graphical LCD and a PIC16F877, linked via RS232 with a second board with 3 sensors: LDR, thermister and humidity sensor and a PIC16F628. When there’s light the LDR will show a sun on screen. When it’s dark it should show a moon. Same happen with the other sensors, which are supposed to show some graphical data, but at this point I think I’m happy with just one output range.
I built the boards, done the circuit diagrams, but I'm totally stuck with the assembly programming. Hopefully there's someone to help.
So what do I need them to do? When I switch on the power and press the button on the motherboard the second board should read the light level. The threshold is set to 2V and I’m relying on the Vref and comparators of the PIC16F268 to indicate when the pins should be high and low. I’ve got +5V running and a range between 0.12V for light at 400Ω and 2.5V for dark at 16k.
What I need now is the bit of programming for the PIC16F268 that would gradually check the light until it gives an output. I have part of the programming for the motherboard (with the PIC16F877), where the graphics are, but really struggling with the other one which I can consider zero built.
Would there be anyone able to help me with this? I imagine that for most of you is just a simple play, but for me is the stress I can’t get over with and the time I still need but don't have to get closer to the finish line. Thank you!
 

Attachments

  • ppp 390.JPG
    1.8 MB · Views: 314
  • ppp 392.JPG
    1.7 MB · Views: 263
  • T6963C_ALL WITH RS232.asm
    21 KB · Views: 183

hi,
Some queries about your circuits.

Whats the purpose of D1/1N4135 of pin 11 of the F877A supposed to do.?

What type of LCD is it.? It appears to have 5 control lines.?

Is there any power line decoupling capacitors on the +5V lines.?

On the 628 PIC, you say you are using the LDR's etc to work with the PIC's comparators.. the ANx comparators dont appear to be connected at all.??

The 10K on the LDR is shorted out.

The Thermistor is wired in a strange way.

You must correct all the circuit errors before even thinking about programming.
 
Last edited:
Regarding the Circuit: Pin 11 must be connected to a direct +5v (the two capacitors in series with the diode does not make sense at all).

regarding the LDR circuit. are you attempting to use the ADC of the PIC micro-controller or make an additional circuit to give you a low when sun and hight when dark?.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…