Embedded World 2012

I’m back from Embedded World! As always being there was great, you can sense the pulse of the Embedded developments, see the trends and what’s new.

It was 4 days fun! We met with all our important silicon chip vendors and planned many new boards for release which you will see very soon 😉

This year our German distributor Elektronikladen had no booth and we co-exhibited with our Global distributor Mouser Inc. Their booth they built was beautiful:


If you do wonder where Olimex is,  here we are:




These pictures I took early in the morning at 9.00 AM they let the visitors in and it got crowdy.

We chatted with hundreds of young and interesting people who came to our booth:



We had one DuinoMite-Mega running on the booth with Wii-nunchuk and many were interested to see the code themself:


Lucio Di Jasio who wrote the book “Programming 32-bit Microcontrollers in C – Exploring the PIC32” and who’s idea Geoff Graham used to make Maximite came to our booth also and we talked about DuinoMite.

Then we have been visited by some key PIC32 people in Microchip and they all have been charmed by DuinoMite and Pinguino boards.

1000 PIC32-PINGUINO-MX220 boards were given-away and I hope this will be a nice kickstart for Pinguino project. Lot of students and people who use Arduino  were hear about this promotion and came to get their free Pinguino to test.

I also had some time to look around.

Olimex’s boards were on Texas Instruments 3rd party display:



As this event is huge and you have to catch the crowd attention, some booths had even ‘live’ bears on them:


On ARM booth there was Lego robot which solves Rubic cube in less than 6 seconds:


Being on Mouser booth I had chance to talk to some of the managers and I was amazed to learn about the logistic capabilities they have.

MOUSER stock hundreds of thousands different components, but once you fill your order on their web 15 minutes later the order is ready to load on the FedEx truck.

This is trully amazing (comparing to our Olimex humble shipping possibilities).

I learned that they do consolidated shipments for Europe and clear the import export procedures for their European customers. So if you place your order at their web latest 8.00 PM Texas time, your order is loaded on the last FedEx truck which leave their facility at 8.30 PM. All EU shipments are consolidated in a big container. The container is loaded on the plane and while it flyes the export/import paper work is processing, so it gots unloaded at Fedex facility in France and all small parcels are distributed within Europe shipping from France. So if you live in EU you don’t have to deal with import and customs like if you order from other vendors like Digikey.

DuinoMite DM-BASIC now have CAN support

Good News! Frank Voorburg implemented CAN support BASIC commands for DuinoMite http://www.kenseglerdesigns.com/cms/forums/viewtopic.php?f=4&t=259

Running StickOS BASIC on DuinoMite-Mega

StickOS is BASIC interpreter which runs on Microchip PIC32 and Freescale MCF52XX microcontrollers. Recently in release 1.92 support for DuinoMite-Mega was implemented so I did a test drive this weekend.

To install StickOS on DuinoMite is very easy, you should go in bootloader mode and start DuinoMite bootloader then to load this HEX: http://www.cpustick.com/downloads/StickOS.PIC32.DuinoMite-Mega.v1.92d.elf.hex and then if you are on WIndows you need this INF file for the USB VID/PID which StickOS uses: http://www.cpustick.com/cpustick.inf

when you program the HEX code and press reset new COM port will be created you can use your terminal program of choice to connect to this port and you will see:

Welcome to StickOS for Microchip PIC32MX7-F512H DuinoMite-Mega v1.92d!
Copyright (c) 2008-2012; all rights reserved.
(checksum 0xe2e6)

StickOS pre-tokenize BASIC command and do syntax check while you enter your code

This is good as it speeds the execution of the code later also it prevent you to write code with syntax errors.

For instance if you want to write:

>10 non-existing command
^ – error

you will receive this error message and nothing will be stored to line 10

pre-tokenizing the source allow later the interpreter to switch the statements with single byte  comparison instead the multiply byte comparison which MM/DM BASIC does and this allow speed increase, another speed increase feature is that StickOS uses just the real PIC32 peripherials and do not make bit-banging as MM BASIC does, this result it x4 times faster execution:

10 dim a
20 configure timer 1 for 1 s
30 on timer 1 do print a
40 for a = 1 to 200000
50 next

