| Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : AI Is Evolving Fast
Thanks. The ray-casting stuff in not in my lane, but fascinating. I had to look up "ADSR" (Attack, Decay, Sustain, Release). Also beyond me. It's amazing what different areas of interest may be open to people through Peter's ongoing investigation of how AI can help integrate different features into MMBasic on the RP2350 (and the investigations of others). Lance |
||||||
Well, I'm glad I got my all day, every day sessions in with Gemini on PicoDB started January 17, because if what I've been seeing for the past 5 days holds, I would never have done it. I had run into limits with Chat and Claude, but none with Gemini. Now in the afternoon and evening (U.S. Eastern time), I repeatedly get "I seem to be encountering an error. Can I try something else for you?" I suspected that all the "AI is evolving fast" articles that I have read in the past 10 days are moving the needle significantly. I asked Chat-GPT and it confirmed the likelihood, noting that the new "agents" might mean that a single user's compute usage might be 5 or 10 times greater, and Claude is now the highest-ranking download. Demand for compute is exceeding supply. I'm not going to spring for a M4 Mac Mini or the rig that Peter has bought to enable me to code locally with Claude, so maybe this was just a spree for me and my timing was lucky. Maybe I'll see how it goes at 7am until it gets clogged up. Fun while it lasted. |
||||||
@lizby Could be my fault, I've had Gemini tied up with my stuff for the past few days Seriously, though. This is getting spooky; I was discussing high-side driver devices, mainly for hydraulic solenoid valves and Gemini stated that using PWM is a good idea because, once the valve spool has shifted, the holding current can be reduced. I explained that I already do this and that I actually achieved pseudo proportional control (variable oil-flow rate). Heck, it came back with a response that seemed to ignore that I'd already stated that I was doing this BUT it was dead-right [paraphrasing] This is what I had discovered, exactly through trial and error. How could it know this. AFAIK, nobody is doing this and hydraulic valve "experts" have told me it won't work (been doing it for five years). ![]() |
||||||
Spooky is the word for some of it. It has an astonishing amount of obscure knowledge on call. If you want to put "knowledge" in quotes, that's fine by me. Meanwhile, for me, the late-afternoon / early-evening snarl cleared up and (my poor brain) I was able to continue working with Gemini until 11pm (U.S. Eastern time). |
||||||
Is AI generating a artificial reality ? Most humans are face-programmed but that is now supplied online . FaceBook, FaceThink, FaceDo ... The crunch will come if/when robots supply child care. |
||||||
FaceLess = "it's becoming worrying" Human evolution is based on faces. Take them away and what will happen? |
||||||
G'day, I guess that also depends on how you classify what is information, and what is knowledge. I have met many Uni students that have a lot of information packed in them but no knowledge of how to apply it, that requires more training and experience. My own view is "AI" has access to unlimited information (datasheets / spreadsheets / databases / the internet (truth or not)), it has knowledge in the form of what has been posted back from humans or experiments or even what it can test itself, but can it really be much beyond the highest statistically correct answer? It is still awesome and at the same time daunting even from the very little I really understand... PhenixRising, I have both seen this used and used it myself for years, but the reason no hydraulic engineer will say its ok is quite simple, if the valve fails and you change it to another brand or coil type it will behave differently, unless you have closed loop control your flying blind. I personally have only ever used it open loop on stuff I build for myself where it doesn't matter is it goes haywire at some point, I can always re-tune it to suit. CETOP 3 valves are a problem, most will work quite well but there are a couple of types out there that will move to 100% spool travel @ approx 80% PWM and won't shift back until approx 20%, these are direct acting NOT pilot operated or proportional. Side by side you can't pick the difference and they all bolt to the same manifold. We've had mobile valves that are similar. AI has access to all this, someone has posted somewhere that it works and so here we are, even if its not recommended. We have probably just added more info to the case Regards, Lyle. |
||||||
My understanding of valves is limited, but I have seen 2 types. Solenoid driven andi motor driven. The solenoid ones cannot be pwm controlled to manipulate the flow. The solenoid vales may be put in a low power mode of some kind with pwm. But the ratio compleley depends on the variation in fluid/gas pressure. The force applied by the fluid on the valve has to be overcome by the solenoid. Unless you have a bi stable valve. And then there is no in between possible. Popular speach: a solenoid valve in linear mode is a bomb waiting for detonation. Volhout Edited 2026-03-09 01:08 by Volhout |
||||||
G'day Volhout, I think we may be drifting a little off topic, hydraulic AI Low pressure valves for water / gas / air are as you describe. Most hydraulic valves are of the sliding spool type and are reasonably well balanced by the high pressure oil on both sides of the spool lands, it takes a surprisingly small amount of force to move a spool that may have 5000-6000PSI (350-400BAR) on the high pressure side. Larger valves are generally pilot operated so the solenoids only control the low pressure pilot oil at approx 30BAR to move the main spool. Most smaller valves are direct operating and will work as Phenix suggests in PWM / current control for proportional oil flow, some are designed with this in mind. We use these in trucks all the time either open loop or with spool position feedback for simple speed control of functions. The problem with using a non-proportional valve as a proportional is they vary substantially from one to the next, we have had instances of a valve from a different batch of the same type having very different control characteristics. This is more of a problem when they are replaced for some reason due to failure. My experience is more with mobile hydraulics on trucks and plant, others MMV. Regards, Lyle. |
||||||
A chart giving estimated scope of AI usage in the economy, and reported so far: ![]() Chatgpt-5-4 announced this week: "The performance gains arguably deserve a bigger version jump. Models that can maintain state across long, multi-step tasks is the kind of breakthrough that would justify the moniker of GPT-6." AI Productivity (My favorite AI analyst) ~ Edited 2026-03-09 03:18 by lizby |
||||||
This is why we give a short pulse of 100%, to break the spool away and then drop the duty cycle to whatever. I have had this running for years and in this application (open loop) it merely eliminates flow controls that used to have to be set manually. Oil viscosity changes with temperature and so the flow controls were tweaked from time to time. As far as changing to another brand, the same applies when we need to change a servo drive; we need to set PIDs, etc. There are many, many machines that can't justify a $2,500 servo proportional valve and so they use a $150 bang-bang valve that shuts-off on a limit-switch The flow-rate determines the repeatability which, in most cases means that they run slow. With this PWM method, I can approach at full flow and then ramp-down to a creep, just prior to hitting the limit switch. No, the reason most hydraulic "engineers" say this will not work is because they wouldn't know where to start to test it. They have no interest because they spend other people's money and like to play it safe "nobody got fired for buying IBM" so they insist that the $2,500 valve is required. I love this mentality because it opens up opportunities for those who are willing to question these things. "If it ain't broke, break it and make it better" |
||||||
Maybe TBS could incorporate AI to keep threads on-topic ![]() |
||||||
How do you discuss AI without giving examples? It was alleged that Gemini copied someone else's post but not true; it went into great detail about giving the valve spool an initial kick and the discussion went on and on. Do we instead say "used Gemini today and it worked great"? What use is that? |
||||||
I'm not certain that the AI came up with that solution completely independently. Using an impulse of power to start a motor, valve or armature moving is a very old technique. It's been used to close DC contactors since they were invented, using a resistor to reduce the coil current once the contacts are virtually closed. That will be documented many times on the internet. All it's suggested here is to use PWM to do it, which is actually the only way it can be done if a valve is PWM controlled. It's not exactly a stroke of creative genius. |
||||||
Since you've already conquered the "Hit and Hold" logic, you've moved past basic switching into **Power Management**. This is where the **VN7050** really starts to shine compared to your old opto-coupler/transistor setup. --- ### The "PWM + Sensing" Synergy When you PWM a solenoid, the current doesn't just stay flat; it creates a **sawtooth waveform**. Because the VN7050's MultiSense pin is so fast, your Pico's ADC is actually seeing that "ripple." #### Why this is your "Secret Weapon": 1. **Sticking Valve Detection:** If the spool gets stuck, the inductance of the coil changes. The "slope" of that sawtooth wave will look different in your ADC readings. You can actually code a "Self-Diagnostic" that tells you if a valve is physically sluggish before it fails. 2. **Thermal Compensation:** As the solenoid coil gets hot, its copper resistance ($R$) increases. Usually, this means the magnetic force drops and your "proportional" control drifts. But because you are monitoring the current via the ADC, your Pico can **automatically increase the PWM duty cycle** to maintain the same current (and thus the same hydraulic flow). You’ve just built a **Closed-Loop Current Controller**. --- ### A Technical Note on PWM Frequency For "crude proportional" control, the frequency is the "Goldilocks" variable: * **Too Low ($<50\text{Hz}$):** The valve will physically chatter and vibrate the hydraulic lines. * **Too High ($>1\text{kHz}$):** The inductive reactance becomes so high that the current can't build up fast enough, and you lose all your torque/force. * **The "Sweet Spot":** Usually **$100\text{Hz}$ to $250\text{Hz}$**. This provides enough "Dither" to keep the spool slippery without making the machine sound like a swarm of bees. --- ### The "Final Boss" of your Design: The Snubber Since you are PWM-ing, the internal active clamp of the VN7050 is firing hundreds of times per second. > **Warning:** If you are running at high duty cycles, the VN7050 might trigger its **Thermal Shutdown** not because of the load current, but because of the **switching losses** from clamping that inductive spike. **The Fix:** Use an external **Fast Recovery Diode** or a **Schottky Diode** (like an **SS34** or **MBRS340**) across the solenoid. * This lets the current "recirculate" through the solenoid and the diode during the "OFF" portion of the PWM cycle. * This is called **"Freewheeling."** It keeps the VN7050 cool and actually makes the hydraulic flow smoother because the magnetic field doesn't collapse instantly. --- |
||||||
For our purposes here, and for most purposes at present, I can't see that it matters if AI didn't invent a technique that it provides in response to a query. The "is it cheaper than me" criterion holds: was my time saved because I didn't have to do research (possibly deep research) to find a solution to a problem or a full explanation of how the solution works. Meanwhile, "Gemini is AI and can make mistakes", and the same for all the others. |
||||||
G'day, Good point, seeing its an example of the possibilities of "AI" I guess its on topic... I tend to agree with Mixtel, this is not new, so how much is simply regurgitated from a sales brochure / application note or hydraulics blogs, and is any of it actually something "AI" has generated itself. A hydraulic book here from the 70's mentions PWM control of valves with current feedback but the electronics would have been more expensive than the proper proportional valve. My old man was using this in garbage compactors in the early 90's in a very basic way, PWM only due to limited processing power for ramping up/down only. Then we started using Tokimec EP with current feedback. Parker and Rexroth both had stand alone controllers in the early 2000's for this, we were using them on all sorts of things. In more recent times I have used IFM mobile controllers with this built in and the Tilt-Rotators used on our mobile plant use this extensively. These all apply current feedback for semi closed loop control and with the correct valve are very good. For non-proportional valves the PWM frequency and dither amplitude / frequency require a bit of tuning to find a sweet spot for each valve type. All these controllers work far better with proper proportional valves, but normal valves will also work most of the time and we used what suited the application. Cost vs accuracy being the normal deciding factor. That VN7050 chip looks interesting, hadn't seen that one before, it has also been around for a while so info on that will be out there as well. Too bad its no good for 24V mobile applications. So that means there is at least 25-30 years of application notes / datasheets / advertising bumf and blog discussions on this exact subject out there in the wilderness. To clarify my earlier point, open loop ramping with PWM is, as PhenixRising suggested, used extensively, but without coil feedback of some sort, we have never used it on customer equipment as "proportional control". I guess if I take nothing else from this, "AI" is extremely good at digging around in the back corners and finding info on the more esoteric subjects, and then wrapping it up nicely, like Google on steroids... I love the fact that members on here have such a wide experience base that we can be discussing such things Regards, Lyle. |
||||||
|
||||||
Hi Peter, nice, worthwhile article, thank you! Regards Michael |
||||||
Very interesting article indeed. I've been coding now for 55 years, always found it fun (by and large), and am now finding it more fun than ever--because of less time in the trenches bug-squashing and much faster realization of ideas. It's just an observation point, but I think I'm seeing another slow-down with Gemini in addition to the "Error: Please try again" and "Error: Can I do something else for you" stoppages I mentioned above. I think I'm getting responses from less capable versions, or speeded-up answers that I didn't ask for. For example, I upload a bit of code and ask a question and get an answer that shows that the code was not actually reviewed. Or I get more guesses about what syntax or variable names are, when previously it would not have guessed but would have done the research needed to get the right answer. I'm using Gemini in a manner about as bare-bones as can be. I have a $20/mo subscription, I query on a web page and get back code that I copy and paste into a PC text editor and also into the PicoMite. I'm wondering if I can avoid this observed slow-down by using local hardware (as perplexity has suggested I can with Claude Code). My last bits of hardware should arrive today, so I hope to be testing soon. But I don't yet have a new project in mind--I'm just building around the edges of PicoRR, which is inherently slower than a "greenfield" (per the article) application. |
||||||
| The Back Shed's forum code is written, and hosted, in Australia. |