The Development Log


 
Ok, so a couple of stupid questions. I am not an engineer, so please feel free to ignore if appropriate :) I've been pondering the thermocouple issue since I built my board. I cannot access the schematic at work so I can't see what you are using for the thermocouple amp, but why are you attempting to interface at an analog level? There are 2 thermocouple amps that I've been reading about that work in the digital realm. The max 38155 and the max 31850k. The latter is a maxim 1-wire device that should be easy to interface with. On the Adafruit site she does mention that a .01uf to .1uf cap across the thermocouple input will stabilize the signal. I know you have tried this with your board to no avail. Link: http://learn.adafruit.com/thermocouple/f-dot-a-q

Thoughts? Flames? If I was better at the programming side of all of this I'd try it myself, and I still may at some point.
 
The amp is the AD8495 analog thermocouple amp. There is a common mode noise rejection filter, a differential noise filter, and an heavy output low pass filter on the thermocouple board. The problem is mostly with the noise on the HeaterMeter board itself causing the ATmega to take bad readings on all probes. I'm mostly working on trying to get rid of that first, because I think the rest will fall into line when that's gone.

I'd like to avoid having to implement their protocol into the source, mainly due to code bloat. The current implementation added somewhere on the order of a hundred bytes which I think is good for something that won't be used by most.

A digital thermocouple amp might be something I try down the road if I can't get it working, thanks for the suggestion.
 
Hey Brian,

If I can recommend this - definitely go digital and avoid the issues (as you are currently experiencing) with analog. You do away with many hardware complexities. If you do a search on the net, you can see that most thermocouple implementations don't select the analog route.

Regarding the noise, you might look at the spark.io board - they have a special circuit they've designed for ultra clean 3.3V (with a inductor bead in series with a capacitor in parallel). But, this means more stuff on an already crowded board.

heh heh... unless you want to come to the dark side and go SMD :).

Cheers, D
 
The problem actually affects the thermistor probes almost as much as it does the thermocouple probes so that's why I'm spending so much time trying to get it clean. I've also used the same circuit with a separate 3v3 supply, inductor bead, ferrite to star point ground, capacitors right on top of components and it still is there.
 
Can you point me to the post where you show how do load/run your debug mode? I'd like to do the test with my SMD design and see if i can replicate it. I'm guessing that designing the AVR chip so that the temp analog traces are as close as possible to the thermoresister plugs would be helpful.
 
It is on the previous page. I'm curious to see your results as well, but I also have the problem that other things running in the house seem to affect the readings so I guess the results will vary from location to location :-D
 
Last edited:
I'm seeing a graph that is very smooth, measuring ambient air temp. The house heater was turned off.

NXkoVw3.jpg


What do you have radiating at your place? 200 Watts of Transmitter? (ed: sorry for the snark)

Does it make sense for you to test an alternate design at your place?
 
Last edited:
Yeah it looks fine at that scale, here's mine:
HS729qz.png


But you can't tell what's going on behind the scenes from that. Most of the noise is averaged out in software but still it would be nice to eliminate it at the hardware level which would make a more reliable experience for everyone.
 
Ok, here is the debug output.... how do I interpret it?

tBWDNOy.jpg


It does look a heck of a lot smoother than your graph, just from my uninformed review.

[ED: Added new graph later]

Later, I've recorded a busier graph:

zJiPFMO.jpg
 
Last edited:
It's showing your raw data coming in from the ADC for one sample period, bottom scale is milliseconds. That's somewhat clean. You should have only one number, a straight line, or possibly two values if the temperature is hovering between two ADC ticks. The largest noise is usually seen when the fan is running at low power, like a manual 5% or 10% setting (whichever your min value is set to in the config).

Here's my thermoworks probe normally, with 5% fan speed, and again when a lamp is on in the room


It can change the actual output value and could get worse depending on, I don't know, electrical magic I guess. I'd prefer it be more resilient to the environment so that something like someone turning a tv on doesn't cause the probe to start behaving strangely.
 
Ok, so if the ADC permits the input of 0-1023 to measure 0-5V, what do the Y axis values mean in this graph? I assume I'm seeing the voltage measured in ADC values? And the Mavericks are positive temperature coefficient thermoresistors?

Nevermind - I figured it out.

On a related note, I was searching for how to make measurements more accurate, and I found this idea:

Apparently the 328 can measure it's own supply voltage rail - which means very accurate estimations using the ADC...

I haven't dug into the code to see if we do this type of check, but it may be worth a quick review:

http://hacking.majenko.co.uk/making-accurate-adc-readings-on-arduino

https://code.google.com/p/tinkerit/wiki/SecretVoltmeter
 
Last edited:
Bryan,

Are you planning to release a new revision of the PCB anytime soon? I'm about to order another batch of 20 4.1 PCB's but if you are going to release an improved version in the next few weeks I'll better wait. Anyway, keep up the good work!
 
It can change the actual output value and could get worse depending on, I don't know, electrical magic I guess. I'd prefer it be more resilient to the environment so that something like someone turning a tv on doesn't cause the probe to start behaving strangely.

