# pwm help. 10 in paypal for working circuit

#### fubar

Joined Mar 22, 2006
11
hi. i am a physicist not an engineer so please don't attack me for having no clue.

anyway, i've got a PWM operating at 350hz. i want it to be at 35hz. i want the same duty cycle (averaged!) though.

my idea to do this is the following:
take that signal (which is 14V), run it over a resistor to drop it down to 3 or so.
run that lower voltage signal into a counter
let the counter count to 5 pulses and then turn on a latching switch
the latching switch turns on a FET
let the counter count five more pulses and tell the switch to shut off the FET
repeat.

is this goofy?

also, what happens if i don't get modulable, by five, number of pulses? does this means it stays on...is there a way to assess the signal and shut it off i only get a few pulses? or, should i do something different like measure how long it takes to get five pulses and store that somehow and then when i would normally switch on, just run for that time and then reset the clock?

send me a working circuit diagram and i'll send you $10 in paypal immediately! #### pebe Joined Oct 11, 2004 626 Originally posted by fubar@Mar 22 2006, 08:07 PM hi. i am a physicist not an engineer so please don't attack me for having no clue. anyway, i've got a PWM operating at 350hz. i want it to be at 35hz. i want the same duty cycle (averaged!) though. my idea to do this is the following: take that signal (which is 14V), run it over a resistor to drop it down to 3 or so. run that lower voltage signal into a counter let the counter count to 5 pulses and then turn on a latching switch the latching switch turns on a FET let the counter count five more pulses and tell the switch to shut off the FET repeat. is this goofy? also, what happens if i don't get modulable, by five, number of pulses? does this means it stays on...is there a way to assess the signal and shut it off i only get a few pulses? or, should i do something different like measure how long it takes to get five pulses and store that somehow and then when i would normally switch on, just run for that time and then reset the clock? help!!! please. send me a working circuit diagram and i'll send you$10 in paypal immediately!
[post=15304]Quoted post[/post]​
It's all 'do-able' until the last paragraph. It's up to you to decide what you want to happen there, and to specify it.

#### fubar

Joined Mar 22, 2006
11
Originally posted by pebe@Mar 22 2006, 03:15 PM
It's all 'do-able' until the last paragraph. It's up to you to decide what you want to happen there, and to specify it.
[post=15305]Quoted post[/post]​
i just want to make sure it doesn't stay "on". so, i think measuring the duration of five pulses and sending one long pulse on and then measuring again during the "off" cycle and repeating would work pretty well but i am clueless how to design such a circuit.

#### pebe

Joined Oct 11, 2004
626
Originally posted by fubar@Mar 22 2006, 08:21 PM
i just want to make sure it doesn't stay "on". so, i think measuring the duration of five pulses and sending one long pulse on and then measuring again during the "off" cycle and repeating would work pretty well but i am clueless how to design such a circuit.
[post=15306]Quoted post[/post]​
Are you just interested in getting 35Hz. Is it OK for the thing to start with the first 5 pulses giving latch on, then 5 for latch off, etc?

#### Ron H

Joined Apr 14, 2005
7,014
Originally posted by fubar@Mar 22 2006, 02:21 PM
i just want to make sure it doesn't stay "on". so, i think measuring the duration of five pulses and sending one long pulse on and then measuring again during the "off" cycle and repeating would work pretty well but i am clueless how to design such a circuit.
[post=15306]Quoted post[/post]​
Doesn't that always give you a 50% duty cycle? I guess I don't understand how you think this will work.

#### Papabravo

Joined Feb 24, 2006
14,393
Originally posted by fubar@Mar 22 2006, 04:07 PM
hi. i am a physicist not an engineer so please don't attack me for having no clue.

anyway, i've got a PWM operating at 350hz. i want it to be at 35hz. i want the same duty cycle (averaged!) though.

my idea to do this is the following:
take that signal (which is 14V), run it over a resistor to drop it down to 3 or so.
run that lower voltage signal into a counter
let the counter count to 5 pulses and then turn on a latching switch
the latching switch turns on a FET
let the counter count five more pulses and tell the switch to shut off the FET
repeat.

is this goofy?

also, what happens if i don't get modulable, by five, number of pulses? does this means it stays on...is there a way to assess the signal and shut it off i only get a few pulses? or, should i do something different like measure how long it takes to get five pulses and store that somehow and then when i would normally switch on, just run for that time and then reset the clock?

