Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

555 duty cycle modulator 1

Status
Not open for further replies.

serbar

Automotive
Oct 1, 2012
37
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.

 
Replies continue below

Recommended for you

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 : , and voila, independent frequency adjustment and duty cycle adjustment.

Special thanks to VE1BLL and all others.
 
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.
 
Is it possible with no much dificulties to use a bcd/segments unit to display duty cycle and frequency value?



 
If you're going to do that, then you should just do everything with an Arduino or PIC, including the PWM generation.

TTFN
faq731-376
7ofakss
 
I think Arduino has 430 Hz max outup frequency from PWM pins. Can it be increased?
 
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.
 
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...
 
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.
 
 http://files.engineering.com/getfile.aspx?folder=c397642f-8e7f-4b45-83fa-7197c8bd3afd&file=n_75_pierburg.pdf
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.
 
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.
 
 http://files.engineering.com/getfile.aspx?folder=bc871d4c-8982-425d-8d4c-c63a6ef5d417&file=sb3.JPG
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.


 
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.
 
Yes.

I will try with a FET too.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor