- Joined
- Jul 4, 2009
- Messages
- 16,547
- Helped
- 5,157
- Reputation
- 10,347
- Reaction score
- 5,217
- Trophy points
- 1,393
- Location
- Aberdyfi, West Wales, UK
- Activity points
- 139,936
I doubt that will work for several reasons.
1. the PIC inputs are fixed at 2.5V by the pull-down resistors and collector load resistors, for example R8 and R19. Remove R8, R9, R10, R11 and R12.
2. the pull-down resistors on the buzzer and relay transistors do nothing whatsover except waste current, remove R6 and R4 (numbers not clear on diagram)
3. negative side of C3 should connect to GND
4. there is nothing to provide reset when powered up. Add a capacitor (~10uF) in series with a resistor (~100 Ohms) across the reset switch.
Conceptually, it looks like you intend conduction through the water to turn the transistors on. This will only work under certain circumstances. The water must be sufficiently conductive, most is due to dissolved electrolytes but pure water isn't. Also consider that to turn the transistors on, you need to supply current to their base pins. It appears at the moment that your only 'common' connection is ground and maybe a feed through R22. Even if the water is conductive, I suspect you will not find the transistors turn on reliably, especially if the water container is plastic or has conductivity to any other electrical items or ground.
It's your design but I would suggest a capacitor across the C-E of the sensing transistors to filter noise and mains interference, the water level will change very slowly compared to 50/60Hz mains so you can afford a slow reacting input. Also connect resistors from each sensing transistor base to +5V, the intention being to make them conduct when water is NOT present so you want fairly high values, I suggest 220K as a starting value. It will reverse the logic at the PIC input but you can fix that easily in software, it does mean the water can have a connection to ground instead of +5V though. As water touches the sensors it conducts the bias current to ground and turns the transistors off. It also limits the amount of current through the probes which will help to stop them corroding.
Brian.
1. the PIC inputs are fixed at 2.5V by the pull-down resistors and collector load resistors, for example R8 and R19. Remove R8, R9, R10, R11 and R12.
2. the pull-down resistors on the buzzer and relay transistors do nothing whatsover except waste current, remove R6 and R4 (numbers not clear on diagram)
3. negative side of C3 should connect to GND
4. there is nothing to provide reset when powered up. Add a capacitor (~10uF) in series with a resistor (~100 Ohms) across the reset switch.
Conceptually, it looks like you intend conduction through the water to turn the transistors on. This will only work under certain circumstances. The water must be sufficiently conductive, most is due to dissolved electrolytes but pure water isn't. Also consider that to turn the transistors on, you need to supply current to their base pins. It appears at the moment that your only 'common' connection is ground and maybe a feed through R22. Even if the water is conductive, I suspect you will not find the transistors turn on reliably, especially if the water container is plastic or has conductivity to any other electrical items or ground.
It's your design but I would suggest a capacitor across the C-E of the sensing transistors to filter noise and mains interference, the water level will change very slowly compared to 50/60Hz mains so you can afford a slow reacting input. Also connect resistors from each sensing transistor base to +5V, the intention being to make them conduct when water is NOT present so you want fairly high values, I suggest 220K as a starting value. It will reverse the logic at the PIC input but you can fix that easily in software, it does mean the water can have a connection to ground instead of +5V though. As water touches the sensors it conducts the bias current to ground and turns the transistors off. It also limits the amount of current through the probes which will help to stop them corroding.
Brian.