prints 112518 BASIC instructions per second

what I missing in StickOS is:

– no VGA and PS2 keyboard support

– no SD card file system

– print command is very simplified

– not open source, although there is mechanism to add new commands by skeleton source which links the core basic as pre-compiled object code

It’s very easy to go back to MM/DM BASIC by simply entering bootloader mode and re-loading the HEX file for MM/DM BASIC.

If you want to give it try to StickOS BASIC you can first learn the commands by reviewing these PDFs:

Quickstart guide


and user manual


DuinoMite new boards: T-shaped breadboard adapter, Wii-nunchuk to UEXT and ICSP adapters



Ken Segler again had nice idea for T-shaped breadboard adapter which brings all DuinoMite GPIOs in easy to access form to breadboard + adds +5V/GND bus on top and +3.3V/GND bus on bottom of the breadboard – small and elegant solution for all who want to experiment with DuinoMite / MaxiMite.

This is our first prototype, we will have stock of this board around end of February.


For all retro computer Game lovers there is good news, now there is easy way to connect Wii-nunchuk to DuinoMite! For this purposes two adapters were built:


one is with UEXT connector so connects directly to the DuinoMite UEXT connector, the other is with PIC-ICSP connector layout and could be wired with 6 pin ICSP cable to DuinoMite PIC programming ICSP connector – as DuinoMite uses bootloader for new firmware upgrades the ICSP connector is used just once when the bootloader is programmed then stays with no use, so interfacing the Wii-nunchuk is good use for the ICSP.

Wii-nunchuk offers: X-Y Joystick and 3-Axes accelerometer + 2 Buttons and works with I2C.

In this thread on TBS forum you can download ready to use Wii-nunchuk BASIC code which is tested to work just fine with the UEXT connector, to work with ICSP connector new soft-emulated I2C communication should be implemented in the firmware.

DuinoMite Project: Using LED as light sensor


Everybody knows that LEDs emit light when you apply voltage on them and current flows through them.

Not everybody knows that LEDs do the reversal too, when the LED is irradiated with light they generate voltage.The more bright is the LED the more voltage it generates.

I made small setup to prove this. First you need high-brigthness LED – I got 8000 mCd red LED and connect the cathode to GND and anode to PIN(1) of DuinoMite as on the picture above.

Then wrote this small code:

10 SETPIN 1,1 ‘setup PIN(1) as analog input
20 A = 0 ‘accumulator variable
30 FOR I = 1 TO 5000 ‘do 5000 times
40 A = A + PIN(1) ‘add the PIN(1) readings to Accumulator i.e. I amplify 5000 times the PIN(1) readings this way
60 PRINT A ‘print the result
70 GOTO 20

The 5000 loop is also good to not scroll so fast the print results 🙂

With not irradiated LED the readings are:

> run

If I point it to the red power LED on DuinoMite it reads:
> run

If I point to the yellow LED on Duinomite it reads:
> run

The RED and YELLOW LEDs are with same brightness, then why the readings are different?

The “sensor” LED is most sensitive to the light spectrum it emmits, so when irradiated with RED light it generate more voltage than when irradiated with YELLOW light.

Tomorrow using this feature I will tell you how to teach DuinoMite to recognize colors, using RED, GREEN, BLUE and WHITE LEDs I will build Color-meter and when irradiate the “sensors” with different color light DuinoMite will recognize it and print on the screen.

Now let’s go back to RED only leds and think what else we can do with them. What If I make row of LEDs and scan them sequentially? I will make some low resolution (5 mm dot) scanner.

I make next setup with 4 LEDs wired as “sensors”:


The code nave to be changed to scan for 4 analog inputs:

10 NBR = 100 ‘how much to amplify
20 OPTION BASE 1 ‘option base for the arrays
30 DIM P(4)
40 FOR I = 1 TO 4: SETPIN I,1: NEXT ‘make PIN1-4 as analog inputs
50 CLS
60 FOR I = 1 TO 4: P(I) = 0: NEXT ‘clear the accumulators
70 FOR I = 1 TO NBR ‘read the analog inputs NBR times and add to the accumulators
80 FOR J = 1 TO 4
90 P(J) = P(J) + PIN(J)
100 NEXT J
110 NEXT I
120 FOR I = 1 TO 4 ‘display as graphics bars on the Duinomite VGA screen
130 LINE (I*30,MM.VRES)-(I*30+25,MM.VRES-2*P(I)),1,BF
140 NEXT I
145 PAUSE 200 ‘wait and do it again
150 GOTO 50

