Shop OBEX P1 Docs P2 Docs Learn Events
Keurig Auto Fill with BS1 and Milone eTape — Parallax Forums

Keurig Auto Fill with BS1 and Milone eTape

eod_punkeod_punk Posts: 146
edited 2013-07-13 20:40 in Robotics
Here is how I automated refilling my Keurig coffee pot with a BS1 and a 8" Milone eTape.
[video=youtube_share;f-w_Y_e3z-Y]

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.


IMG_0245.jpg
IMG_0244.jpg
IMG_0243.jpg
IMG_0246.jpg


IMG_0250.jpg
IMG_0249.jpg
IMG_0248.jpg
IMG_0247.jpg

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

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

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

'-----[Variables]---------------------------------------------------------

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]---------------------------------------------------------

Main_Loop:
  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 ]-----------------------------------------------------

Get_Level:
  POT Sensor,scale,level       'Check Fluid level
  RETURN

Fill:
  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.

Close:
  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
  RETURN

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
  RETURN
Keurig Auto-Fill.bs1 Keurig Button-Fill.bs1

Comments

  • doggiedocdoggiedoc Posts: 2,239
    edited 2013-05-25 06:43
    Very cool Mr. Punk.

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

    Doc
  • davejamesdavejames Posts: 4,045
    edited 2013-06-04 07:32
    ...very clever!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-05 09:00
    Very nice project! Thanks for sharing!
  • DracosIceDracosIce Posts: 1
    edited 2013-07-10 17:28
    Great project! What part do you use for the Solenoid valve?
  • eod_punkeod_punk Posts: 146
    edited 2013-07-10 18:04
    I used a ASCO Model #U8256A002V 24v solenoid that I had laying around from swapping parts with people.
    http://goo.gl/KX1Mq (Link to Grainger) I’m powering it with 12v with a pn2222a transistor.
  • WhitWhit Posts: 4,191
    edited 2013-07-12 05:56
    @eod_punk,

    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...
  • Nick ErnstNick Ernst Posts: 138
    edited 2013-07-12 08:32
    This is awesome....I think my Keurig has an appointment with destiny this weekend!
  • TtailspinTtailspin Posts: 1,326
    edited 2013-07-13 19:15
    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'.


    -Tommy
  • ercoerco Posts: 20,250
    edited 2013-07-13 20:40
    FANTASTIC! Love the BS1 and this is a great application. BRAVO!
Sign In or Register to comment.