First question to the forum

Thread Starter

kuch128

Joined Mar 7, 2011
20
Hello,
I have read these forums for over a year and have yet to make a post. I've enjoyed reading all the posts and I am amazed at how helpful the community is especially some the senior members, this site is an incredible resource.

Well enough of an introduction here is my situation. I want to start actually building some of the circuits I have been studying. Recently in my digital logic class we built a PWM circuit using an Altera DE1 board and AHDL code to control the speed of a computer fan. What I want to do is build the same sort of circuit but use a 555 timer in astable operation to provide the pulse and a potentiometer as RA to control the duty cycle of the pulse. The output would drive a transistor acting a switch to handle current needed by the motor. Before I get to deep into the weeds with this project I just wanted to know if i was on the right track.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hello Kuch128,
You'll likely find the forums a lot more interesting when you are interactive with it. ;)

As far as your Altera PWM circuit, I'm curious as to the type of fan you were using in that experiment? PWM would likely work OK with a purely DC fan, but could be problematic with BLDC fans. There are several types of computer fans in use; the really old ones were DC with brushes (they wore out quickly), then 2-wire BLDC (Brushless DC) fans came along, then 3-wire BLDC's (one is a tach output), and then 4-wire BLDC's (one tach out, one PWM in).

I haven't tried to run a BLDC fan using PWM for one that was not specifically built for that (the 4-wire BLDC's are), and I frankly don't know what would happen were it tried. I did build a thermistor-controlled fan speed regulator using a switching voltage regulator; it worked very well to keep the computer temperature under control while keeping fan noise at an acceptable level.

A 555-timer PWM circuit is certainly simple enough to build using just a few parts. You should first determine what the maximum current draw of your fan will be, and post that. The current requirement of the fan will determine what the driver transistor's capacity will need to be, and the base resistor requirement.

And yes, you are on the right track for a PWM circuit.
 

Thread Starter

kuch128

Joined Mar 7, 2011
20
First off Sgt Wookie I would like to say hello to a fellow Marine I've been active duty since 2004 and got selected for a program where they send me to school for 4 years to get my degree to come back to them as an officer. Any way I am sorry that I cannot give you an exact model for the fan but I do remember that it was just 2 wires that were used to connect it to the circuit and we used a 7406 and a IRFD110 to drive it. We used a 1 kHz square wave and the code was used to incremement the pulse width in increments of 10%. The way I understood it was that the speed of the fan was a result how often power was applied to it.

As for what I am trying to do, I dont have a fan on hand I have a DC motor from radio shack PN# 273-0258 http://www.radioshack.com/product/index.jsp?productId=2102828#tabsetBasic . I'm trying to take this in baby steps as not to overwhelm myself, I'm the type of guy that looks a motherboard to a computer and wants to know how it all works down to the component, I realize this is ridiculous so that is why ill just be happy if I get the motor to spin. I do have bigger plans for this but like I said baby steps :)
 

hgmjr

Joined Jan 28, 2005
9,027
First let me say "Thank You" for your service to our country.

Second, You have come to the right place for assistance. I commend you for your decision to take "baby steps" as you call them. You will find the information at our ebook at www.allaboutcircuits.com very useful in famialirizing yourself with the various electronic and electronic related concepts.

hgmjr
 

wayneh

Joined Sep 9, 2010
17,496
+1 on both points.

Dirty Harry said, "A man's got to know his limitations". That's probably the single biggest failing of most newcomers here. They want to build a wireless flatscreen HDTV out of spare parts and power it with a 9v battery or worse. They get angry when they learn that it might be harder than they thought.

Slow and steady will give a lot more satisfaction and depth of learning. Enjoy the journey as much as the destination.
 

SgtWookie

