Close

Building the KIT1 with extra features

A project log for Open Source IOT Platform

Open-Source, easy to build IOT Dosimeter with sensors and Internet connectivity to centralise data.

Radu MotisanRadu Motisan 05/11/2017 at 15:040 Comments

As the KIT1 is open source, talented community makers often brought upgrades to this versatile IOT platform. Here' the work of Akos, that adapted the KIT for battery use and also built a plexiglass enclosure.

Last week I’ve assembled a KIT1 and posted some details about it to the forum. radhoo praised the article and asked me to share it on this blog, maybe will be helpful for the readers. So, here is an updated “copy-paste” from the original post.
The diy kit is based on the v1.1.104 pcb. It was made with minor modifications / improvements regarding the original model. First of all, I’m a beginner in all this electronics and coding stuff, so if I wrote something stupid, please correct me. I’m always open for constructive criticism. Second, sorry for my English, it is not my native language.

Differences to the original KIT1

– Incorporated lithium battery
– Builtin battery charger module + micro usb port
– Low dropout (0.17v) regulator
– Real PoE connectivity, no additional cable / connector needed on the device side, just the rj45 connector
– Transparent case made from plexiglass
Updated BOM, with the components I used (if something is missing, please let me know).
Note: I bought the components for these kits from local stores, the best available quality. Hence, the visual aspect of these components may differ from the originals shipped with the KIT1. I measured / tested all of them before soldering, to make sure everything is up to the specs.
03_portable_unit
I built 2 kits: one for me and on for a friend. He asked to make it portable, because he will use it mainly on field, as a mobile unit, outdoors and on industrial working sites. This raised two challenges:
The final product has to have a:
– reliable and high capacity rechargeable battery
– a robust but not too bulky case
Regarding the pcbs, after some emails, radhoo was so kind to send me 2 pieces, thank you again! And because i didn’t want to ‘destroy’ these beauties, all the modifications are made without hacking the pcb!

Power supply / charger / power consumption

Nowadays the “standard” power supply for handheld devices is the type b micro usb port. You can find them virtually anywhere. Also, it is fairly easy (and very cheap) to implement them into DIY stuff, using these modules. To add these without modifying the pcb, I simply glued them with 10 minutes epoxy. Not too smart, but will surely withstand the abuse of the backlash from the usb cable.
As for the battery, probably everybody has access to some broken smartphones… although the phone or display is broken, chances are good that the battery is still functional. You just have to hook up to the output of the charging module and the input of the voltage stabiliser and it is ready to use. I’ve used one scavenged element from an old macbook battery. It contains 4 lithium cells, similar to the one on this site. The cells are roughly the size of the kit1 pcb. This way, I saved all costs on charger + battery (0.3 euro).
filtering-2To keep a safe distance between the aluminum foil of the battery and the bottom of the pcb (high voltage!), I used 4 self adhesive rubber shoes, like those intended for furniture.
Most lithium batteries have a nominal voltage of 3.6V (min 2.9V, max 4.2V). The recommended operating voltage for the KIT1 is min 3.0V, max 3.3V. To use the battery to the maximum, I opted for a 3.0V voltage regulator. It has to have ultra low dropout voltage, in order to maximize battery life.
I also had to replace the original lm1117 voltage stabiliser, because it has a large dropout voltage, 1.1v. (this would be: 3.0 + 1.1 = 4.1v, maybe just 5% of the overall battery capacity. Not suited for my case … ).
After a lot of research, I bought the MCP1700-3002E/TO regulator. It has a very low dropout, only 0.17V! We get: 3.0 + 0.17 = 3.17v, so I can use around 95% battery capacity. So far, so good.
The max output current for the MCP1700 is 250mA, and the max input voltage is 6.0V. As the lithium battery never goes above 4.2v, it’s ok for me.
My battery is quite old and tired, and so the 3700mA nominal capacity was irrelevant. To estimate the battery life, I’ve made some measurements. The kit1 has the following current consumption @ 3.0V (*):
Offline mode, backlight off: 36mA
Backlight: 18mA
Online mode, backlight off: 147mA
Maximum peak current: 170mA
*with the red led desoldered from the ethernet module.

In online mode, with fully charged battery (4.2v) it took ~18 hours to discharge it to 2.9v. Discharging a lithium cell under 2.9v is not recommended, so even if the KIT1 kept working at 2.9V, I stopped the measurement. It then took ~5 hours to fully charge the battery (from an USB port). Based on the above current consumption scenarios and the measured 18 hours, it is fairly safe to estimate 50 hours uptime in offline mode. more than adequate for daily use on the field.

mcp1700

This regulator has a different pinout, then the original 1117. I had to make a tricky implementation, but that worked.

At the moment, the only flaw is, that the KIT1 keeps working even under 2.7V, over-discharging the battery. In the long run this will damage the lithium cell so the firmware should be modified to post a ‘low battery’ message to the screen and standby the unit, if the voltage drops below 2.85V. (We need access to the full source code to implement this)
Also, it would be nice to have a voltage divider on the battery terminals (say 4.2V to 3.0V) and implement a battery voltage monitoring function in the firmware. This way the user can have a feedback about the battery state. There are 2 unused analog pins on the mcu, this shouldn’t be a problem.
filteringThe MCP1700 needs 2 filtering capacitors to work properly. I’ve just replaced the original c3 with 1uf ceramic, the other one (Cout) was soldered on the back side of the pcb
p1120015
switch
Because the charger module covered some holes of the on / off switch on the pcb, I’ve used a different switch, placed on the right side of my case.

Real PoE

