Technologic Systems Logo
Search Icon
Customer Area | Contact Us |Cart Icon
  16525 East Laser Drive
Fountain Hills, AZ 85268
Phone (480) 837-5200

Home > Software > Solutions for ARM > NetBSD Toaster

 

NetBSD Toaster with the TS-7200 ARM9 SBC

arrow

It has long been regarded that the UNIX-like OS NetBSD is portable to every type of machine except perhaps your kitchen toaster. Technologic Systems, however, has conquered this last frontier. Using one of its rugged embedded TS-7200 single-board computers housed inside the empty space of a standard 2 slice toaster, Technologic Systems has designed a functional NetBSD controlled toaster.

The toaster on display now in the NetBSD booth at the LinuxWorld Expo in San Francisco, is as high-tech as they come. This toaster features a 4 line LCD, USB keyboard, 10/100 ethernet port and a RS232 serial port for the external console. The toaster's internal circuit boards have been bypassed and routed through the CPU board allowing NetBSD complete control over the toaster's features. A keyboard connects through a USB port on the side of the toaster and the 4x40 LCD displays a NetBSD/toaster login prompt. The burner element is also controlled by the TS-7200 via an internal relay. Unlike previous NetBSD toasters which were nothing more than a glorified PC case-mod, this toaster can actually toast bread!

NetBSD was ported to the toaster by Jesse Off (an engineer at Technologic Systems). When asked details about the week-long effort, he replied, "NetBSD is well laid out for this type of embedded application development. I was most worried about physical things such as fitting the hardware inside the case and the board being able to survive 60 seconds at a time a half centimeter away from an 800 watt burner element. A regular PC can't even survive room temperature without heatsinks and fans, and the TS-7200 has neither." The end-design has no thermal issues and will not let the user toast if things start getting close to the temperature margins of the internal components measured by the onboard temperature sensor.

When asked what he thinks of the NetBSD operating system, Off replied, "Well, I'm skewed. I have been a small-time NetBSD developer on and off the last 4 years. NetBSD's single no-frills high quality source tree is a great starting point for bringing up an embedded application. The API's have a great power-to-complexity ratio and are coded with great wisdom as well as great intellect. For NetBSD though, being wiser is definitely the greater virtue."

When asked what the point of this exercise was, company president Bob Miller chuckled and had this to say: "Well, we're definitely not planning on going into full production with this. The idea was to follow through on a process most of our customers are using everyday in their own embedded designs using our boards. Though customers are not likely using toasters in their designs, they are likely encountering many of of the same issues such as GPIO control of hardware, custom software design/modification and dealing with tight spaces and high temperatures."

So what exactly is inside this toaster for a computer to read/control? For one, there is a small magnetic latch that holds your toast down against the spring action after you press down. To engage that latch, one needs to know when the user is pressing the bread into the toaster which the TS-7200 reads with another sensor. There is a browning level knob (a potentiometer) which the TS-7200 reads with an analog converter input. The front panel also contains 4 bright red LEDs and 5 push-buttons which appear to the system as a 5-key keyboard. The NetBSD LCD driver presents a standard VT100 text mode console that both the USB keyboard and 5-key front-panel are connected.

Technical Details

All peripherals had NetBSD drivers written that allow their manipulation and readback. The interface to toaster hardware uses the sysctl API. sysctl allowed for the easy coding of the toasting finite state machine as a simple shell script. The 4 LED's are configured as PWM style outputs to vary brightness/blink-rate. Temperature is tracked using the TS-7200 onboard TMP124 sensor. This temperature sensor has .0625 degC precision and the kernel driver takes multiple measurements averaged over time to interpolate even higher precision. (the sysctl returns millionths of a degree C) The burnlevel knob is a potentiometer connected to channel 0 of the 12-bit MAX197 ADC which returns a number 0-4096 to the system also via sysctl. The 5 buttons are simple switches that are polled at 64Hz by NetBSD's matrix keypad driver. This driver allows for attachment into the system as a standard keyboard using NetBSD's wskbd API. The 4x40 text mode LCD is a raw HD44780 based LCD available at allelectronics.com This devices uses the bit-banged hd44780 kernel driver which allows attachment into the system as a standard NetBSD wsdisplay. The wsdisplay and wskbd drivers coalesce in the wscons framework to appear to the system as a regular VT100 system console.

A full NetBSD installation is on the 512MB compact flash attached to the TS-7200. This includes self-hosted compilers, FTP/telnet server, ssh client/server, crypto libraries, kernel/userlevel debuggers, and standard UNIX utilities. Apache with PHP is also installed on the TS-7200 and presents some CGI programs to control the LEDs, play music, etc... Since the 4x40 LCD is attached as a generic console, manipulating text files is also reasonably possible using installed text editors, though admittedly using vi on a 4 row text display is not particularly productive.

The toaster itself uses a single TS-7200 plus TS-DIO24 daughterboard for toaster control. Two 48mA output pins on the TS-DIO24 directly drive 2 5V relays with 250V/8A contacts. One relay is used to switch 110V to the burner element and one relay is used to switch 25VDC to the magnetic latch. 25VDC is acquired by tapping off some traces on the stock toaster circuit board after the power supply. All traces from the power supply portion of the PCB to the LEDs and buttons were cut and instead attached to the TS-DIO24 and TS-7200 GPIO pins via small jumper wires soldered directly to the components. A separate, small 5V switching power supply is also placed inside the toaster shell to power the TS-7200, TS-DIO24, and LCD off the same 110V line that comes in through the toaster shell. The TS-7200's USB port, DB9 serial console, and ethernet jack are brought out on jacks on the backside of the toaster. The USB port is then used to connect a small PC keyboard to the system which combines with the 5 key wskbd to control the 4x40 LCD display console. USB speakers are attached through the built-in USB hub on the keyboard to allow playing of MP3's while toasting occurs.

For more information about NetBSD, please visit their website

Jesse's page on details regarding NetBSD on a TS-7200 is here