Help needed regarding LED
christineee
Posts: 17
I am in need of help for my school project!
I am working on a project to adjust the LED brightness automatically according to light level detected in the surrounding. I want to enhance my circuit so that it can light up 70% of the brightness in low light and 100% brightness in no light surrounding.
Right now, i am done with the part whereby my circuit is able to turn on when there's little/no light in the surrounding and turn off when the circuit detect light
Would like to know if there's any way if i could use basic stamp programming to program my circuit to adjust the brightness according to the light level?
Or do i really have to use PWM to do the work?
Thanks in advance.
I am working on a project to adjust the LED brightness automatically according to light level detected in the surrounding. I want to enhance my circuit so that it can light up 70% of the brightness in low light and 100% brightness in no light surrounding.
Right now, i am done with the part whereby my circuit is able to turn on when there's little/no light in the surrounding and turn off when the circuit detect light
Would like to know if there's any way if i could use basic stamp programming to program my circuit to adjust the brightness according to the light level?
Or do i really have to use PWM to do the work?
Thanks in advance.
Comments
I have uploaded a picture of my codes and the schematic diagram.
i have note down the measurements of the light level.
turn on 4000
turn off 168
What is the intent of the circuit you posted? Meaning, what do you expect it to do?
How is the transistor expected to operate? There's nothing connected to the base.
Hi there.
Pardon me as i am new to this forum.
I want to create a circuit that is able to automatically adjust the brightness of an LED according to the amount of light it receives using basic stamp programming.
For example,
At night: LED light up to 100% brightness
Rainy days when there's little light: LED light up to 70% brightness
Sunny days: LED does not light up
I have also attach a copy of a mindmap i have come up with and hope it can give you an idea of what i am planning to do.
Many thanks.
As for the transistor i am not sure how to connect the base as i am using a phototransistor and there's only 2 pins.
Hope you can help me with that.
...oohhhhh - the "transistor" is the light sensor. Sorry, got it.
I agree with the other posters that mentioned the use of the PWM command to modulate the effective light level produced by the LED. As your code now stands, the LED will either be 'on' or 'off'; nothing in between.
I would suggest reading up on the PWM command in the BasicStamp help, or in the hard copy Syntax and Reference manual.
(time for nighty-nite...yawn...)
Thanks for the suggestion.
By using the PWM command, is it true to say that i am unable to program the circuit to adjust brightness automatically? As from this video (http://www.youtube.com/watch?v=N9ZBd3AcOFc) ,i see that the person is turning a component on the breadboard and i presume that its the potentiometer.
Using thePWM command, the LED brightness can be 100% under program control; if you also detect the light level, the prgram can adjust the LED in relation to the light level, any way you desire.
I don't know about circuit in the video, but I would guess that your circuit will need a potentiometer to adjusts sensitivity. Even after you figure all the volts and ohms, they will vary by the tolerances, so we tend to need to adjust the analogue part of the circuit.
thanks!