Maker Pro
Maker Pro

PIC08 Circuit To Control 12v PC Fans

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
Hi everyone, just looking for some help on an electronics project I'm doing at school. I'm making a PIC08 circuit which controls three 12v computer case fans using a Thermistor as an analogue input. However I discovered that the output voltage I'm getting from the PIC isn't high enough to actually start the fans so I'm having to change my plans slightly.

I'm hoping to change the power supply of the circuit to 12v but use a voltage regulator to bring the voltage going into the PIC down to 4.5 (or 5) volts. However I'm having trouble finding a voltage regulator which has these specifications.

Can anyone recommend what I should do? I will update this post with circuit diagrams later once I have time.

EDIT: Here's the PCB I'm currently using. If possible I don't really want to have to make another.

EDIT 2: Corrected - I am hoping to change the power supply to 12v then bring down the voltage with a regulator.
 

Attachments

  • PCB Layout Image.jpg
    PCB Layout Image.jpg
    104.3 KB · Views: 239
Last edited by a moderator:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,631
Joined
Nov 17, 2011
Messages
13,631
There is the 7805 or the LM317, for example.
You will need a buffer stage to bring the output of the PIC to 12V. A simple transistor circuit is suitable (scroll down to "Connecting a transistor to the output from an IC")

Harald
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,631
Joined
Nov 17, 2011
Messages
13,631
That is right.
You'll have to add filter capacitors right before and after the regulator, see the datasheet. Depending on the current you draw you may also need an additional heatsink. The regulator has an input-output differential voltage of 7V (12 V - 5V).
For example: at a moderate 500mA this translates into 7*0.5 W = 3.5W which is converted to thermal enrgy. You need to get this energy away from the regulator otherwise it will overheat and can be destroyed.

Your circuit probably needs much lesss current. You should know.

Harald
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You could also use a 78L05, which comes in a TO92 case, like a transistor.

Bob
 

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
Depending on the current you draw you may also need an additional heatsink.

Thank you for your advice. How would I use a heatsink? Also if it makes a difference, the circuit will be inside of a computer which means it should in theory get some extra cooling.
 

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
You could also use a 78L05, which comes in a TO92 case, like a transistor.

Thanks for your advice. Would this provide better heat dissipation? Or would it just be smaller?



On a side note, can anyone see anything blatantly wrong with my original PCB drawing? I've breadboarded the circuit and it did work with 3v motors (like are seen on the drawing). However I have no way of knowing how the thermistor works, and what values to set my PIC program to.

Thanks.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,631
Joined
Nov 17, 2011
Messages
13,631
How would I use a heatsink?
A heatsink is screwed onto the regulator. It may be required even within a PC case. It depends on the power dissipation which we do not know because we do not know how much current is drawn from the regulator.

Harald
 

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11

Attachments

  • PCB Layout Image Final 1.jpg
    PCB Layout Image Final 1.jpg
    119.4 KB · Views: 153
  • PCB Layout Image Final 2.jpg
    PCB Layout Image Final 2.jpg
    102.8 KB · Views: 171

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1) Placing a 9V battery in series with AA cells isn't the greatest idea.

2) running power past the motors then to the PICAxe is a bad ides (the power supplies need decoupling)

3) The PICaxe will have a fit if you give it 12V (actually it will probably just quietly die) OH, is that a 3 terminal regulator? You really should have an output cap (plus the decoupling mentioned above)
 

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
1) Placing a 9V battery in series with AA cells isn't the greatest idea.

2) running power past the motors then to the PICAxe is a bad ides (the power supplies need decoupling)

3) The PICaxe will have a fit if you give it 12V (actually it will probably just quietly die) OH, is that a 3 terminal regulator? You really should have an output cap (plus the decoupling mentioned above)

Thank you for your advice.

1) How could I replicate 12v using a battery?

2) I have searched decoupling and this requires a capacitor? What type of capacitor would this be, and where would it be placed in the circuit?

3) How do I put an output cap on a voltage regulator?

Finally, would it be easier to have 2 circuits with 2 different power supplies and connect them with an opto-isolator?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1) Using 10 AA cells is a good approach.

2) In your case it is an input capacitor for the regulator. It would also be valuable to run a separate track from the power input to the regulator. Placing a diode between the battery and the regulator (before the input capacitor) would be useful.

3) Look at the datasheet for the regulator. It will almost certainly describe exactly how to do it.
 

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
1) Using 10 AA cells sounds like a better idea then, thank you.

