×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

555 duty cycle modulator

555 duty cycle modulator

555 duty cycle modulator

(OP)
Hi.

Wanted to build a circuit with a NE555 that provides modulated PWM.

After some research I found that in astable mode with a diode in paralel with the discharge resistance of the capacitor i can do this.

I made the circuit and i can modulate PWM (16-88% Duty cycle). My problem is the calculations i did first don t match with the real world values, and i would like to know why.

Hope some one explain to me why...

Ok i will try to post and explain what i did step by step.


1. My goals with the circuit:

Test control vacuum electrovalves, this ones work with control signal of more or less 300 Hz frequency PWM (variable duty cycle of course) and 12 V.


2. Calculations i made:

If I want more or less 300 HZ freq i will try to calculate R1 and R2 (see atached file of hand made circuit) based on this and on the duty cycle i want every time:

Frequency expression based on my calculations:

f=1/( ln2*R2*C + R1*C*ln[(0.66*Vcc-Vdiode)/(0.33Vcc-Vdiode)] )

For my aplication the fixed values are:

f=300Hz
Vcc=5 V
Capacitor capacitance C= 47 uF
Vdiode=0.7 V

Duty cycle expression arranged in function of R2/R1 ratio:

R2/R1 = ((1-DC)/DC)*ln[(0.66*Vcc-Vdiode)/(0.33Vcc-Vdiode)]

For my aplication the DC fixed values i want are:

DC
0,99
0,85
0,8
0,75
0,7
0,65
0,6
0,55
0,5
0,45
0,4
0,35
0,3
0,25
0,2
0,15

Vcc=5 VVdiode=0.7 V

Now for every different duty cycle value, i have a different R2/R1 ratio, combining the DC equation and the frequency equation i have two equations with two variables for each DC value, so i can calculate R1 and R2 for every DC value i want and 300 HZ frequency right? At least on my Excel sheet.

3. Real World conclusions:

The R1 and R2 resistance values calculated don t match the DC values i calculated, and the frequency changes as i change the value of R1 and R2 (both 470 ohm pot).

Why this happen? What am i doing wrong?

Thanks in advance.

RE: 555 duty cycle modulator

I avoid anything with a 555 in the same way I dont eat insects even if they are chocolate covered. You could do the same thing with a TL494 or later variations of similar PWM regulators. Duty cycle will be completely variable and frequency is totally independent. Personally if you are going to make a test jig, use something like a UNO processor that will give you repeatable values without a whole wall of pots that always need adjusting.

RE: 555 duty cycle modulator

"...Capacitor capacitance C= 47 uF..."

Electrolytic tolerance is often something like +50%/-20%.

RE: 555 duty cycle modulator

(OP)
uy9yuiy

[quote Electrolytic tolerance is often something like +50%/-20%.]

And what about ceramic instead?

Thanks.

RE: 555 duty cycle modulator

I think it has to do with that darsh gone diode thingamajigie.

RE: 555 duty cycle modulator

Why do you have the diode there? The basic charging configuration of C would have about 3ma of charge current, but your diode limits the drop across R2 to 0.7, when it should go up to about 1.7V.

http://www.fairchildsemi.com/ds/LM/LM555.pdf

Also, your circuit diagram corresponds to the diagram for pulse position modulation, not pulse width modulation.

TTFN
FAQ731-376: Eng-Tips.com Forum Policies

RE: 555 duty cycle modulator

(OP)
The diode is to bypass R2 when capacitor charge happens, in this mode R1 plus voltage drop across diode are the only things that limit charge time, and duty cycle can be less than 50%. in astable DC= (R1+R2)/(R1+2R2). If lower R1 to very small values aproximate from the DC= R2/(2R2) that is never less than 50%.

http://www.williamson-labs.com/555-circuits.htm

I don t understand very well the circuit diagram for PWM with LM555 on the data sheet you posted, do i have to generate a sine wave or square wave in pin 5? How can i do this in my aplication? And the trigger have to be continous?

Thanks.

