Category Archives: Reference

Datalogging on MAC

Some newer mac os x versions may be in conflict with USB dongle’s driver (chipset = CH340) leading to a computer crash when the dongle is inserted in any USB port. The problem is solved by removing the old driver and installing a new one (more details and help here or here).
A functional setup should see data coming from the Charge Doctor, check it using an ascii console set at 9600 bds.


ascii data from the Charge Doctor

Data can be plotted using a grapher, for example “Plot2”. Probably not the best one because of its un-intuitive and ugly user interface but still good enough for the purpose. A free version exists (with some nag screens) and is downloadable from the App Store.


graphic display of data by “Plot2”


attribution : images & data by Henrik M.

Charge Doctor V2, firmware V 2.03

Firmware V2.03 adds importants features to Charge Doctor’s V2.02. Please refer to this user manual for all CD shipped after June 2016, it replaces the now obsolete initial manual.

The CD is now available for a large range of electric wheels, from unicycles to hoverboards, bikes, scooters… It also exist in “mixte” versions for use on different models by the same CD (eg. Ninebot & Gotway). Here is a list of (non exhaustive) CD-compatible electric wheels :

  • Airwheels & clones, King Song, Gotway, Solowheel, Firewheel, Dolphin, Pinwheel…
  • Gotway 84V (GX16 4 pin connector)
  • IPS (GX16 4 pin connector)
  • Ninebot One (Lemo connector) an Minipro (GX12-4 pin connector)
  • InMotion V3 & V5 (Lenovo square socket) and V8 (GX12-3 pin connector)
  • Hoverboards
  • Scooter with XLR-3 pin connector or GX16-3 pin connector (GTX, Dualtron, Speedway,…)

Image

Charge Doctor V2 features

  • Voltage: 20.0V – 100.0 V
  • Current : 0.00 – 10.00 A
  • Charge : 0.000-1000 Ah with automatic decimation
  • Energy : 0.0-10000 Wh with automatic decimation
  • End-of-charge by current threashold (0.1-8.0 A) or voltage threshold (30.0-85.0V)
  • Datalogging serial output 9600 bauds TTL
  • Dimensions : 85x50x20 mm
  • Weight : 65 g

Usage

At startup, displays “C-Dr” (blue) and firmware version “2.03” (red).

Image

Top display shows alternatively voltage (“61.9U”) and current in amps (“1.99A”).

Image Image

Bottom display has 3 display screens:

Short click => screen change
1. Wh
2. Ah : “Ah” alternates with value to differentiate from Wh mode
3. Auto-shutdown threshold ( flashing display)
Long click
1. & 2. reset Ah and Wh counters
3. Enable/disable auto-shutdown (“—A” = disabled).
N.B. auto-shutdown threshold can
only be changed in “adjustment” mode
Image Image Image
screen 1: 148.2 Wh screen 2: 2.377 Ah screen 3: auto-cut threshold
short click =>change to screen 2
long click => Wh, Ah = 0
short click =>change to screen 3
long click => Wh, Ah = 0
short click =>change to screen 1
(automatically back to screen 1 if no click for more than 6s)

Screen 3 has 3 modes, press long click to change mode :

Image Image Image
screen 3 / mode 1  screen 3 / mode 2   screen 3 / mode 3
auto-cut when current is below threshold (1.20 A)

auto-cut disabled (use this mode to  charge to 100%)

charge has been auto-cut (“off”). To resume charge, press long click or restart the CD by disconnect/connect charger

Easter egg: press 3 short clicks (interval < 0.3 between clicks) to turn off LED display
In display-off mode, the CD continues to work normally. Another click restores display


 Adjustement

Enter adjustment mode by holding the button when powering on.
1) mode auto-shutdown, threshold adjustment : button hold < 5s
2) mode voltage & current calibration : button hold > 5s

1) Adjustement of auto-shutdown threshold

Top led displays current parameter. With no button click, the screen is cycled through 3 avaibles parameters every 2s. Any click holds up the actual parameter 6s for adjustment before the cycling restarts. Adjustment mode is terminated and the CD gets back to normal mode if no click for more than 10s.

Image 3 available parameters:

  • Auto : auto-cut
  • Pr1 : parameter 1, display off at auto-cut
  • Pr2 : parameter 2, auto-cut mode by current or voltage

“Auto” : auto-shutdown mode. Bottom led displays the shutdown threshold. When the threshold is reached, current is cut by the CD and the charge session is ended (I=0.00A). The threshold is incremented by 0.1A steps (auto-cut by current mode) or 0.1V steps (auto-cut by voltage mode). Hold the button for fast then ultra-fast increment. Voltage and current threshold are stored in separate non-volatile memories.
Important: disabling auto-cut can not be done in “parameter mode” only in normal mode (see above).

“Pr1” : parameter 1. Value = 1 => deep standby mode with Led display off at auto-cut. To power on, click button or disconnect/reconnect the CD.

“Pr2” : parameter 2. Available values, “dn A”, “up V”, “dn V”

