danpowell88 / NodeMCU-Wixel

Low-cost Wifi connected Wixel for use with xDrip. Can be used in combination with a Bluetooth Wixel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NodeMCU-Wixel

Low-cost Wifi connected Wixel for use with xDrip. Can be used in combination with a Bluetooth Wixel.

About

This is a low-cost do-it-yourself Wifi connected receiver for the Dexcom G4 transmitter. It is intended to be used together with xDrip. It is possible to use multiple NodeMCU-Wixels to cover a large area. Can be used together with a Bluetooth Wixel, if you do not want to carray around the Bluetooth Wixel at home.

Blueprint
Example use

What you need

  • A Wixel ~15 €
  • A NodeMCU ~4 €
  • A 5kΩ resistor.
  • A LED and 220Ω resistor. (Optional)
  • Cables and a stripboard, perfboard or breadboard depending on how it should be assembled.
  • A micro usb charger (An old phone charger works great.)
  • A box to put it in. (Optional)
  • A Wifi network to connect the nodes too.
  • An Android device (phone/tablet/computer)

Diagram

Diagram
Diagram

Finished NodeMCU-Wixel in box
Finished NodeMCU-Wixel in box.

See bottom for more images.

How-to

Windows

  1. Download the NodeMCU-Wixel repository and extract the files.
  2. Download the wixel-xDrip repository and extract the files.
  3. Modify transmitter id in Wixel code from the NodeMCU-Wixel repository (NodeMCU-Wixel/Wixel/dexdrip.c) and set it to your transmitter id. Then save.
  4. Copy dexdrip.c from the NodeMCU-Wixel repository (NodeMCU-Wixel/Wixel/dexdrip.c) to the wixel-xDrip repository (wixel-xDrip/apps/dexdrip/dexdrip.c).
  5. Build the Wixel code in the wixel-xDrip repository and write it to the Wixel by following the instructions here. If the NodeMCU-Wixel is already assembled you need to either disconnect the cabel to the reset-pin on the Wixel or connect power to the NodeMCU (running the latest code) during programming of the Wixel. Otherwise the Wixel will be in reset mode and cannot be programmed.
  6. Assemble the NodeMCU-Wixel by soldering or using a breadboard.
  7. Flash the NodeMCU with the firmware from the NodeMCU-Wixel repository (NodeMCU-Wixel/Firmware) using the NodeMCU Firmware Programmer.
  • Connect the NodeMCU to the computer.
  • Open the firmware programmer.
  • In the Config tab:
    • Browse for the firmware file.
    • Make sure that the new firmware file is the only selected firmware.
    • Set Offset to 0x00000.
  • In the Operation tab:
    • Select COM Port.
    • Click the Flash button.
  • Wait for the flash to finish.
  1. Change Wifi settings in the NodeMCU-Wixel repository (NodeMCU-Wixel/NodeMCU/modWifi.lua). Change ip, netmask, gateway, wifiSsid and wifiPassword depending on your network configuration. Then save. If you have multiple NodeMCU-Wixels, then make sure they each have a different ip.
  2. Upload code to the NodeMCU using ESPlorer.
  • Select COM port.
  • Set Baud rate to 115200.
  • Click Open.
  • Make sure you are connected to the NodeMCU. You might need to press the reset button on the NodeMCU.
  • Upload all files for the NodeMCU from the NodeMCU-Wixel repository (NodeMCU-Wixel/NodeMCU/) by clicking "Upload..." and selecting a file. Repeat until all files are uploaded.
  1. Restart the NodeMCU by pressing the reset button on it.
  • Wait until you see the text "Starting NodeMCU Wixel in 10 seconds...", then you know it is working.
  1. Download and install xDrip to your Android device (phone/tablet/computer).
  2. Start xDrip and goto Settings.
  • Select "Wifi Wixel" as Hardware Data Source. (Or "Wifi Wixel + BT Wixel" if you also want to use a Bluetooth Wixel.)
  • Under "List of recievers" enter the ip-addresses and ports of all NodeMCU-Wixels you want to use. This is the ip-address that was configured when changing Wifi settings for the NodeMCU-Wixel. The port is 50005 It should be a comma separated list. Example: 192.168.0.100:50005,192.168.0.101:50005
  1. Select "Start Sensor" in xDrip and wait for two readings, then enter a dual calibration.

LED Indicator

Current LED behavior

The LED will blink in the following cases.

  • Connecting or reconnecting - Slow blink (on 1 second, off 1 second, and so on).
  • Wrong password or other failure - Fast blink (On and off 4 times in one second).
  • Access point not found - Medium blink (on and off once each second).
  • Connected to access point - No blinking.

LED behavior prior to 2017-01-04

The LED, if present, will blink when an error occurs.

  • Fast blink (on and off four times in one second): Unable to connect to access point. Wrong password, out of range, etc.
  • Slow blink (on and off once in two seconds): Lost connection to access point, restarting after 60 seconds if not connected again.

Images

Finished NodeMCU-Wixel in box
Finished NodeMCU-Wixel in box.

Back of perfboard
Back of perfboard.

NodeMCU-Wixel connected on breadboard
NodeMCU-Wixel connected on breadboard. No soldering needed.

Monitoring NodeMCU-Wixels
Monitoring NodeMCU-Wixels.

Acknowledgement

This project relies on, and uses, the wixel-xDrip code and the xDrip application. A big thank you to the people behind these projects.

About

Low-cost Wifi connected Wixel for use with xDrip. Can be used in combination with a Bluetooth Wixel.

License:GNU General Public License v3.0


Languages

Language:C# 43.8%Language:C 34.6%Language:Lua 21.6%