Some advice/help about the HM circuitry...


 

GeordieStew

New member
Hey folks

I'm planning on rolling my own, personal Pit Controller. Looking to borrow some of the features from the HM project, as they are tried and tested. My main focus is software, and my understanding of electronics is low/nil. I guess I'm looking for some individual "branches" of the circuit so I can replicate the hardware, then play with my software side of things.

1. The Thermistor circuit. I have some Thermoworks probes. There's a 0.1u cap on the ground side. A 100k resistor between the probe and the ADC channel. And a 10k resistor between the 3.3V line and the probe. Is this correct?
Which value is used in the divider calculation?​

2. Blower circuit. This is way above my level. A full circuit of just the Blower would help. But know that'll be quite a big ask.
HMBlower.jpg

Apart from this circuit, is there anything else I need? The inductor was a problem, but think I've sourced something similar. What are the important characteristics of the chosen ones from Mouser?

That'll do for now...

Thank you in advance
 
On the probe circuits the .1u cap and 100k resistor are an RC noise filter to clean up noise that comes in from the probes, the 10K resistor is the pullup resistor. The 10K resistor is the only one that is "needed" for it to work, but the RC filter is important for making the probes read stable temps, otherwise the noise makes the probe readings fluctuate quite a lot.

The majority of what you see there on the blower circuit (past the inductor) is a feedback circuit that goes back to the ATMega so it can run in "Voltage" mode. Technically you dont need the feedback circuit if you run in "pulse" mode, though pulse mode generates more noise which can effect the probe readings. As for selecting the parts, the HM BOM has links to all the parts so IDK why you would need to go through the process of selecting parts, that is all laid out there for you already.

Voltage mode and the RC filters were put in place to make the probe readings more stable, if you eliminate those you are taking a huge step backward and your design will have the weakness of earlier HM designs, like temp readings that fluctuate quite a bit, which will in turn make the fan ramp up and down constantly because it thinks the temps keep changing. These two improvements came with the HMv4.2 design, which is where the HM really hit stride on stability. You can look at the HMv4.0 or HMv4.1 to see the circuits as they existed before these improvements, but I would urge you to use what you see in the HMv4.2, these are HUGE improvements in the HM design.
 
You're gonna have to just look at the specs on the part bryan is using then and try to get something that matches those specs. Perhaps put his part number into the supplier you can get parts from and let them suggest an alternative part? I've gotta move on with things today so I don't have the time to look into the specs of the two parts and tell you if you made a good choice, perhaps someone else will have the time to do that for you.
 
Thank you Ralph. The inductor will be here tomorrow, so guess I can test it.

Not really sure how the circuit works, but what's the worst that can happen?! :)
 
If the inductor isn't right the fan will not ramp up the full range when in voltage mode. I repaired a HM that got damaged by having -12VDC power supply connected (reverse polarity), the blower worked perfect in pulse mode but would start up at about 80% when in voltage mode (blowing fast even though the HM output was at a very low %). Turned out to be the inductor got toasted a bit, after I swapped the inductor it worked perfect in Voltage mode again. This is an easy malfunction to miss, because the fan does come on and off etc, but is running too high all the time. So compare the fan speed in pulse mode to voltage mode and if it is spinning about the same in both then your inductor is OK.
 
Thanks for answering all the questions for me, Ralph!

Geordie, the fan blower circuit is a simple "buck converter". The MOSFET acts at the switch to turn on and off power at 62KHz. If fully turned on, it just passes 12V, and the lower the duty cycle, the lower the output voltage. L1 and D2 form the buck circuit, C12 smooths out the voltage, +12_BLW is the output.

Then the feedback circuit so HeaterMeter knows how much to set the duty cycle for the MOSFET. R13 and R4 are your two voltage divider resistors to drop the 0V-12V down to 22/(68+22) * 12 = 0V -2.933V. The 100k and 0.1uF capacitor are a smoothing circuit again (15.9Hz cutoff, 23 msec to 90% response) which is fed into the ADC. The circuit can read up to 13.5V feedback, but higher power sources are OK because the ADC inputs are clamped my the ATmega and the 100k resistor prevents any large amount of current from flowing into the ADC anyway.

