Questions on a circuit.  Switching from +5V to ground - Page 1
Forum section: electronics / beginners

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 08:07:01 pm
content: I have a circuit that's pretty simple, but not sure how to go about it without using a relay, and I don't want to do that. Relays are too big, I need a small component for surface mount.Here's what I have.I have 8 hall sensors. The output signal puts out 5volts. When a magnet triggers the sensor, the output then goes to about 0.20volts. I want to set up a circuit so that when a hall sensor is triggered, it will light up a single LED, indicting that one of the hall sensors have been triggered.Something like the picture. Except, I am not sure how to change it so that when the voltage drops to the 0.20 volts, the LED will light.Any ideas? I would like to use a very small footprint for the SMD chip. I will be using 2 quad Diode chips and their footprint is SOT-363. very small.

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 08:19:52 pm
content: I think I figured it out.I could use a PNP transistor. Supply the 5volts to the emitter via a resistor to drop the voltage to like 3.2volts (needed for the LED), then, when the base (power from the sensor) drops to the 0.20 volts, it will turn on the transistor, letting current flow from the emitter to the collector (LED), correct?

author: dfmischler
author_rank: Frequent Contributor
timestamp: June 20, 2013, 08:28:35 pm
content: Um, how much current can the hall effect sensor sink? The simplest thing to do is have the hall effect sensor pull down the cathode of the LED, and tie the anode to +5 through a resistor.. There may be reasons why your circuit needs to be more complicated, but you didn't specify.

author: madires
author_rank: Super Contributor
timestamp: June 20, 2013, 08:30:24 pm
content: Two transistors should do the job. The first one for inverting the signal and the second one to switch the LED. If you have to hit the 0,2V exactly a comparator would be the solution. Should the LED just light as long as the singal is 0.2V or do you like to have it lit for a specific time?

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 08:34:11 pm
content: The output of the hallsensor is also going into a few ULN2803 chips. The sensor data sheet is here,http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCwQFjAA&url=http%3A%2F%2Fwww.allegromicro.com%2F~%2Fmedia%2FFiles%2FDatasheets%2FA3141-2-3-4-Datasheet.ashx&ei=nWbDUdjOJ-GWiAL9jYGQDw&usg=AFQjCNEOdzCEoz2KfzfuhXorAUsx0yxKKg&bvm=bv.48293060,d.cGEWill this transistor work? Using 4 of them?http://www.mouser.com/ds/2/302/BC857BS-85394.pdf

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 08:35:03 pm
content: I had the diodes that way, because I didn't want to chance any current going back through the Sensor and messing with the function of the ULN2803's.I guess I don't understand.

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 08:36:42 pm
content: My multimeter displayed about 4.9volts and when triggered, about 0.13 volts on the sensor output signal. It will fluctuate a little, depending on the power supply source.

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 08:39:00 pm
content: Quote from: Bored@Work on June 20, 2013, 08:32:22 pmSo you are saying to let the LED ground out through the Sensor? That signal output of the sensor goes to a series of ULN2803's. Will it still ground out through those as well? Without effecting the operation of them?

author: madires
author_rank: Super Contributor
timestamp: June 20, 2013, 08:58:42 pm
content: Quote from: Falcon69 on June 20, 2013, 08:34:11 pmCould you please provide a schematic to show how the ULN2803s are driven.QuoteOpen-Collector 25 mA Output ... Compatible with Digital LogicThis opens another door.QuoteI'd go for the NPN version. But first we have to check out how you drive the ULN2803s.

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 09:11:27 pm
content: This is the schematic. This one uses ULN2003's, but I've updated it using 2803's for the 8 outputs instead of 7.The circuit I'm wanting to add, would be on the External USB Schematic. (the second one) I want to add the Red LED to that to give a visual indication that a switch has been triggered. It's not needed, I just want the effect.

author: madires
author_rank: Super Contributor
timestamp: June 20, 2013, 09:50:59 pm
content: A simple inverter (74HC14ish) plus diodes would do the trick. Connect each sensor output to one inverter input, put a diode at each inverter output and connect all diode cathodes together to drive a singe LED.

author: Falcon69
author_rank: Super Contributor
timestamp: June 20, 2013, 10:07:11 pm
content: any suggestion as to which one? Do they only come as 6 circuits? I need a total of 8.Can you explain how the inverter works? It looks like the ones on Mouser are only 5.2mA. The LED takes 20mA of current.Thanks for the help madires

author: Falcon69
author_rank: Super Contributor
timestamp: June 21, 2013, 06:03:20 am
content: Would 2 of these work for the inverter....http://www.mouser.com/ProductDetail/NXP-Semiconductors/74VHC14BQ115/?qs=sGAEpiMZZMutVWjHE%2fYQw4fbtmXPwDouSuomqnf6uMU%3dand then use two of these for the Diodes....http://www.mouser.com/ProductDetail/NXP-Semiconductors/BAV70S135/?qs=sGAEpiMZZMtoHjESLttvklAT8BXmK%2f4ovbCEMn160xM%3dSo would this be correct for the schematic?

