Dont we all like to max out a new toy and see what it can really do?
So made myself a double mosfet - was a bit of a pain to make but runs cool
And plugged in the 3 battery box and took off the pwm limit so somewhere north of 200W
A bit of overshoot as i havent tuned the pid settings
I think next big bit of code is adding the profile stuff and moving all the settings over to that now - so just have a folder or something and each file is a profile - will make it simple to edit as well and use profile_name.txt or something like that so maybe a global one with stuff like:
coil_resistance = 0.55 #Ohms
session_timeout = 300 #in seconds
battery_min_volt = 3.2
Then a profile config like desktop_mains.txt
match_voltage_upper = 12.2
match_voltage_lower = 11.8
power_type = mains
session_timeout = 900
pid_tunings = 0.28, 0.0008, 0
heater_max_duty_cycle_percent = 60
Or config like portable_2_battery.txt
match_voltage_upper = 8.4
match_voltage_lower = 7.4
power_type = battery
battery_count = 2
pid_tunings = 0.31, 0.0011, 0
heater_max_duty_cycle_percent = 100
With a few resistors i can add a test on the input voltage and try to match one of the profiles based on that when it first powers up and if not either use the last one or show list of profiles for a few secs for the user to select one.
Also need it to set some sensible defaults for power level and pid values based on input voltage so watts are about 60-70w as it should work fine and not blow up any power supply
I have been looking at the 65w USB C chargers which output about 20v and should be able to power it but really on the edge of what they put out and also need to talk to the supply over usb and get it to output the higher power but think i need to miniaturise it first which is a bit more work than the current one which uses standard parts like the pico and need to basically make my own pico