My liquid soap dispenser failed to function. No matter how hard I swing my hand, nothing come out. Either I buy a new one or fix it. I got one day off. So let me have fun.
Step 1: Disassemble the Machine
I disassemble the small machine. Found the mother board (yes, a mother board with MCU :O ) and sensor are damaged. Luckily the motor is still functioning. So cut out those damage part. Let me replace the motherboard with my simple design.
Step 2: Trial Run the Circuit
I use a pnp and a npn transistor to drive the motor. The npn 8050 is used to drive big enough current for the motor. You may replace it with other npn transistor you have. Just need to make sure it can drive the motor..
I use a infrared emitter and receiver pair ITR20001 to sensor my hand. You may change to use other infrared emitter and receivers but you may need to change the resistors in series with the diodes.
I use a breadboard to try out the circuit and found that work perfectly. The 100ohm resistor may go very hot so you may change it to bigger value like 300ohm but that may shorten the sense distance.
Step 3: Solder Everything Together
To save space I have not used PCB. Just solder all parts together as captured..
Basically the two transistors are stick closely and the resistores are bend to stick on the transistors. The infrared emitter and receiver are solder together to become one unit that require only three wires.
Six lines come out from the complex. Three go to the infrared emitter and receiver. Three go to motor and power.
Step 4: Final Assembly and Water Proof
I use a hot glue gun to melt plastic glue on top of the components but leave some space for heat and allow all six lines come out.
The complex is just fit and can put into original room.
Now put everything back and try with real soap.
Normally no issue at all as the circuit has been tested via breadboard.
That is all. Enojy it.