Monday, July 2, 2012


WIDJETS is short for Wild Iris Discovery Junior Engineer Training Sets. When this project first started, we didn't have a name for it. In a moment of whimsy the term WIDJETS just came out. It's an easy name to remember and has a fun connotation to it; something that you want for a product targeted toward young people. Since then the name has stuck. So until something better presents itself, WIDJETS is what we call it.

LEGO-LOGO was the first robotics product produced by Lego. It came on the market in the early 1990's and was the predecessor of LEGO-MINDSTORMS that came out in 1998.

Here is a video clip showing LEGO-LOGO in action. If you go forward to 3:20 you'll start to see glimpses of the control box. The control box was connected via a RS-232 serial link to either a MAC or IBM-PC running DOS. The PC programming was an IDE from which one could set up, program and run a project. The LEGO-LOGO software allowed one to create a GUI "front panel" to run their project from that included the kinds of user controls that you would find in a LabVIEW program. The actual programming for one's project was in the language LOGO. At 3:40 one can see a MINDSTORMS RCX Brick incorporated into one of the projects. You could do this because the RCX Brick still used all of the same motors, sensors and actuators from the earlier LEGO-LOGO product.

My first encounter with LEGO-LOGO came when my wife, Paula, was part of a summer STEM enrichment program for middle school girls that used LEGO-LOGO. As an engineer, I took one look at it and concluded I could do a lot better. I was already familiar with the new USB serial protocol from my work as a manufacturing engineer. At that time USB seemed to be the natural choice for a control box interface, such as the LEGO-LOGO one.

There were no USB Host Controller chips available at that time. This motivated me to create my own using some CPLD parts from Lattice Semiconductor. My first USB Host Controller was written in CUPL, a now defunct HDL language. I companioned this Host Controller with a Dallas Semiconductor DS80C310, 8051-type embedded controller to make my first WIDJETS control box. The work was published in a two-part article in Circuit Cellar Magazine: issues 108,109. This point marks the end of my first design effort.

WIDJETS Control Box, Rev: A,  the original bread board
About this time my son was born, so work on this project had to be put on hold. It stayed on the shelf until the early 2000's when Cypress Semiconductor came out with an 8-bit USB Host Controller chip for embedded applications. I redid my old prototype board, taking out the CPLD parts and replacing them with the new SL811HST part. At this time I also upgraded the DS80C310 to an Atmel AT89S8252, 8051-type micro-controller part. Once my revised prototype was running, I started next on writing a Forth compiler for it.

WIDJETS Control Board, Rev: B.
It bothered me that it was taking 15 to 30, or more, 8051-machine instructions to execute just one Forth instruction. To speed up the processor's ability to run Forth, I tried the idea of adding a Forth "coprocessor" to the design. But within a week, it became obvious that if I just replaced the CPLD part I was using for the coprocessor, with a FPGA, I wouldn't need either the AT89S8252 or the SL811HST in the circuit. This marked the end of the second chapter of my design effort.

The next prototype design was based on a single FPGA incorporating both a stack-based microcontroller and the USB Host Controller in one package. This design also included a small LCD graphics display and a 6-button keypad. Since the machine code instructions for my stack-based microcontroller were Forth words, it could run Forth programs with no time penalty.

WIDJETS Control Box, Rev: C
I started working on the design of the individual plug-in motors, sensors, and actuators that would be needed to complete the WIDJETS product concept. Then the problems started to happen. To describe USB as a temperamental serial bus would be an understatement. The system would run fine for minutes at a time, but then glitch and crash. After much hair pulling, I finally traced the problem down to timing glitches that are inherent to the USB interface itself. I originally chose USB 1.10 as my serial interface, since as an industry standard it gave me access to a host of low cost parts to design around. But by this time, USB 2.0 was already in play, USB 3.0 was getting ready to be released, and USB 1.10 parts were disappearing from the market.

With the original reasons for selecting the USB serial interface no longer applying, there wasn't any reason left to stick with it. So I made the leap of faith to create my own serial bus; one optimized for the needs of the WIDJETS concept. This marked the end of the third chapter of my design effort.

Building on all of the painful lessons over the previous 10 or so years, the current design emerged. The project as described in a previous post was completed in 2010. Since then, life and finances have kept me from making any further progress. Hopefully, this year, I can get back to it and make some more progress.

No comments:

Post a Comment