Notifications
Clear all

How to check voltage against threshold using electrical components?

6 Posts
4 Users
2 Reactions
576 Views
(@yurkshirelad)
Member
Joined: 4 years ago
Posts: 493
Topic starter  

Let's say I have a photoresistor light sensor that is connected to an analog pin of a microcontroller. The microcontroller runs software that reads the value and lights an LED when it rises above a specified threshold.

How would you implement this without a microcontroller, using electrical components? I assume a transistor would be used to turn the LED on and off, but how would you check the voltage against a threshold to control the transistor?

Thanks


   
Quote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
 

The circuit you construct would ultimately depend on what you intend to happen when a light sensor goes over a threshold, which could be 'sensed' from a number of different electronic components and circuits.

When I saw your question I though mm, in my limited knowledge, do I know enough to knock up a circuit to do this.  Well its was not long before I had more questions than answers in my mind, so I googled 'light sensor circuits' and a number of good circuit diagrams popped up.  

Maybe someone will give a good explanation but in the meanwhile you will also find some interesting stuff with a google.   I started to play around with electronics a couple of years ago, but when faced with these seemingly simple questions I'm still flummoxed and it a reminder to me that I will have to get back my endeavours to get to a better grasp on all this malarky. 🤔 

(This was all a bit of a waffle that did not answer your question, but hey, its snowing outside and writing this is a good excuse for sitting in the warm and not going  to my workshop where I have another coat of paint to put on my latest woodworking effort. 😎 )


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 4 years ago
Posts: 493
Topic starter  

Thanks. I don't have enough electrical components to build anything like this. This was more a question that interested me as a concept; something people could discuss and throw ideas around and I could learn from. I'm not sure what said circuit would actually do, I'm just curious. 🙂 


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
 

Well I think the simplest way to think of the photoresistor is as a switch.  A battery to one leg of the photoresistor the other leg to a light bulb and back to the battery.  Daylight fades, photoresistor allows electricity to flow and on goes the light.  

A transistor would be used if the light bulb needed more current than could be passed through your photoresistor.  In this case the photoresistor could trigger the base of a transistor to allow a greater current from a second and bigger battery to pass to the light bulb.


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 129
 

A comparitor could be used to compare two voltage levels. One input would be the voltage from the

photoresistor and the other input to the comparitor would be a variable resistor so you can set the

voltage level you want the output to trigger at.


   
YurkshireLad reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 
Posted by: @yurkshirelad

Let's say I have a photoresistor light sensor that is connected to an analog pin of a microcontroller. The microcontroller runs software that reads the value and lights an LED when it rises above a specified threshold.

How would you implement this without a microcontroller, using electrical components? I assume a transistor would be used to turn the LED on and off, but how would you check the voltage against a threshold to control the transistor?

Thanks

Not sure if this is exactly what you're asking, but in one of my old electronic books, written by "Malcolm Plant", he uses a potentiometer to create a voltage divider to the base of the transistor, coupled with another transistor to create what's known as a darlington pair.  This configuration increases the gain massively, to provide that switch like sensitive snap action you really want when the light changes.  You cover the photo resistor with your hand, and then fine tune the circuit via the pot to your liking.

Cheers.


   
YurkshireLad reacted
ReplyQuote