![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
|
#61 | |
|
Badcaps Veteran
Join Date: Feb 2007
City & State: Melbourne, Victoria
My Country: Australia
Posts: 647
|
Quote:
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. |
|
|
|
|
|
|
#62 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
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);
}
Also can someone double check and verify my breadboard setup, I don't want to fry something but I think it's correct. |
|
|
|
|
|
#63 |
|
Fuhjyyu Killer
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
|
For a basic one like that I think Arduino NG
|
|
|
|
|
|
#64 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
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 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.. |
|
|
|
|
|
#65 |
|
Fuhjyyu Killer
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
|
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. |
|
|
|
|
|
#66 | |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
Quote:
|
|
|
|
|
|
|
#67 |
|
Fuhjyyu Killer
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
|
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.
|
|
|
|
|
|
#68 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
|
|
|
|
|
|
#69 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
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. Last edited by Mad_Professor; 02-19-2012 at 01:33 AM.. |
|
|
|
|
|
#70 |
|
Fuhjyyu Killer
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
|
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! |
|
|
|
|
|
#71 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
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. |
|
|
|
|
|
#72 |
|
Badcaps Veteran
Join Date: May 2011
City & State: Romania
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 2,102
|
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.. |
|
|
|
|
|
#73 | |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
Quote:
|
|
|
|
|
|
|
#74 | ||
|
Badcaps Veteran
Join Date: Feb 2007
City & State: Melbourne, Victoria
My Country: Australia
Posts: 647
|
Quote:
Congratulations. Now onto making a more permanent solution with five fan outputs. ![]() Quote:
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. ![]() |
||
|
|
|
|
|
#75 |
|
Fuhjyyu Killer
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
|
|
|
|
|
|
|
#76 |
|
Badcaps Veteran
Join Date: Feb 2007
City & State: Melbourne, Victoria
My Country: Australia
Posts: 647
|
|
|
|
|
|
|
#77 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
It is done! Fresh out of the oven!
I shall call you FRANKENSTEIN!!! Last edited by Mad_Professor; 02-20-2012 at 07:13 AM.. |
|
|
|
|
|
#78 |
|
Super Moderator
|
Good work. Looks nice.
__________________
(Insert signature here) |
|
|
|
|
|
#79 |
|
Fuhjyyu Killer
Join Date: Oct 2007
City & State: Behind a soldering iron
My Country: New Zealand
Line Voltage: 230V AC 50Hz
Posts: 1,614
|
Powering up your circuit on a conductive anti-static bag probably isn't the best idea.
|
|
|
|
|
|
#80 |
|
A Mech Warrior
Join Date: Feb 2011
City & State: Orlando Fucking Florida
Posts: 835
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|