RE: 555 duty cycle modulator

Agree with operahouse, never seen the 555 wired with a diode across the setting pins...just resistors. What happens when the pin-to-pin voltage is below the diode Vf?

RE: 555 duty cycle modulator

(OP)
As i said i can modulate PWM with this configuration, but i want to do this keeping frequency constant.

I searched a litle more and seen in a book of signal conditioning that placing a potentiometer between pin 5 (control pin) and the capacitor can modulate output signal frequency.

Anyone allreday tried this?

Thanks.

RE: 555 duty cycle modulator

(OP)
Ok i now tried without diode, in astable configuration, and guess, i can have less duty cycle than 50%. I am very confused now. Nothing matches the 555 theory i consulted.

I tried potentiometer in pin 5, it changes frequency a litle but messes with duty cycle too, and that was expected.

RE: 555 duty cycle modulator

(OP)
Regarding my previous post, i have min duty cycle in astable mode of 47%, no less, so i guess this is aproximately 50%.

With diode i can reach min values of 10%-15%.

RE: 555 duty cycle modulator

I agree with OperaHouse, there are probably better ways to do this, but if you really want to use the 555, the timing components you have are very low, and that can affect circuit operation, as well as electrolytic capacitor tolerance.

Consider increasing the resistor values by a factor of 100 and reduce the capacitor by the same. So 47000 Ohms (or a 100 kOhm pot, one end to Vcc, other end to pin 6 and wiper to pin 7. also, put a 1 kOhm or so resistor in series with each end so the value never goes to zero) and a 0.47 uF cap, mylar would be good, X7R adequate. The 555 will be much happier with these values.

That said, with a $25 or so Arduino you can vary the duty cycle in 1/256th increments with crystal controlled constant frequency. It would be simple to have a pot drive an ADC input to control the variation, so it would act in a very analog manner.

RE: 555 duty cycle modulator

Circa 1980, for a microcomputer programming project at university, my buddy and I teamed up to program the Single Board Computers (8080?) to measure and display engine RPM and ignition dwell using a simulated ignition primary signal (minus the real world noise). To simulate this signal I built a 555 based astable with two pots, one for "RPM" (frequency) and one for "Dwell" (duty cycle).

If I recall correctly (?), the only solution required a comparator. The 555 provided the Astable. The (only) clever bit was that the circuit "stole" the near-linear triangle waveform from the 555 (the node that oscillates from 1/3 to 2/3 Vcc), and compared it to an adjustable reference made from two 4.7k resistors and a 5k pot (these values ensure complete 0 to 100% duty cycle range with a bit of extra pot travel at each end to make sure). The circuit was published as a Design Idea in either EDN or Circuit Design magazine sometime in the late-1980s or very early-1990s.

I distinctly recall determining that it needed a second building block (the comparator stage) to provide the duty cycle adjustment. I concluded that there was no practical solution to have independent adjustments for frequency and duty cycle just using one 555. Feel free to prove me wrong, but that was my very carefully considered conclusion at the time.

It's sad that I can still recall these details 32 years later. I think I'll go have a drink. smile

RE: 555 duty cycle modulator

PDF LINK Page 6.

It's not exactly a self-evident circuit.

RE: 555 duty cycle modulator

"It's sad that I can still recall these details 32 years later. I think I'll go have a drink"

Everyone has to have their 666 experience, They never listen when you tell them. This will also be a memory carried for life.

RE: 555 duty cycle modulator

Quote (OperaHouse)

Everyone has to have their 666 experience

"666" = The Sign of The Beast.
"668" = Neighbour of The Beast.
Etc. smile

RE: 555 duty cycle modulator

(OP)
Thanks for the ideas everyone.

VE1BLL in the circuit from the link you posted where does pin 7 connects? An dthe wiper pin of P2 (R1)?

RE: 555 duty cycle modulator

The answers to your questions would come from one "Darvinder Oberoi, CEDTI, Jammy, India". smile

That circuit by Mr. Oberoi is too mysterious for me to comprehend. I still like my idea better as it's perfectly straightforward and yet just a wee bit clever.

