Badcaps.net Forum
Go Back   Badcaps Forums > General Topics > General Computer Discussion
Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

 
Thread Tools Display Modes
Old 02-16-2012, 05:26 AM   #61
shadow
Badcaps Veteran
 
Join Date: Feb 2007
City & State: Melbourne, Victoria
My Country: Australia
Posts: 647
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Mad_Professor View Post
Ok so I'm working in tinycad since veecad needs a netlist to place components.

Anyways I just realized something, do I need to have digital outputs for each set *1k>tip120>fan* that say PWM on the arduino pin out or can I use one PWM output to control the 5 transistors?
If I can't then can I use any pin that says digital I/O?

http://arduino.cc/it/Hacking/PinMapping168

This left side of the chip and place the chip to the right on the board.
I was going to use,
digital I/O PWM pin 3/actual: pin 5 on chip
digital I/O PWM pin 4/actual: pin 6 on chip
digital I/O PWM pin 5/actual: pin 11 on chip
digital I/O PWM pin 6/actual: pin 12 on chip

I want to use
Digital I/O pin 7/actual: pin 13 on chip
But it doesn't say PWM. I don't know if I can use it as PWM connection.

I was going to put the pot on the right side of the board too and connect it to where it says analog PC0.

Then below the chip put my DAPA header and run the lines to the right side of the chip.
Then the left side can be used for tip120, diodes and resistors and headers.
It has been a while since I checked out this thread. I say the easiest and most flexible way of achieving what you want is to connect each transistor to a PWM output. In theory, one could power all five transistors from one PWM output. However I doubt that the current output from the microcontroller will be able to power five transistors. Therefore you will probably need another transistor to provide the extra power required to energise all five transistors at once from a single microcontroller output.

I would suggest to use the same PWM outputs as the Arduino. That way it is much easier to program using 'their' language. Not all Digital I/O pins can be configured for PWM use. Only one or two ports on the microcontroller will support PWM output. From memory, there are more PWM pins than what the Arduino's provide on their boards (this would have to be confirmed by checking the datasheet for the ATMega168), however if you use these pins, it will be difficult to make use of the Arduino C like language and their hardware libraries. On top of that, perhaps those extra PWM outputs are required for other purposes such as ICSP programming.

For the software side of things, I tried a fair few free products and found them all to be quite difficult to use (to design stripboard layouts). I found Lochmaster very good and intuitive for stripboard design. Unfortunately you can not design a schematic in it. Therefore you have to verify your layout against your schematic manually. For your circuit, it should be pretty simple. However it would be a problem for complex circuits, however stripboard is not that effective for complex circuits so it's unlikely to be used for such complex designs.
shadow is offline   Reply With Quote
Old 02-17-2012, 07:58 PM   #62
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

Got the parts today. Its on a breadboard. When I was putting it together I realized I made some errors in my schematics.

My inductor was on the wrong pin, needed to be on AVCC. My 10k resistor for reset was connected to ground.

Wrote some code but I don't know what board to compile for.
Not to be vague but under tools > boards > ??
Code:
int fan1= 5;


int fan1val = 0;
int pot1 = 0;

void setup() {}



void loop() {
fan1val = analogRead(pot1);
fan1val = fan1val / 4;

analogWrite(fan1, fan1val);
}
Tomorrow I'm going to get my old p3b-f board and load XP or linux, whatever I feel like using and hack up a parallel cable and make an attempt to load this sketch on to the chip.

Also can someone double check and verify my breadboard setup, I don't want to fry something but I think it's correct.
Attached Images
File Type: jpg 100_0674.jpg (263.1 KB, 10 views)
File Type: png fancontroller.png (26.4 KB, 8 views)
Mad_Professor is offline   Reply With Quote
Old 02-17-2012, 08:17 PM   #63
Agent24
Fuhjyyu Killer
 
Agent24's Avatar
 
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
Default Re: I need to make a fan controller.

For a basic one like that I think Arduino NG
Agent24 is offline   Reply With Quote
Old 02-18-2012, 01:26 PM   #64
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Agent24 View Post
For a basic one like that I think Arduino NG
It looks like I can set the fuses through Arduino.

I just copied and paste the section from NG w/Atmega168, and changed whatever I need.

This is a snippet from boards.txt

Code:
atmega168.name=MYBOARD w/ ATmega168

atmega168.upload.protocol=Parallel Programmer
atmega168.upload.maximum_size=14336
atmega168.upload.speed=19200

