▒█▀▀█ █▀▀ █░░█ ▒█▀▀█ █░░█ ░▀░ █▀▀█
▒█▄▄█ ▀▀█ █▄▄█ ▒█░░░ █▀▀█ ▀█▀ █░░█
▒█░░░ ▀▀▀ ▄▄▄█ ▒█▄▄█ ▀░░▀ ▀▀▀ █▀▀▀
So, you might say use of a microprocessor isn't it overkill to this kind of basic project? nope. we're talking about expensive & hard to find antibacterial soap in here, every drop is counts.
My first attempt was a quick transistor, photodiode and yes it works. problem is it was spilling out at the night, i don't know why. maybe a bug passing thru (literally) or some light reflection hit to sensor.
If you check previous entries i was bought quite amount of attiny85 powered digispark boards while they was under $5, it's $9 today and even they don't manufacture it anymore.
Still 5 more left after the smart scaler project, used one of those as a soap dispenser. The things on market is just put a silly servo to already existing mechanic dispensers, i can't find something quick that works under one second then decided to build myself. The setup is quite simple and obvious on the picture.
Nozzle
I wanted to highlight a detail: the dispenser nozzle. basically it works on same principle with inkjet printer nozzles, i just shaped the tube with pincer.
Code
Application continuously checks the distance and if it's under 700 milimeters since 250 miliseconds, it just runs the pump for 500ms. that's all.
also got accidental release mechanisms and extra dispense feature.For example, device sitting at there for one day, maybe more. all the soap in hose is might went back a little and pump runs extra 100ms to suck it up from ground first.
full code available in here: dispenser_digistump.ino
Uses
+ digispark pro
+ Sharp 0a41skf85 distance sensor
+ IRF540 mosfet module
+ dual water pump