automating a coffee maker, need a good relay

Discussion in 'General Electronics Chat' started by magnet18, Mar 19, 2013.

  1. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    So, my current idea is to automate the coffee maker in my room, so I don't have to get out of bed to turn it on in the mornings, and also be able to trigger it via remote command
    I was thinking sms command, or possibly IR
    Probably gonna run it with an arduino

    my idea was a latching relay to just put in series with the current on/off switch, triggered via the arduino
    I should be able to find a 12V/5V power line in the coffee maker somewhere to use

    anyway, I need a latching relay triggered by 12V and capable of switching 120V
    Does anyone know any good part numbers to look up from their experience, or have other ideas to pitch into the project?


    Thanks!
     
    Last edited: Mar 21, 2013
  2. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    T90, T91, T92 series from here will do it. Choice of PC mount, panel mount or PCB coil drive with off-board tabs. Get name brand TE (tyco) etc. Many of the Chinese knockoffs are pure junk.

    Mouser stocks them.

    EDIT: oops! Didn't see 'latching' requirement. Why? You could do a standard latching via contact affair I guess but why not use the uC?

    If you can't do it with the uC, consider a small DIP 2 coil magnetic latching relay to drive the coil of the power relay. Cheaper than a power latching relay.
     
    Last edited: Mar 19, 2013
  3. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    yea, doing it with the uC would be easier, I failed to think that power relays that latch would be more expensive

    Thanks for the part advice!
     
  4. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    hrm, coffee maker is unfortunatley simple

    might switch to a smaller uc, and just set up a simple timer, rather than sms :p
     
  5. charliewilde

    New Member

    Mar 13, 2013
    13
    1
    There are many various types of coffeemaker, I would say this is really nice idea to have this kind of machine. Coffeemaker contains a lot of advantages like they have many style model, it can also various price and one most of all you can save time for making a coffee.
     
  6. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    With the how-to resources available here and with a uC, why not make it a timed ON with a passive IR sensor that will override the normal ON time and make coffee early when you get up to let out the cat?
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    You can buy this machine for 25 bucks at Walmart:

    [​IMG]

    You can buy this Arduino for about the same from Adafruit:

    [​IMG]

    Once you get the Arduino you still need a coffee maker.
     
  8. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I HAVE a coffee maker, and it cost like $10, and just needs automated
    I also have 3 arduinos floating around with no home or purpose in life

    also, dorm room, no cat, and a roommate that sleeps till noon kinda puts a damper on the passive IR :p
    though, it is a good idea, I might get a sensor of the wavelength of the flashlight on my phone so I can just shine it at it :)

    now the question arises, what kind of setup do i use to determine the time?
    It's seeming easier to tie this into my old junk alarm clock that sits right next to it...
    melding the clock and this together would allow an easy power source for the uC, as well as a time reference and way to set the time for it to start
     
    Last edited: Mar 19, 2013
  9. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    Make a simple one with an H11AA1 or something similar. When the line cycle goes through zero, both input LEDs will be off. If you have a pullup on the collector of the p-transistor, it will spike up every 8.3333ms. Connect this to an IRQ input of the uC and count em up. Consider what happens if the power fails. If you have a battery backup, you can generate an approximation of the timing while waiting for power to come back.

    Make this with a transformer ->bridge ->filter->regulator linear supply, pick up the AC off the input of the bridge (lower voltage).
     
  10. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Why not just use the uC's timer to keep track of the time? Super accuracy shouldn't be a requirement.
     
  11. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    Actually, its not as simple as you may think. Even using something like a PICs TMR1 with the watch xtal setup requires trimming for long term accuracy. Same using the main osc with an internal timer. You can do it but without trimming the error will eventually accumulate to something noticeable. For a timer, say run something a few hours and shut off its not a problem. For a time of day clock which should be accurate without intervention, it can be a challenge.

    Electric power co's are constantly fine-tuning the line freq to maintain an average of 60Hz VERY accurately. The freq at any instant may be off by a little but over time, its bang on.
     
  12. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    yea, but if I use something like that, then I need a way to SET the time, and then a way to view what the time is set to...
    It's really much easier to tap into the buzzer line on the alarm clock

    I already went ahead and re-wired the 9v battery backup line on the clock to be a 10V output, cut the buzzer wire, put a voltage divider on it, took some measurements, and wrote the code for the arduino to measure the voltage to the buzzer
    works like a charm actually, which is surprising, since the clock has just a transformer and diodes, so the entire circuit fluctuates between 10-12 volts for the power supply

    Code ( (Unknown Language)):
    1.  
    2.   int alarm = A0;      // select the input pin for the potentiometer
    3.   int coffeeMaker = 13;// select the pin for the LED
    4.   int sensorValue = 0; // variable to store the value coming from the sensor
    5.   float voltage;       // variable to store voltage in
    6.  
    7. void setup() {
    8.   // declare the coffeeMaker pin as an OUTPUT:
    9.   pinMode(coffeeMaker, OUTPUT);  
    10. }
    11.  
    12. void loop() {
    13.   // read the value from the clock:
    14.   sensorValue = analogRead(alarm);    
    15.  
    16.   float voltage = sensorValue * (5.0 / 1023);
    17.  
    18.   if (voltage > 1)
    19.   {
    20.     digitalWrite(coffeeMaker, HIGH);
    21.     delay(100);
    22.   }
    23.   else if (voltage < 1)
    24.   {
    25.     digitalWrite(coffeeMaker, LOW);
    26.   }
    27.  
    28. }
    29.  
     
    Last edited: Mar 20, 2013
  13. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Didn't think we were talking about a time of day clock. It only needs to run from the time the appliance is set up until time to brew the coffee.
     
    JohnInTX likes this.
  14. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    I guess we were thinking along different lines. Good info either way!
     
  15. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    Timer as in "make coffee at 8AM"
    not as in "make coffee in 2 hours"

    anyway, my problem now is how to wire the relay

    if i do it in series, i need an override switch so i can turn it on when the alarm is not on

    the current switch is spDt, and im not sure why since nothing happens when its off, it just connects the side of the heating element that should be hot, to neutral, so i might just disconnect it and wire it a always on, then the relay will do the switching

    I'm glad i caught that, or the resulting short would NOT have been pretty :eek:
     
  16. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Agree. I think I'm going to try an experiment with my PIC board and see how long it stays accurate. I can think of some ways to compensate for off-center crystal frequency, but not for drift.

    Sorry for the O/T Magnet, but your question begat more questions.
     
  17. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    If you wired the relay contacts in parallel to the switch, then you could still use the switch if you want coffee at some odd hour other than what you set up the timer for. You have the options of using the timer or the manual swtich.
     
  18. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I almost did that, then realized that the hot side of the element was connected to neutral via the switch, so if i had just used the relay to make the line hot, it would have shorted :eek:
    I don't see why it needs to go to neutral though, I'll rewire it after class

    ooh...
    unless it's the neutral line that allows the in-switch light to light up...
    in which case it's fine...
    I'll see
     
  19. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    That doesn't make any sense. By wiring the relay in parallel, the relay contacts would simply replace the switch contacts that presently operate the appliance. If what you say is true, the switch should blow every time you turn the appliance on.
     
  20. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    It's a SPDT switch, 3 contacts
     
Loading...