atmega168.bootloader.low_fuses=0xe2
atmega168.bootloader.high_fuses=0xdf
atmega168.bootloader.extended_fuses=0xf9
atmega168.bootloader.path=atmega
atmega168.bootloader.file=ATmegaBOOT_168_ng.hex
atmega168.bootloader.unlock_bits=0x3F
atmega168.bootloader.lock_bits=0x0F

atmega168.build.mcu=atmega168
atmega168.build.f_cpu=16000000L
atmega168.build.core=arduino
atmega168.build.variant=standard
EDIT:
Remind me to NEVER BUY this again.

http://search.digikey.com/us/en/prod...0982-ND/698225

I can't get the fucking metal contacts out so I can hook up my wires to them.

Worthless piece of shit.

Last edited by Mad_Professor; 02-18-2012 at 02:34 PM..
Mad_Professor is offline   Reply With Quote
Old 02-18-2012, 02:54 PM   #65
Agent24
Fuhjyyu Killer
 
Agent24's Avatar
 
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
Default Re: I need to make a fan controller.

There should be a piece of metal sticking out from the side of the contact that clicks into place in a hole in the plastic header.

Just push this down with a pin or stiff wire and then push towards the opening. Or you can probably grab the other end with needle-nose pliers, or stick another piece of wire in through the bottom to push the contact out.
Agent24 is offline   Reply With Quote
Old 02-18-2012, 03:31 PM   #66
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Agent24 View Post
There should be a piece of metal sticking out from the side of the contact that clicks into place in a hole in the plastic header.

Just push this down with a pin or stiff wire and then push towards the opening. Or you can probably grab the other end with needle-nose pliers, or stick another piece of wire in through the bottom to push the contact out.
Yeah the metal slides on the side yeah I push those down it did not slide I attack from the top with pliers and damaged one of the contacts. I give up, I'll wired directly to the breadboard.
Mad_Professor is offline   Reply With Quote
Old 02-18-2012, 03:41 PM   #67
Agent24
Fuhjyyu Killer
 
Agent24's Avatar
 
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
Default Re: I need to make a fan controller.

Odd, it must be a different type of connector to what I am thinking of then, it might need a special insertion tool or something.
Agent24 is offline   Reply With Quote
Old 02-18-2012, 03:57 PM   #68
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Agent24 View Post
Odd, it must be a different type of connector to what I am thinking of then, it might need a special insertion tool or something.
I managed to get them out, but I had to use an ice pick and lot of pressure to get them out.
Mad_Professor is offline   Reply With Quote
Old 02-19-2012, 01:25 AM   #69
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

IT WORKS!

I'm still having problems with the arduino software but the controller works as planned. Also I just realized I got the wrong voltage regulator, I got one with input 7v-35 instead of 0-35v Oh well I'll just stick it on the 12v anyway.

The problem I'm having with arduino software is when I made a board in boards.txt and tried to use the upload button but it spits out an error stating that it could not open port com 1 because com 1 is not a valid port for dapa it needs to be lpt1,2, or 3. But I can't find the setting to specify it.

I work around it using the upload via programmer option in the file menu.

This is pretty sweet.
Attached Images
File Type: jpg 100_0679.jpg (260.9 KB, 11 views)

Last edited by Mad_Professor; 02-19-2012 at 01:33 AM..
Mad_Professor is offline   Reply With Quote
Old 02-19-2012, 01:34 AM   #70
Agent24
Fuhjyyu Killer
 
Agent24's Avatar
 
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
Default Re: I need to make a fan controller.

Upload is designed to upload through the serial port and the bootloader. If you don't have these in your circuit you must use upload via programmer. So that's not an error, it's by design.

Good to hear it goes!
Agent24 is offline   Reply With Quote
Old 02-19-2012, 06:53 AM   #71
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

What's the max amperage for 23 awg wire? I plan on running two wires, one for ground, one for 12v to the first tip120 header then daisy chain from there?
But not sure if 23 gauge is safe for a 5 fan load? The wire came out of short piece of cat6 cable I had laying around.
Mad_Professor is offline   Reply With Quote
Old 02-19-2012, 07:40 AM   #72
mariushm
Badcaps Veteran
 
Join Date: May 2011
City & State: Romania
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 2,102
Default Re: I need to make a fan controller.

See http://www.powerstream.com/Wire_Size.htm

It will do 5A easily, 7-8 amps with some heating up. But why daisychain... don't think that's best.

