JDY-31 Bluetooth SPP module

A friend referred me to a ‘replacement’ for the HC-05 Bluetooth module, a JDY-31.

Above is a JDY-31 bluetooth module with header pins fitted. The physical design is poor, the header pins can be fitted from only one side (not plated through holes, no pads on the other side, probably to suit the base board below), and the black plastic part obscures the board labelling of the pins. Continue reading JDY-31 Bluetooth SPP module

Hobbyking 2500mAh 18650 LiIon cells (9210000181-0) initial capacity test

This article is documentation of a capacity test of 5 x Hobbyking 2500mAh 18650 LiIon cells (9210000181-0).

The cells were purchased on 26/02/2018 (~$7 + shipping) and received at about 30% charge. They were each charged in a XTAR VC2 Plus charger at 0.5A until charged.

The cells are 65mm long, and do not claim to contain protection modules which are prudent in some applications.

Each cell was then discharged at 1A (0.4C) to 2.8V, the discharge was captured.
Continue reading Hobbyking 2500mAh 18650 LiIon cells (9210000181-0) initial capacity test

A little programming adapter for 4 x 2mm pitch pads

I recently had need to attach four wires to a set of pads on a device for programming its microcontroller. The pads for these sort of things are often on difficult to solve pitch, this one is 2mm which is not too bad.

Above is the target and solution.

The target is the four vias right next to the LEDs on the daughter module. Continue reading A little programming adapter for 4 x 2mm pitch pads

Inductance of sensorless brushless DC motors

A reader of A Demagnetisation Risk Index for a sensorless brushless DC drive asked whether the inductance of a sensorless brushless DC motor could be measured with one of the inexpensive LC meters available on eBay.

Motor inductance line-line typically ranges from several µH up towards 100µH. Importantly, the fundamental frequency of flux change in the laminated iron core under normal operation is typically less than 2kHz.

Validation of the LC200A

To verify the instrument, a test inductor was made with 3t on a FT-240-43 ferrite core.

Above is an estimate of the expected inductance of the test inductor, 9.65µH. Keep in mind that the tolerance of ferrite is quite wide, 20% variation is not unusual. The test inductor measured 9.1µH at 10kHz on a classic RLC meter.

Above, the LC200A measuring an inductor comprising 3t on a FT240-43 ferrite core, measurement frequency was 670kHz. The measured inductance is 8.98µH, 7% lower than the estimate but well within tolerance of the ferrite core, and less than 2% below the value measure with a classic RLC meter. Continue reading Inductance of sensorless brushless DC motors

Standardised processing of instrument screen captures

I have several instruments and software packages that can create screen captures, and the capture files commonly need some mix of image processing including for example:

  • cropping;
  • scaling;
  • brightness, contrast, gamma adjustment;
  • transparency change;
  • format conversion; and
  • file copy / archive / cleanup.

Above is an example. Though WordPress presents a small image inline, if you click on it, there is a 640×480 image that was created from a QVGA (320×240) screen capture file scaled and gamma adjusted.
Continue reading Standardised processing of instrument screen captures

A Demagnetisation Risk Index for a sensorless brushless DC drive

The article Demagnetisation in a sensorless brushless DC drive gave a broad overview of demagnetisation in a sensorless brushless DC drives that depend on Zero Crossing (ZC) detection to synchronise the next commutation phase.

There is no widely recognised method of prediction whether a drive is at risk of excessive demagnetisation time, not even in the steady-state wide open throttle (WOT) scenario.

This article proposes a statistic that might be used as a risk indicator, it is dimensionless and approximately proportional to the ratio of energy stored in the self inductance of a coil to the energy consumed by the motor in the time available for demagnetisation. Continue reading A Demagnetisation Risk Index for a sensorless brushless DC drive

Demagnetisation in a sensorless brushless DC drive

This article explains the ‘demagnetisation’ issue that challenges sensorless brushless DC drives that depend on Zero Crossing (ZC) detection to synchronise the next commutation phase.

Fig 1.

Above is a scope capture the ‘A’ terminals of a Multistar 4220-650Kv with 1045SF propeller running at about 50% throttle on 3S (about 4000rpm). The motor is quite lightly loaded for the purpose of illustration. The motor drive is low side complementary PWM modulated, and drive is advanced by 15° and the FETs are all N-FETs.

We will focus on the detail starting at about 5 divisions on the time axis (2500µs). The explanation will detail behaviour of the ‘A’ section of the drive, but the same thing happens on the B and C sections which follow each 120° electrical later respectively.

Fig 2.

Above is a capture of the A terminal focussing on the end of one of six commutation phases. The A terminal is the ‘low side’ terminal on the left hand side (and C is the high) and the ‘sense terminal’ on the right hand side (C is the high and B is the low). Continue reading Demagnetisation in a sensorless brushless DC drive

