Reverse polarity of heater (peltier heating/cooling)
-
@blandified said in Reverse polarity of heater (peltier heating/cooling):
If we measure the resistance of the peltier (let's just say it is 10kOhms), and then we take a 10kOhm resistor and put it in series with the peltier, voltage divider means that the voltage across the peltier should be half (12V).
Is this viable? Assuming we can find a resistor that can handle up to 6A?
It's possible in theory, but you would need a 4.1 ohm 35W resistor. A buck regulator is a less expensive and more efficient solution, and may give you an adjustable output voltage too.
Another solution is to connect a high current inductor in series with the Peltier, and also connect a Schottky flyback diode in parallel with the combination. Then you can increase the PWM frequency to 50kHz and control the peltier current with PWM. The inductor would ideally be about 1mH, for example three of these https://www.digikey.co.uk/product-detail/en/wurth-electronics-inc/74437529203331/732-11718-ND/8134292 connected in series.
-
Thanks for the info!
I bought this DC/DC regulator and will update you when it gets in
-
Remember - do not connect the DC/DC regulator directly to heater output - buck converts don't like be driven with PWM. The buck convert needs to be connected directly to the power supply and then the peltier device positive connection goes to the positive output of the buck convert. And the negative output from peltier device goes to the Duet heater output ground connection.
-
I was not aware of this tbh. Thank you for info!
I honestly thought the the regulator would go inbetween the heater outputs and the peltier, like in series between the two.
I want to make sure I understand, so I drew a picture to clarify.
Does the negative output of the regulator go anywhere? (see X)
Does the Vin of the heater output go anywhere? (see X)
-
Both X - leave unconnected. Such buck converters don't provide galvanic isolation so the negative output from the regulator is directly connected to its negative input so it doesn't need to be connected anywhere. The E0 Vin is just always on, Duet switches when doing PWM the ground not the supply voltage - this is why we can use buck converters like this.
-
Thank you! The regulator will come in tonight so I will update you tomorrow.
-
So for a test, we set our temp for 35degC and the peltier will heat up and maintain that temp assuming we cool the other side enough.
So heating is good. But would you be able to point us to the function that is controlling the heating process?
I ask this because we would like to modify it to be able to COOL instead of just heat.
For example, if we set the temp to cool to 10degC (with current temp at 25degC), the temperature sensor actually shows that the peltier tries to cool by a degree or half a degree but then it will shoot up rather crazily.
So I am thinking:
if (desiredTemp < currentTemp)
// Send a control voltage to DPDT relay to send current one direction
// Do cooling function (might need to swap some increment/decrements in existing code)
else
// Stop the control voltage to DPDT relay to have current go the other direction
// Regular Heat.cpp functionalitySo basically if we want to heat, then the normal heat function occurs. But if we want to cool, then we select our COOl function.
So I guess the question is where do we find the heat function to edit this?
-
@blandified said in Reverse polarity of heater (peltier heating/cooling):
So I guess the question is where do we find the heat function to edit this?
It should be here:
https://github.com/dc42/RepRapFirmware/blob/dev/src/Heating/Heat.cpp -
@klcjr89 said in Reverse polarity of heater (peltier heating/cooling):
@blandified said in Reverse polarity of heater (peltier heating/cooling):
So I guess the question is where do we find the heat function to edit this?
It should be here:
https://github.com/dc42/RepRapFirmware/blob/dev/src/Heating/Heat.cppThat's the right general area, but it's actually in the Pid.cpp file.
I suggest you work with the v2-dev branch, not the dev branch, because that is where the source code for the V2.0 beta version is.
-
Thanks for your help!
Just to updated, we haven't done the cooling portion yet but we wanted to let you know about the DC regulator you recommended.
So when we heat up to say 40degC, the peltier only receives anywhere from 7V to 10V, so it's not like it is receiving the full 24V. Because of this we haven't used the peltier yet. Just to let you know