Last edited by mariushm; 02-19-2012 at 07:43 AM..
mariushm is offline   Reply With Quote
Old 02-19-2012, 07:54 AM   #73
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

Quote:
Originally Posted by mariushm View Post
See http://www.powerstream.com/Wire_Size.htm

It will do 5A easily, 7-8 amps with some heating up. But why daisychain... don't think that's best.
Because having 10 wires going back to the molex connector is messy.
Mad_Professor is offline   Reply With Quote
Old 02-19-2012, 09:04 PM   #74
shadow
Badcaps Veteran
 
Join Date: Feb 2007
City & State: Melbourne, Victoria
My Country: Australia
Posts: 647
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Mad_Professor View Post
IT WORKS!

I'm still having problems with the arduino software but the controller works as planned. Also I just realized I got the wrong voltage regulator, I got one with input 7v-35 instead of 0-35v Oh well I'll just stick it on the 12v anyway.

The problem I'm having with arduino software is when I made a board in boards.txt and tried to use the upload button but it spits out an error stating that it could not open port com 1 because com 1 is not a valid port for dapa it needs to be lpt1,2, or 3. But I can't find the setting to specify it.

I work around it using the upload via programmer option in the file menu.

This is pretty sweet.
Pretty good that it worked first time.
Congratulations.

Now onto making a more permanent solution with five fan outputs.

Quote:
Originally Posted by Mad_Professor
Upload is designed to upload through the serial port and the bootloader. If you don't have these in your circuit you must use upload via programmer. So that's not an error, it's by design.

Good to hear it goes!
In one of my previous posts, it explains how to add another 'board' in board.txt file to use a programmer to upload a program to the controller. However the blog entry may have been a bit old and outdated.

I can't seem to find any upload via programmer option. Maybe it is because I don't have a USB connected programmer and my laptop does not have a parallel port.
shadow is offline   Reply With Quote
Old 02-19-2012, 09:19 PM   #75
Agent24
Fuhjyyu Killer
 
Agent24's Avatar
 
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
Default Re: I need to make a fan controller.

Quote:
Originally Posted by shadow View Post
I can't seem to find any upload via programmer option. Maybe it is because I don't have a USB connected programmer and my laptop does not have a parallel port.
Maybe, but do you have the latest version of Arduino IDE as well?
Agent24 is offline   Reply With Quote
Old 02-19-2012, 09:41 PM   #76
shadow
Badcaps Veteran
 
Join Date: Feb 2007
City & State: Melbourne, Victoria
My Country: Australia
Posts: 647
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Agent24 View Post
Maybe, but do you have the latest version of Arduino IDE as well?
That could be it as well.
shadow is offline   Reply With Quote
Old 02-20-2012, 06:28 AM   #77
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

It is done! Fresh out of the oven!

I shall call you FRANKENSTEIN!!!
Attached Images
File Type: jpg 100_0687.jpg (271.6 KB, 8 views)
File Type: jpg 100_0688.jpg (258.1 KB, 10 views)
File Type: jpg 100_0695.jpg (273.8 KB, 8 views)

Last edited by Mad_Professor; 02-20-2012 at 07:13 AM..
Mad_Professor is offline   Reply With Quote
Old 02-20-2012, 08:17 AM   #78
ratdude747
Super Moderator
 
ratdude747's Avatar
 
Join Date: Nov 2008
City & State: New Albany, IN
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Student Tech
Posts: 10,737
Send a message via Yahoo to ratdude747 Send a message via Skype™ to ratdude747
Default Re: I need to make a fan controller.

Good work. Looks nice.
__________________


(Insert signature here)
ratdude747 is offline   Reply With Quote
Old 02-20-2012, 01:48 PM   #79
Agent24
Fuhjyyu Killer
 
Agent24's Avatar
 
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
Default Re: I need to make a fan controller.

Powering up your circuit on a conductive anti-static bag probably isn't the best idea.
Agent24 is offline   Reply With Quote
Old 02-20-2012, 01:57 PM   #80
Mad_Professor
A Mech Warrior
 
Mad_Professor's Avatar
 
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
Default Re: I need to make a fan controller.

Quote:
Originally Posted by Agent24 View Post
Powering up your circuit on a conductive anti-static bag probably isn't the best idea.
scotch taped the bottom. But that's funny, I've put motherboards and other stuff on anti-static bags, never had a problem.


Didn't know those were conductive.
Mad_Professor is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:47 AM.


Badcaps.net Technical Forums © 2003 - 2013
Powered by vBulletin ®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.