SPI input for the generic heating / cooling controller

The generic heating / cooling controller (hcctl) is a flexible bang-bang thermostat controller based on an ATTiny25.

The project has been expanded to accept a simple SPI temperature sensor. The test case uses a MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter for K type thermocouples. The MAX31855 is around US$5 at Digikey for singles, but the tests were conducted using Adafruit MAX31855.


Thermocouples bring two challenges for hcctl:

  • low noise amplification of very low sensor voltage;
  • compensation of the ‘cold junction’ temperature; and
  • high resolution ADC.

The MAX31855 provides a solution to all of these challenges in a single inexpensive chip. Continue reading SPI input for the generic heating / cooling controller

Adafruit MAX31855 checkout

Intending to enhance my generic heating / cooling controller to read SPI temperature sensors, I purchased an Adafruit MAX31855 module on eBay from a local supplier for about A$26 posted.

The module you might have guessed uses a MAX31855, a Cold-Junction Compensated Thermocouple-to-Digital Converter for K type thermocouple with an SPI interface. The Adafruit module includes a regulator and level translators to use it in a 5V system.

This article describes a simple checkout using a BusPirate V4. Conveniently, the MAX31855 module can be powered from the BusPirate. The thermocouple input is provided by a thermocouple calibrator.


After a short wait to allow both devices to stabilise at ambient temperature, a test was run. The BusPirate session is as follows. Continue reading Adafruit MAX31855 checkout

Coupled coils – a challenge for hams!

One frequently sees discussions of coupled coils in ham fora, and the advice of the forum experts is commonly sadly lacking.

An example is the thread Impedance matching transformer where the OP is encouraged to make a transformer for 2:1 impedance transformation ratio based simply on turns ratio and a Rule Of Thumb for minimum number of turns.

Lets review a design where two windings of say 10µH and 20µH are wound on a toroidal core. With no flux leakage, the turns ratio would be 1:1.414. The model is a simple one of coupled coils and ignores self capacitance.

100% flux coupling

If there was no flux leakage, the mutual inductance is (10*20)^0.5=14.14µH, and we can build a three component model of the coupled coils along with the intended 100+j0Ω load.

Screenshot - 11_05_2015 , 08_36_22

Above the model for 100% flux coupling.

Screenshot - 11_05_2015 , 08_36_05And above, the response of the network. At 7MHz, the input impedance is 48.7+j8.7Ω, not perfect, but close (VSWR=1.2). Continue reading Coupled coils – a challenge for hams!

BLDC ESC – effect of insufficient dead time

This article reports measurements on a brushless drive used for an RC quadcopter.

Dead time is the time allowed between turning one FET in a half bridge off and the other FET on to ensure that they do not both conduct simultaneously, even for an instant, as very large currents may flow. The dead time specified in ESC configuation is an ‘additional’ delay added over and above circuit delays.


Measuring a stable properly synchronised drive system at minimum speed can expose the effects of insufficient dead time on total drive input current. At minimum speed, very little power is delivered to the propeller and most drive input power is lost in various system losses, so drive current becomes very sensitive to system losses. Continue reading BLDC ESC – effect of insufficient dead time

Report on Hobbyking 40A ESC 4A UBEC 9261000003 / BC3540-14 brushless drive

This article documents some a test on elements of a drive system which is the basis for one of my flying quads.

Test configuration:

  • Gemfan 11×4.7″ SF propeller;
  • BC3530-14 1000Kv motor;
  • Hobbyking 40A ESC 4A UBEC 9261000003 (BEMF caps removed);
  • SimonK commit 02bd8e4ca36a06722efe51bc7cd5130d72a184b8 bs.hex with 2000ns dead time; and
  • 4Ah 4S Lipo battery.

The dead time was chosen for compatibility with F-40A which I also use. Dead time of 1200ns is sufficient for the 9261000003.

This is quite a low cost drive, the 300W+ motor cost about A$14 and the 40/60A 6S ESC just under A$20 at the time of purchase.

The tests were conducted at 4S as a stress test (up to 170% of rated current), the quadcopter uses 3S. Continue reading Report on Hobbyking 40A ESC 4A UBEC 9261000003 / BC3540-14 brushless drive

Slot.it CS23B build

The Slot.it CS23B is a Porsche supplied as a ‘white’ body only kit which requires assembly and painting work. The body will be an alternate body for a CA23B car.


Above is the body assembly as supplied after priming with Valejo 73.601 acrylic-polyeurathane primer surfacer. The primer was applied to a very lightly scuffed body with an airbrush, it sprayed on well straight from the bottle, levelled nicely, and was no fuss to use it from its convenient squeeze bottle. Continue reading Slot.it CS23B build

Accuracy of AIMuhf system – AIM865A vs AIM885Gx on a ferrite cored inductor

AIMuhfAt Accuracy of AIMuhf system – AIM865A vs AIM882 vs AIM885 on a ferrite cored inductor I compared measurement of a small ferrite cored inductor on three ‘production’ releases of the AIM program.

Since then, AIM885A was released and it had problems as mentioned at AIM 885A produces internally inconsistent results.

Since then, AIM882, AIM885, and AIM885A have been pulled.

The developer advised on his support forum I’m sorry but version 885A has some problems. I’m working an update. In the meantime use the mature version AIM_865A.

Today, he posted a link to AIM885Gx (a declared beta release which presumably fixes problems in the pulled versions AIM882, AIM885, and AIM885A). Continue reading Accuracy of AIMuhf system – AIM865A vs AIM885Gx on a ferrite cored inductor

Using a Pt100 RTD with my generic heating / cooling controller

Generic heating / cooling controller describes a bang-bang type thermostat based on a AtTiny25.

This article works up an example application using a Pt100 RTD sensor. Pt100 is the designation for a platinum (Pt) resistance temperature detector with nominal resistance of 100Ω at 0°. Pt has a nearly linear resistance / temperature characteristic and high accuracy. Continue reading Using a Pt100 RTD with my generic heating / cooling controller

N2006P PID checkout #1

The N2006P is a inexpensive PID controller, typically for heating and cooling operations. There are lots of similar devices for under A$20 on eBay.


Above, the controller in a minimal test harness using a Type K Thermocouple for temperature sensing and 40A SSR mounted on a heatsink. (The SSR output should be protected with an MOV for inductive loads.) 480VAC 40A SSRs sell for as little as A$5 on eBay. Continue reading N2006P PID checkout #1