Image Image Image
dn A : down A, auo-cut when charge current is below threshold. Default mode at first use.

UP V : auto-cut when charge voltage is above threshold. This mode generally allows more accurate auto-cut, to be used on big batteries (>560Wh)  when auto-cut by current doesn’t have enough resolution.

dn V : down V, auto-cut when voltage drops below threshold. To be used only for discharge tests.

 

 

 

2) Calibration

Voltage and current are calibrated at +-10mV and +-1mA respectively before shipping. Avoid recalibration unless you have accurate instrumentation.

Top led displays actual parameter. With no button click, parameters changes every 2s in a round robin schedule for all available parameters. Any click keeps the actual parameter 6s before the round-robin restarts. To quit this calibration mode and revert back to normal mode, power-off then on Charge Doctor.

Image
“down U” : decrease voltage gain
(about 10mV per click)
Image
“UP U” : increase voltage gain
Image
“down A” : decrease current gain
(about 1mA per click))
Image
“UP A” : increase current gain
Image
“00 A” : change current offset to calibrate 0.00A
ATTENTION : connect no charge (zero current) and hold button 2s to calibrate (short click is ignored to filter out manipulation error)

Data logging

Charge-Doctor transmits data every 10s by serial 9600 bds protocol, TTL level, 8 bit data, 1 bit stop, no parity. Data are in ASCII format with separator = coma. The format is identical to the first version Charge Doctor, see the blog’s article on Graphic Display for steps to download and process data in realtime.
N.B. Charge Doctor does not store data. For data logging, a PC must be connected during all the charge record.

Connection to dongle : the Charge Doctor’s output Tx must be connected to the serial-USB converter dongle’s input Rx :
Image

Image

IMPORTANT : at power-up, Charge Doctor sends a 2 line header containing various information such as the firmware version :

Charge Doctor V2.00-10A by HMC 01/2015
Time(s) Voltage(x0.1V) Current(x10mA) Charge(x0.1Wh)

These two lines will be recorded in file “log.txt” but they are not parsable by the grapher KST so the realtime display will stop : KST is quite pricky as to the data format and any error will stop the graph updates. Data and graph should change in realtime in KST when new data is logged into “log.txt” by datalogger.exe so if KST’s display freezes, then “log.txt” contains errors. To remove errors, quit KST and edit “log.txt” using a text editor.

The ininterpretable header lines can be removed from “log.txt” by two methods :

  • restart datalogger.exe 2 secondes AFTER restarting Charge Doctor so the header gets lost and not logged
  • Click “Stop logging”, UNcheck option “Append to file” then click “Start logging” in datalogger.exe => old file “log.txt” is deleted and replaced by a new blank file for logging, hence, without the uninterpretable header.

Pictures of Charge Doctor V2, versions with GX16 connector (most electric monocyles, bike, hoverboard, bikeboard) and Lemo connector (Ninebot monocycle).
(click picture for high resolution image)

Image

Image

How to take care of your unicycle’s battery

Most unicycles use 16 LiIon battery cell packs. There are a few variants, InMotion battery has 18 cells, Pinwheel uses Lipo batteries, first generation Solowheels have LiFePo batteries, so the thresholds listed below are to be adapted but the operating principle remains unchanged.

All batteries have a BMS board (battery management system) to manage the cells, especially to balance the voltages of 16 cells and to automatically shut off charging current to prevent overcharge. A large majority of BMS also features overdischarge protection by cutting off power (without warning !!!), a horribly faulty design responsible for countless accidents, sometimes serious, see this blog’s BMS many articles.

Note that according to Shane Chen himself, Solowheel’s founder and popularizer of the electric unicycle concept, his BMS never cuts off power during a ride (vital requirement for an unicycle!). If the battery has a problem, the BMS just reports it to the mainboard thanks to a dedicated signal wire, the only reasonnable thing to do.

Battery capacities

To double the capacity of a 16S1P battery pack, an additional cell is welded in parallel to each existing cell to make a 16S2P (16 series or 2 parallel cells). Smallexis made such mod for his Airwheel Q3 battery, find it with the “search” button). To triple the capacity, add two cells (16S3P), to quadruple, add 3 cells (16S4P eg on the Firewheel 680Wh). The most common variant is two parallel packs, each with its own BMS, eg two packs 340Wh in parallel to have a capacity of 680Wh (Gotways).

Important thresholds

Here are some important values for a ??LiIon pack. They are useful to know to charge & discharge properly, to make a quick diagnosis in case of the wheel’s power supply problem and to monitor battery (inevitable) aging.
Values are for cell and pack (1 pack = 16 cells in series, values ??measured by the Charge Doctor )

Note V cell V pack Threshold
1 3.0 48 Quick deterioration
2 3.2 51 Minimum, avoid going below
3 3.45 55 Stop limit on most wheels
4 3.6 58 Storage voltage
5 3.7 60 For calculating the nominal value Wh
6 4.0 64 Open circuit after full load
7 4.1 66 Balance triggering by BMS
8 4.2 67.2 Constant voltage charge threshold

