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.

How can I do this

Status
Not open for further replies.
At lunch at the moment Mosaic as soon as I finish work I will post the results...Any suggestions on using a SCR or an alternative ? the reason I ask is when I adjust the sensitivity of the sensor via the potentiometer it seems to throw everything out but how could that affect the 2n2222 it couldn't or could it.

Cheers thanks
 
Use the resistive load and isolate the transistor switch. Make sure it is good.

This is the negative of the open source 'building block' approach to DIY. It doesn't teach the basics.
A transistor switch circuit is a basic item. If the OP doesn't understand the basics then it's harder to debug via 'reported' results.

BBQ: You need to understand this switch and be able to debug it...22 posts over this is excessive. Is this 'homework' or a school project?
**broken link removed**
 
I may be wrong but I don't think this circuit works.

When Q1 is turned on you will still have a 0.7V drop across the transistor this will be enough to put Q2 in the linear mode. A resistor on the base of Q2 might fix this, 1K between Q1 collector and Q2 base.

But personally I'd use an PNP transistor like so:
Capture.JPG


With V2 on, Q1 will be turned off and R2 ensures the base of Q2 is low so Q2 is off. So V2 on turns load off.
With V2 off Q1 will be on turning Q2 on.
 
What is providing your on/off signal to Q1? For my circuit it would need to have some current sink capability so wouldn't work with a switch for example. but it could be modified a little

Capture.JPG
 
Thanks Misterbenn two of the other sensors are low current reed switches....float switches, I will give it a whirl when I get back,I see you are from birmingham or located there ,I was born and bred in Erdington lol.

Cheers
 
Mosaic 'homework' or a school project? hardly I'm knocking on 50 years old I took up electronics 8 Months ago so I'm a newbie as you can tell,we all have to start somewhere ....
 
Oh yeah, I'm living in Shirley now although originally from Coventry.

In my last drawing R5 should probably be 10K ohms but it will work either way. Also S1 and R5 can be swapped for normal open or normal closed switches.
 
The sensor is a digital unit.
It's possible it has weak pull ups etc on the PCB. Thus you can have a power leak from the digital (i2c/spi) lines showing up on the power pins even with no help from the 2n2222.

Try out the circuit with a standard 'load' like a lamp or a resistor (100 ohms). If it still has a prob with switching off. Measure the Vbe and Vce of each transistor and post it here.

Yeah, I don't "get it". I wasn't getting updates on this thread either? In the simulation the base of Q2 is going to zero volts and we tried a base to ground resistor on Q2 to make sure it turns off. Yeah, I would replace the load with a 100 or 120 ohm resistor or so and see what the circuit does.

Ron
 
I disconnected the breadboard supply and used a 9v battery working perfect disconnected battery then reconnected the bench supply at 9v working fine adjusted up to 9.5v sensor comes on....Scratch Head ? I'm not working the weekend so I will sit down and take all the measurements and post....I will also acquire a sledge hammer and smash every transistor I see it won't rectify the problem but it will make me feel better.

I will give MisterBenns circuit a spin and post the outcome...thanks guys
 
The sensors you mention are 3.3 or 5V but you also mention a 9V power supply.
If you are trying to use the 3.3/5V sensor output to turn on/off a 9V power supply, my circuit wont work as Q1 wont be able to turn off.
If you are using a5 to 9V input on the base of Q1 to turn on/off a 5V supply to your sensors then my circuit will work.

As ever the more details we have about an application the better the recommendations we can make.

Sorry reloadron i still can't see how the base of Q2 can possibly be below 0.7V with Q1 on. Did your simulation include the correct voltage drop across the transistor? Replacing the transistors with Mosfets would enable this circuit to work correctly.
 
The sensors I bought on ebay, the operating voltages that they stated in the spec says 3.3 to 5.0v I have them operating at 12v without issue which is the voltage that I want to switch them off at,the 9v supply was the pp3 9v that I used to see if the circuit would operate ok which it did but as soon as I used the bench supply at 9.5v the sensors switched on when as you know should be off ? I have followed all the suggestion to no avail, I will give the circuit you gave Misterbenn and see how that works the weekend. Cheers
 
Just as an aside, I built one of these 'sensors' using a pair of 304 s/s 1mm dia, 1" long, welding rods in a 3/4" PVC end cap and potted with polyethylene hot glue. That created one leg of a voltage divider which is sampled by a 16F886 uC to derive the relative moisture level of the 'soil'. The uC oscillates the voltage on the sensor probes to avoid galvanic effects. Tristating the voltage divider with a uC pin handles sampling, once every few minutes and limits power use. Works fine, permits uC set points to trigger irrigation.
 
The sensors you mention are 3.3 or 5V but you also mention a 9V power supply.
If you are trying to use the 3.3/5V sensor output to turn on/off a 9V power supply, my circuit wont work as Q1 wont be able to turn off.
If you are using a5 to 9V input on the base of Q1 to turn on/off a 5V supply to your sensors then my circuit will work.

As ever the more details we have about an application the better the recommendations we can make.

Sorry reloadron i still can't see how the base of Q2 can possibly be below 0.7V with Q1 on. Did your simulation include the correct voltage drop across the transistor? Replacing the transistors with Mosfets would enable this circuit to work correctly.

OMG, I don't believe I did that. I totally omitted the forward voltage drop of Q1. You are absolutely correct. My bad all around on that circuit. Thanks for actually getting me to think.

Ron
 
The sensors I bought on ebay, the operating voltages that they stated in the spec says 3.3 to 5.0v I have them operating at 12v without issue which is the voltage that I want to switch them off at,the 9v supply was the pp3 9v that I used to see if the circuit would operate ok which it did but as soon as I used the bench supply at 9.5v the sensors switched on when as you know should be off ? I have followed all the suggestion to no avail, I will give the circuit you gave Misterbenn and see how that works the weekend. Cheers

As the voltage you are trying to turn off and the voltage of the sensor are the same then my circuit should work, although I've thought of a simplification last night see below.
Capture.JPG


Are you using the analogue or digital output of the sensor? I am concerned that you are using this circuit out of spec and at 12V I wouldn't be surprised if you had fried the IC that I can see on the sensor.
 
Even better again Misterbenn, the sensor has the lm39312m Max Rating: 2 V to 36 V so I modified a good few of these at .99p a pop I thought it would be a good introduction to electronics,although I haven't operated the circuit beyond 15v by changing the input pins around I can do a whole bunch of stuff however on this occasion I haven't modified anything until we can get the switching right ....Here is the spec **broken link removed** the circuit will be used to switch these on and of ....**broken link removed**....

Cheers thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top