I am attempting to make a beverage dispenser for a party and I am not quite sure how to start with the wiring. My basic components so far are:
- Adafruit VCNL 4010 Proximity/Light Sensor
- A 12v peristaltic pump with silicon/food grade tubing
- Arduino Uno
- 12v battery
My end goal is to have guests be able to dispense their own drinks by putting their glasses close to the sensor in order to activate the pump. When guests' cups are full, they simply take their cup away and the drink dispenser shuts off.
The thing I can't quite wrap my brain around is how to get this 5v sensor in line before the 12v pump without frying the sensor or dropping the voltage to the pump so much that it dispenses too slowly. I am also not sure about the wiring between the pump and the sensor in order to get the sensor to talk to the pump.
Is this best done with a series or parallel circuit?
One idea I had was to start my circuit with a 12v battery and use it for both the sensor and the pump. Before the sensor I would put resistor(s?) in line to drop it to 5v. Then I think I would need some kind of transistor between the sensor and the pump.
I tried to be as specific as possible but with my lack of knowledge I feel like this is just a mound of general questions, so any help would be appreciated! Thanks.