For the stationary unit installed outside, I wanted to have just one single cable (for supply + ethernet). According to wikipedia, the POE standard uses 2 modes: A and B. Unfortunately after some fiddling, I’ve realised that none of these modes are implemented in the hr911105a RJ45 connector, used on the enc28j60 ethernet modules. What a pity! All the 8 pins are galvanically isolated. I needed access to pins 4+5 for dc+, respectively pins 7+8 for dc-
poe-cable
Custom made ethernet cable: on the router end there is an additional USB cable, serving to inject 5V dc. This will be powered from the unused USB port on my router. The other end is just a standard RJ45 connector.

Hacking the rj45

It is possible to open the metal sheet on the connector.
10_rj45-open-1
The isolation transformers from rx and tx are clearly visible:
11_rj45-open-2
Then I’ve removed some plastic with a red-hot cutter blade, to expose the pins. Cleaning and soldering the wires to the selected pins was relatively easy:
12_rj45-open-with-cables
For tapping I’ve removed one of the lateral side tins. After putting some patches of insulating tape to the exposed pins I closed the connector.
13_rj45-closed-with-cables
The terminal wires (green + white) were soldered to the appropriate INPUT pins (+5v and gnd) on the micro usb charger module. Now i have a real poe module!
Attention: do not solder the +5V cable to the charger module OUTPUT, because it will overcharge the lithium battery! Lithium batteries, if charged beyond 4.3V can explode or catch fire!

short

This modification doesn’t deal with the two 75 ohm resistors, which kinda “shorts” the usb port. But if you do the math: 2 x 75R = 150R. For 5V / 150R = 33mA extra current consumption for the usb port. The usb port standard specifies at least 500mA / port. The whole device does not absorb more than 200 mA, so I think this is on the safe side.
Regarding the heat production on the two 75 ohm resistors:
0.033A x 5v = 0,166W total. There are 2 resistors, so this is 0.083W / resistor. Even if the resistors will burn out, I do not care, they are useless in this configuration (I think).

Note: using 5V DC with poe is not recommended on long cable runs because when load is applied, the voltage drops quickly. In my case, I needed only 5m of ethernet cable. With the device connected, the 5V dropped to 4.3V. This means, that the charger module will output max 4.0 volts, so the battery will be never charged to 100%. This is not a problem for me, as the router will continuously supply the power. However, for much longer cables, one should consider using an adjustable dc to dc booster between the USB port and ethernet cable (on the router end), to compensate for the voltage drop. With the uradmonitor unit turned on, clip a voltmeter to the charger module input pins, and adjust the booster on the router side, until exactly 5.0v is measured by the voltmeter. This way the voltage is compensated for the respective cable. If you alter the cable length, you have to re-do the adjustment!

Additional sensors – bme280

bme280
The v1.1.104 pcb has a nice feature, the extension port. This can accept any module with serial or i2c interface. Although, it is possible to retrofit any older kit with additional sensors – soldering the wires directly to the mcu pins, this breakout port is a more elegant solution. I’ve populated this with a bme280module. You can buy one here.
These sensors are very high quality and one can obtain a lots of info, with proper code implementation:
– temperature
– pressure
– altitude (uncalibrated)
– relative humidity
– dew point
– heat index (shadow)
– heat index (sunlight)
Attention: during operation the sensor chip is sensitive to light, which can influence the accuracy of the measurement! The position of the vent hole minimizes the light exposure of the sensor chip. Nevertheless, BOSCH recommends avoiding the exposure of BME280 to strong light. Probably it would be a good idea to paint black the sensor area inside the case… I always suspected that nail polish has some utility 🙂
I wrote a small arduino sketch to display all these values, using the SparkFunBME280 library.
16_uradmonitor_kit1_with_bme280_sensor
Unfortunately, at the time of writing this article, the uradmonitor source code (v117) is not fully open. We have to wait for radhoo to implement this sensor, or much better, to publish the full source code on github.

Case design

17_uradmonitor_kit1_plexi_enclosure
For the device to be fully usable outdoors and to have a better visual experience, it needs a case. I’ve designed the case in corel draw x8, made two very similar models, one for wall mounted fix station, one for portable device. Despite my very limited knowledge in Corel, I managed to finish it with quite good results. It was then laser cut from 3mm clear plexiglass.
case-draw
Since the enc28j60 chip produces a lot of heat, in a closed case this would deteriorate the temperature readings. I’m interested in the REAL outdoor readings. If the temperature value is not correct, all the other values are useless. The humidity calculation formula is also based on temperature. Accordingly, I had to assure a very good ventilation for the sensor:
p1120008
So, here are lots of ventilation holes on strategic parts of the case. These are circles 1.5mm in diameter – the smallest diameter the laser can cut (?), without melting too much plexi around. I hope the insects will not pass these holes. They will surely try. When winter is coming, a ‘heated’ hotel is very tempting…
As hot air always goes up, the components arrangement is not very fortunate for the sensor, since it is placed exactly above the biggest heat source in the kit1. I decided to mount the whole device upside down to the wall, this way the bme280 will be under the ethernet module. The ventilation holes should produce a chimney effect*, that will take care to transport the air from bottom to top. Theoretically, the sensor will always receive the unheated air from outside, obtaining correct readings. While used as a fixed station, the micro usb port will be out of order. Hence, it will be covered with a cap, to keep the bugs at bay.
* I will test this theory when the device will be mounted on the wall, placing an external temperature sensor near the case, and compare the 2 values.
If anyone is interested to build this case, here are the corel draw x8 files: fixed station with bme sensor, portable, without bme sensor.

If you have any additional ideas how to upgrade the case, you are free to modify, but please share here!
p1110998
I will add new photos when it will be installed in its final place. For high resolution pictures you can visit my album.
case-id
Thank you Radu for all the big effort and helpful attitude in this worldwide project!

Thanks for reading,

wanek t.

Discussions