Joined Jul 17, 2007
22,230
First off Sgt Wookie I would like to say hello to a fellow Marine I've been active duty since 2004 and got selected for a program where they send me to school for 4 years to get my degree to come back to them as an officer.
S/F, and Congratulations on your selection for the program - in my time, it was called MECEP; I don't know for certain, but I think that it is still called that.
I was a MOS 6657; that was a Vietnam-era MOS - I was an airborne weapons systems/radar/missile fire control tech on the McDonnell/Douglas F-4J/S Phantom II. When I hit EAS, CMC Amos was a 2nd LT in my squadron.

What was your MOS?

Any way I am sorry that I cannot give you an exact model for the fan but I do remember that it was just 2 wires that were used to connect it to the circuit and we used a 7406 and a IRFD110 to drive it.
Interesting. The 7406 is an open-collector hex inverter. That's the only way you could have raised the gate of the MOSFET you used high enough with TTL.
We used a 1 kHz square wave and the code was used to incremement the pulse width in increments of 10%. The way I understood it was that the speed of the fan was a result how often power was applied to it.
I see. With a 555 timer and a pot, you will be able to have much finer control over the speed of the fan.

As for what I am trying to do, I dont have a fan on hand I have a DC motor from radio shack PN# 273-0258 http://www.radioshack.com/product/index.jsp?productId=2102828#tabsetBasic . I'm trying to take this in baby steps as not to overwhelm myself, I'm the type of guy that looks a motherboard to a computer and wants to know how it all works down to the component, I realize this is ridiculous so that is why ill just be happy if I get the motor to spin. I do have bigger plans for this but like I said baby steps :)
OK; well the motor you've selected is only rated for up to 3v; so you should stay at or below that to keep from burning it up. This also means that a standard 555 timer won't work, as it needs 5v to operate. CMOS 555 timers can operate from as little as 3v. Radio Shack sells a CMOS version of the 555, the TLC555.

I'm seeing conflicting reviews on the motor though; some say they've run it at up to 9v. I'd take that with a pound of salt, as they were probably using a 9v "transistor" battery that has very high internal resistance. Another suggested a higher voltage, but didn't actually specify if they tested it using a power supply; only mentioned a solar cell.

One of the big problems now is selecting a suitable driver at such a low voltage. You're really limited with only 3v; you can't even use a logic level MOSFET.

The TLC555 can sink 100mA, but is only rated to source 10mA. For this reason, I elected to use a PNP driver. This is going to be dicey, as according to the comments, if the motor is held at stall, it will try to draw 1.5A which will exceed the 2N2907's ratings by a large margin. So with this simple circuit, you will have to content yourself with simply varying the speed up and down. See the attached.

OTOH, if you power the 555 with 10v-12v, you can use a MOSFET. The motor should still be powered using 3v.

[eta]
Feel free to take advantage of our online E-books, accessible via links at the top of every page.
For more in-depth information, you may wish to go through the Navy NEETS course, available in downloadable .pdf files from this site:
http://www.phy.davidson.edu/instrumentation/NEETS.htm
I went through a predecessor course back in the mid-70's.
 

Attachments

Last edited:

thatoneguy

Joined Feb 19, 2009
6,359
The brushless PC Fans I've played with, I've used a high frequency (30kHz) with a lowpass filter so the motor essentially sees a varying voltage rather than PWM, the speed control was very good until trying to turn very slowly.

I didn't know they'd work at 1kHz, so I'm interested in how this turns out.
 

Thread Starter

kuch128

Joined Mar 7, 2011
20
@ Sgt Wookie, MECEP is still the name, as for me im a 2862 Ground Communications Technician. As for the circuit you posted thank you, I was under the impression you would never be able to get a duty cycle less than 51% with a 555 with the way they describe the ratio between Ra and Rb on the data sheet but after simulating the circuit I was surprised at how simple this method is once its staring you in the face. As for actually powering the motor that was what I was hoping to accomplish this with the transistor I wanted to use it as a low side switch that is turned on or off by the timer and the length it would be turned on would be determined by the pulse width. Ill need to do more research on the type of transistor needed and if the base current provided by the timer would be enough to deliver the appropriate current to the motor.

