Uno running PID w/PWM frequency change

do you have a suggestion for a better DC/DC SSR that would meet my needs?

The valve we are using is actually the exact part from the vehicle this system is used in. I am not sure how much info we will be able to get out of Ford/International on these. Here are the part numbers though:
Ford - 5C3Z9C968CA
Motorcraft - CM5126
International - 1846057C1

I tried to look around on Google to see if I could find any information on it using the part number. I have also tried looking it up by what it is called "IPR valve from a 6.0L powerstroke" here is the google search that provided the most information for me was this 6.0L Powerstroke IPR PWM frequency

How much current is going through the valve? How is the valve controlled when it is used in a vehicle?

TheReelMuhcoy:
do you have a suggestion for a better DC/DC SSR that would meet my needs?

I'm looking towards an H-bridge motor control. I'm familiar with this one it has the power and speed to whatever frequency you need. http://www.instructables.com/id/Motor-Driver-BTS7960-43A/
It's a little over kill and you only need half the H-bridge but it's cheap and powerful.
Z

cattledog:
How much current is going through the valve? How is the valve controlled when it is used in a vehicle?

I dont believe the valve uses very much current. I have a 5 amp fuse in line and it has not blown yet. It is being powered by a 12v computer power supply pushing 18amps.

The valve is controlled by the PCM in the vehicle, the valve operates at 14-85% duty cycle. 85% being maximum closed percentage, and 14% being maximum open percentage

