|
already did on your original post
|
|
|
|
|
This month speeches are a put up job (11)
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
DECORATIONS
This month = DECember
speeches = ORATIONS a put-up job.
|
|
|
|
|
Well done Derek - YAUT
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
I think I found a potential breakthrough for my project.
I believe I have figured out a way to drive pumps and fans at a specified RPM without using a PID based system.
PID is a problem because you have to calibrate it for each device using a scope, or at the very least by hand checking the output, even if not using a scope.
The trouble is for some reason I don't have a general purpose power supply for my bench. It actually never occurred to me that I'd need one because everything I work with is 3.3 volts or 5 volts.
I used to have a collection of DC wall warts for situations similar to this, but I don't know what happened to them, although I probably got rid of them while trying to cast off clutter during the last move or something.
So now I've got this trick code to do adaptive speed adjustments on fans and pumps but no way to test the theory until probably after Christmas.
I do have a couple of friends with fans who are willing to test this, but one can't find his, and the other is asleep right now. (They're both in different parts of the world)
This isn't a general request for help. However, if anyone wants to help and has an ESP32 of some sort and a PWM fan + two+ channel level converter, I wouldn't turn it down.
To err is human. Fortune favors the monsters.
|
|
|
|
|
honey the codewitch wrote: I believe I have figured out a way to drive pumps and fans at a specified RPM without using a PID
honey the codewitch wrote: This isn't a general request for help. However, if anyone wants to help and has an ESP32 of some sort and a PWM fan + two+ channel level converter, I wouldn't turn it down.
I love new discoveries, could you describe the new algorithm you found?
|
|
|
|
|
It's shockingly simple.
I give it a change delay - say 500ms (acceptable for my specs)
It can measure the RPM at any given point.
So what it does is there is a state machine and as soon as you change the RPM it stores the new target, and kicks the state machine off in one or two states depending if it's moving up or down.
Once you entered the new target RPM it continues to increase or decrease the PWM duty by one "tick"** each change delay until just after the RPM passes the target RPM mark, at which point it draws it back a tick and then stops changing.
** what a tick is depends on the resolution of the PWM.
The only downsides I can see to this method is probably taking more time to do the change, and potentially passing the mark for an instant before correcting itself.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Believe it or not I use to write dynamic positioning software that drove azimuth/bow thrusters, rudders and propellers and we heavily relied on PID algorithms. I use to write maritime vessel navigation software when I worked at Marine Technologies. I wrote both civilian and DoD navigation software systems.
My "instincts" tell me that what you are proposing might work for your "Laboratory setup". But you can get into situations where you are "chasing the error rate".
I know this might be hard to visualize but imagine you are on a school ground. You are on a playground swing, the person behind you pushes just 0.5 seconds after you reach the bottom of the swing.
It's that simple, you need to account for the error rate.
In fact most dynamic systems need a Kalman filter for higher accuracy.
Your 'dynamic system' is whatever Temperature gradient of the mass you are working with.
|
|
|
|
|
My lab actually is more demanding than my production, wherein with my lab I'm testing changes far more rapidly than will be made in my production environment.
I'm thinking if it's good enough to control PC style fans it should be able to drive fans that I only need to control in increments of minutes per change.
We'll see. I can plug PID into it if I have to, but I don't want to have to calibrate everything.
In fact it is nearly impossible for me to do so in the field since all the real world hardware is halfway 'round the world from me, and I need this code in place before the project's principal makes the trip over there.
If this part of the project fails in terms of the drop dead date for the above trip, it's not a show stopper, but it would be immensely helpful if it works.
To err is human. Fortune favors the monsters.
|
|
|
|
|
If you are working with AIR temperature you might have an measure of success.
I'm typing all this on my TV, pain in the ass, but it boils down to temperature gradient, I'm just a simple software engineer, my "job" was to take the math/physics these guys came up with and write it in C++
It's the 'laymen' and patent clerks that have to learn the physics.
Life sucked back then, I had to live in Egersund, Norway for a while, we had an office there.
|
|
|
|
|
Randor wrote: my "job" was to take the math/physics these guys came up with and write it in C++ I had a consulting job once that was like that. The scientist had written the math for the process we were implementing, and then 'C' code that (supposedly) implemented it. He originally insisted that I use his code as-is. Unfortunately it was really buggy, as he didn't quite understand how pointers and arrays were equivalent. I finally got him to show me the math, and between that and the code, I managed to write a version that actually worked.
Software Zen: delete this;
|
|
|
|
|
Randor wrote: PID algorithms Ye gods. You just triggered a flashback to my control systems class, decades ago.
Software Zen: delete this;
|
|
|
|
|
Yeah, this is what I was hoping to avoid because I want something you don't have to use a scope to tune.
I may be flying too close to the sun, as I've run into several problems with my approach so far, even with just measuring the RPMs, but I'm not ready to give it up yet.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Do you have the PSU from your old computer? That has 12V DC outputs at reasonable amps, as well as 5V and often 3.3V
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Not at the moment, but even if I did, don't they have to be plugged into a mobo before they'll give you the time of day?
To err is human. Fortune favors the monsters.
|
|
|
|
|
No, not generally - they provide at least some power immediately. I use an old PSU as a 12 / 5 bench supply for testing odd gizmos from time to time.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
A good power supply is indispensable and are not all that expensive.
I've had one of these BK Precision 1660A Triple Output DC Power Supply | eBay[^] for about 10 years now and it's been solid. At the time they were all over ebay and around $100 but they seem to be scarce now.
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
TOAUTO dc power supply $50 through Amazon but not currently (no pun intended) available. Works for me.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Yeah there are a ton of them on the market, and cheap. The only reason I bought the one I did is because it was a lab supply and knew it would be reliable.
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
agree
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
And also when did it start appearing on Visual Studio.
|
|
|
|
|
It's the "Visual Studio Debug Console", and it's been there since the first release of VS (as "Visual Studio" - it was a part of it's predecessors, right the way back to "Visual C++" V 1.0, "Quick C For Windows", or even existed in a form in Quick C for DOS.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
I saw the recent ChatGPT answers that were recently posted here on codeproject.com and were subsequently deleted. I don't disagree with the judgement call.
Some of the answers were really good. At least one of the answers was 'more correct' than two other answers veteran members gave. I checked, I double checked.
What surprises me the most is the infancy of this technology. I'm not sure if I will be able to determine real people from computers here in the near future. Kinda worrisome.
In fact, the only reason they got caught is they answered like 20-30 questions on a wide range of topics in just an hour. If they would have submitted 1 answer per day along with chat/banter here in the Lounge they may have gone undetected.
I'm not even sure if it was ChatGPT, it was different. When I looked at how it was answering more correctly than our members, I think it was comprehending the question better than our members.
It was very verbose, gave a very accurate description of C/C++ semantics. I felt like I wanted to see more.
|
|
|
|