Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best circuit for light / dark activated switch

Status
Not open for further replies.
The pinout for the LM393 can be found on the datasheet which can be found using your favourite search engine.

Just connect the inputs of the unused comparator to opposite power supply rails, i.e. the + input to +V and the - input to 0V or the other way round, it doesn't matter.
 
Erirc pointed out to me, via PM, that I'd made a mistake.

I'd missed off the base emitter resistor which ensures Tr1 turns fully off, without R7 it will leak 8mA when it's supposed to be off.

I've edited the schematic

**broken link removed**

EDIT:
Just another thing: it won't help here but you should be able to parallel the outputs of both of the comparators on the LM393, as long as they're on the same IC, the current sharing should be near perfect. This will help though, if you need to drive a large load with the driver transistor so you need to ensure a high base current in order for it to saturate properly.
 
Last edited:
Sorry to be a pain, i thought i understood what you meant with regards to what pins to connect to the 393,

i have connected pin 5 to the positive rail and pin 6 to the negative rail, along with of course pin 2 + 3 is that correct.

Thanks

Phil
 
No.

You need to connect the power supply pins to +V and 0V, pin 8 and 4.

The only other pins which need connecting to the power supply are the inputs for the unused comparator, i.e. either pin 3 and 2 or pin 5 and 6, depending on which comparator you're using.

You've connected up both inputs to the power supply and left the power supply pins unconnected which isn't good.
 
Been away for the weekend, The illustration you kindly provided, not sure if is a PNP or NPN transistor from the diagram which would be best suited.

Thanks again

Phil
 
PNP.

Hero's circuit still needs some tweaks. You will have a hard time finding a 9V relay. Common relay coil voltages are either 5, 6 or 12V. His circuit has way too much hysterisis. Use 1meg as the feedback resistor. Look at the attached sim. Note that with the 1meg feedback resistor, the circuit trips at 9.9K and 10.1K. With the 100K feedback resistor, the trip points are 10.9K and 9.1K, respectively.
 

Attachments

  • DF22.png
    DF22.png
    44.2 KB · Views: 233
  • DF22a.png
    DF22a.png
    44.5 KB · Views: 246
Last edited:
Oh damn, i must admit i am struggling with this, i realise for a rank novice this is a tall order and a learning
curve, but i cannot afford the £100 plus price for the commercial version for my project.

i will have a go at the circuit with my breadboard still stuck with the transistor in the diagram, i do really
appreciate the feedback and comments given, i am happy to consider any alternative including different
power DC voltages (nice to keep easy ie AAA's or AA's or 9 v PP3 etc)

am also happy to consider low voltage relays (reed switch i believe at work so cannot get access to my
paperwork at present)
 
Not counting the relay and the battery, the parts for the circuit Hero and I posted could be bought from DigiKey for less than $5.
 
It is frightening how much i could pay for effectivly the same item bundled in a box with a posh makers badge, and pretty finish etc.

it is also a good thing to know that if i made it and a problem arises i have a good idea on how to fix etc, or at least where to start, and save another packet of money on repair costs (smiling to myself as i type)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top