2) I've added a different track running to the voltage regulator, and I've also added an input capacitor with a diode before it (placed the right way, I hope). I've added an image of my updated PCB design below: is this what you meant?

3) I've taken a quick look at the data sheet and I can't find anything about output caps. Surely the regulator will cap itself? At 10v input, it says that the minumum output is 4.8v and maximum is 5.2v. I'm not sure if this will change as I'm using 12v?
Here's the datasheet: http://html.alldatasheet.com/html-pdf/100156/ETC/TS7805CZ/116/2/TS7805CZ.html

I also have a new problem: on the data sheet it mentions something about linking all of the pins of the voltage regulator to the same negative rail. I've added a diagram below from the data sheet to explain what it means, but do I have to do this?

Thanks.
 

Attachments

  • TS7805CZ Recommended Setup.png
    TS7805CZ Recommended Setup.png
    37.3 KB · Views: 210
  • Image 1.jpg
    Image 1.jpg
    120 KB · Views: 185
  • Image 2.jpg
    Image 2.jpg
    127.6 KB · Views: 146

davenn

Moderator
Sep 5, 2009
14,232
Joined
Sep 5, 2009
Messages
14,232
...............
3) I've taken a quick look at the data sheet and I can't find anything about output caps. Surely the regulator will cap itself? At 10v input, it says that the minumum output is 4.8v and maximum is 5.2v. I'm not sure if this will change as I'm using 12v?
Here's the datasheet: http://html.alldatasheet.com/html-pdf/100156/ETC/TS7805CZ/116/2/TS7805CZ.html

Thanks.


seriously ? ;)

the first page shows the input and output capacitors :)
as does your reproduction of it above

Dave
 
Last edited:

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
seriously ? ;)

the first page shows the input and output capacitors :)
as does your reproduction of it above

Dave


OH. How stupid of me! I thought 'caps' was about capping the output voltage, not capacitor!

Thanks for your help :p So can anyone see any problems with my circuit?
 
Last edited:

Exceptional_Joe

Nov 27, 2012
11
Joined
Nov 27, 2012
Messages
11
Programming Thermistor As Input For PIC08

This thread follows on from a previous thread regarding a project I'm doing to make an automated PC Fan Controller. The original thead can be found here: https://www.electronicspoint.com/pic08-circuit-control-12v-pc-fans-t254710.html

I am wondering about the values when programming the Thermistor as an input. I would like the fans (all 3 of them) to be activated when the internal PC case temperature is above 35 degrees (for example - I haven't decided on exact temps yet). However, I have no idea what this temperature would be in terms of resistor values or in terms of PIC values.

I will include screenshots of my initial plans for the programme below.


As you can see on the image, it says "b0>10" and "b0>140" it is these values that I am confused about. What do these values (10 and 140 in this example) mean in terms of real world temperature or resistance?


Thanks in advance.
 

Attachments

  • Programming Trial.jpg
    Programming Trial.jpg
    94 KB · Views: 138

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,631
Joined
Nov 17, 2011
Messages
13,631
Please stay in one thread for one topic. I therefore merged these threads.

The "real world" resistance of the thermistor you will find in the thermistor's datasheet. What this means in volts at the ADC-input requires that you show us a schematic (not the topography of your layout, as above).
What that voltage means in terms of ADC output values depends on the reference voltage used and the operating mode of the ADC. Someone more familiar with the PIC controllers than I am should be able to answer that off the cuff.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
All you can say with any sort of certainty is that the temperature when the reading is 10 is different from when the reading is 140.

The ADC probably has a range of 0 to 255 (that's 8 bits). This (typically) corresponds to 0 to 5V at the input pin of the chip.

Depending on your circuit, and the type of thermistor, a count of 10 may indicate a
high or a low temperature. My guess is that it indicates a high temperature. The Yes and No are backwards on the b >10 test (or the test should be b < 10).

There are several ways to determine the correct values to use.

One is to look at the datasheet for the thermistor and figure out the resistance, then use that to determine the voltage reaching the chip, then use that to determine what the ADC would return (and this is close to the correct way).

The other way is to connect it all up, run a program that reports the ADC value (you can do that in the Picaxe development environment) and after verifying that the count goes up and down with changing temperature, you can subject the thermistor to the temperatures you wish it to switch at, and read the ADC value reported.

Typically the second method requires hot air (or hot water and insulation for the thermistor) and a thermometer to determine the actual temperature (if that is important)
 
Top