Wouldn't the above scenario indicate that perhaps a better power supply circuit is needed? Have you ever tried running the HM on separate bench power supplies for the 3.3, 5 and 12v? If the HM is effected by other appliances etc that would seem to indicate that the power supply is not isolated enough or not having enough reserve energy stored in the capacitors? Perhaps beef up the capacitors in the PS circuit? We've been tied to the DC-DC regulator on the HM, which is certainly convenient, but perhaps it's not supplying clean enough power for this sort of application?

Forgive me if you've covered/discussed the above recently, I've been out of town for a while and am just now getting back in tune with things....
 
Apparently the 328 can measure it's own supply voltage rail - which means very accurate estimations using the ADC...

I haven't dug into the code to see if we do this type of check, but it may be worth a quick review:

http://hacking.majenko.co.uk/making-accurate-adc-readings-on-arduino

https://code.google.com/p/tinkerit/wiki/SecretVoltmeter
We don't measure any voltage on the thermistor probes at all, HeaterMeter just measures the fraction of the voltage that's remaining after the voltage divider. These "secrets" are all wrong anyway because they assume the 1.1V reference is 1.100V which it is not. There's a 10% tolerance in the bandgap which means you need to physically measure it to determine what it actually is. There's also temperature variance to consider, but that's not as large a factor.

Our voltage line is also pretty accurate anyway, being fed by a 3.3V regulator whose only job is to power the ATmega / shift register / RF module. Which only really matters when it comes to measuring the thermocouple amp output, and only then would manifest as a static offset which is not what we're seeing.
 
Wouldn't the above scenario indicate that perhaps a better power supply circuit is needed? Have you ever tried running the HM on separate bench power supplies for the 3.3, 5 and 12v? If the HM is effected by other appliances etc that would seem to indicate that the power supply is not isolated enough or not having enough reserve energy stored in the capacitors? Perhaps beef up the capacitors in the PS circuit? We've been tied to the DC-DC regulator on the HM, which is certainly convenient, but perhaps it's not supplying clean enough power for this sort of application?
I've tried numerous large caps in parallel on all the lines and it has no effect. While it certainly can't be helping that the input voltage is dipping going into the HeaterMeter power supply, I believe it is more the board layout that affects the readings. There's just return current going all over the place and the ATmega is right in the path of everything.
 
I've tried numerous large caps in parallel on all the lines and it has no effect. While it certainly can't be helping that the input voltage is dipping going into the HeaterMeter power supply, I believe it is more the board layout that affects the readings. There's just return current going all over the place and the ATmega is right in the path of everything.


Bryan, is it possible that the caps were letting something through? I know on my 2 current HMs that if I use a small digital PS that the readings drop out at least 50% of the readings. If I use a transformer based PS I have no problems.
 
I know a lot of people have the "white wire" mod on their HeaterMeters, but does anyone have this much action going on?


I figured if I was going to redesign I might as well really redesign. Most of that junk on there is me trying to block out noise (completely unsuccessfully). However the big black inductor and feedback circuit are something I've been wanting to do from v1, which is produce a stable fan voltage rather than pulsing 12V at 488Hz PWM. Just one more component is needed to make this work, however to control it accurately I've added feedback to the ATmega that monitors the output voltage and adjusts the output duty cycle to achieve the target voltage.

The current software scales the output between 6V (at 1%) and 12V (at 100%) currently. I've tried plugging in a second blower while the first is running and the software quickly adapts the output to handle the new current draw.

As far as noise, there is a similar amount of noise from this circuit as the original PWM, at least on this test board. The first set of v4.2 prototype boards are going to have this design and hopefully with their smarter layout this design will bring a great new feature, quieter blower operation (it no longer goes WEEEEEEE when below 100% power), and acceptable measurement performance.
 
I know a lot of people have the "white wire" mod on their HeaterMeters, but does anyone have this much action going on?


I figured if I was going to redesign I might as well really redesign. Most of that junk on there is me trying to block out noise (completely unsuccessfully). However the big black inductor and feedback circuit are something I've been wanting to do from v1, which is produce a stable fan voltage rather than pulsing 12V at 488Hz PWM. Just one more component is needed to make this work, however to control it accurately I've added feedback to the ATmega that monitors the output voltage and adjusts the output duty cycle to achieve the target voltage.

The current software scales the output between 6V (at 1%) and 12V (at 100%) currently. I've tried plugging in a second blower while the first is running and the software quickly adapts the output to handle the new current draw.

As far as noise, there is a similar amount of noise from this circuit as the original PWM, at least on this test board. The first set of v4.2 prototype boards are going to have this design and hopefully with their smarter layout this design will bring a great new feature, quieter blower operation (it no longer goes WEEEEEEE when below 100% power), and acceptable measurement performance.

Interesting. Will there still be support for those of us running an SSR that drives an electric element?
 
To tell you the truth, I like the WEEEEEEE sound as sometimes it's the only way I know anything is actually happening :)
 

 

Back
Top