@ thatoneguy, you will have to excuse me as my knowledge of filters doesn't reach far beyond what is in the online book, but am I far off with visualizing the load as the fan and using a variable inductor or capacitor to adjust the voltage seen at the output?
 

thatoneguy

Joined Feb 19, 2009
6,359
No variable inductors or capacitors. The PWM duty cycle from the controller is the only variable (on time vs. off time). The low pass filter would be an inductor in series with the + lead, and a large capacitor between the + and - leads to make the PWM into "rippled DC Voltage" instead of actual on/off cycles. PWM duty cycle determines the average output voltage. The reason for the higher frequency is to enable the use of smaller inductor and capacitor values for the low pass filter to get close to DC output. This method is sometimes used to modulate a SineWave via PWM and filters from a microcontroller as well.

This is one (sloppy) method that can used with a Microcontroller to create pseudo-analog voltages out of a digital device. There are other (far more accurate) Digital to Analog converters available. They require more for setup/communication, and are basically overkill in accuracy just to vary fan speed.
 

SgtWookie

Joined Jul 17, 2007
22,230
@ Sgt Wookie, MECEP is still the name, as for me im a 2862 Ground Communications Technician.
Interesting. Did you see/use ATACTS test gear while you were doing that?

As for the circuit you posted thank you, I was under the impression you would never be able to get a duty cycle less than 51% with a 555 with the way they describe the ratio between Ra and Rb on the data sheet but after simulating the circuit I was surprised at how simple this method is once its staring you in the face.
There's another way you can accomplish basically the same thing only using Vcc, pin 7, a diode and a pot instead of sourcing/sinking from pin 3. If heavy current will be sunk/sourced from pin 3, this way is better.
As for actually powering the motor that was what I was hoping to accomplish this with the transistor I wanted to use it as a low side switch that is turned on or off by the timer and the length it would be turned on would be determined by the pulse width.
That's a problem with the low Vcc being used due to the voltage rating of the motor. I've already mentioned that the transistorized 555 timer won't work at 3v, and the CMOS 555 can sink 10x more current than it can source - so this necessitated a PNP solution where the transistor sources current to the load, instead of controlling the ground side.

If a higher Vcc can be used, then it may be possible to use a logic-level N-ch MOSFET to control the low side of the load.
 

Thread Starter

kuch128

Joined Mar 7, 2011
20
I'm sorry for the late response, but no Wookie we didnt use the ATACTS but right before I left Okinawa back in 2007 I was in one of the units that meant to test it, that is if we are talking about the same thing. The only piece of test equipment we learned outside of an O scope and multimeter was the TETS which has a lot of potential and could be quite a powerful piece of test equipment but the units that have it in the fleet have pretty much turned their back on it because of it's complexity and lack of support for the newer radios.

Anyway back to the circuit you posted I just want to make sure I got the operation down, sorry for the slow learning curve. So with the transistor when the 555 pulse is low the transistor is on and conducting? Also when it is low C1 is discharging through R1 the bottom half of the pot through D2 and then through pin "out"? (this is the part that im most confused about).
 

Thread Starter

kuch128

Joined Mar 7, 2011
20
Also after looking at the data chart was the 1n914 diode used because of its much lower Vf condutcance rating for example if I am reading this right around 20 mA at .8 volts?
 

SgtWookie

Joined Jul 17, 2007
22,230
I'm sorry for the late response, but no Wookie we didnt use the ATACTS but right before I left Okinawa back in 2007 I was in one of the units that meant to test it, that is if we are talking about the same thing.
Yes, we probably are. The ATACTS unit would have been loaded with test software, and had umbilical adapters to connect many different radios currently in use. It could run the radios through their paces and sped up the troubleshooting process by quite a bit. It was basically about 13 pieces of test equipment all rolled into one unit about the size of an O-scope.
The only piece of test equipment we learned outside of an O scope and multimeter was the TETS which has a lot of potential and could be quite a powerful piece of test equipment but the units that have it in the fleet have pretty much turned their back on it because of it's complexity and lack of support for the newer radios.
Hmm, not familiar with TETS.