I have a rather tight hose (1/4") dumping the over-pressure off to a cooler, I think it might be pushing back too much on the valve and making it difficult for the valve to run effectively. I will be putting on a 5/8" hose this evening, see if that makes any improvement.

I believe that the frequency code is working now. I did notice a difference in the low end pulsing of the valve, however it still bangs hard when I begin to turn the pressure up over 1000psi.

TheReelMuhcoy:
I dont believe the valve uses very much current. I have a 5 amp fuse in line and it has not blown yet. It is being powered by a 12v computer power supply pushing 18amps.

The valve is controlled by the PCM in the vehicle, the valve operates at 14-85% duty cycle. 85% being maximum closed percentage, and 14% being maximum open percentage

I have a rather tight hose (1/4") dumping the over-pressure off to a cooler, I think it might be pushing back too much on the valve and making it difficult for the valve to run effectively. I will be putting on a 5/8" hose this evening, see if that makes any improvement.

I believe that the frequency code is working now. I did notice a difference in the low end pulsing of the valve, however it still bangs hard when I begin to turn the pressure up over 1000psi.

Looking at the nature of the pressure regulator I'm not seeing a reason for the operation of the pressure regulator failing to work on lower frequencies. The nature of the magneticmagnetic coil induction could inside the valve will impede change smoothing the oscillation from the PWM output at the standardstandard frequencies the Arduino uses for PWM. So your thoughts about back pressure have good meritmerit as well as the ssr Mary not work well at high frequencies. Do you have an oscilloscope to see the output of the ssr? how does it compare with the input to the ssr?
Z

The issue is though that I need to produce up to 4200psi and currently am only able to steadily produce 1000psi at best before it starts slamming the valve.

Have you worked through this piece by piece to determine that the instability is a function of the pwm frequency?

With a fixed voltage, say range 2v to 10v to the IPR valve can you see the range of pressure you want?

With a fixed pwm frequency and duty cycle can you achieve the same results?

When you know you can control the valve in a static regime, then you can move to a control strategy for changing the pressure.

With the code you currently have for pwm frequency you know at the prescaler 8 is the 3920hz.

The prescaler 64 is the standard 490 Hz.

The prescaler 256 will give 122.5 Hz which is getting into the spec of the SSR response time. Slower may be better.

The prescaler 1024 will be around 31Hz.

analogWrite() will work for all the settings.

I am opening up the bleed off for a larger NPT port and using a 5/8" hose instead. We'll see if it is part of the problem or not, if not that is fine too. The noise the 1/4" line with the swivel fitting made was loud and incredibly annoying so I will be happy to have that go away.

Yes I do have a oscilloscope, I bought a used unit specifically for this project. I am still learning how to use it but will be checking the output of the Arduino board and comparing it to the output of the SSR to see if the SSR is the limiting factor here.

I retried the frequency code and noticed that at the pulsing of the valve DID become noticeably smoother as I tried using higher frequency settings while keeping the pressure below the same 1000psi mark, otherwise it would start slamming the valve and out of control. I did not think to try running lower frequencies to see the results but I will try that once the new return line is in.

The fellow I mentioned earlier who built and programmed the PCB to control the injector spool valves gave me a ring last night to see how things are going. He had much the same suggestion of trying to manually control the PWM and see how the valve responds. He didn't believe the SSR would be the likely cause but also suggested that I checked the pwm of the output pin of the Arduino, and recheck it after the SSR to see if it is the problem.

I agree with you about the valve. The nature of the electro-magnetic coil as well as the springs in the valve I would think would help smooth things out and more-so at higher pressures. Which is what throws me off about why it starts banging at higher pressure...

The bleed-off line is swapped out with the 5/8" line, it definitely made me less crazy not having to listen to that clacking of the other fittings on the 1/4" line. There is really no pressure on the bleed off line. It is a braided stainless line and I can pinch it just about as easily as a line with nothing in it. I did not change any values from what I had last loaded to the Arduino.

When turned on and it acted just the same as before, however I changed some values after that (I don't remember which of course) and the pulsing changed drastically! BUT nothing is consistent, if i were to set it back to a setting that I had run before to achieve those same results, it wont act the same. I don't get it. Now the pulsing is so subtle you cant even tell there is a pulse! The needle is PERFECTLY still. At first it was a little shaky and would still only make 1000psi, if I tried to turn it up past that it would seem like it would overtake the valve and the pulsing would stop entirely like the pilot came to a stand still and then the pressure would slowly bleed off unless you turn the pot down to a setting where the pulsing begins again. I played with some other values, frequecy, sample rate, PID, and managed to get it to get it to the point that I can achieve 1400psi before the valve ceased to pulse and pressure faded.

I still need to setup the Oscilloscope to check the output of the SSR. The fellow I mentioned in a previous post, the one who made the PCB and software to fire the injector, sent me a sketch to test the PWM Duty cycle and frequency. I will test that out and check the output with the scope.

I figured I would post the current results because they're so inconsistent and I hope someone might have an idea of whats happening. Could there be something with the PID program delaying my inputs? I don't think this PID program is a learning kind, but it does store certain information while it loops right? could it not be releasing certain information and causing it to be thrown off?

I still need to setup the Oscilloscope to check the output of the SSR. The fellow I mentioned in a previous post, the one who made the PCB and software to fire the injector, sent me a sketch to test the PWM Duty cycle and frequency. I will test that out and check the output with the scope.

Very good.

I hope someone might have an idea of whats happening. Could there be something with the PID program delaying my inputs? I don't think this PID program is a learning kind, but it does store certain information while it loops right? could it not be releasing certain information and causing it to be thrown off?

In my opinion , until you sort out the issues of the response of the valve to pwm inputs of different frequencies and duty cycles and the impact of the the ssr on those inputs it is not worth trying to figure out the issues of PID control.

It is the SSR... The input and output does not match as I lower the frequency I have to increase the duty cycle to compensate for the pressure loss. As the pulse increases it seems like it becomes weaker and eventually the pressure overtakes the pilot and stalls the valve out allowing the pressure to bleed off.

I hope someone might have an idea of whats happening. Could there be something with the PID program delaying my inputs? I don't think this PID program is a learning kind, but it does store certain information while it loops right? could it not be releasing certain information and causing it to be thrown off?

I have a solid understanding of PID. I'll help you get that part tuned up. :slight_smile:
Z

Thanks Homie! You guys have been great! thanks for dealing with my ignorance.

The other fellow I mentioned before that has been helping me also has suggested using a simple fet and diode to make my own sort of SSR. I have a big ole' box of electronic goodies that I acquired probably 20 years ago from my step mom, her ex-husband who passed MANY years ago was a BIG electronics hobbyist and had a lot of good stuff. With any luck I'll have something that I can use to make it work for now, heading out to the shop shortly, I'll report back if I've got the goods to make it work.

using a simple fet and diode to make my own sort of SSR. I have a big ole' box of electronic goodies that I acquired probably 20 years ago from my step mom, her ex-husband who passed MANY years ago was a BIG electronics hobbyist and had a lot of good stuff. With any luck I'll have something that I can use to make it work for now, heading out to the shop shortly,

Look for an n channel logic level mosfet with IRL before the part number. The gate can be driven directly (with a current limiting resistor) from the Arduino. You will need to look at the data sheets for whatever parts you can find and look for the lowest RDS(on) (Ω) resistance you can practically find, to limit heat buildup.

A forum search will give you lots of information about selection. Here's one example
http://forum.arduino.cc/index.php?topic=90183.0

I built a cheesy little circuit with a FET I was able to pick up locally. Shockingly there is a electronics shop here in my town run by an old-timer fella. Long story short they had a decent selection of FET's and everything else.

Now we're maintaining the PWM and frequency on the output to the valve. Unfortunately i am still having the issue of the pressure is only able to reach about 1400psi and then the valve seems to be overtaken and the pressure bleeds off. I think it might be that I've damaged this valve... I have another that I can try hopefully tomorrow.

I built a cheesy little circuit with a FET I was able to pick up locally. Shockingly there is a electronics shop here in my town run by an old-timer fella. Long story short they had a decent selection of FET's and everything else.

Now we're maintaining the PWM and frequency on the output to the valve. Unfortunately i am still having the issue of the pressure is only able to reach about 1400psi and then the valve seems to be overtaken and the pressure bleeds off. I think it might be that I've damaged this valve... I have another that I can try hopefully tomorrow.

TheReelMuhcoy:
I built a cheesy little circuit with a FET I was able to pick up locally. Shockingly there is a electronics shop here in my town run by an old-timer fella. Long story short they had a decent selection of FET's and everything else.


Now we're maintaining the PWM and frequency on the output to the valve. Unfortunately i am still having the issue of the pressure is only able to reach about 1400psi and then the valve seems to be overtaken and the pressure bleeds off. I think it might be that I've damaged this valve... I have another that I can try hopefully tomorrow.

I like it :slight_smile:

Let us know how your valve tests go
Z