When run I can see bar graph which change with the amount of light which fall on the LEDs.

You can see on this video I apply light on the LEDs with RED high intenity LED of same kind, and this generates a lot of response on the “sensor” LEDs.

The same principle is used in this video, it uses 8×8 LED matrix as multi touch touchscreen device, too bad I have no 8 Analog inputs on DuinoMite as if I had I would duplicate this project 🙂

Similar projects are also THIS and THIS

You could even make on the same principle Interractive LED table like THIS

DuinoMite Project: Tank fluids level metering by capacitance measurement


Using the capacitive measurement setup from here I will try to make project for measuring the fluid (water) level by measuring the capacitance.

I found on my desk the “TANK” – plastic empty candy box. Then put two stripes of self adhesive aluminum foil on the two sides of the box and measured with C-meter the tank empty and full with water.

The empty TANK capacitance was 12 pf:


the full with water TANK had 79 pf capacitance:


pretty good difference so using the same schematic with measurement of the charging time I set in the previous project I ran the same code:

10 PIN(1)=0 ‘sense pin will first pull the capacitor to GND and discharge
20 A=0 ‘accumulator
30 FOR I = 1 TO 1000 ‘measure 1000 times and average to remove noise
40 SETPIN 1,8 ‘discharge the capacitor
50 SETPIN 1,1 ‘start charging
60 A = A + PIN(1) ‘accumulate the readings
80 A = A / 1000 ‘now divide by 1000 to normalize the result
90 PRINT A ‘let’s see the result
100 GOTO 20

and got 3.14 value for empty and 2.34 value for full tank measurement.

we can scale these measurements for instance 0-100% by this formula

FULLPERCENTAGE = (3.14-A)/0.008

and as DM-BASIC arithmetic is with float points we will get easy the measurement in % from 0 to 100.

Now let’s make graphical presentation of the tank:

10 PIN(1)=0
20 A=0
30 FOR I = 1 TO 1000
40 SETPIN 1,8
50 SETPIN 1,1
60 A = A + PIN(1)
80 A = A / 1000
100 CLS
110 LINE (0,0)-(210,210),1,B
120 LINE (5,205)-(205,205-2*(3.14-A)/0.0078),1,BF
130 GOTO 20

With this code we display on the screen the TANK and the fluid level in it.

This is link to video which show the tank level metering in action -> LEVEL METERING

DuinoMite Project: Low cost Humidity measurement with SMTHS07 capacitive sensor


SMTHS07 is low cost EUR 5.00 capacitive Humidity sensor from Smartec. The datasheet of this sensor is here.

The sensor change it’s capacitance linear in range 20-95% with 0.6 pf/RH.

Now the question is will DuinoMite be able to detect so small capacitive changes of 0.6 pf?

Let’s do some experimenting first. I made small schematic on breadboard-mini with two resistors and the sensor:


then wrote small BASIC code:

10 PIN(1)=0 ‘sense pin will first pull the capacitor to GND and discharge
20 A=0 ‘accumulator
30 FOR I = 1 TO 1000 ‘measure 1000 times and average to remove noise
40 SETPIN 1,8 ‘discharge the capacitor
50 SETPIN 1,1 ‘start charging
60 A = A + PIN(1) ‘accumulate the readings
80 A = A / 1000 ‘now divide by 1000 to normalize the result
90 PRINT A ‘let’s see the result
100 GOTO 20

the result was steady:

> run

if I approach the sensor with wet fingers the reading go to

So the sensitivity is quite good! All I need is calibration of the sensor, but how to do this?

How to Preciese calibrate SMTHS07 is explained here .
Poor’s man calibration is to put the sensor it in refrigerator, the humidity in refrigerator is always 100%. As SMTHS07 is linear knowing the capacitance in just one point is enough to calibrate it.

Previous Older Entries Next Newer Entries