Microcontroller
The sensor device is designed around an ATmega328p AVR - a microcontroller I have a fair amount of experience with, and one that will be immediately familiar to anyone who has ever used an Arduino. Even when communicating with the rest of the circuit it draws little power - only a couple of mA. It provides both the USART used to communicate with the Bluetooth module, and the SPI port to communicate with the two measurement chips.
Humidity Sensor
The first, and most important of these, is a Honeywell HIH6131 digital humidity/temperature sensor. After the issues I had with the SHT75 in the previous iteration, this chip was appealing in that it had a hydrophobic filter to prevent water from throwing measurements off, and used standard SPI as the interface. It also integrates a temperature sensor, which is both directly accessible for measurement and automatically corrects the humidity reading. Interestingly, the datasheet also notes that this sensor is able to rehydrate in ambient conditions after soldering (a lot of other humidity sensors require rehydration in a very high humidity environment to start working properly).
Accelerometer
The other measurement chip is an LIS3LV, a 3 axis accelerometer made by STMicro. This relatively cheap accelerometer is actually extremely capable, measuring with 12 bits at either 2G or 6G ranges, all the way up to 2650Hz. While not completely necessary, the circuit design was already using SPI, and it I was curious to see if there was any correlation between movement during sleep and hypoglycaemia events. This came back to bite me in a couple of ways.
Upon closer inspection of the datasheet (read: after ordering everything), it turned out that the comms protocol it uses isn’t quite standard SPI - when the Slave Select line (SS2) is pulled high to disable the port, it switches to I2C mode rather than going to high impedance, messing with anything else you’re trying to communicate with. R7 and R8 allow this to work anyway, but do limit the maximum SPI clock speed somewhat (I do have an oscilloscope trace lying around somewhere, and there is obvious rounding of the edges when the accelerometer is driving MISO compared to the humidity sensor).
Bluetooth
While the prototype device used a pretty generic serial/Bluetooth adapter, I needed something smaller to fit in this iteration. I eventually found a pretty tiny module made by STMicro, the (bit long winded) SPBT2632C2A. It includes it’s own chip antenna and is only 11.6 mm by 13.5mm. It’s also a bit unique in that it uses edge castellations for data connections instead of pins. Other than that, it functions essentially the same as any other serial/Bluetooth adapter - you turn it on, connect it with a bluetooth device such as a phone, and serial data going in one end comes out the other.
When connecting and transmitting, this module draws by far the most significant amount of current in the whole circuit - around 18mA. To avoid flattening the battery too quickly, the microcontroller uses a MOSFET to turn the Bluetooth module on only when data needs to be sent.
Power Supply
All of this is powered with a 2.7V switch mode supply, running off a small 400mAh LiPo battery. The regulator used also actually handles the battery charging functions, all combined into a single chip made by LT - the LTC4081. Power supplied via a micro USB port at 5V charges the battery, which varies from 4.2V when fully charged, down to 3.3V when flat. A buck regulator then pulls this down to 2.7V. RV1 is a trimpot to adjust the battery cutout voltage, and the various other passive support components set the battery charge current, supply voltage, and temperature cutout.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Have you considered moving to bluetooth 4.0/BLE to reduce power consumption (it really works) ? Im working with Ti 2540, while i cant recommend this particular ic because it has 8051 mcu on board (which is redundant if you have your own mcu), there exist versions of BLE ics without mcu, like ones used in pebble watch.
Are you sure? yes | no