The second version of the collar is based on a Wemos D1 Mini micro-controller, making it more compact. It also adds the ability to read the battery level and allows the battery to recharge 5 times faster. It utilizes the same accelerometer as the first collar, and adds

I will say that for the time being this build is trickier than my first collar. We have 4 layers in total on the device. The bottom layer is the D1 Mini. On top of that we have the battery shield, proto board, and finally the accelerometer on top.

The “tricky” part is twofold. First, since we’re going for compact here, we need a pair of side-snips to cut some components down to size. The second tricky part is that we end up with two halfs of the device, the controller and shield, and the proto board and accelerometer, which need to be combined. This makes soldering a bit tricky due to space contraints.

If that seems too daunting then the first collar will give you a bit more room to work in.

Hardware

Wemos D1 Mini
D1 Mini Battery Shield
Accelerometer D1 Mini Proto board

Battery

With the addition of the D1 Mini Battery Shield we gain the ability to read battery levels and re-charge faster.

To read battery levels you would normally create a voltage divider circuit to step the voltage down to under 1 Volt which is a requirement of the analog pin A0 on the micro-controller. The D1 Mini already includes an internal 220K resistor and with the addition of the battery shield we get a 130K resistor to complete the circuit. This means we can read a voltage approximation on pin A0, and do a little math to get the values we want.

The battery shield also includes a solderable jumper which causes the recharge current to be increased from 100mA to 500mA. If you do this do not ever use a battery smaller than 500mAh. Doing this however would cause the recharge time for a 500mA battery to go from 5 hours down to 1 hour.