author: madires
author_rank: Super Contributor
timestamp: June 21, 2013, 11:26:56 am
content: Quote from: Falcon69 on June 20, 2013, 10:07:11 pmUse two 74HC14 or a single 74HC240 which got 8 tri-state inverters.QuoteAre you familiar with logic gates? Basically they got two states: low and high (like 0V and 5V). If you feed the inverter (=not) with a low state it will output a high state and vice versa. You could build one with some transistors. Since this is a very brief explanation please seehttp://en.wikipedia.org/wiki/Logic_gatefor a starting point.The 74HC14 and the 74HC240 provide enough output current for the 20mA LED.QuoteYou're welcome!

author: Falcon69
author_rank: Super Contributor
timestamp: June 21, 2013, 02:53:46 pm
content: okay, so if i understand it right....The chip has a vcc (voltage input of the 5 volts), and a ground. I connect those.Then each sensor to the input. and the anode of a diode to the output, then a resistor and then the LED and then to ground (like in picture).So, when the switch is high (4.9 volts), the diodes anode would be as if I had connected it to ground. But when the Sensor is low (0.13 volts), then the diodes anode would be as if I connected it to the 5 volts (vcc). Is that correct? So it kind of works like a transistor then? If 5 volts is supplied to the vcc, is that what the LED will see (minus the 1.2v drop through diode), so the LED will see a total of 3.8 volts? I think the diodes drop 1.2 volts, if I red the chip characteristics correctly.And since no reverse current can flow to the sensor, it shouldn't interfere with the ULN2803's operation.And since no current or voltage is really used from the sensor, it shouldn't interfere with the ULN2803's operation.So, if that is correct, will I need a resistor between sensor and inverter to drop the voltage lower to get closer to 0 volts when the switch is activated with the magnet?A Little confused on the Schematic of the 74HC240.Would it be connected as....Sensor to 1A0 then 1Y0 to Diode AnodeSensor to 1A1 then 1Y1 to Diode AnodeSensor to 1A2 then 1Y2 to Diode AnodeSensor to 1A3 then 1Y3 to Diode AnodeSensor to 2A0 then 2Y0 to Diode Anodeetc....What are 1OE and 2OE for, it says 'Output Enable Input (Active LOW'What would I connect GND1 to? Do I just use a couple of vias through the pad and then go under the board and connect to ground?Would I need any other resistors or capacitors?

author: Falcon69
author_rank: Super Contributor
timestamp: June 21, 2013, 02:56:45 pm
content: oh, i think i know what the 1OE and 2OE do, using a switch, I can make it so the inverters are off or on. So, I need to connect those to something to make the chip work? Or just leave them unconnected.?OH! it says active LOW. I am assuming that means they must be connected to ground to make the chip active (or working as it should)

author: madires
author_rank: Super Contributor
timestamp: June 21, 2013, 03:56:55 pm
content: Quote from: Falcon69 on June 21, 2013, 02:53:46 pmYes, and connect the cathodes of all diodes, then connect the resistor to that point.QuoteYep, the diodes prevent any current flow from a high state output into any low state output, since the inverter's output in low state sinks current (would cause a short circuit). The transistors are inside the inverter:-) If you need a higher voltage you could use Schottky diodes with a drop about 0.3V.QuoteCMOS logic gates got a high input impedance (FETs).QuoteNo, because the low/high states are not fixed voltages, they're are within a voltage band. For the 74HC family at 5V Vcc low is roughly 0-2V and high is 2.7-5V.QuoteYes!QuoteThe 74HC240 is a bus driver, therefore it got those enable pins. Simply connect them to ground (always enabled).QuoteI'd add a 100nF bypass cap nearby.

author: Falcon69
author_rank: Super Contributor
timestamp: June 21, 2013, 04:09:58 pm
content: awesome, thank you Madires.Where exactly would I put the Capacitor? And I have plenty of the 0.1uF (100nF) 0805 capacitorsWould it go from the anode of the LED to ground?

author: madires
author_rank: Super Contributor
timestamp: June 21, 2013, 04:27:52 pm
content: Quote from: Falcon69 on June 21, 2013, 04:09:58 pmIt's placed between Vcc and Gnd as near as possible to the 74HC240. Most place the bapass cap just in front or back of the IC where the traces of Vcc and Gnd come in.

author: Falcon69
author_rank: Super Contributor
timestamp: June 21, 2013, 04:33:58 pm
content: okay, thank you. Will start laying all this out now in DipTrace. Thanks!