RE: 555 duty cycle modulator

(OP)
http://www.ehow.com/how_5992626_build-pulse-width-...

VE1BLL i think this link express your design idea. I will try this but would like to know too if the circuit design from mrs Darvinder works too. I will dig a litle more.

Thanks.

RE: 555 duty cycle modulator

(OP)
Hi guys.

After some research and experimenting i concluded the advices you all gave me, namely:

1. Tried a smaller capacitor (0,1 uF) with the "astable/diode in paralel with R2 configuration" in 555 and the timing equations are much more reliable compared with real world values. However the frequency is afected by R1 and R2 variations. Not good for what i want.

2. Tried this circuit : http://www.rmcybernetics.com/projects/DIY_Devices/... , and voila, independent frequency adjustment and duty cycle adjustment.

Special thanks to VE1BLL and all others.

RE: 555 duty cycle modulator

That is a lot ow work when it can be done with a LM494 and only a couple parts. The duty cycle pot would also be linear/proportional.

RE: 555 duty cycle modulator

(OP)
Is it possible with no much dificulties to use a bcd/segments unit to display duty cycle and frequency value?



RE: 555 duty cycle modulator

Exactly correct.

RE: 555 duty cycle modulator

(OP)
I think Arduino has 430 Hz max outup frequency from PWM pins. Can it be increased?

RE: 555 duty cycle modulator

488HZ...for the stand alone PWM that operates off internal timers. Believe this can be changed in the uno by changing timer divider but those are still fixed intervals. Just have to be careful that those timers don't change the function of anything else You can still do a software loop to create any frequency you want. Thought you wanted 300HZ. I really like the UNO for these kinds of tasks. I recently bought a 12 char LCD display for one for a little over $2 shipped. Complete automated testing for under $20. Once you use one it is hard to go back to sticking chips together.

RE: 555 duty cycle modulator

(OP)
Ok my problem now is:

I want to have more or less 500 mA with 12 V on the electrovalve, so i need a transistor since LM393 output is max 5 mA, no problem. But with the configuration "electovalve load in series with transistor colector-emitter circuit" i don t have constant 12 v on electrovalve terminals. When i change duty cycle i change voltage on the electrovalve.

I dont see how to overcome this...

RE: 555 duty cycle modulator

(OP)
The osciloscope image on the terminals of an electrovalve of this type is on page 4 of the atached document, bottom right, figure 7, for two diferent duty cycle situations. Observe that the "on" voltage value is always batery voltage regardless of duty cycle value.

RE: 555 duty cycle modulator

I don't see your circuit or your waveform and don't understand what your problem is exactly. I don't think voltage. I have driven 6V coils with 50V. The response depends upon the driver. do you have a diode across the coil, xener, mov, resistor. They all will give a different response. colector-emitter circuit tells me nothing. Experience in the past reminds me that this is likely something I couldn't even concieve of.

RE: 555 duty cycle modulator

(OP)
Here is the circuit schematic i made, and two hand made oscilograms at 50% and 10% duty cycle with osciloscope leads at 12,5 ohm resistance terminals (same resistance as an electrovalve i want to test but don t have on here right now so i put a regular 470 ohm pot).

As i said i want to test this electrovalves, so i want to provide a signal exactly the same as the ECU from the car provids when these are fited in the car. In the car when i connect osciloscope at electrovalve terminals the "on" voltage is always batery voltage (more or less 14 V) regardless of duty cycle value.

In my aplication as i increase duty cycle the "on" voltage across electrovalve terminals decrease (actualy a 12,5 ohm resistance right now).

My question is: Can i do something to keep "on" voltage constant regardless of changing duty cycle, as hapens in the car?

Thanks.

RE: 555 duty cycle modulator

As long as the transistors are fully turning on then the culprit is your power supply. It should be spec'd to handle at least 13W.

RE: 555 duty cycle modulator

