Overclockers Australia Forums
OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Specific Hardware Topics > Electronics & Electrics

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 18th August 2012, 1:33 PM   #1
adkeco Thread Starter
Member
 
adkeco's Avatar
 
Join Date: Aug 2012
Location: Perth, WA
Posts: 5
Default Sensor circuit

Hi All, im not new on this forum but new to this section and under this username. Years ago I used to have ~aconnoll username but have forgotten the password and dont use that work email address anymore. Myself and my friend Craig were known here for supercharging a Camira a few years ago.

Anyway, fast forward to now and I have a problem im trying to solve that id like a little help with. Im far from an electronics expert but understand the basics. I would like help with the below image.



As can be seen I have a 12v source powering some sensors that output 3.3v high when motion is detected. Now I want these sensors to be able to turn on a 12v solenoid (poly retic valve), essentially to scare my dogs away from the fence when they get to close to it (as they have been digging human sized holes into the neighbours to try and eat the poodle next door).

The problem im having is that im only getting about 1.8v out of each sensor in the way ive got it wired up like above. Meaning that they have to move past both sensors to set off the transistor and get the water squirting.

Can someone please help me here on how I can wire it so that only one sensor can set off the solenoid? ive tried diodes to try and block interference between sensors but it doesnt seem to matter. I understand that I should be using a protection diode between the collector and 12+ (not shown or implemented yet).

Thanks in advance, Adam.
__________________
adkeco is offline   Reply With Quote

Join OCAU to remove this ad!
Old 18th August 2012, 2:11 PM   #2
pcs
Member
 
Join Date: Mar 2008
Posts: 29
Default

what transistor are you using?
pcs is offline   Reply With Quote
Old 18th August 2012, 2:46 PM   #3
P.YO
Member
 
P.YO's Avatar
 
Join Date: Feb 2004
Location: Brisbane - Southside
Posts: 439
Default

Depending on how the otuput of the sensors are driven, it looks like the 2 1k resistors are acting like a voltage divider. Hence why you are only getting about 1.8v output.

What you should use is something like an OR gate. The two sensors from the inputs of the OR, and the output of the OR drives the current transistor.

Here's an example circuit of a transistor OR gate, 2nd one on the page.
__________________
Lots of trades - biggest so far, $2500 with Raynar
P.YO is offline   Reply With Quote
Old 18th August 2012, 3:16 PM   #4
SLATYE
SLATYE, not SLAYTE
 
SLATYE's Avatar
 
Join Date: Nov 2002
Location: Canberra
Posts: 25,776
Default

As others have said, one sensor is pulling the voltage down to ground, while the other is trying to hold it at 3.3V. The result is that the voltage at the transistor is 3.3V/2 = 1.65V (depending on how powerful the pull-up/pull-down hardware in each sensor is).

If you just put one transistor on each sensor and then tie the outputs of those together (ie rather than tying the sensor outputs together before the single transistor) then that should work.
__________________
Main system: Phenom II X4 920 | 8GB (4x 2GB) DDR2-800 | Gigabyte M57SLI-S4 v2.0 | Leadtek Geforce 9600GSO 384MB | Enermax Modu82+ 525W | 1TB Hitachi HDD | 3.5" + 5.25" FDD
Laptop: Compal EL80 | C2D T7200 | 320GB Fujistu HDD | 2GB DDR2-667 | GF Go 7600
SLATYE is offline   Reply With Quote
Old 18th August 2012, 3:34 PM   #5
adkeco Thread Starter
Member
 
adkeco's Avatar
 
Join Date: Aug 2012
Location: Perth, WA
Posts: 5
Default

Thanks for the speedy replies guys. I'm out at th moment but will try that when I return home this arvo and report back. Cheers, Adam
__________________
adkeco is offline   Reply With Quote
Old 18th August 2012, 4:20 PM   #6
Goth
Grumpy Member
 
Goth's Avatar
 
Join Date: Jun 2002
Location: /dev/null
Posts: 9,303
Default

