Thoughts on Qualcomm AllJoyn and ARM’s MBED IoT

At Qualcomm’s Uplinq 3 weeks ago, there was an awesome vision talk from Rob Chandhok on AllJoyn, QCOM’s vision for IoT (or IoE as they say). You can see it here.

It was interesting to compare that to the talk by Dave Locke of IBM at the ARM MBED event the following week. This was ARM’s big announcement of MBED branching out to the Cloud and the launch of MBED OS.

The IBM story was hub-and-spoke. Everything goes back to the Cloud. Well, of course. We make servers, software and services…

The Qualcomm story was of a meshy spontaneous web of devices around you that doesn’t necessarily go back to the Cloud, instead often sorting tasks out itself through a combination of smart devices. We make Apps processors!

I like to think of a combination of the two. Spontaneous mesh around you with gateways to the Cloud.

Having used both MBED and AllJoyn, I note that MBED is much easier to use. AllJoyn is an awesome, big, exciting vision. But for me it still fails the printf

read more

STM MEMs pressure sensor, gyroscope and accelerometer hook up to ARM MBED

I used a header board for an STM MEMS evaluation kit in order to take a look at some common MEMS sensors:

  • LPS301: Pressure and temperature sensor
  • LG3D20: Gyroscope
  • LSM303DLHC: Accelerometer and magnetometer

The header was an STEVAL-MKI124V1 which is designed to work with an STM motherboard evaluation system. I took a shortcut and used it with an ARM MBED board featuring an NXP LPC1768 MBED.

Hook-up using I2C was trivial:

Screen Shot 2014-08-10 at 9.37.23 PM

The schematic for the evaluation board is here:

The orientation of the sensors on the board is like this:

Screen Shot 2014-08-10 at 9.38.10 PM

MBED-based code I write to drive the I2C is on the MBED website here

The code sets up each of the sensors and then provides a continuous output of temperature, pressure and orientation. Rather than optimize for performance or efficiency, the code here is intended to show clearly how to access the sensors.

An interesting twist was to use the linear accelerometer to find the vector of the earth’s gravitational field (i.e. down) and to use that to make a tilt-adjusted compass. Algorithm

read more

Using MBED SPI to drive Analog Devices AD9850 frequency synthesizer

I was looking for a way to test the frequency response of a new oscilloscope.

Analog Devices has a nice IC that can produce a digitally synthesized sine wave of frequency between 0 and about 70 MHz. AD9850 link is here.

The quickest way to throw together a prototype was using an MBED platform. My code is here

What made things even easier was the availability of ready-to-go evaluation boards from China on Ebay for less than $5. This is the one I used.

This design is limited to about 40MHz if you want a clean signal without aliasing.

Frequency and phase are set by a 40-bit command that has:

  • 32-bit frequency setting
  • 5-bit phase setting
  • 1-bit power up/down
  • 2-bits factory debug access

MBED_SPI packet

Output frequency is given by: fOUT = (frq × CLKIN)/(2^32)

where frq is the 32-bit frequency and CLKIN is the frequency of the on-board crystal (125MHz in this case) So, for example 0x147AE148 is 10MHz.

Frequency resolution has a step size of 29KHz with the 125MHz clock.

You can also change phase in increments of 180°, 90°, 45°, 22.5°, 11.25° or any combination thereof using

read more