Introduction: Have You Ovulated Yet? a Maker's Approach to Fertility Tracking
The fertility awareness method sensiPLAN® is proven to be as effective as the contraceptive pill in avoiding pregnancies. The android- and mobile phone app LadyCycle is based on the rules provided by this method of birth control. In addition, the app also allows to determine the ideal time for conception. The method requires regular measurements of ones basal body temperature, usually estimated by taking measurements in the morning before rising.
Even though the effectiveness as birth control is not reduced by irregular waking times, the number of "safe" days (days where no additional contraceptives are needed) can be reduced. Regular measurements can also be a challenge when small children require instant attention on awakening. This challenge can be met by using internally worn temperature loggers that autonomously measure the body temperature in (user-) defined intervals. These temperature loggers even offer the possibility to determine the true basal body temperature, which is the lowest internal body temperature achieved during the day.
Commercial products available include Endotherm® Basal, OvuSense Realtime Fertility Monitor and OvulaRing. OvuSense is only for women trying to conceive and can't be manipulated to work otherwise. OvulaRing can only be readout by turning on a PC and is fairly expensive (219€ for the first three months and 21€ for each additional month).
Endotherm Basal consists of an Maxim iButton ds1922L as temperature logger (70€), a vaginal capsule (2 pieces for 18€) out of medical grade material, an usb adapter for sensor setup and readout, and a PC fertility software. In addition, the company Endotherm offers excellent, sympathetic support in German and English! The sensor is calibrated, featuring a higher accuracy than the industrial version that can be purchased from the iButton manufacturer (for 58€). The iButton's battery will last for about 5 years (typical use). The set is certified as medical product in Switzerland (180€). The components of the set can be purchased independently, however.
Out of the three mentioned products, Endotherm Basal is (by far) the least expensive one. It is also the most flexible, allowing the user to build own soft- and hardware applications. Nonetheless, one should be aware of the fact that the iButton's temperature resolution (0.0625°C) shows a small deviation from the resolution recommended by the Sensiplan rules (0.05°C, which is the resolution of the analogue thermometers available when the Sensiplan rules were evaluated). Some rules can be adapted to guarantee at least the same effectiveness as the measurement with the recommended resolution. For others, a definite statement can't be made.
In this instructable, I will show you how to build a low cost iButton ds1922L-to-Bluetooth adapter using an Attiny841. The provided firmware for the microcontroller will enable communication between ds1922L-iButtons and the android fertility app Ladycycle (you can also use this general purpose app to program and read the iButton's data).
But I have to mention that the device is far from being perfect: Sometimes, there will be error messages during readout or strange readings. In these cases, the readout process has to be repeated. Also, the more temperature readings are stored in the iButton, the longer the readout will take. During this time, the iButton has to be held steady on its probe.
Step 1: Parts & Tools Used
For this project, you will need the following parts:
- a pcb board like the one shown in this fritzing project
- 2x 1µF ceramic capacitors 0805
- 2x 100nF ceramic capacitors 0805
- 2x 27pF ceramic capacitors 0805
- 1x 2kOhm SMD resistor 0805
- 2x 100Ohm SMD resistor 0805
- 1x QANTEK TECHNOLOGY CORPORATION QCL11.0592F18B23B QUARZ, 11.0592MHZ, 18PF, HC-49US
- 1x NCP1117ST33T3G (LDO 3.3V)
- 1x KINGBRIGHT L-9294QBC-D LED (blue)
- 1x KINGBRIGHT L-93WEGW LED (red, green)
- 1x HC-06 SMD module
- 1x either AMPHENOL FCI 10104110-0001LF MICRO-USB 2.0-BUCHSE, TYP B, SMD if you want to power your device by usb or 1x KEYSTONE 2481 Battery holder for 4x aaa batteries (you can install both options, but JUST USE ONE AT A TIME)
- 1x switch (this kind)
- 1x iButton probe (this one)
- an ATtiny841 programmed with the sketch provided by the fritzing project. In order to do so, Download the Arduino OneWire library, which has to be put into your Arduino "library" folder, from here. The arduino Attiny841 core is found here. To include the core in the Arduino IDE, open "preferences" and paste the link behind "Additional Boards Manager URLs". Before uploading the file to an ATtiny841, you will need to make it run at 11.0592MHz with external crystal. With the Arduino IDE, this is done by selecting "ATtiny841 (11.0592MHz external crystal)" as a board and then executing the "burn bootloader" command.
-optional: this kind of dental box, where the reader will nicely fit in (drilling corresponding holes will allow access to the switch, the probe and LEDs)
You will also need the following tools (not included in the set):
- a soldering iron, solder and equipment for SMD soldering
- 4 AAA batteries/USB charging cable (DON'T USE BOTH OPTIONS SIMULTANOUSLY)
- optional: drilling machine for modifying the dental box
And of course an iButton and an Android phone with LadyCycle or the general purpose app installed. The general purpose app is for free. LadyCycle in general is for free, but a small donation to the LadyCycle team (this is not me) for their efforts would be really nice.
Step 2: Assembly of the IButton Reader
Solder the components on the PCB board according to the fritzing project, solder the smd parts first. The battery holder is soldered at last, oriented as pictured.
Step 3: Operating the Device
Switch on the device, enable bluetooth on your android phone. In the list with the bluetooth devices, you will find a new device which you have to pair with. How the pairing is done and a short LC tutorial is shown in this video.
Here, you find the link for the general purpose app that enables bluetooth communication with the adapter.
If you encounter problems during readout and you get a lot of timeout messages, try deleting the bluetooth cache of your Android device (Settings->Apps->All->Bluetooth->delete cache). This has helped other users.
If there are any other questions, don't hesitate to ask!