Keurig Auto Fill with BS1 and Milone eTape

eod_punkeod_punk Posts: 146
edited July 2013 in Robotics Vote Up0Vote Down
Here is how I automated refilling my Keurig coffee pot with a BS1 and a 8" Milone eTape.

The BS1 polls the eTape using the "POT" command and opens a 12vDC solenoid through a PN2222 transistor if it is low. It also flashes the LED quickly while filling. To try and prevent an over fill and making a mess while it is filling the BS1 keeps count through the fill loop. If the count limit is reached it will close the solenoid and no longer automatically fill the reservoir untill the power is toggled, the LED is also toggled slowly. If you want to fill the reservoir before it is low you can just press the fill button and it will top off the tank. To get the water to the Keurig I tapped into my refrigerator water supply. I used all 1/4" push to connect fittings and a shut off valve at the T connection.



' {$STAMP BS1}
' {$PBASIC 1.0}

' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL Pbtn   = PIN0
SYMBOL Led    = 1
SYMBOL Sensor = 2
SYMBOL Valve  = 3
SYMBOL scale  = 100


SYMBOL level = B0
SYMBOL count = W1       '0 to 65535
SYMBOL CountLimit = W2

CountLimit=200 '0 to 65535

'-----[ Initialization ]-----------------------------------------------------
  'DEBUG CLS                    'Debug info for checking fill level.
  'GOSUB Var_Data
  GOSUB Get_Level
  'GOSUB Var_Data

  HIGH Led                     'Turn the LED on to inidacte power is on.

'-----[Main Code]---------------------------------------------------------

  GOSUB Get_Level
  'GOSUB Var_Data
  IF Pbtn=1 AND level>19  THEN Fill
  IF level>=38 THEN Fill
  PAUSE 100
  GOTO Main_Loop

' -----[ Subroutines ]-----------------------------------------------------

  POT Sensor,scale,level       'Check Fluid level

  HIGH Valve                   'Open solenoid valve to start filling.
  FOR count = 1 TO CountLimit  'If count limit is reached the tank maybe over filling.
    GOSUB Get_Level            'Check fill level
    'GOSUB Var_Data             'Debug values if needed.
    IF Level<=19 THEN close    'If full goes to the Close solenoid routine.
    GOSUB Flash                'Goes to the LED flashing routine.
  NEXT                         'Loop and add one to the counter.
  GOTO Alarm                   'Goes into error to prevent over filling the tank.

  LOW Valve                    'Close solenoid valve.
  HIGH Led                     'Turn the LED on to inidacte power is on.
  'GOSUB Var_Data               'Debug values if needed.
  GOTO Main_Loop

Flash:                         'This will flash the LED to indicate the solenoid is open.
  HIGH Led
  PAUSE 100
  LOW Led
  PAUSE 100

Alarm:                         'This will stop and flash a warning light in case of error.
  'GOSUB Var_Data             'Debug values if needed.
  LOW Valve
  LOW Led
  PAUSE 1000
  HIGH Led
  PAUSE 1000
  GOTO Alarm                   'If error occures the power to the Basic Stamp must be reset or powered off before it will work again.

Var_Data:                      'For Debuging Purposes.
  'DEBUG "level = ", #level
  'DEBUG " Count = ", #Count, CR
Keurig Auto-Fill.bs1 Keurig Button-Fill.bs1
1024 x 768 - 56K
1024 x 768 - 89K
1024 x 1365 - 131K
1024 x 1365 - 109K
1024 x 1365 - 127K
1024 x 1365 - 143K
1024 x 1365 - 100K
1024 x 1365 - 125K
There is no problem that can't be solved with a suitable amount of explosives!
EOD Memorial


  • 10 Comments sorted by Date Added Votes
  • doggiedocdoggiedoc Posts: 1,996
    edited May 2013 Vote Up0Vote Down
    Very cool Mr. Punk.

    I am pleased to see another BS1 project! Seems to be fewer and fewer these days.

    Some times my mind seems to wander..... these days I just tag along.
  • davejamesdavejames Posts: 3,902
    edited June 2013 Vote Up0Vote Down
    ...very clever!
    Well-written documentation requires no explanation.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited June 2013 Vote Up0Vote Down
    Very nice project! Thanks for sharing!
    Chris Savage | Engineering Tech | Main Office: (916) 624-8333 | Direct to Tech Support: (888) 997-8267 | Website | Twitter | Google+
  • DracosIceDracosIce Posts: 1
    edited July 2013 Vote Up0Vote Down
    Great project! What part do you use for the Solenoid valve?
  • eod_punkeod_punk Posts: 146
    edited July 2013 Vote Up0Vote Down
    I used a ASCO Model #U8256A002V 24v solenoid that I had laying around from swapping parts with people. (Link to Grainger) I’m powering it with 12v with a pn2222a transistor.
    There is no problem that can't be solved with a suitable amount of explosives!
    EOD Memorial
  • WhitWhit Posts: 3,800
    edited July 2013 Vote Up0Vote Down

    Great project - my Dad is hooked on his Keurig and we are always refilling it!

    Thanks also for the link to the EOD Memorial - learned something new...

    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Nick ErnstNick Ernst Posts: 138
    edited July 2013 Vote Up0Vote Down
    This is awesome....I think my Keurig has an appointment with destiny this weekend!
  • TtailspinTtailspin Posts: 1,326
    edited July 2013 Vote Up0Vote Down
    Great idea! They do need to be filled with water every morning...
    I fought hard against getting one of these coffee makers, I thought it was a gimmick first time I saw one in the store,
    We got had to use one for a weekend, Now I don't want to be without my Keurig.

    Thanks for sharing, and congrats on making 'project of the week'.

  • ercoerco Posts: 18,937
    edited July 2013 Vote Up0Vote Down
    FANTASTIC! Love the BS1 and this is a great application. BRAVO!
    "When you make a thing, a thing that is new, it is so complicated making it that it is bound to be ugly. But those that make it after you, they don’t have to worry about making it. And they can make it pretty, and so everybody can like it when others make it after you."

    - Pablo Picasso
Sign In or Register to comment.