Hobbyking Multistar 4220-650Kv

This is a report on a series of tests performed on a Hobbyking Multistar 4220-650Kv sensorless brushless DC motor.

Above, a top view of the bare motor. It is a 12S16P disc form or pancake form motor, a style that is very popular though inclined to sync problems.

Above, the underneath of the bare motor.

The prop adapter is not shown, it had almost 1mm runout and would need to be replaced to actually fly the motor as propeller induced vibration would be unacceptable.

The motor would appear to be similar to the Hengli 42 20 650Kv, in fact so similar that it would seem possible, even likely that Hengli is the OEM.

Induced voltage waveform

The motor was driven at 970rpm and the voltage between two motor wires observed on a scope.

The line-line voltage is the sum of two phase voltages, one of which is a time delayed copy of the other and whilst the resultant is sinusoidal when the components are purely sinusoidal, the transformation is less obvious for complex waves such as shown above.

The phase voltage is of interest as it drives the sense process that provides motor timing crucial to commutation.

Direct measurement of the phase voltage using a star of 12kΩ resistors to establish a neutral reference yields the waveform above.

The induced voltage waveform somewhat the result of the 12N16P configuration. Period of the waveform is 7.7ms, equivalent to 60/0.0077=7790erpm indicating 7790/970=8 pole pairs or 16 poles.
Continue reading Hobbyking Multistar 4220-650Kv

Regenerative braking and electronic power supplies

Simple DC machines

Simple DC machines includes a DC motor with permanent magnet field and wound armature with commutator. The permanent magnet DC motor is a good case to study.

In simple DC machines, the difference between being a motor and generator is often simply a matter of rotational speed. The motor develops an induced voltage in its windings by virtue of its rotational speed, and current flows in the winding if that voltage is different to the terminal voltage… the direction of current determined by which voltage is higher and the direction of current determines whether the torque assists or resists the rotation.

The counter torque from reverse current is often referred to as regenerative braking as the retarding effect of the current driven by the induced emf of rotation slows the motor, and current flows into the source.

If a simple DC machine is powered from a simple rectifier circuit, the rectifier will block the flow of reverse current, and so there is no regenerative braking… the rotation induced emf simply raises the terminal voltage of the motor (possibly dangerously), but no current flows and there is no counter torque.

If a simple DC machine is powered from an electronic regulated power supply, the situation is a little different. The regulator will commonly block reverse current, and it may sense that output voltage is greater than desired and shut down, it may even be damaged by the excess terminal voltage.

Brushless DC motors

Brushless DC motors use some form of electronic driver to provide commutation of current in the coils, whether derived from sensors fitted to the motor or sensed from the undriven coil at any instant.

Some driver configurations provide a path for regenerative current to flow to the power source. If the power source blocks the regenerative current, the terminal voltage of the motor and power supply may increase, possibly to levels that may damage the motor driver and damage or disrupt the power supply. Electronic power supplies do not usually contain provision for regenerative current.

An example sensorless brushless DC motor used in UAVs

This example illustrates the nature of regenerative current in a particular application where rapid response of the drive is very important.

Above is a supply current graph for a test scenario that subjects the drive to a number of acceleration / deceleration scenarios. The current sensor does not measure negative current, its output is clipped at I=0. Continue reading Regenerative braking and electronic power supplies

RCTimer 4215-530Kv BLDC motor checkout

I purchased an inexpensive BLDC for some tests on a 6S battery pack. The RCTimer 4215-530Kv could be loaded up to about 20A at 24V (the limit of my bench supply) with an 11×4.7 SF propeller (in stock). The motor is a low pole count motor, 12N14P. On 24V, the no load speed should be almost 13,000rpm, and fully loaded perhaps three quarters of that.

Above is the motor as supplied. I used an ordinary M6 propeller nut so that it was easy to remove and replace without wearing out the nyloc nut supplied.

Above, the induced voltage waveform at 940rpm, somewhat the result of the 12N14P configuration.


The ESC was a Hobbyking 40A ESC 4A UBEC 9261000003, SimonK commit 02bd8e4ca36a06722efe51bc7cd5130d72a184b8 with COMP_PWM.

On a steady test on the 24V bench supply, the drive drew just on 20A cold and was clocked at 9200rpm with the Gemfan 1147 SF. Winding speed up and down slowly (to avoid degenerative braking which is incompatible with the power supply), motor starting, acceleration and deceleration were always smooth and without any sign of sync loss.

Tests were conducted with a script that I use consistently with asrg and eLogger to capture current, altitude is 700m. Continue reading RCTimer 4215-530Kv BLDC motor checkout