Why Embedded?
This is a great question. With new laptops available for $500 and USB everywhere, why bother with the creation of embedded controls? Usually it comes down to the fact that the environment is not appropriate for a laptop (read: a laptop will not last long under the expected conditions). There are some nice side benefits such as not being easy to hack (although network printers are showing that this is not always true; see here for more). Embedded devices tend to have lower "update" cycles as well... although this too is not always the case. Our experience is that embedded solutions are more expensive to create. Depending on your organizations existing skill set, this extra cost may be significant.
In the case of the heat table project here at braingrove, an embedded controller made good sense. We needed to get rid of the laptop as it was constantly getting dirty and at risk of getting knocked around.
Design, design, design
So what is the big picture?

Right off the bat, we used RJ45 and USB connectors for things that are NOT ethernet or USB. This could be a big no-no. It was an experiment to reuse standard plugs. The logic was to use connectors for which we have a cheap and plentiful supply of cables. The external connectors and cables will have to be well labeled to prevent confusion.
The bulkhead connectors were ordered from L-com for about $5 each. Not too cheap, but then we do not need $20 cables either. The RJ45 bulkhead connector is particularly impressive as it is actually a bulkhead coupler. During fabrication, one can cut apart a standard ethernet cable 6-8 inches from one end. The short side is spliced apart and used to wire up the insides of the box and the rest of the cable can be used for the external cable with a positive lock connector!
Levers and Buttons

The product of this effort is really a prototype. Our prototype is using an unrefined algorithm for maintaining the water temperature. Essentially, if the temperature goes below the low temperature set point the heater turns on. If the water temperature is higher then the high temperature set point the heater turns off. The set points can be changed with a 3-way vertical lever switch and two buttons. The mid-position of the lever switch causes the controller to run. In the up-position, the controller takes inputs from the buttons for setting the high set point. Likewise, the lever switches low-position causes the system to use the button pushes to set the low set point. There are, of course, two buttons to changing the set points: up and down.
The Insides
The pinning goes like this:
| signal | Olimex Sam7 | DS1621 | LCD | USB Conn | RJ45 Conn |
| SDA | 3 | 1 | 3 | 1 | |
| SCL | 4 | 2 | 2 | 2 | |
| +5v | 36 | 8 | 1 | 7 | |
| GND | 38 | 4 | 4 | 4 | 8 |
| high set sel | 18 | ||||
| low set sel | 19 | ||||
| up button | 17 | ||||
| low button | 15 | ||||
| heater on output | 14 | 1 |
The innards look something like this.
The Code
We used IAR's Embedded Workshop. When coupled with a compatible JTAG debugging device, IAR's solution is a potent tool. IAR's pricing is really hard to swallow. They do offer a free for up to 32k option, so you can try it out. The debugger we used was the Segger USB JTAG device called J-Link . It turned out to be a wonderful solution... albeit pricey.



