Try something like this: edit: also make sure that you are not putting weird voltages into the AND gate, try using a simulator like eagle before you do that circuit in real life.
guys, hold on here a little...first off, I see your first potential problem here. To actually get the seperate levels, you need to mount the point you measure from, on the actual level, and inject only one 12v below the lowest level, if you measure from the bottom and inject 12v on the seperate levels, all sensors will pick up the 12v coming from the lowest level. secondly, your house boat will probably have a engine with a negative ground, and you are putting 12v directly into some other parts of the boat, this will at some pint lead to damage form electrolytic corrosion. I work as an electrician on boats for a living and believe me, you do not want that. (Faraday's 1st Law of Electrolysis is relevant here, if you want to calculate the loss of metal due to this) I suggest placing a >100Kohm resistor on your 12v source to the tank, this should reduce the current, and slow down the galvanic corrosion to a reasonable level, or even better supplying the negative to the tank instead. (assuming the engine either has negative ground, or has a 2-pole electrical system.)
Thanks man, this is just a University project and the application is just an idea. It won't be installed or used long term
Jesus this is making my head hurt, I have no idea whether it is going to work properly or how to get the LED circuit going
Hi Longweight, Spotted your thread and remembered a few circuits came across, whille looking for circuits for a friends canalboat. Fluid sensors:- Circuit 1 Circuit 2 Found them via discover circuits website, a good resource for this electronic. Hope these help, especially as they give theory too.
That website is awesome! Here is my initial stab at getting it going, I can't get the DC sweep to work as it says that I am missing a parameter? https://www.circuitlab.com/circuit/7tmc2t/project-1/
Ok so I am a little confused by the AND gate, I am inputting 12V and the AND gate is outputting 5V, is that correct?
You shouldn't really be inputting 12V to a logic gate. Logic should be 5V and 0V. You could use a transistor to act as an AND gate but you'd have to ask someone with more electronics knowledge than me.
He wants to use AND gates. A transistor AND gate can be found here: http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/trangate.html
I think 100 ohms for the LED resistors is not enough. Edit: you may also run into some trouble with the BE voltage on the transistors. What i usually do is put the emitter connected to ground, put the LED and Rled before the Collector and put an R before the Base to limit Ib so that you do not fry the AND gates and have enough current to drive the transistor. Remember: Ic = beta(also known as gain) * Ib and Ie = Ib + Ic. Look at the image i posted previously.