send me a working circuit diagram and i'll send you \$10 in paypal immediately!
[post=15304]Quoted post[/post]​
Could you tell us what is generating the 350 Hz. PWM signal, and why you want it to be 35 Hz. instead? It might be easier to change the time base of the original PWM gnerator than to mess with the output. How important is the accuracy of the frequency? Would 35 Hz plus or minus 3 Hz. be OK? I suppose what you want to do is possible, but it sounds rickety and delicate. Not good characteristics of an experimental setup.

Most pulse generators have independent controls for frequency and pulse width. I would rather see you take one apart, disconnect the wiper arm of the pot which controls the pulse width and inject a suitable analog voltage. Then you can put the frequency where you want it, with great precision.

#### fubar

Joined Mar 22, 2006
11
Originally posted by Papabravo@Mar 22 2006, 04:07 PM
Could you tell us what is generating the 350 Hz. PWM signal, and why you want it to be 35 Hz. instead? It might be easier to change the time base of the original PWM gnerator than to mess with the output. How important is the accuracy of the frequency? Would 35 Hz plus or minus 3 Hz. be OK? I suppose what you want to do is possible, but it sounds rickety and delicate. Not good characteristics of an experimental setup.

Most pulse generators have independent controls for frequency and pulse width. I would rather see you take one apart, disconnect the wiper arm of the pot which controls the pulse width and inject a suitable analog voltage. Then you can put the frequency where you want it, with great precision.
[post=15313]Quoted post[/post]​
the source of the signal is a general prupose output on an ecu for my car. i need it to run a solenoid valve. the mass of the valve is too much for 350hz and just sits there and vibrates but doesn't resopond appropriately. yes, plus or minus even 10hz would be fine. i don't want something rickety : ) it's got to be rock solid. it seems to me that this should be easy. it's not though, is it??

#### hgmjr

Joined Jan 28, 2005
9,029
Hi fubar,

If you can, it would be very helpful to post a schematic. It may be possible to make a few minor tweeks to a component or two as papabravo has described in order to get you to the new frequency.

It would be worthwhile if you could also describe what advantage you expect to gain from making the frequency adjustment.

hgmjr

#### fubar

Joined Mar 22, 2006
11
Originally posted by hgmjr@Mar 22 2006, 04:40 PM
Hi fubar,

If you can it would be very helpful to post a schematic. It may be possible to make a few minor tweeks to a component or two as papabravo has described in order to get you to the new frequency.

It would be worthwhile if you could also describe what advantage you expect to gain from making the frequency adjustment.

hgmjr
[post=15316]Quoted post[/post]​
i don't have the schematic for the ECU. all i know is that there exist very few, if any, solenoid valves that can handle the air flow that i require to operate the wastegate that, at the same time, that can switch above 150hz, let alone 350hz.

the advantage that i hope to gain is simple; that the solenoid valve will be able to open and close. doing that, i will be able to control the wastegate of the turbo.

#### Papabravo

Joined Feb 24, 2006
14,393
Originally posted by fubar@Mar 22 2006, 05:22 PM
the source of the signal is a general prupose output on an ecu for my car. i need it to run a solenoid valve. the mass of the valve is too much for 350hz and just sits there and vibrates but doesn't resopond appropriately. yes, plus or minus even 10hz would be fine. i don't want something rickety : ) it's got to be rock solid. it seems to me that this should be easy. it's not though, is it??
[post=15315]Quoted post[/post]​
Is "ecu" an engine control unit?

Is the solenoid valve an ON/OFF type valve or a proportional valve?

The solenoid you describe sounds like a proportional valve and its position depends on the applied voltage. The valve acts like a low pass filter and averages the modulated pulse train to produce a voltage which it translates into position. This kind of valve is not designed to be snesitive to the frequency of the pulse train, only the average voltage. If that is the case then what you want to do is convert the pulse train at 350 Hz. into a voltage which you can do with an electronic low pass filter, like an R and a C. Just put the 3dB corner frequency at 3 Hz. and you will get something that looks like a pretty smooth DC voltage proprtional to the duty cycle.

If the solenoid is an ON/OFF type valve then what would be the purpose of the PWM except to possibly limit the power disipation or use a lower voltage solenoid in a higher voltage system. In this case I would expect pulses to be ON and no pulses to be OFF. Again the important point is that the operation is not dependent on frequency

Can you do the experiment with a pulse generator to see if changing the frequency affects the behavior? I'm not certain on this, but I don't think it will.

BTW, does the valve have a datasheet that you can upload or point us to?

#### pebe

Joined Oct 11, 2004
626
Originally posted by fubar@Mar 22 2006, 08:21 PM
i just want to make sure it doesn't stay "on". so, i think measuring the duration of five pulses and sending one long pulse on and then measuring again during the "off" cycle and repeating would work pretty well but i am clueless how to design such a circuit.
[post=15306]Quoted post[/post]​
Here is a circuit that will probably do what you wanted. The 4017 is a divide by 10. The output at CO toggles every 5 clock pulses, so dividing by 10.