Anyway back to the circuit you posted I just want to make sure I got the operation down, sorry for the slow learning curve.
I wouldn't expect you to know how it operates by just glancing at it. ;) 555 timer circuits can be deceptively simple, with parts doing double duty and more.
So with the transistor when the 555 pulse is low the transistor is on and conducting?
Yes.
Also when it is low C1 is discharging through R1 the bottom half of the pot through D2 and then through pin "out"?
Yes!
(this is the part that im most confused about).
But you've got it. :)

Now I'm going to throw another schematic at you. This is closer to the "by the book" R1/R2/C1 astable multivibrator, with a twist thrown in - it will basically do the same wide-range PWM as the other circuit, but using one less part!

Have a look at the attached.

The upper half of VR1 + R1 are equivalent to R1 in the "astable multivibrator" circuit in the datasheet, and the lower half of VR1 is equivalent to R2.

The big deal here is that VR1 is a pot, so as our virtual R1 decreases in size, R2 increases and vice versa. The trick here though is, D1 bypasses the low side of the pot when C1 is charging.

In the datasheet:
http://www.ti.com/lit/ds/symlink/lm555.pdf
...you'll see two basic formulas for the astable multivibrator:
Output time high = 0.69 * (R1+R2) * C1
and
Output time low = 0.69 * R1 * C1

But, since D1 is now providing a different current path around the "virtual" R2, the output time high formula changes to:
Output time high = 0.69 * R1 * C1
so R2 is no longer in the equation.

Now, in the circuit I've attached, there is a 330 Ohm R1 in addition to VR1. The reason for this isn't obvious at first. When it's time to discharge the timing cap, pin 7 is internally connected to ground to sink current. If there is no resistance between the voltage supply and pin 7 (which could otherwise occur if VR1 were set so that there was zero resistance between the upper terminal and the wiper), the timer and/or the pot will get fried, as it will be the only load!

My "rule of thumb" for resistance between the voltage supply is 100 Ohms per volt, or 10mA current maximum. If you go higher current than that (lower resistance), you are unnecessarily wasting power, and are risking a malfunction in the circuit (poor/unreliable operation).

If you have Java installed, you can click on this link:
http://www.falstad.com/circuit/#$+1...15625+0+-1 o+4+32+0+42+20.0+9.765625E-5+1+-1
...and see a simulation of how this thing works.
I have changed some values to make the simulation easier to understand.
This particular simulator's pot doesn't work like it should, so I've used two 25k resistors in series instead of a 50k pot. I've increased C1 to 100nF so that you can see the waveforms easily. I added a 100 Ohm resistor in series with the motor to cause the current through the "motor" (an inductor) to decay; without it the simulation would have a hard time.

If you don't have the current version of Java installed, click here:
http://www.java.com/en/download/index.jsp
... download and install it.

The Falstad circuit simulator is very handy for demonstrating visually how a circuit might perform. I encourage you to experiment with it. There are quite a few demonstration circuits on the website; accessible here:
http://www.falstad.com/circuit/e-index.html

The Falstad main electronic simulator page is here:
http://www.falstad.com/circuit/
I suggest that you bookmark the above page, if nothing else.

If you wish to simulate circuits more accurately, I'll encourage you to download the free and good LTSpice schematic capture and PSPICE circuit emulator.
Google "LTSpice download" to get the current link; it should be on Linear.com's website.

If you decide to try LTSpice, I will also encourage you to join the Yahoo! LTSpice users' group; just sign up for a free Yahoo! account, and request to join it. Lots of PSPICE models are available there for you to add functionality to LTSpice with, and free help in the forums.
 

Attachments

Top