I think you should have a diode across the solenoid too, to stop its back-emf from damaging the transistor.
__________________
"How is anyone supposed to know that this isn't just a bunch of crap?" - Richard Feynman.
Goth is offline   Reply With Quote
Old 18th August 2012, 4:24 PM   #7
Bastard Child
Member
 
Bastard Child's Avatar
 
Join Date: Jan 2006
Location: Crooklyn 3012
Posts: 2,063
Default

If the electronics fail, what's the backup to stop your dogs from killing a child the poodle when no-one's around?

I'd be pegging 1.5m wide wire mesh - flat along the ground - at the fence line.
__________________
I'm the reason we can't have nice things
Bastard Child is offline   Reply With Quote
Old 18th August 2012, 4:27 PM   #8
TERRA Operative
Member
 
TERRA Operative's Avatar
 
Join Date: Jul 2005
Location: Niraikanai
Posts: 6,553
Default

yeah, a fly-back, or reverse biased diode across the solenoid would be a good idea. A 1N4007 or similar would do the trick.
__________________
I DO NOT support internet filtering!!!
Tereno Empireo Rapidmova Reakcii Armeo
Check out my Youtube channel!
TERRA Operative is offline   Reply With Quote
Old 19th August 2012, 1:39 PM   #9
adkeco Thread Starter
Member
 
adkeco's Avatar
 
Join Date: Aug 2012
Location: Perth, WA
Posts: 5
Default

Quote:
Originally Posted by Bastard Child View Post
If the electronics fail, what's the backup to stop your dogs from killing a child the poodle when no-one's around?

I'd be pegging 1.5m wide wire mesh - flat along the ground - at the fence line.
Bastard Child, how about sticking to the topic and ill worry about my dogs killing anything ok?

To everyone else helping, ive just whacked on a second transistor so that the signals are separate, and have joined the transistors back together at their respective collectors and emitters.

Im still seeing the same issue here, where the sensor is outputting 1.8v instead of 3.3v? Im still having to walk past the two to set it off? Its not making sense to me. To get around this, couldn't I just use smaller (lower valued) resistors than 1K to activate?

FYI protection diode now in place between collector and 12v.

Cheers,
Adam
__________________
adkeco is offline   Reply With Quote
Old 19th August 2012, 2:02 PM   #10
mtma
Member
 
Join Date: Aug 2009
Posts: 2,607
Default

Does the thing fire if there's only one sensor connected?

I'm not sure what's going on with the sensor but at a guess you need about 6mA base current to get the solenoid to fire, so your 1k resistor is too much anyway.

I'd put on a 220ohm and see if it fires, though I don't know what your sensor output current capability is. You might actually need a buffer between the sensor and transistor if the sensor won't provide enough current to drive the transistor base directly.
mtma is offline   Reply With Quote
Old 19th August 2012, 8:53 PM   #11
adkeco Thread Starter
Member
 
adkeco's Avatar
 
Join Date: Aug 2012
Location: Perth, WA
Posts: 5
Default

Quote:
Originally Posted by mtma View Post
Does the thing fire if there's only one sensor connected?

I'm not sure what's going on with the sensor but at a guess you need about 6mA base current to get the solenoid to fire, so your 1k resistor is too much anyway.

I'd put on a 220ohm and see if it fires, though I don't know what your sensor output current capability is. You might actually need a buffer between the sensor and transistor if the sensor won't provide enough current to drive the transistor base directly.
Ok, ill give this a try in a couple of days because its going to be raining in Perth over the next few days. Thank you everyone for giving me a hand with this one much appreciated
__________________
adkeco is offline   Reply With Quote
Old 20th August 2012, 7:33 PM   #12
adkeco Thread Starter
Member
 
adkeco's Avatar
 
Join Date: Aug 2012
Location: Perth, WA
Posts: 5
Default

Big thanks to all that helped. I tried the 220ohm resistors in place of the 1Ks and it works great! Thanks again

If any of you live around the Canning Vale area, id shout you a beer while we watch the dogs run away from the fence haha..

__________________

Last edited by adkeco; 20th August 2012 at 7:39 PM. Reason: added picture :)
adkeco is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 6:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. -
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!