Modding a cheap PID controller

(Derryn Harvie) #1

I’ll start this category off then since I suggested it…

I bought one of these cheap PID temp controllers off ebay which I’m sure lots are familiar with. Plan was to make a sous vide with it.

After a bit of investigation I was pretty unimpressed with a number of things about it:

  • No substantial documentation in English. Sure you can glean enough by googling to do a basic setup, but it’s that old chestnut of different versions behaving a little differently with different bugs and a number of user manuals on the net showing different things.

  • The thermocouple input appeared to have no cold junction compensation. My guess is they’ve just picked a standard room temp and a using that for the cold end (e.g. 25 degrees). I never investigated this enough to be sure, but there’s definitely no temp sensor of any kind near the back of the case where the connector is. There was a pair of terminals labelled Rt, which possibly was for an external thermistor to be connected, but again it’s not clear as one manual I found shows those terminals being used for a PT100 thermistor probe instead of the thermocouple, not in addition to.

  • The K-type thermocouple was never really going to be that great for the temp range (in the 50-80 degrees.) They’re just not that accurate in that sort of range owing to the extremely small thermocouple signal levels. Buying a PT100 (thermistor) version of the same controller was easily twice the price.

  • No easy way of moding the firmware. I wanted to be able to do things like stepped temp changes and logging of the PID performance, of which this controller has no capability for. The uC on it is a Chinese 8051 derivative of some kind, but I couldn’t find any good data on it. Getting a tool chain together for it was always going to be an uphill battle.

Because the design of these controllers is modular, with a power supply board, display board and separate microcontroller board, I’ve designed a new microcontroller board that has the same physical form factor of the old board. I’m using a PSOC 4200 micro because it has some nice analog stuff for this applications, and I’ve got a bunch sitting around from when they were on a promo sale for $1ea. The board is designed to slip straight in with a small amount of soldering and make it somewhat of a universal controller. See attached kicad screen grab.

At this stage the boards have been made by Itead and are in the mail (probably be here late this week), they’ll need populating and testing.

I’ve temp wired up a PSoC dev board and written the firmware to control the display, leds and buttons which are all multiplexed.

I’ve got some waterproof DS18B20 digital temp sensors on the way which will be much more accurate (and simple to use) than a thermocouple in the required temp range.

Currently working on integrating a ESP8266 to provide logging and control over wifi.

If anyone is interested in using one for some purpose (doesn’t have to be temp control), I’ll have spare boards and parts. The PIDs are ~$15 delivered off ebay, or $25 with SSR and heatsink.

(Derryn Harvie) #2

New boards arrived, it’s nice to see I at least got the mechanical design right. Pic shows the old and new board.

(Derryn Harvie) #3

Have stuck all the Kicad board files and code into Github if anyone’s interested.

(Devdsp) #4

How much work would it be to support temps up to 210 (for solder reflow). I guess that does need a cold junction. Do they support 240VAC loads?

(Derryn Harvie) #5

At that temp you’re pretty much stuck with using a thermocouple. At this stage I’ve just got the DS18B20 sensor code ported across and working. I plan to sort out using a thermocouple soon, they’re not that bad to use, but will need a couple of extra parts (i.e. opamp.)

240VAC loads are supported using an external SSR, like this sort of thing:

That’s fine as long as you can do PWM with a cycle time of a couple of seconds. If you need to cycle chopping (50Hz) then you can but it’s a bit more complex. Need a suitable SCR, some sort of zero crossing detector, opto-isolator + code.

(Derryn Harvie) #6

Board loaded with DS18B20 sensor hooked up and working. Still waiting on some stainless steel waterproof versions to arrive.

Next things is to sort out the ESP8266 module code to get this thing on the network.

(David Lyon) #7

Hi Derryn,

Nice work.

Application-wise, what function were you considering using the ESP8266 for ?

Options might be on/off switch, streaming of temperatures, publishing temperatures on a web page.

(Derryn Harvie) #8

In truth I’m not totally sure yet, I’m kind of working it out as I go.

First up I want to log temp and control variables back to a server to assist in tuning the control algorithms. That should be pretty straight forward.

Once that’s sorted, I want to be able to use the wifi link to do module setup that would otherwise be painful on the LED display and buttons. Things like the control algorithm parameters. But also I want to setup things like preset temps in the module and temperature/time profiles for cooking certain things.

I’ve got a couple of different end applications for this in mind at the moment, so it’s likely the data output and control stuff is going to be slightly different in each.

(Paul Harvey) #9

Incidentally: this was picked up by hackaday back in July :smiley:


Hi Harvs!
What a great Job! Congratulation!
I’m realy interested in doing the same thing.
Have you update it since 2015?
Thank you for your reply!