Maker Pro
Maker Pro

Dither for PWM circuit driving a proportional solenoid

markdav91

Jul 30, 2017
9
Joined
Jul 30, 2017
Messages
9
Hi guys,

First of all I'd like to say that I have seen the same or similar questions asked in many forums but nobody has ever come up with a concrete solution or posted anything about the results of trying out the various suggestions given to them. So here I am still trying to figure things out so please help me out. And now to my problem

I am planning to proportionally drive a solenoid of the following specs: 24VDC,1.19A 28.5W resistance 20.2ohms +-5% at 20C

I'm planning to use the arduino to accomplish this. I'm aware of the whole concept of dither which is necessary to avoid stiction in the solenoid valve. As most of you will be aware of, we cannot freely choose the pwm frequency in the arduino but are restricted to a few discrete frequency values of which only 30.5Hz (Pin 3,9,10,11), 61Hz (pin 5,6) and 122Hz (Pin 3,9,10,11) are below 200Hz. I found optimal dither at 122Hz which is okay. ( A tiny part of the project is taken care of)

But I can't use the the dither signal alone to drive the solenoid due to obvious reasons as it is not possible for the dither signal to form a constant amplitude since the PWM frequency has to be continuously adjusted as a function of the stipulated desired current value and in the process the amplitude and the frequency of the dither will signal change accordingly. In other words i need the dither to be a constant while i'll still be able to change the average current in the solenoid to manipulate the spool proportionally.

Then I stumbled upon a concept of superimposing the dither ( low frequency signal ) on a high frequency PWM signal.

Hi-Freq_PWM_2.gif


But i do not know how to do this. Some smart guy by the name of Drazzy suggested in an old arduino forum :"You could put source of a small MOSFET on one pin, and gate on the other....". If i got him right he means using one MOSFET at a lower frequency to switch another MOSFET at a higher frequency (or the other way around? i'm confused:| ).

I also came across a website that talked about combining PWM outputs. http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/
Is there anyway that i can use this in this application in context?

Either way could someone shed some light on this. will this work practically? what would be the circuit like? Any useful information is welcome. Any other ways to achieve the same are also welcome.

Help a friend and thank you in advance :)
 

Alec_t

Jul 7, 2015
3,587
Joined
Jul 7, 2015
Messages
3,587
Welcome to EP!
So, you want a 122Hz dither frequency, but what wll be your main PWM frequency?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
As most of you will be aware of, we cannot freely choose the pwm frequency in the arduino
says who?

My understanding is that there are limits to what you can use but, between those limits, the choice is down to various register settings.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
If I understand you correctly you want to modulate a PWM signal with another? You could do this using a logic gate (AND two PWM signals) or do it in software since you're using such low frequencies by feeding it back into a couple of input ports and 'doing the business'.
 

Alec_t

Jul 7, 2015
3,587
Joined
Jul 7, 2015
Messages
3,587
I think you need to set up the main PWM frequency, then use code to jitter the register value (in OCR2A/B) which sets the main PWM duty cycle.
From what I read (I'm not familiar with Arduino), although the default 'Fast PWM' mode has only a few preset frequencies it is possible, as Kelly says, to set a wide range of PWM frequencies by use of various control registers.
 

markdav91

Jul 30, 2017
9
Joined
Jul 30, 2017
Messages
9
Welcome to EP!
So, you want a 122Hz dither frequency, but what wll be your main PWM frequency?
The main frequency would be the default on the pins, I believe that about 490 Hz on some and about 970 Hz on others. I guess 490 Hz will have to do
 

markdav91

Jul 30, 2017
9
Joined
Jul 30, 2017
Messages
9
If I understand you correctly you want to modulate a PWM signal with another? You could do this using a logic gate (AND two PWM signals) or do it in software since you're using such low frequencies by feeding it back into a couple of input ports and 'doing the business'.

modulate a PWM signal with another? -> yes, if that's what it takes to get a control signal of that nature.

how do I AND 2 PWM Signals ? could you explain in brief

by feeding it back into a couple of input ports and 'doing the business' - > are you talking about a feedback and some PID algorithm?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You don't need to combine two signals, you just need to periodically change the duty cycle. If programming at low level instead of using Arduino primitives this should be simple.

On a low-end 8-bit PIC, just for kicks I, I output a 1MHz PWM signal (yes, they go that high), changing the duty cycle every millisecond. Connected it to an antenna, and I could pick up a 1000Hz tone on an AM radio.

Bob
 

markdav91

Jul 30, 2017
9
Joined
Jul 30, 2017
Messages
9
You don't need to combine two signals, you just need to periodically change the duty cycle. If programming at low level instead of using Arduino primitives this should be simple.

On a low-end 8-bit PIC, just for kicks I, I output a 1MHz PWM signal (yes, they go that high), changing the duty cycle every millisecond. Connected it to an antenna, and I could pick up a 1000Hz tone on an AM radio.

Bob
Thanks Bob. I will post the results soon.
 

Kiwi

Jan 28, 2013
471
Joined
Jan 28, 2013
Messages
471
Just wondering if you are overcomplicating your project?

Have you observed stiction in your project?

All the proportional hydraulic solenoid valves that I work on in earthmoving/construction machines have a steady PWM frequency and just vary the duty cycle.
 

markdav91

Jul 30, 2017
9
Joined
Jul 30, 2017
Messages
9
Just wondering if you are overcomplicating your project?

Have you observed stiction in your project?

All the proportional hydraulic solenoid valves that I work on in earthmoving/construction machines have a steady PWM frequency and just vary the duty cycle.
Hey Kiwi, thanks for your reply, I'm not exactly working on a proportional valve, I'm trying to get it to be proportional
 

markdav91

Jul 30, 2017
9
Joined
Jul 30, 2017
Messages
9
for those who have com here in the mean time, it will be until October that i post the results.
 

ShewShew79

Nov 19, 2015
6
Joined
Nov 19, 2015
Messages
6
markdav91

Have you had any success in your question? I to would like to know how and why this is done. If I had a scope image to work from would help and I could then either build or program something to work. It seems everybody has a partial idea on how to do it but doesn't actually know how!

Regards

Shew
 
Top