The incoming waveform switches on the transistor taking Reset low and will keep it low as long as there is a signal. That allows the counter to count. The sequence starts with CO high. 5 clock pulses later It goes low. When the input stops C2 will discharge taking the reset high.

I dont know what you want the output to drive, but you can add an invertor and FET as required.

#### fubar

Joined Mar 22, 2006
11
Originally posted by pebe@Mar 22 2006, 07:19 PM
Here is a circuit that will probably do what you wanted. The 4017 is a divide by 10. The output at CO toggles every 5 clock pulses, so dividing by 10.

The incoming waveform switches on the transistor taking Reset low and will keep it low as long as there is a signal. That allows the counter to count. The sequence starts with CO high. 5 clock pulses later It goes low. When the input stops C2 will discharge taking the reset high.

I dont know what you want the output to drive, but you can add an invertor and FET as required.
[post=15328]Quoted post[/post]​
instant message sent asking for paypal address. thanks so much. i hope this works! i'll let you know if you guys care.

btw, it's a bang/bang solenoid. the frequency of opening determines the airflow into the wastegate (basically a balanced diaphragm) which determines how much exhaust gas goes into the turbine.

thanks for all you help.

#### hgmjr

Joined Jan 28, 2005
9,029
Originally posted by fubar@Mar 22 2006, 08:12 PM
instant message sent asking for paypal address. thanks so much. i hope this works! i'll let you know if you guys care.

btw, it's a bang/bang solenoid. the frequency of opening determines the airflow into the wastegate (basically a balanced diaphragm) which determines how much exhaust gas goes into the turbine.

thanks for all you help.
[post=15333]Quoted post[/post]​
I for one would be interested to learn how well the solution that pebe recommended worked out for you.

hgmjr

#### pebe

Joined Oct 11, 2004
626
Originally posted by fubar@Mar 23 2006, 01:12 AM
instant message sent asking for paypal address. thanks so much. i hope this works! i'll let you know if you guys care.

btw, it's a bang/bang solenoid. the frequency of opening determines the airflow into the wastegate (basically a balanced diaphragm) which determines how much exhaust gas goes into the turbine.

thanks for all you help.
[post=15333]Quoted post[/post]​
I hope it works for you. If so, you can send the donation to the charity of your choice.

#### Papabravo

Joined Feb 24, 2006
14,393
Originally posted by pebe@Mar 23 2006, 05:12 AM
I hope it works for you. If so, you can send the donation to the charity of your choice.
[post=15336]Quoted post[/post]​
With a bang bang solenoid, which is just a coil with a spring return I'm guessing that the problem is insufficient current to make the plunger move. Never mind that the wimpy output of a 4000 series IC is unlikely to impress even a low power solenoid.

The test would be to connect the PWM output to the solenoid and observe the peak to peak voltage with an oscilliscope. Is it a good deal less than the peak to peak voltage of the PWM with no load? If so the voltage of the PWM output is being loaded by the low impeadance coil to a place where it supplies some amount of current at some amount of voltage which is insufficient to move the plunger against the spring return.

What you need is not a change in frequency, but a boost in current at the appropriate voltage.

#### pebe

Joined Oct 11, 2004
626
Originally posted by Papabravo@Mar 23 2006, 07:22 PM
.......Never mind that the wimpy output of a 4000 series IC is unlikely to impress even a low power solenoid.......

[post=15352]Quoted post[/post]​
It was never intended to. You will note that I said that an inverter and FET could be added, depending what it was required to drive.

In a PM to fubar, I asked him to let me know if he wanted help with the output.

#### Papabravo

Joined Feb 24, 2006
14,393
Originally posted by pebe@Mar 23 2006, 04:38 PM
It was never intended to. You will note that I said that an inverter and FET could be added, depending what it was required to drive.

In a PM to fubar, I asked him to let me know if he wanted help with the output.
[post=15356]Quoted post[/post]​
So would the original output from the ecu, without the change in frequency, but with a current boost work just as well?

#### pebe

Joined Oct 11, 2004
626
Originally posted by Papabravo@Mar 23 2006, 09:07 PM
So would the original output from the ecu, without the change in frequency, but with a current boost work just as well?
[post=15359]Quoted post[/post]​
I've really no idea because I'm not familiar with ECUs.
Fubar originally said he wanted to convert 350Hz to 35Hz to switch a FET, and that was the query I responded to.

Now I know its to operate a solenoid then, yes, I think the pulses could be integrated and used to switch a FET directly.