For my smart watch project I decided to experiment with sensors for reading pulse. Looking around I stumbled upon a sensor made by Maxim – MAX30100. For my surprise once I got my development board and delved into the sensor’s datasheet I discovered it’s not as simple as just wiring up the sensor to a microcontroller and reading the data. A lot of work you have to do yourself. In this tutorial, I’ll try to explain what I’ve learned about pulse oximeter and how to make sense of their data.
Recently I assembled a PCB I designed with the latest revision of nRF51822AC, and for my surprise the code I wrote on BLE400 development board just doesn’t work on the new platform. My main concern is that I never really figured out have to use Qt’s QBS to separate compilation of C files with GCC and CPP files with G++.In addition because I don’t properly compile the application, it seems that the G++ screws with the memory addresses regarding C code. Long story short, I realised that Qt Creator can also make use of Makefile directly in the IDE. Best part, it is extremely simple to setup, even with debugging. In this article I will go through what I changed in the nRF51 makefile to be able to compile CPP files and have two versions of release and debug for Qt Creator to compile. If you’re a hardcore compiler and makefile guru, this article probably is not for you.
Now that we have set up the programming environment the next thing I personally like to implement on any microcontroller is a simple UART communication. Since it is really simple to do using nRF51 SDK, I thought of explaining how to implement USART and FreeRTOS in C++. Even though C is a very capable language on its own I feel restricted without OOP, I know some people might disagree but personally OOP enables me to structure my code better and is easier to pick it up after couple months of idle time. Nonetheless, this article won’t cover FreeRTOS in details; it is expected from you to know more or less what is an RTOS and what is it capable of. Also I prefer not to use printf/scanf whenever I can in embedded projects due to its large memory footprint. Since we will have the luxury of C++ we will implement a similar “Serial” library to Arduino. Honestly serial library is one of the things people behind Arduino got right.
Recently I came across an interesting little ARM Cortex M0 microcontroller nrf51822, which has an integrated low energy Bluetooth (BLE) and overall is a very capable to do other tasks besides BLE especially due to its immense FLASH memory and RAM which is 256kb and 32kb accordingly (varies between models). Immediately I thought of trying to make a simple smart-watch for various reasons like low energy mode, which I think was 0.1µA in sleep mode. Only drawback compared to other ARM Cortex series microcontrollers is that it’s not really the fastest in the market, however a new one will be coming soon by first quarter of 2016, which will be more efficient, faster and overall more capable SOC. Luckily for us, their SDKs are pretty much identical, and once you learn and understand how nrf51 series SDK is structured and how to use it then switching to nrf52 shouldn’t be a problem. In any case I bought the development board BLE400 which is pictured above to play around; nonetheless I highly recommend buying the original nrf51-DK board just to support Nordic for developing an awesome micro.
For my final year project, I tried to replicate and possibly improve the Disney's touche device using much cheaper components than they did. It was a partial success, but a great learning experience nontheless. These days most touch sensitive devices are designed either to recognize where it has been touched or whether is touched or not. Many objects around us in everyday life can be potentially used as touch interactive surface providing they are made out of conductive material. With the conventional way it would only be possible to detect whether the object has been touched or not. However, by exciting the object with different frequencies it is possible to detect how much skin is touching it. Essentially the system could recognize whether the object is grabbed, pinched, touched by one or more fingers or any other gesture which have different amount of skin touching it. There are many surfaces, objects and liquids which can be transformed into touch sensitive devices without additional buttons or touchscreens like door handles, mobile phones, lamps, desks, walls etc.