Category Archives: In the lab

BluetoothLE Temperature Sensor

This system measures temperature and sends the measurement to an Android phone via Bluetooth Low Energy (BTLE).  The microcontroller is a Silicon Labs C8051F931, the Bluetooth breakout board is a Nordic nrf8001, and the temperature sensor breakout board is a TI TMP102.

The micro talks to the nrf8001 using SPI and to the TMP102 using I2C.  The system was debugged using Saleae Logic 8 Analyzer.

The microcontroller code was ported from the Adafruit Bluefruit project which was authored by Kevin Townsend and running on an Arduino Uno.  KT did a great job.  Porting the code from the Arduino to the Silabs 8051 was a nightmare but I made it work.  Hey!  I am an analog guy mostly, so give me a break!

I am using UART Services for this project, so I was able to test the interface using Nordic’s NRF UART app on the Android.  Later, I had my son take the Nordic code and modify it to interface with the temp sensor.

The C8051F931 is implemented here on one of the Silabs Toolstick target boards.  Power can be provided external to the board or use an on-board LR44 battery that is boosted up using a SMPS boost converter built into the F931.  To make things simple for this demo, I used a separate 2032 coin cell to power the radio and the temp sensor.

Hack of an iRig Pre XLR preamp with phantom power

Recently I wanted to do some recording onto a camcorder using a high-end microphone.  The camcorder had an line-in 3.5mm jack so I needed to get from the microphone having the XLR connector requiring phantom power to the 3.5mm female connector at the proper signal levels.  I tried using my Tascam 8-channel digital studio (mic in, headphone out to the camera).  Never could make it work and my patience was such that I opted for a different solution with a mic of lesser quality.  I made the recording and am happy enough for now.

Now I have purchased a new camcorder and it is on its way. I am determined to figure out how to solve the XLR problem.  As it happens, I have owned this little iRig Pre Mic converter/preamp.  It was designed to interface with Apple devices using a TSSR 3.5mm jack.  Never was happy with the performance on the Apple device, so it has been collecting dust.  So, I decided to see if there was some kind of mod I could do on it to make it useful for my intended purpose.

Thankfully, most of the work has been done for me.  I found some videos describing how to hack the 3.5mm cable so that it forces the preamp to operate and drive out to the headphone jack.  In the video hack, the guidance is to cut the cable and solder certain wires together and leave others untouched.  I really did not want to destroy the cable.  I preferred the idea of doing temporary shorts on the male TSSR jack.  To do this, I needed to figure out which wires went where.  Ohm meter to the rescue.  Here is what I resolved.

2016-01-05 14_29_37-iRig Pre Hack.pdf - Foxit ReaderSince I wanted to preserve the jack, I did not solder to it.  First I took some shrink tubing and covered the Green ring so that it is not exposed.  Then, I tightly wrapped a wire around the remaining exposed rings, spanning the length of the jack.  Then covered it with larger shrink tubing and voila!

I have since ordered two TSSR extensions.  I will cut one and short the appropriate wires.  When I want to use the hacked iRig, I just plug in the hacked extension.  Otherwise, the iRig is in default factory condition.