(1) the battery may not be destroyed by such a low voltage, it only “takes a hit”. This is a deep discharge state. Avoid at all costs !
(2) this limit is normally never reached because the wheel’s mainboard emits low voltage warnings (buzzer and/or pedals tilt-up) and forces the rider to descend before. If you have this value or lower, then your package has a problem, usually some defective cells.
(4) indicative value, may vary. Use this value to get 50% charge state for storage (a Charge Doctor counting capacity from voltage and current would be much more accurate). The goal is not to store the battery neither full (high voltages tend to stress the cell’s electrolytes separation membrane), nor empty to avoid self-discharge from deeply discharging the battery (see (1)).
(6) after the load, open circuit (no load) voltage tends to sag, especially if the battery is old.
(8) constant voltage charging zone: the charge current gradually decreases. When it is below a few tens of mA, the load is automatically switched off by the BMS. It can also be manually turned off by the user when the red LED on the charger switches to green, which corresponds to a charging current less than 0.25A. At this point, the battery is almost 100%, keeping on charging is unnecessary because only a few Wh would be added.
(8) The voltage at the charging socket (read by the Doctor load) may be 68V due to the BMS’s voltage drop, especially the reverse voltage protection diode.

Charge profile example (Firewheel 260 Wh)

Preserve the pack

  1. It is preferable to not charge more than 90% (even 80%), nor to discharge to less than 10% of the nominal capacity in order of the reduce stress to the battery. It’s not always possible with low capacity batteries (eg 130Wh) so if you have a beefy battery, just do it.
    A 100% charge or discharge to 0% results in a more stress to the electrolyte separation membrane and the electrodes respectively and reduces the number of usefull charge / discharge cycles. A LiIon battery does NOT like overcharge.
    Most of the times, it’s OK to stop charging when the current drops below 1A on a 2-ampere chargers (see graph). For discharge, the wheels stop early enough by raising the pedals so that we do not have to worry about a deep discharge.
  2. If the wheel is not used for a long time, eg more than a year, the battery should be voltage monitored and if necessary recharged to 50% to compensate for self discharge. However, LiIon battery’s self-discharge is very small (compared to NiCd or NiMh batteries) so checking it every year is enough.
  3. Log at least once the battery charging curve (using the Charge Doctor) and store it for later comparison in case of problems or to find the battery aging conditions after a few months or years of use. The reference curve gives a lot of important information, including how to determine the duration for charging to 90% (read the voltage at the beginning of charge, place the point on the curven use the x-axis to determine the time it takes for current fall below 1A, and use this duration to end the charge).

BMS, how to make your wheel safer

Most unicycles use bicycles’ BMS (Battery Management System) which has a overdischarge cut-off circuit (T1) to prevent the battery from discharging under the LiIon recommanded voltage. It’s a feature usefull for off-the-shelf bicycles’ batteries but for monocycles, it’s
1) unecessary since the mainboard deals quite well with voltage warning
2) utterly, incredibly stupid since a cutoff by the BMS results in a faceplant for the rider. In other words, the wheel’s designer prefers to protect the battery by hurting the user!!! Many many users have been harmed, especially when the wheel is cold (under 10°C), since the batteries’ internal resistance increases and triggers the cut-off more easily. Continue reading

Keep the Gotway quiet

The buzzer on my Gotway 14″ MCM 2S 340Wh is very loud. It’s a piezzo device, powered by a 25% duty cycle 3.3 khz square signal. The signal’s amplitude is 65V (the battery voltage !), no wonder it’s loud, and super duper annoying for you and certainly much more for pedestrians.

Unfortunately, as it has been said at length on the forum, the buzzer can’t be cut off because the GW has no tactile warning like tilt-back or vibrations on any other wheels. Without the beeping, you can overspeed (which can happens even at… 6km/h when the battery is near flat) and then, the wheel WILL shut the power down and throw you off. Yeah, as unbelievably stupid as it seems, it’s totally true : the wheel shuts the power down when riding to… protect you, nice logic, no ?

To reduce the volume and to make a Gotway ride more bearable, I don’t do the 100 Kohm potiometer-series-connected mod, it’s has been out there since the Gotway exists as a testimony of the super duper annoying buzzer (Gotway, please, do something !!!).

Here is my way to tone down the buzzer : a screw.

gotway_buzzer

A2 Generic – BMS shunt

The A2 wheel is a generic X3 clone. The wheeler had a power cut because of a defective cell. After the shunt, no more power shutdown, even if the defective cell has not yet been replaced. All that happens then is a much less powerfull wheel because the defective cell (to be replaced) behaves like a short, leaving a battery pack with lower voltage, though a much more preferable and manageable situation than a sudden cutoff. More evidence of the criminally stupid idea of integrating a cutoff circuitry in an electric unicycle.

P.S. The wheel electronics is accessed from outside, which is a good point ! Mainboard is a X3 generic, with the same ridiculous heat sink which doesn’t sink anything and needs to be added a big aluminium plate.

Shunt by connecting B- to P- :

Continue reading