span.SPELLE {mso-spl-e:yes;} span.GRAME {mso-gram-e:yes;}

AppleMark
Smart Coffee Maker X2005

Dave Belding and Kelsey Hill

 

Ever had your last bit of coffee burn up in the pot? You get down to those last few drops and the coffee pot doesn't lower its temperature at all and soon all you have is burned coffee and a scorched pot.

This is what led to the idea of the Smart Coffee Maker X2005. Using weight and temperature sensors, it determines when there's not enough coffee left to warrant keeping it at the same high temperature. At this point, it turns off rather than scorching everything.  If you add more coffee, it automatically turns back on to start brewing the next pot.

 

 

AppleMark
Components

 

The LCD

The LCD was the hardest part of the design of our Smart Coffee Maker. It requires slowing the bus down to 10 MHz (a simple setting in the SCCR register) and stretching timing out on all signals to accomodate the slower timing of the LCD controls. Once timing is properly set up, there is an initialization sequence that must be sent to the LCD as the first thing when it is powered on. This involves picking a function set, setting it for 8-bit data, and setting the cursor direction.

 

ThermistorsThermistors

There are 7 thermistors across the plate on the coffee maker. In a real design, the thermistors would be built right into the plate to take an actual temperature reading, but due to manufacturing constraints, we installed ours above. These are links to the protoboard, each in series with a 200 kOhm resistor. Voltage from across the resistors is sent to 7 of the 8 channels of the ADC and converted by software into a temperature reading.

 

Weight SensorWeight Sensor

There are two weight sensors on a protoboard under the coffee maker. One is just for balance support for the other which actually provides a voltage readout to the ADC, again across a nother resistor. This makes it output more voltage as more weight is applied. Again, in a real design, these would be built in under the plate to measure the weight of the coffee in the pot.

 

The Relay SwitchThe Relay Switch

The relay switch is set up with a transistor circuit. The gate on the transistor is connected to one of the test-point pins so when it is sent a 1, it allows power to go through the transistor to the relay. This is used to turn the coffee maker on at the beginning and to turn it off if the weight/temperature ratio becomes too small. The circuit can be seen in the picture, with the green wire at the top of the LCD.

 

Software

The majority of our software is implemented at the assembly language level.  The temperature sensors and weight sensor are read from the ADC on 2 ms interrupts and their values are stored into an array.  This array is processed by a C function called format.c that turns their hex values into something that can be outputted to the display.  Due to timing issues with the LCD, this is not all outputted at once; instead it is implemented with a 1 ms timer which essentially runs through the formatted array, writing it to the LCD screen.

The LCD is also initialized through an interrupt generated by a timer.  Because of certain timings required by the LCD initialization process, the interrupt is generated every 6 ms.  Our final interrupt is external, using IRQ7 for the end of conversion (EOC) signal from the ADC, letting us know that our conversion is finished.

 

 

Difficulties

 

* Bad cables, pins, protoboards. We made the mistake of building our circuit right on a powered protoboard, assuming that because it only worked for 5 volts and no one else needed it, it would be easiest and most compact to just build our circuit right on it. The problem arose when our protoboard starting only outputting about 0.9 volts instead of 5, which is not enough to power our LCD.

* the LCD. This was one of the most difficult parts of the entire project: interfacing with the LCD. Because it runs on a slower controller, timing has to be extra slow and stretched out. It also did not help when we had to rebuild our circuit board and accidentally put the data pins backwards. We also had to split the address for the LCD into 2 separate addresses for writes to either the data or instruction register.

* the ADC.  In lab 8 we used the dipswitches to select a channel for sending to the ADC, and over and over this seemed to work ok, but we were not able to select a channel in software until we realized that we were reading in our channel off of the wrong bus.