Timer for dispensing system
waynel
Posts: 2
Hello All
I am building a drinks dispensing systems. I have four solenoid valves driven with four MOSFETs, via a BS2. Also I have LCD03 display.
I would like to activate the solenoid all at one but switch them off at different times. For example Valve1=200sec, Valve2=203sec, Valve3=196sec and Valve4=210sec.
The problem I find with the BS2 is that there is no interruptible timer or timer registers. Is there another device I can add such as a timer ic with registers and comm via serial?
Cheers
WayneL
I am building a drinks dispensing systems. I have four solenoid valves driven with four MOSFETs, via a BS2. Also I have LCD03 display.
I would like to activate the solenoid all at one but switch them off at different times. For example Valve1=200sec, Valve2=203sec, Valve3=196sec and Valve4=210sec.
The problem I find with the BS2 is that there is no interruptible timer or timer registers. Is there another device I can add such as a timer ic with registers and comm via serial?
Cheers
WayneL
Comments
You could indeed add an external timer module such as a DS1307.
But an easier way might be to add a short subroutine to your program which will give a delay of say, 100 mSec.
Now, each part of your solenoid program can call the subroutine repeatedly. The solenoid code just has to track how many times it called the delay subroutine to figure out the seconds delayed.
Cheers,