Inductor sizing is 220uF chosen to get the voltages out we want (5V-12.1V) at our frequency (62KHz) and our power output (~0.5A). I picked a 1A part so even larger fans would work reasonably well, however it may be overspeced for the job. I've also damaged an inductor by operating HeaterMeter in pulse mode and connecting it to a 3D printer hotend. Yes, HeaterMeter can directly control a 25W hotend/thermistor! However the circuit board traces for the blower were getting pretty toasty and the inductor became really noisy. It would be best to short out the inductor (just remove it and solder in a wire) for that application.
 
Last edited:
Hey all

I wired up the first part of the blower circuit...I need to do it in chunks or I'll get lost.

When the PWM (analogWrite) is 255, the blower isn't on.
When the PWM (analogWrite) is 122, the blower moves slowly.
When the PWM (analogWrite) is 0, the blower moves fast.

I took my cheap DMM out and measured across the blower.
PWM 255 = 3.7V
PWM 122 = 6.8V
PWM 0 = 9.3V

There's definitely 12.X V going into the circuit.

What could be wrong that I'm not achieving 12V at the blower?
Why are the results the inverse of what I expected? Is that normal?

Thanks in advance!
 
Oops looks like I forgot to explain one more part, Q1 / R14. Because the power MOSFET is P-Channel, the gate needs to be pulled up by R14 to turn it off. When we want turn it on, we enable Q1 which pulls the gate on the power fet down to roughly ground and it lets current flow.

Did you maybe not include Q1 and R14?

Another thing to note is that the PWM frequency and phase needs to be the same as HeaterMeter's. There's a "gate charge" on the power fet so if you try to drive it too fast, it doesn't turn back off fast enough as the current through the 2.2k resistor takes too long to re-charge the gate and the ATmega is turning it off again before it fully closed. HeaterMeter uses Pin 3 in 488Hz fast PWM mode I think.
Code:
  // in setup();
  TCCR2A = bit(WGM21) | bit(WGM20);
  TCCR2B = bit(CS22) | bit(CS20); // 488Hz
 
I believe I included Q1 and R14.

I revisited it this morning. Realised that the source of Q1 wasn't grounded. And also added the code above to Setup.

Now runs
255 PWM - 11.3V
122 PWM - 10.1V
0 PWM - 9.3V

I added the feedback circuit in but it's reading 1023 all of the time. When I check my meter, the FB signal is negative. No idea what I've done here...Maybe I should stick to C#!
 
I am not quite sure what you've built, but you might want to tear it all down to just Q1, R14, and Q3. That should give you
255 PWM = Input voltage (12V)
0 PWM = 0V

And the fan should run proportional to PWM output. Then add D2 and C12 and it should run more quietly but with a little less linear control. Finally drop on L1 and you should still get the same 255/0 outputs but now the voltage in the middle is going to change. Note that it isn't linear at all any more at this point, 128 PWM output could give you 11.9V or it could give you 5.2V depending on the current draw. With no fan hooked up it will probably always read around 12V no matter what the PWM.
 
There's something awry. 7.3v with 0 written to PWM. 11.3V with 255.

ETA - This is one with Q1, Q3 and R14. I'm clearly doing something wrong.

12.3v from the PSU. Will do more analysis after a nice cuppa!

ETA...the schematic shows 2k2 resistor for R14...parts list shows 22k. Will check it out now.
 
Last edited:
the schematic shows 2k2 resistor for R14...parts list shows 22k
Actually the parts list says both! The 22k is supposed to be R4 (feedback divider), R14 (the pullup) is 2.2k.

But yeah something is clearly not right if you're getting 7.3V with 0 PWM and 11.3V at 255 PWM with just those parts.
 
Q3 is getting really hot. I've swapped it out for another FQU11P06TU but still the same.

Also made sure that R14 is 2k2. Sorry for being a moron! ha
 
Well you're the first person in over a year that has noticed that the parts list had R14 on it twice, so nothing to apologize for there!

If the fet is getting warm at all it sounds like it is on for some reason all the time, and passing lots of current. If you've got Q3's source (or is it the drain in a P-fet? the leg connected to the 1N5819 in the schematic) hooked directly to ground then that would be a problem because it effectively shorts when conducting (gate less than around 10V).
 
Guess I'd blown something up (one of the MOSFETs). I've tried new components

0 PWM - 0.08v
122 PWM - 5.85v
255 PWM - 11.25v

At the blower end.

Not sure if that's right, but at least the blower stops when I want it to.
 

 

Back
Top