I have a device (hho generator) who's current I want to control using a shunt resistor and pwm controlling a power mosfet.
My though was to measure the voltage drop across the shunt and adjust the duty cycle for the pwm to have a constant current draw (the hho generator draws different currents based on temperature and electrolyte concentration).
Will this work and could someone provide some details on how to get started?
Thanks in advance!
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No idea what an hho generator is, but what comes to mind is something like a Max4080, Linear, or some other high side current sense IC. Of course no expert here, because an innocent 16f877a got smoked due to my feeble attempt at making a battery monitor circuit (using the Max4081). Lesson learned is prototype with a cheapo Pic when messing with high currents.
A cheapo Pic would be a 12f683 which could use the a-d to read the Max4080 output. And, you would have the option to use a software or hardware PWM to the FET. Haven't a clue whether the round trip current sense, a-d, PWM feedback cycle is adequate for this type of project. Use a ramp up/down function on the duty cycle, and definitely put a fuse on the line load for safety.
A basic test of your idea could use a pot on an analog pin, then develop software to equate the input voltage to the PWM duty cycle, send that out on an output pin to say a logic level FET that would run a motor or fan. Plenty of sample code in the Online Help. Understand that, then move on to the current stuff.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone!
I have the following challenge.
I have a device (hho generator) who's current I want to control using a shunt resistor and pwm controlling a power mosfet.
My though was to measure the voltage drop across the shunt and adjust the duty cycle for the pwm to have a constant current draw (the hho generator draws different currents based on temperature and electrolyte concentration).
Will this work and could someone provide some details on how to get started?
Thanks in advance!
Alex
No idea what an hho generator is, but what comes to mind is something like a Max4080, Linear, or some other high side current sense IC. Of course no expert here, because an innocent 16f877a got smoked due to my feeble attempt at making a battery monitor circuit (using the Max4081). Lesson learned is prototype with a cheapo Pic when messing with high currents.
A cheapo Pic would be a 12f683 which could use the a-d to read the Max4080 output. And, you would have the option to use a software or hardware PWM to the FET. Haven't a clue whether the round trip current sense, a-d, PWM feedback cycle is adequate for this type of project. Use a ramp up/down function on the duty cycle, and definitely put a fuse on the line load for safety.
A basic test of your idea could use a pot on an analog pin, then develop software to equate the input voltage to the PWM duty cycle, send that out on an output pin to say a logic level FET that would run a motor or fan. Plenty of sample code in the Online Help. Understand that, then move on to the current stuff.