![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I am just starting out in electronics, so forgive my questions about relatively basic things. I am trying to electrically control a "contact closure" sensor. Currently the sensor is set up with a reed switch and magnet. I'd like to remove the reed switch and magnet and replace that with a visible laser/photocell switch. I was able to design a circuit that works...well, most of the time. It works on the breadboard, but it seems to have problems in the long term when I built a PCB and I can't figure out why this is. One of my challenges is that the voltage is very low between the contact closure pads. Just 0.45V. So, my plan is the following: 1) Build a typical voltage divider circuit off a 3VDC source with a 10K resistor and a CdS photocell with a range of Rdark=2,000,000ohms, Rlaser=100ohms, Rambient=9000ohms. I've done the math and that's where I came up with the 10K resistor (probably should be more like 20K, but it's what I've got). The photocell is on the ground side of the voltage divider, so that Vout is ~2.9V when dark. 2) Use the Vout of the voltage divider circuit to drive a NPN 2n3904 transistor which will switch on/off the contact closure pads. It works, then it doesn't work, then it works, then it doesn't work. I can't tell if the circuit is incorrectly designed, or the transistor I have is flaky. I do know that the sensor module works if I put the reed sensor back in. I should mention that I have the photocell very well protected from stray ambient light. Also, the capacitor in the schematic is optional and helps me control how quickly the sensor module detects a break in the laser. I've been experimenting with different values there. I'll see if I can't attach a schematic... Any comments welcome. sensor-schematic.jpg Last edited by krich; 23rd March 2008 at 06:09 AM. | |
| |
| | (permalink) |
| Well, I worked on this over the weekend and still can't seem to get it working reliably. I may just hook the laser sensor up to an AVR and write a bit of code to trip the sensor module. I'm better at that anyway. | |
| |
| | (permalink) |
| How much current does SIG require when the transistor is on? | |
| |
| | (permalink) | |
| Quote:
So, low voltage (<0.85V) and low current (<1mA). Would these values be too small to saturate collector to emitter (is that how you say it)? I've seen something like that in the 2n3904 datasheet. I'll go take a look. Ken. | ||
| |
| | (permalink) |
| Can you more completely state the characteristics of the flaky operation? Have you monitered the voltage on the collector to see what it's doing? | |
| |
| | (permalink) |
| Good point. Flaky doesn't really give anyone much to go on. The symptoms are that it'll work on the breadboard, and it will work with the PCB I etched. But then, just an hour later, it'll not work at all. Just as I've decided to throw the whole project into the wood chipper, it works again. One concern I have is whether or not I'm dealing with voltages and currents that are too low for the 2n3904 I have in the circuit. Should I be using a mosfet or solid state relay instead? I just picked the 2n3904 because that's what I first pulled out of my box. Also, if I use 0V to 5V on the base of the 2n3904, does any of that voltage bleed into the emitter? I'm a complete transistor newbie. Thanks for taking the time to help me with my project. Ken. | |
| |
| | (permalink) |
| The 2n3904 transistor would seem okay for what you're doing. It's a general purpose amplifer/switch. Some General Transistor Info: Bipolar transistors, such as this, are current operated devices. The gain (beta) of the transistor is the ratio of collector current to the required base current. For use as a switch, a beta of 10 is often used to insure good turn-on of the transistor, thus 1mA of collector current would require 0.1mA of base current. The base-emitter junction looks like a foward biased diode thus the typical base-emitter voltage when the transistor is on is about 0.65V (for silicon). Since it's like a diode, you always need a resistance in the base to control the base current. Applying a voltage to the base above about 0.6V can fry the device if there's no resistance to limit the current. ----------------------------------------------------------------- The flakyness could be a cold solder joint. Recommend you touch up all the joints with a hot iron and make sure the solder wets both the wire and the bond pad. Sometimes a joint may appear good but it will be intermittent. | |
| |
| | (permalink) |
| You might try using a Darlington arrangement like shown in this schematic: http://www.ozitronics.com/docs/k79a.pdf | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| I've done a little googling on "contact closure sensor", and now I'm curious to know how you are supposed to "trip" a contact closure sensor. Is it current activated or voltage activated? One datasheet I ran across cautions that the inputs are designed for contact closure only, and that no power should be connected to the contacts. Or, are you trying to replace the contact closure sensor itself? | |
| |
| | (permalink) | ||
| Quote:
What I am trying to do is come up with a method of changing the sensing method of that sensor module by removing the reed switch and putting my own creation in it's place. I have many, many more of these than I do doors, so I think it would be fun to use the sensors for other things. My problem is that I know what I need to do, but I guess I don't yet have the skills to pull it off "correctly". This is the part where I get to bug you guys about my project, try not to tick anyone off for being too far in over my head, and hopefully learn a whole bunch in the process. Quote:
Last edited by krich; 26th March 2008 at 06:09 PM. | |||
| |
| | (permalink) |
| Mechanical and reed switches are used because they are simple, reliable and cheap. What would be the purpose of a more complex device that does the same thing? Radio Shack sells relays, any car repair shop too. PS alarm system sensors are not just a simple wire, they often have a 5K resistor on the sensors and a window comparator on the alarm. Else a wire jumper could bypass most systems. I put together a zoned system based on 1-wire DS2401 devices and reed switches, works great and did not add much to the cost of the sensors, more secure too. ![]() ![]() Only two pins are used on the DS2401 Last edited by blueroomelectronics; 26th March 2008 at 07:20 PM. | |
| |
| | (permalink) |
| blueroom: a DS2401 is a "silicon serial number" device. Did you mean another part no.? (Edit: maybe I understand how you used them now, but feel free to elaborate.) After thinking about it I understand now why a Darlington probably wouldn't work - it has a much higher Vce(SAT) than a single transistor. The 2N3904 has a Vce(SAT) of around 0.2V which may not be small enough to reliably trigger the sensor if voltage between the contacts is only 0.45V. Then again, it would be helpful to know how (electrically speaking) the sensor is triggered. Another option would be to try a MOSFET. A 2n7000 is a common, general purpose N-FET. Solid state relays are essentially just MOSFETs. Finally, might be valuable to know what resistance is required to trip the contact closure sensor. Last edited by pc88; 26th March 2008 at 09:00 PM. | |
| |
| | (permalink) |
| Thanks to everyone that has weighed in on my project. From what I've heard from the kind folks here is that there's nothing "obviously" wrong with the circuit I've proposed, just that I, quite possibly, lack the experience to pull it off. So, I've tried to take a second crack at the circuit based on the circuit posted a few posts above this one, using an already proven (and well explained) circuit at the risk of complicating the circuit and overloading my already feeble mind. Digging through my tackle box, I was able to find a 3V relay amidst what I thought were all 12V relays (bonus!). Its like it was sitting there just waiting for me to find it for this project. I have yet to build the circuit, but I do have some confidence that it will work properly. The only drawback is that I'm not sure it will fit into the battery compartment of the sensor module I am modifying, so it'll probably take a bit more planning on the mechanical side of things. I've attached the circuit drawing. I removed the DPDT switch because I won't be needing to switch between activate on dark and activate on light. I'm now trying to understand Darlington Pairs and what that's all about, but I think I understand the basic premise...at least somewhat. Using a smaller voltage/current to switch on a transistor that can use a larger voltage/current to switch on a relay. Allows a much higher gain than with a single transistor. Not sure why its necessary in this circuit, but I'll keep pondering that question. Any light the folks can shed on this would help. laser sensor.jpg I'll be leaving the country in a couple days, so I don't think I'll have time to build it and test it before I leave. I may not have a good way to respond back to comments until I get back, so thanks in advance to the community for your interest and comments. EDIT: I've written an instructable, more so that I can remember how I did it and keep track of my progress. I like how you can add comments to pictures and stuff. Anyway, the instructable goes through in detail what I didn't really want to clog up these forums with, so check it out if you are interested. I didn't want to publish it until I got things working flawlessly, but I think it would help those who are trying to help me to understand what I'm doing. I'd prefer to keep the comments in this thread on topic, which is specifically the sensor circuit, but I can start a new thread on the overall project if there is interest. PM me if this is the case. And yes, I've quite literally got a box-load of these cameras and sensors in the garage, much to my wife's chagrin. Xanboo/Homesite Laser Break Beam Sensor Regards, Ken. Last edited by krich; 27th March 2008 at 10:12 PM. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Audioguru Please See My Simple PreAmp Circuit | Gayan Soyza | General Electronics Chat | 11 | 8th May 2007 03:58 AM |
| Simple Integrator Circuit | ThermalRunaway | General Electronics Chat | 3 | 21st March 2007 09:29 PM |
| Simple flatulence sound generator circuit? | HarveyH42 | Electronic Projects Design/Ideas/Reviews | 4 | 29th July 2006 06:37 PM |
| Need A Simple Alarm Clock Circuit | Handiplus | Electronic Projects Design/Ideas/Reviews | 0 | 29th March 2004 03:02 PM |
| I need a simple low power LED flasher circuit | alanzhao | General Electronics Chat | 5 | 25th January 2004 06:20 AM |