Skip to main content

The Sensitive Side of Rohm Semiconductor

The Idealist philosopher George Berkeley maintained that physical objects exist only so long as they are observed – and vanish when you stop looking at them. His mantra was: “to be is to be perceived”. Microcontrollers, whether fully embedded or in an IoT application, find themselves subject to a similar solipsistic outlook without high quality sensors to inform their decisions about their surroundings.

In what almost certainly isn’t a nod to George Berkeley, the need for MCUs to perceive their surroundings is why so many development boards are designed with defacto 'standardised' I/O pins in Arduino or Raspberry Pi format: so that developers can quickly make use of existing sensor and comms modules, without needing to redesign the wheel. It saves time and mistakes when you're starting out.

Rohm Semiconductor started making resistors in the early 1960’s – indeed, the company’s original name was R.ohm – ‘R’ for resistance, as you would find in a circuit diagram and ‘ohm’ as its unit of measure. In the years since then, they have branched out into a wide variety of semiconductor parts – including a broad spectrum of sensors, which is the subject of our article today.

In particular, we will be looking at a couple of add-on modules that Rohm produce for one of my favourite dev boards at the moment – the Sony Spresense.

ROHM Add On Boards

As you may remember, the Sony Spresense includes high resolution audio support and an advance GNSS receiver. However there are a number of GPIO pins where we can add functionality:

Main-Board1_64254ebb490e6fdaedc5b524bc99443540406add.jpg

To experiment with this, I ordered a SPRESENSE-SENSOR-EVK-701  (181-2212) which comes out of the box like this:

2F_385e0d1ff0aab8af575e4bb7ca1a9dc7b62620c5.jpg

The little bubble that the board is packaged inside give it a huge amount of crush protection, which is great.

Even though it is a pretty tiny board, we get access to 3 sensors: a KX122 (KX126 in rev B boards) accelerometer, a BM1422  (175-0401) magnetometer and a BM1383 barometric pressure sensor. As if that were not enough, there is also a sensor expansion connector that can support another 7 types of sensor, including brightness, proximity, colour, magnetism, temperature, UV light and pulse wave (heart) sensors.

I really like that they include a sheet with the pins labelled, the sensor specs and the Github repository address. It is a little thing, but it makes getting started so much easier when you don’t have to go looking for this information.

I decided that, while I was ordering the sensor module, I would go the whole hog and order the SPRESENSE-BLE-EVK-701  (181-2213) Bluetooth LE Add-On board at the same time. Here is what we get out of that box:

4Fz_4c9235ea59b583103e4b33289b6a94c2d8da8117.jpg

This module includes a MK71251 BLE module with a built-in antenna and worldwide wireless certifications. Again, I like that they have included the information sheet with the pinout. It makes it easy to fit the modules to the Sony board:

fit2a_74b238caeb3e32254f8f891b45b9eca0f191e2bc.jpg

Firing Up Our Senses

The quickest way to test that our sensors arrived in working order is to try out an Arduino example sketch for the sensor board. If you have already set up the Arduino IDE to support the Sony Spresense, you will see that there are a number of examples included in the support package:

examples_7f2070edf943f0c39ee612e80458fb1f66e5bfb7.png

In this case, I downloaded a zip file of the Arduino Github repository mentioned on the sheet included with the board. After extracting this file into my Arduino directory, I picked a sensor sketch (for the KX126 accelerometer on my rev B board) and uploaded it to the Spresense:

kx126_sketch_b9ff496039f0be17e9016852727807ce97689c17.png

OK, great! When we open the serial monitor we can see some data coming through. Give the board a little shake and yes, we are getting varying accelerations recorded for each axis:

kx126_OP_a4aba2aa102fc1aa350de1096ebb5152572d2a96.png

We can quickly check the BLE module too. Download the Lapis BLE Tool to your iPhone or Android phone and run it up. You will see a list of currently visible Bluetooth GATT broadcasts. Going down the list, we can find our Lapis BLE module. Clicking on this connection reveals device information about the module:

IMG_0400_13b98d8cbc885f9f35fbe915f49612a6af35cb0c.png

Great, so we can see our BLE module is there too. Now that we know our gear is sound, we can start experimenting.

Final Thoughts

I am now experimenting with the examples in the Nuttx SDK that I have installed on a Linux virtual machine. The latest SDK version has added a number of example application over what we had before:

Screenshot_from_2019-04-05_14-17-23_3f21c9007a597bf2755111cfd03f2336a2912bb1.png

We will upload a video of setting up the Nuttx SDK and our adventures with a few of these examples in the near future.

Mark completed his Electronic Engineering degree in 1991 and worked in real-time digital signal processing applications engineering for a number of years, before moving into technical marketing.
DesignSpark Electrical Logolinkedin