That was my first guess. If both of the transistors only had a minimal gain of 30 each it should have worked Of course I then had to photoshop that picture and then find a magnifying glass. I don't get it with these automotive guys. I'm electrical and I rebuilt an automatic transmission. So why can't they do electronics. The problem is he is trying to get 1A through a 2N2222.

RE: 555 duty cycle modulator

The 2N2222 is definitely not the right transistor for the job.

If you want to make it work like when it is controlled by the ECU, you might want to see if you can find out what transistor is in the ECU ouput. The reason this might matter, is that different transistors are going to have varying clamp voltages to protect the transistor. It can be anywhere from 20V to several hundred. This difference in voltage will affect the behavior of the solenoid as it shuts off.

RE: 555 duty cycle modulator

Any POWER TRANSISTOR would work as long as it is rated for 10A and 60-100V. It would require an external zener at about 50V to prevent spike damage. I have grown fond of using power fet since these almost always have the zener built in and there is no need to do gain calculations. The down side is the zener is built in and thar develops heat as well as the fet. Dont think that woeld be a problem with this circuit. Got any old computer power supplies or UPS? These are a great source of fet.

RE: 555 duty cycle modulator

Any power transistor would work, but as I pointed out, you will see some variance in the closing of the solenoid, based on the where the voltage is clamped at with the internal zener. Depending on what he really wants to test for this solenoid, he may want to have it clamped at the same voltage as what is in the ECU.

RE: 555 duty cycle modulator

Can i do something to keep "on" voltage constant regardless of changing duty cycle, as hapens in the car?

Yes, always make sure the transistor saturates at these speeds. The spec sheet of the 2N2222 says you will get 1.6V at 500ma. At an amp that would be a couple volts and probably not for long. If you paralleled up five of them it might work. As far as zener clamping, no clamping is the best. I've noticed in automotive systems a trend to use resistors instead of diodes. My guess is a 100 ohm 1W resistor in parallel with the coil would keep the spikes under 50 volts, be fast and reliable. Once you get over a zener over 30V it likely doesn't matter at these speeds.

RE: 555 duty cycle modulator

(OP)
Ok i now have much less variation in voltage (12 V with 0% duty cycle and 10 V with 100% duty cycle), and what i did different was:

1. Use a TIP31C transistor;

2. Increase the current button in my power suply since it was giving me a very low current suply (i think it was the main problem).

You see some times i forget that a power source is just it, a "power" provider and power = U * I not just U...

Sincerely thanks to everyone.


RE: 555 duty cycle modulator

Good but no cigar.......When choosing a transistor, look at saturation voltage spec. It is reassuring that your real life experience is fortold by the TIP31 data sheet. Even in saturation you loose more than a volt. Most fets would do much better than that.

RE: 555 duty cycle modulator

(OP)
Yes.

I will try with a FET too.

Thanks.

RE: 555 duty cycle modulator

Yes, even the venerable 2N3055 will get you to less than .2V satyration at 1A. I use the 10X rule, 1A use needs a 10A device. I do suspect that BC???? transistor will not be able to drive it. Use the 2N2222 for the driver,

RE: 555 duty cycle modulator

(OP)
Don t know if i have to create a new tread for this, if yes tell me please.

My question is:

Just for curiosity i want to know the power dissipated by the elctrovalve. So i need to know current and Voltage. I searched in some websites for calculations of a mean voltage and current in PWM drived devices.

I found this formula:

Quote (For PWM: VRMS = ( ( C x V12 ) + ( (1-C) x V22) ).5 Where: V1 and V2 are the two peak (top and bottom) voltages in respect to 0, C is the duty cycle in respect to V1 (ie C = .2, duty cycle is 20%))


Is this right? if now i can i calculate a mean voltage and currente in PWM? Thanks.

RE: 555 duty cycle modulator

The voltage should remain constant, the current will change. It is just a solenoid. Why does it matter if you are not driving it with exceptional voltage.

I just wanted to add that unless you use a base-emitter resistor on the driver transistor you don't get the specs you think. Of course that also sucks away drive current.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources