Tuesday, June 12, 2012

The Laser TV Project

Some people use electronics to build something they need, others just want to find out if something can be done. These projects are often the most fun to read about because of their unusual character and the creativity needed to accomplish the (sometimes bizarre) goal. The laser TV project posted on Elektor Projects is such a project. It is an attempt to project an image by means of 30 rotating mirrors mounted on a VHS head motor. Why you would want to do such a thing is not important, can it be done is the thing that matters.

According to the author the main challenge is the phase synchronization of the top plate on which the mirrors are mounted, and the author is looking for interested BASCOM programmers to develop the motor PLL (or a similar software solution). The motor rotates at 750 rpm and must be precisely synchronized to a pulse, which is available once per revolution.

Who can help, or who has done something similar with Atmel and BASCOM? Head over to Elektor Projects and join hpt in this interesting project. While you’re there, why not have a look at the other proposals and vote. Your vote counts!

Wednesday, April 11, 2012

Linux on AVR

Every once in a while something comes along that changes the way you look at things. A project posted last week by Dmitry Grinberg was such a thing for me. The project in itself is already pretty strange: porting a 32-bit operating system (OS) to an 8-bit microcontroller lacking most of the features needed to actually run the OS. Why would you want to run Linux on an AVR? “Because you can”, would answer George Obama (or was it Barack Mallory?) and now also Dmitry. Yes, apparently you can (I didn’t try it myself), it only takes two hours to boot Linux on the AVR, with an effective clock speed of a dazzling 6.5 kHz. It is fun as in academic demonstration.

Yet for me this demonstration, working or not, useful or not, shows more. Emulating one platform on another more powerful platform is common practice these days, but I had never thought about doing the opposite. I think emulating a 32-bit ARM processor on an 8-bit microcontroller is actually quite a cool idea. Maybe Dmitry is not the first to have done this, I don’t know, but it is an excellent example of thinking the other way around, outside the box. The result may be useless for now, but who knows what one day may come from this?

Honestly, did you ever think of hooking up a SIMM memory module to an 8-bit MCU? I didn't, but maybe I will do so in the future.

Way to go Dmitry!

What do you think? Did you try something similar yourself? Please let me know, I would love to hear about other outside-the-box MCU projects.

Thursday, March 1, 2012

MCU Development Board Benchmark - The Winners

The February issue of Elektor contained an article on the MCU Development Board Benchmark that I introduced in an earlier post. In the article the benchmark was developed slightly further and it ended with a request for comments from the readers. The article also promised to give away the TI TMS570 USB kit that started it all.

A few readers actually responded so we have to keep our promise to give away the kit. But before we do that, let me first resume the comments that came in. Some remarks were rather vague and can not easily be converted into parameters, but several readers proposed a multiplication factor related to the number of operating systems the dev kit will work on: if it runs on Windows, MAC & Linux the factor is 1, if not it will be lower.

Other suggestions concerned more generic criteria like documentation, examples, usability, user friendliness and ease of programming the controller. In my opinion these criteria are actually well covered by the LED blinking test. If you cannot get an LED to blink within a reasonable amount of time and effort, then the kit has a problem. The resulting figure does not indicate where exactly the problem is (IDE, programmer, licenses, etc.), but that's why the test should be accompanied by a detailed article.

OK, that's enough about the benchmark for now. I would like to thank all the people that took the time and effort to participate in this, ehm, project. The winner of the TI TMS570 USB kit is Alexander Steiger. I decided to throw in a Freescale Kinetis KwikStik too and that one is going to Jorgen Sandberg.

Congratulations! to the winners and also a request: if you manage to do something interesting with these kits, please let me know.

P.S. I used the services from Random.org to select the winners as randomly as possible.

Monday, February 6, 2012

KwikStik follow-up

In a previous post I tried to get something going with Freescale's Kinetis KwikStik. Here is a short follow-up on Green Hills’ Multi IDE that is included with this kit. As mentioned in the original article I had a hard time getting a trial license for this software, but I finally got one the day I left for Christmas holidays. When I came back I didn't have time to get back to it right away and then two weeks later or so I received a message from GHS saying that my trial license was about to expire. Oh, come on guys, we're in 2012 now. Be a bit more flexible and open!

In the Elektor article on the MCU Development Board Benchmark about a benchmark that I introduced in an earlier post, I promised to give away the TI TMS570 USB kit that started it all. I have now decided to throw in a Freescale Kinetis KwikStik too! So keep sending your comments and remarks, the deadline is the 1st of March 2012.

Tuesday, December 13, 2011

KwikStik? KwikStuk!

During a recent electronics show my attention was drawn by a strange small orange device on display at the Freescale booth. It turned out to be the Kinetis KwikStik and a very enthusiastic Freescale employee immediately showed me its features and explained that it was fully compatible with the Tower system, Freescale’s reconfigurable development platform, but it can also be used stand-alone. When I asked for a KwikStik to review, no problem, he would send me one after the show. Only five days later (including a weekend) I received the kit.

The KwikStik comes packed in a nice box and you can see that Freescale has spent some time and effort to deliver an attractive product. In the box you will find a KwikStik in its bizarre orange silicone jacket, a DVD, a USB cable and some instructions. Included also is a warranty card, the first one I get with a dev kit. If the kit is broken, you can send it back.

Looking closely at the KwikStik you may notice the logo of Pounce Consulting in several places. Looking up this company on the internet you will find an electronics outsourcing company that probably did this kit for Freescale.

The box promises “the fastest way to realize your design potential”. Now that got me interested as this seemed to be a great candidate for the MCU dev kit benchmark that I presented in a previous post.

When you open the booklet you will see two photographs of the board with arrows indicating its special features. There are many: an LCD, a microphone, a micro USB socket (two actually, the other is for the Segger J-Link connection), an audio output, a buzzer, six touch buttons, a micro SD socket, a battery, an IrDA port, a switch, extension connectors (one as a PCI-like edge connector), and, almost forgot to mention it, a Kinetis K40X256VLQ100 ARM Cortex-M4 MCU. This 100 MHz hot rod sports 512 KB Flash memory, 64 KB RAM and 4 KB EEPROM. A large range of integrated peripherals is available and since it is Cortex-M4 based, it also has an additional 32-bit integer DSP (which is completely ignored in the K40 Sub-Family Reference Manual).

On the next two pages of the booklet information is provided about the demo software preloaded on the kit and also step-by-step installation instructions. Step 1 is connecting the board to the PC to power it. Step 2 is navigating through the demo applications. Step 3: select an application, step 4 go to the Freescale web site. Strange. Nothing to install? I mean, what about the DVD? Next page of the booklet: J-Link and additional features. Last page: nothing.

Oh? OK. Well, let’s do step one: connect the board to the PC. Windows detects the board without any problems and I see the text “KWIKSTIK” scrolling from right to left, hear a beep and then see “LFT” followed by “RGT”, then “SEL.” (with dot) and finally scrolling again “SOUND RECORDER”. Pushing the touch pads is not very reliable and results in a kind of random behaviour, I don’t feel that I have any control over what is happening. So I remove the board from its silicon jacket and this makes things somewhat better. I can now navigate a bit easier, but it is still not very reliable.

The options available are Sound recorder, Remote control, USB mouse and Fretris. Trying the sound recorder I manage to record 2 seconds of data. The recording played back over headphones is barely audible and hidden by some loud interfering sound. I cannot try the remote control because I do not have a Sony TV. The USB mouse suddenly makes me understand the acronyms LFT, RGT & SEL. Why on earth didn’t they write it out? The display is large enough. Anyway, the USB mouse doesn’t work very well. Pressing LFT does random things on my PC like jumping to the left or selecting a block of text, the RGT pad opens the context menu. Actually LFT seems to do a double or triple left mouse button click; RGT does a mere single right mouse button click. Finally, Fretris is a simple Tetris game that is very hard to control as the touch pads do not work well.

The Kinetis KwikStik indicates all by itself its helloWorld score. It is even more severe than I am.

So, then, what’s on the DVD? Well, a flash animation that let’s you click some links to open documents or install software. Included on the DVD are Freescale’s MQX RTOS (free), IAR’s Embedded Workbench for ARM (30-day evaluation and a 32 KB limited kickstart edition), Green Hills’ Multi IDE and Keil’s MDK for Freescale Kinetis (32 KB limited edition). Other tools (Segger, CodeWarrior, etc.) are available on-line. Unfortunately, there are no instructions on what you should do next.

At random I pick Green Hills’ Multi IDE. Wrong choice. You have to unzip this, and then install 1 GB before getting tangled in a license request net. In the world of fastest ways to realize your design potential this is very bad and results in an immediate uninstall. Unfortunately there is no uninstall provided for this package, which makes it even worse. Let’s hope deleting the folder is enough to get rid of this stuff. Probably not, because a dongle driver was installed too.

[24 hours later: I am still waiting for an evaluation license from Green Hills.]

[Monday 19 December, a week later: I finally received a message from Green Hills about my licence request. More questions, but still no evaluation license. How intimate do you have to be with this company before they let you have a glance at their products? This sure takes the pace out of the fastest way to realize my design potential.]

Because I do not give up easily, I now try the IAR EW 32 KB kickstart edition. First, get a license by filling in a form and answering all kinds of questions. Contrary to Green Hills license delivery is immediate. Then install 2 GB of tools to discover that no examples are included for the KwikStik. I have now reached the point of saturation and give up.

After two hours of fiddling with the hardware, installing software and filling in license request forms I am still not able to flash an LED on the board. I haven’t even addressed the J-Link needed to program the board for which separate drivers have to be installed from some conveniently unspecified location. The fastest way to realize your design potential, yeah right. What a bummer. The KwikStik receives an helloWorld score of 1. You cannot get any lower than 1 because I will always give 1 to compensate for the time & effort to design, build and send me the kit.

It is really a shame to see how all the effort to design a nice and fun looking kit with an extremely powerful MCU is annihilated by a total lack of interest for the end user. Is it really that difficult to add a few lines of instructions to help the user on his way? Many hours went in the design of this board but apparently the budget was used when the DVD still had to be done.

Disclaimer
The reviewed board may be great once you get the tools set-up correctly, but being an impatient person I did not manage to get that far. I have other things to do too.

Monday, November 28, 2011

A benchmark for development and evaluation kits

The other day a colleague asked me if I was interested in reviewing the TMS570 MCU Development Kit. This is a kit for playing with the TMS570LS20216 ARM Cortex-R4F microcontroller and when I looked at the picture of the kit available on the product page on TI web site I immediately became interested. It is a big main board with a TFT display and many connectors on which a smaller board sits. The TMS570 microcontroller is designed for use in safety critical systems and as such it includes [quote TI website] dual CPUs in lockstep, CPU and Memory Built-In Self Test (BIST) logic, ECC on both the Flash and the data SRAM, parity on peripheral memories, and loop back capability on peripheral I/O. The Floating Point CPU offers 1.6 DMIPS/MHz, and it has configurations which can run up to 160 MHz providing more than 250 DMIPS. [quote end] The TMS570LS20216 has 2 MB Flash memory and 160 KB SRAM. One might be tempted to say that this is a pretty powerful MCU.

When the kit to review arrived it turned out to be not exactly what I expected, as it was just a large USB stick. The stick is so large because otherwise the MCU in its 144LQFP package wouldn’t fit on it. It came in one of those CD/DVD boxes that we know from TI and that included besides the stick a little flash light, a DVD, a USB extension cable and a flyer with installation instructions. The installation instructions are simple: insert the DVD and do a full install. So I did.


I wrote down the amount of free disk space before launching the install and the time: 9h20. More than 30 minutes and 95 (really!) mouse clicks later the installation was complete. Looking at the free disk space left over I noticed that this demo had used a whopping 7 GB! As a comparison, my Windows XP Pro folder contains 9 GB. To be totally honest, I did this installation twice, the first time I just ran it while trying to do other things. But when the number of mouse clicks and the amazing amount of pop-up windows started bugging me I decided to redo the installation and count and measure the above mentioned parameters.

Naturally I now was pressed to see the demo's, curious to discover what a USB stick with only a few LEDs and a 5 square cm MCU on it supported by 7 GB of software had to offer. Connecting the stick to my PC worked fine, it was recognized immediately, and I started the Safety Demo Software as indicated in step 3 of the installation notes. A window with six large buttons came up and I clicked on the left upper one labelled “Safety Features”. The tool now first programmed the MCU before showing a block diagram of the chip and a list of small buttons on the left that let you generate an error event in the MCU. The error is graphically illustrated in the block diagram and a little red LED is lighted on the board.


You will have little trouble to understand that I was deeply impressed by this convincing demo so I quickly went on to try the others. I clicked the Ambient Light button and a little window with a vertical bar graph showing ambient light intensity came up. A light sensor included on the stick makes this demo possible. If you keep your hand over the stick the bar drops to a few percent and when you shine the flash light on the sensor you can get it up to 100%.

Again, Wow.

So quickly on to the next demo: the Temperature Sensor. Clicking the button opens a small window showing a graph of the temperature. According to the demo the temperature was over 30 degrees Celsius, at least 7 degrees higher than the ambient temperature, but maybe it measured closely to the MCU or the PC? Anyway, this demo was as convincing as the others.

What about the LED Light Show? Again a little window pops up and this time you can start the preprogrammed light show or toggle the six blue LEDs manually. To not spoil the surprise in case you want to buy this development stick yourself I will not tell you what happened but I can assure you that I was again deeply impressed.

If I remember correctly TI was the first to introduce the concept of USB development and evaluation sticks, but where the first one featured an MSP430 MCU that you could break off after programming and then use in your own application, this USB stick seems to be a pure product of marketing. Only 22 of the 144 pins (called “test points”) are brought out to two pin headers although a CAN bus is available too. You get a compiler too, so you can write some code for the MCU but do you really need 7 GB and 95+ mouse clicks for that?

Let us now define a benchmark for MCU development / evaluation kits so we can quickly compare the ease of use and system impact of those kits: the helloWorld (hW). The helloWorld is calculated as mds/(ds*(mc+i)) where “mds” is the highest capacity hard disk available in the year of release of the dev kit (see Wikipedia, in 2011 msb = 4 TB), “ds” stands for disk space needed by the dev kit and mc means mouse clicks needed to get an LED flashing on the dev kit and finally “i” is the number of icons & short-cuts created on the desktop (8 for this kit). With such a benchmark the flash light included in the kit would get a score of infinity because it does not occupy any disk space. The mds parameter is included to introduce an element of time in the benchmark so that it would be possible to compare helloWorld benchmarks over time. You might argue that including Eclipse in a dev kit should be a separate parameter pulling the score down, but Eclipse in itself consumes enough disk space to ensure a low benchmark anyway.

The TMS570 Microcontroller Development Stick presented here scores a value of 4 TB / 7 GB x (95 mouse clicks + 8 icons) = 5.68 helloWorld [hW].

If you have any suggestions of benchmark scores for other dev and or eval (evil?) kits, please do not hesitate to send them to me so I can publish them here.

Thursday, October 27, 2011

Reverse engineering? The new Wiring S board

In the fall of 2008 I started researching Arduino for an introductory article for Elektor. In that article I wrote that Arduino can be seen as a simplification of Wiring. The Arduino environment is very much like Wiring but slightly simplified and the Arduino Diecimila, the board of choice in 2008, was much simpler than the Wiring microcontroller board that had more I/O ports available. It is difficult to prove that the huge success of Arduino is due to this simplification, but the fact is that the current estimate is that more than 300,000 Arduino boards have been sold world-wide, which is pretty impressive.

The people behind Wiring must have been a bit jealous of this success achieved by others with their work so they started simplifying too. The result is the brand new Wiring S board that is almost the same size as an Arduino Uno. The Wiring S team apparently decided that they wanted to do things slightly different than the Arduino team, so the board looks a lot like an Arduino, but it is not compatible. Where Arduino uses mostly ATmegaXX8 controllers, the Wiring S board is based on an ATmegaXX4 controller (ATmega644 on my 1.0 board). The connectors look very similar, and are positioned in a similar way, but there are 5 instead of 4 and the pin-out is different. Also the project is open hardware, but the design files are in KiCAD instead of Eagle.

Seeeduino (left) and Wiring S (right)


It is rather interesting to see how Arduino is becoming more and more complex with programmable USB interface chips, all kinds of different processors and more connectors whereas the Wiring S board is almost like an old Arduino Diecimila but with a bigger processor. The board even offers the possibility to replace the FTDI USB/serial converter chip by an FTDI cable which brings it very close to the even older Arduino Serial. The two teams seem to be working in opposite directions.

For the people who would like to have the best of both worlds, they should use Wiring because the Wiring environment is capable of handling Arduino boards, whereas the Arduino environment does not handle Wiring boards and a Wring Play Shield is available that allows you to stick Arduino shields on the Wiring S board.

The Wiring S board is simply rectangular with its extension connectors on a 0,1” grid and 4 mounting holes placed in a logical manner. I do not like the position or the shape of the reset button; it is too hard & difficult to press. The solder side of my board was not cleansed properly and this seemed to be true for the whole batch received by my distributor. Maybe this is a pre-series problem?

Retro yellow LEDs!


Will the Wiring S meet with the same success as Arduino? Hard to say, I guess not, it is probably too late now.