• That looks good - I'd wire:

    1. To Battery 3.7v
    2. yes - to motor positive (3)
    3. to diode (2)
      4,5,6,7 as you suggested

    So the diode will drop 0.7v of the 3.7v. The other diode was so that if there's a voltage spike when the motor is disconnected, it's soaked up in the diode. To do that, simply connect it backwards across the motor (so the band side is on motor +).

    Only other thing I'd say is to connect the battery to the actual JST battery connector if at all possible. Espruino's got some circuitry to automatically switch between the JST connector and USB for power, but if you connect to the (slightly misleadingly named) 'Bat' on the pins, when you plug in USB and the battery, it'll be trying to put 4.3v into the Li-Ion battery, which is going to be bad news if it's left in for any length of time.

About

Avatar for Gordon @Gordon started