I'm building a circuit for a hobby project that runs a 12 volts DC motor (computer fan) in one direction for 30 s and then in the opposite for 30 s, on and on.
I've posted a picture of the circuit with the following components:
attiny85
SN754410
voltage regulator 5V
I'm planning on supplying the entire circuit with 9 volts (6*AA) and using a voltage regulator to lower the voltage supplied to the attiny85.
It would really be helpful if you draw an actual schematic by hand and take a photo of it with your cell phone and post the photo. A Fritzing is not a schematic. It is not completely useless but requires that the reader generate a wiring list consisting of pin numbers, names & functions and where it connects to. At the very least you should post a link to the SN754410 Datasheet and the ATtiny85 Datasheet.
'm building a circuit for a hobby project that runs a 12 volts DC motor (computer fan) in one direction for 30 s and then in the opposite for 30 s, on and on.
In case you haven't realized it, almost all fans are manufactured for air flow in one direction only, consequently the blades are tilted specifically that direction. Anyone who has mistakenly installed their propellor backwards on an RC model aircraft can attest to the fact that the thrust is reduced when you use a propellor backwards due to the blade tilt factor. It would take you less time to add a second fan than it would to find a bidirectional fan blade.
SEE ATTACHED PHOTO (of chassis enclosure fan)
A regular prop will fly a plane if installed backwards but it won't be as efficient because the profile of the props blades is different from one side to the other.
Originally my plan was to use the H-bridge to control a regular DC-motor and then design a fan myself that would work both ways.
After more research I'm going for a two-fan solution.
Ok, thank you for feedback on my attached photo. It is based on the datasheets, but as you said not very informative standing alone. I won't post those from now on.
From your post count it is obvious you are new to the forum. FYI, if you plan to post in the future you may want to invest a little time researching schematic symbols with Google and learn how to draw schematics so you can post photos of them. It will make everything go much faster.
The output capacitor of 10uF or larger is needed for output stability of LM1117 as required by most of the other regulator circuits.
Do your fans have 3 wires or 4? I think that on the 3 wire fans, the third wire is a tach signal output (not a PWM input). A 4 wire fan will have the PWM input as well as the tach output.
I'm sorry, but why do you quote the datasheet? Haven't I already put that in the circuit?
Regarding the fans, they have 3, and you're right, they do not "support" PWM. However this won't be much of a problem as i will only need to spin them at either full speed. So I've changed the circuit to involve two transistors that can turn the motors on and off.
No worries, it seems i used the wrong symbol for a polarized capacitor (and surely other components as well).
Rasschemmel: Yes, I've attached a drawing of the "new" circuit.
I realize that this will in fact make it possible to control the motorspeed via. PWM, and I have succesfully done so on an Arduino. Hopefully this will work with an attiny85 as well.
That remains to be seen but FYI, your schematic is missing the GND for the 12V battery. That doesn't prevent US from understanding it but I thought you should know that technically that is considered an "error" because the battery has two terminals, only one of which is shown.
Running ANY 5V regulator off a 12V input voltage is not a good idea because you force it to dissipate the difference between what you are supplying and what it needs as an input: (12V -6.5V =5.5V) . The ideal input voltage for a 5V regulator with such a small load is 6.5 to 7V dc. The regulator will run a little hot due to the power it needs to dissipate (the 5.5V it needs to remove). Is there no way you can have a 6V battery pack for the 5V regulator and a 12V pack for the fans so the load supply is separate from the logic supply ? (preferred method)
The middle pin on the motors are PWM inputs that control the fan speed.
Are you sure about that ? My understanding is that it is a Tachometer output of the fan that can be used to monitor the fan speed, and not an input
Just use a cheap TO-92 78L05 regulator.
Don't worry about power consumption of the regulator and the micro.
It will be a fraction of the power consumption of the fans.
Fans like that can draw up to ~400mA.
Make sure your transistors are rated for that. A BC337 should be ok.
You will need a lower value base resistor for that fan current.
I would use 470ohm, and even as low as 220ohm if the transistors are getting hot.
Leo..
For low current applications, yeah, a linear regulator (like the 1117) is very appropriate.
When using a linear regulator, it draws the same current from the power source as the output does, plus the quiescent current used by the regulator itself (see datasheet for details - this is usually quite small). What this means is that, say you draw 10mA at 5v (50 mW), it draws 10mA at 12v (120mW) and dissipates the 70mW as heat. For obvious reasons, linear regulators become impractical at higher current.
At higher current, DC-DC converters are available (ex, on ebay); these have higher overall efficiencies, and are available in configurations that can output a higher voltage than the input, but they're also larger, more expensive (particularly if you get the miniaturized, encapsulated ones - cheap ones on a circuit board from china start at the $1.x range on ebay), and have higher quiescent current.
That should work. One could argue for a 10uf cap on the input side of the regulator too, but you can probably get away without it.
My attiny draws 0,3 milliamps, and the motors draw 80 milliamps. As I understand what you're saying:
The regulator will draw 120,3 mW and supply 50,3 mW on the output pin resulting in 7*0,3 or 2,1 mW of energy dissipated as heat.
That doesn't seem like much?
I was worried that the dissipated energy would also involve the current drawn from the motors.
Rascemmel:
Thank you for your feedback on the schematics drawing. You correctly pointed out, just like groundfungus, that the pin is not for PWM input, but for TACH.