add pcb design

v1
Agis Zisimatos 2014-08-17 21:45:40 +03:00
parent 34f0860a40
commit 717e39a349
8 changed files with 11591 additions and 24 deletions

2056
PCB/SatNOGS.brd 100644

File diff suppressed because it is too large Load Diff

9191
PCB/SatNOGS.sch 100644

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="6.4">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.05" unitdist="inch" unit="inch" style="lines" multiple="1" display="yes" altdistance="0.025" altunitdist="inch" altunit="inch"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="no" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="yes" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<packages>
<package name="ARDUINO_MICRO_PRO">
<wire x1="-8.89" y1="16.51" x2="8.89" y2="16.51" width="0.127" layer="21"/>
<wire x1="8.89" y1="16.51" x2="8.89" y2="-16.51" width="0.127" layer="21"/>
<wire x1="8.89" y1="-16.51" x2="-8.89" y2="-16.51" width="0.127" layer="21"/>
<wire x1="-8.89" y1="-16.51" x2="-8.89" y2="16.51" width="0.127" layer="21"/>
<pad name="1" x="-7.62" y="12.7" drill="1" diameter="1.778" shape="square"/>
<pad name="2" x="-7.62" y="10.16" drill="1" diameter="1.778" shape="square"/>
<pad name="3" x="-7.62" y="7.62" drill="1" diameter="1.778" shape="square"/>
<pad name="4" x="-7.62" y="5.08" drill="1" diameter="1.778" shape="square"/>
<pad name="5" x="-7.62" y="2.54" drill="1" diameter="1.778" shape="square"/>
<pad name="6" x="-7.62" y="0" drill="1" diameter="1.778" shape="square"/>
<pad name="7" x="-7.62" y="-2.54" drill="1" diameter="1.778" shape="square"/>
<pad name="8" x="-7.62" y="-5.08" drill="1" diameter="1.778" shape="square"/>
<pad name="9" x="-7.62" y="-7.62" drill="1" diameter="1.778" shape="square"/>
<pad name="10" x="-7.62" y="-10.16" drill="1" diameter="1.778" shape="square"/>
<pad name="11" x="-7.62" y="-12.7" drill="1" diameter="1.778" shape="square"/>
<pad name="12" x="-7.62" y="-15.24" drill="1" diameter="1.778" shape="square"/>
<pad name="13" x="7.62" y="-15.24" drill="1" diameter="1.778" shape="square"/>
<pad name="14" x="7.62" y="-12.7" drill="1" diameter="1.778" shape="square"/>
<pad name="15" x="7.62" y="-10.16" drill="1" diameter="1.778" shape="square"/>
<pad name="16" x="7.62" y="-7.62" drill="1" diameter="1.778" shape="square"/>
<pad name="17" x="7.62" y="-5.08" drill="1" diameter="1.778" shape="square"/>
<pad name="18" x="7.62" y="-2.54" drill="1" diameter="1.778" shape="square"/>
<pad name="19" x="7.62" y="0" drill="1" diameter="1.778" shape="square"/>
<pad name="20" x="7.62" y="2.54" drill="1" diameter="1.778" shape="square"/>
<pad name="21" x="7.62" y="5.08" drill="1" diameter="1.778" shape="square"/>
<pad name="22" x="7.62" y="7.62" drill="1" diameter="1.778" shape="square"/>
<pad name="23" x="7.62" y="10.16" drill="1" diameter="1.778" shape="square"/>
<pad name="24" x="7.62" y="12.7" drill="1" diameter="1.778" shape="square"/>
<wire x1="-3.81" y1="17.78" x2="3.81" y2="17.78" width="0.127" layer="21"/>
<wire x1="3.81" y1="17.78" x2="3.81" y2="12.7" width="0.127" layer="21"/>
<wire x1="3.81" y1="12.7" x2="-3.81" y2="12.7" width="0.127" layer="21"/>
<wire x1="-3.81" y1="12.7" x2="-3.81" y2="17.78" width="0.127" layer="21"/>
<text x="-8.89" y="-19.05" size="1.27" layer="21">Arduino Pro Micro</text>
</package>
</packages>
<symbols>
<symbol name="ARDUINO_PRO_MICRO">
<wire x1="-15.24" y1="17.78" x2="15.24" y2="17.78" width="0.254" layer="94"/>
<wire x1="15.24" y1="17.78" x2="15.24" y2="-15.24" width="0.254" layer="94"/>
<wire x1="15.24" y1="-15.24" x2="-15.24" y2="-15.24" width="0.254" layer="94"/>
<wire x1="-15.24" y1="-15.24" x2="-15.24" y2="17.78" width="0.254" layer="94"/>
<pin name="1/TX" x="-20.32" y="15.24" length="middle"/>
<pin name="0/RX" x="-20.32" y="12.7" length="middle"/>
<pin name="GND0" x="-20.32" y="10.16" length="middle"/>
<pin name="GND1" x="-20.32" y="7.62" length="middle"/>
<pin name="2/SDA" x="-20.32" y="5.08" length="middle"/>
<pin name="3PWM/SCL" x="-20.32" y="2.54" length="middle"/>
<pin name="4/A6" x="-20.32" y="0" length="middle"/>
<pin name="5PWM" x="-20.32" y="-2.54" length="middle"/>
<pin name="6PWM/A7" x="-20.32" y="-5.08" length="middle"/>
<pin name="7" x="-20.32" y="-7.62" length="middle"/>
<pin name="8/A8" x="-20.32" y="-10.16" length="middle"/>
<pin name="9PWM/A9" x="-20.32" y="-12.7" length="middle"/>
<pin name="10PWM/A10" x="20.32" y="-12.7" length="middle" rot="R180"/>
<pin name="16/MOSI" x="20.32" y="-10.16" length="middle" rot="R180"/>
<pin name="14/MISO" x="20.32" y="-7.62" length="middle" rot="R180"/>
<pin name="15/SCLK" x="20.32" y="-5.08" length="middle" rot="R180"/>
<pin name="18/A0" x="20.32" y="-2.54" length="middle" rot="R180"/>
<pin name="19/A1" x="20.32" y="0" length="middle" rot="R180"/>
<pin name="20/A2" x="20.32" y="2.54" length="middle" rot="R180"/>
<pin name="21/A3" x="20.32" y="5.08" length="middle" rot="R180"/>
<pin name="VCC" x="20.32" y="7.62" length="middle" rot="R180"/>
<pin name="RST" x="20.32" y="10.16" length="middle" rot="R180"/>
<pin name="GND2" x="20.32" y="12.7" length="middle" rot="R180"/>
<pin name="RAW" x="20.32" y="15.24" length="middle" rot="R180"/>
<text x="-12.7" y="20.32" size="1.778" layer="95">Arduino Pro Micro</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="ARDUINO_PRO_MICRO">
<gates>
<gate name="G$1" symbol="ARDUINO_PRO_MICRO" x="0" y="0"/>
</gates>
<devices>
<device name="ARDUINO_BOARD" package="ARDUINO_MICRO_PRO">
<connects>
<connect gate="G$1" pin="0/RX" pad="2"/>
<connect gate="G$1" pin="1/TX" pad="1"/>
<connect gate="G$1" pin="10PWM/A10" pad="13"/>
<connect gate="G$1" pin="14/MISO" pad="15"/>
<connect gate="G$1" pin="15/SCLK" pad="16"/>
<connect gate="G$1" pin="16/MOSI" pad="14"/>
<connect gate="G$1" pin="18/A0" pad="17"/>
<connect gate="G$1" pin="19/A1" pad="18"/>
<connect gate="G$1" pin="2/SDA" pad="5"/>
<connect gate="G$1" pin="20/A2" pad="19"/>
<connect gate="G$1" pin="21/A3" pad="20"/>
<connect gate="G$1" pin="3PWM/SCL" pad="6"/>
<connect gate="G$1" pin="4/A6" pad="7"/>
<connect gate="G$1" pin="5PWM" pad="8"/>
<connect gate="G$1" pin="6PWM/A7" pad="9"/>
<connect gate="G$1" pin="7" pad="10"/>
<connect gate="G$1" pin="8/A8" pad="11"/>
<connect gate="G$1" pin="9PWM/A9" pad="12"/>
<connect gate="G$1" pin="GND0" pad="3"/>
<connect gate="G$1" pin="GND1" pad="4"/>
<connect gate="G$1" pin="GND2" pad="23"/>
<connect gate="G$1" pin="RAW" pad="24"/>
<connect gate="G$1" pin="RST" pad="22"/>
<connect gate="G$1" pin="VCC" pad="21"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="6.4">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="1.27" unitdist="mm" unit="mm" style="lines" multiple="1" display="yes" altdistance="0.635" altunitdist="mm" altunit="mm"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="no" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="yes" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<packages>
<package name="POLOLU-A4983">
<wire x1="-6.35" y1="10.16" x2="-6.35" y2="-10.16" width="0.127" layer="21"/>
<wire x1="-6.35" y1="-10.16" x2="6.35" y2="-10.16" width="0.127" layer="21"/>
<wire x1="6.35" y1="-10.16" x2="6.35" y2="10.16" width="0.127" layer="21"/>
<wire x1="6.35" y1="10.16" x2="-6.35" y2="10.16" width="0.127" layer="21"/>
<pad name="1" x="-5.08" y="8.89" drill="1" diameter="1.778" shape="square"/>
<pad name="2" x="-5.08" y="6.35" drill="1" diameter="1.778" shape="square"/>
<pad name="3" x="-5.08" y="3.81" drill="1" diameter="1.778" shape="square"/>
<pad name="4" x="-5.08" y="1.27" drill="1" diameter="1.778" shape="square"/>
<pad name="5" x="-5.08" y="-1.27" drill="1" diameter="1.778" shape="square"/>
<pad name="6" x="-5.08" y="-3.81" drill="1" diameter="1.778" shape="square"/>
<pad name="7" x="-5.08" y="-6.35" drill="1" diameter="1.778" shape="square"/>
<pad name="8" x="-5.08" y="-8.89" drill="1" diameter="1.778" shape="square"/>
<pad name="9" x="5.08" y="-8.89" drill="1" diameter="1.778" shape="square"/>
<pad name="10" x="5.08" y="-6.35" drill="1" diameter="1.778" shape="square"/>
<pad name="11" x="5.08" y="-3.81" drill="1" diameter="1.778" shape="square"/>
<pad name="12" x="5.08" y="-1.27" drill="1" diameter="1.778" shape="square"/>
<pad name="13" x="5.08" y="1.27" drill="1" diameter="1.778" shape="square"/>
<pad name="14" x="5.08" y="3.81" drill="1" diameter="1.778" shape="square"/>
<pad name="15" x="5.08" y="6.35" drill="1" diameter="1.778" shape="square"/>
<pad name="16" x="5.08" y="8.89" drill="1" diameter="1.778" shape="square"/>
<text x="-6.35" y="11.43" size="1.27" layer="21">Pololu-A4983</text>
</package>
</packages>
<symbols>
<symbol name="POLOLU-A4983">
<wire x1="-10.16" y1="10.16" x2="10.16" y2="10.16" width="0.254" layer="94"/>
<wire x1="-10.16" y1="10.16" x2="-10.16" y2="-10.16" width="0.254" layer="94"/>
<wire x1="-10.16" y1="-10.16" x2="10.16" y2="-10.16" width="0.254" layer="94"/>
<wire x1="10.16" y1="-10.16" x2="10.16" y2="10.16" width="0.254" layer="94"/>
<pin name="!EN" x="-15.24" y="8.89" length="middle"/>
<pin name="MS1" x="-15.24" y="6.35" length="middle"/>
<pin name="MS2" x="-15.24" y="3.81" length="middle"/>
<pin name="MS3" x="-15.24" y="1.27" length="middle"/>
<pin name="!RST" x="-15.24" y="-1.27" length="middle"/>
<pin name="!SLP" x="-15.24" y="-3.81" length="middle"/>
<pin name="STEP" x="-15.24" y="-6.35" length="middle"/>
<pin name="DIR" x="-15.24" y="-8.89" length="middle"/>
<pin name="GND" x="15.24" y="-8.89" length="middle" rot="R180"/>
<pin name="VDD" x="15.24" y="-6.35" length="middle" rot="R180"/>
<pin name="1B" x="15.24" y="-3.81" length="middle" rot="R180"/>
<pin name="1A" x="15.24" y="-1.27" length="middle" rot="R180"/>
<pin name="2A" x="15.24" y="1.27" length="middle" rot="R180"/>
<pin name="2B" x="15.24" y="3.81" length="middle" rot="R180"/>
<pin name="MGND" x="15.24" y="6.35" length="middle" rot="R180"/>
<pin name="VMOT" x="15.24" y="8.89" length="middle" rot="R180"/>
<text x="-10.16" y="11.43" size="1.778" layer="95">POLOLU-A4983</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="POLOLU-A4983">
<gates>
<gate name="G$1" symbol="POLOLU-A4983" x="0" y="0"/>
</gates>
<devices>
<device name="POLOLU-A4983" package="POLOLU-A4983">
<connects>
<connect gate="G$1" pin="!EN" pad="1"/>
<connect gate="G$1" pin="!RST" pad="5"/>
<connect gate="G$1" pin="!SLP" pad="6"/>
<connect gate="G$1" pin="1A" pad="12"/>
<connect gate="G$1" pin="1B" pad="11"/>
<connect gate="G$1" pin="2A" pad="13"/>
<connect gate="G$1" pin="2B" pad="14"/>
<connect gate="G$1" pin="DIR" pad="8"/>
<connect gate="G$1" pin="GND" pad="9"/>
<connect gate="G$1" pin="MGND" pad="15"/>
<connect gate="G$1" pin="MS1" pad="2"/>
<connect gate="G$1" pin="MS2" pad="3"/>
<connect gate="G$1" pin="MS3" pad="4"/>
<connect gate="G$1" pin="STEP" pad="7"/>
<connect gate="G$1" pin="VDD" pad="10"/>
<connect gate="G$1" pin="VMOT" pad="16"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -1,5 +1,11 @@
SatNOGS Arduino
===============
Repository of Arduino code for SatNOGS project.
Refer to block diagram in the repository for wiring documentation.
Repository of Arduino code and Arduino PCB for SatNOGS project.
Refer to block diagram in the repository for wiring documentation.
The shield is based in [Arduino Pro Micro](https://www.sparkfun.com/products/12640) and the [Pololu stepper motor driver](http://www.pololu.com/product/1182). In above picture you can see the PCB.
![satnogs_PCB](https://raw.github.com/satnogs/satnogs-arduino/PCB/SatNOGS_PCB.png)
The Eagle files of PCB you can find in branch:dev .

BIN
SatNOGS_PCB.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -2,15 +2,16 @@
#include <stdlib.h>
#include <math.h>
#define DIR_AZ 8
#define STEP_AZ 9
#define EN_AZ 7
#define DIR_AZ 5
#define STEP_AZ 4
#define DIR_EL 10
#define STEP_EL 11
#define EN_EL 12
#define DIR_EL 6
#define STEP_EL 7
#define SPD 200 //step per degree
#define MS1 9
#define EN 8
#define SPR 200 //step per revolution
#define T_DEALY 10000
#define T_STEPPER 1
@ -25,16 +26,20 @@ void setup()
{
pinMode(DIR_AZ, OUTPUT);
pinMode(STEP_AZ, OUTPUT);
pinMode(EN_AZ, OUTPUT);
digitalWrite(EN_AZ, LOW);
digitalWrite(DIR_AZ, LOW);
pinMode(DIR_EL, OUTPUT);
pinMode(STEP_EL, OUTPUT);
pinMode(EN_EL, OUTPUT);
digitalWrite(EN_EL, LOW);
digitalWrite(DIR_EL, LOW);
/* Enable/Disable Motors*/
pinMode(EN, OUTPUT);
digitalWrite(EN, HIGH);
/* Step size */
pinMode(MS1, OUTPUT);
digitalWrite(MS1, LOW); //Full step
Serial.begin(19200);
}
@ -43,16 +48,12 @@ void loop()
/*Time Check*/
if (t1 == 0)
t1 = millis();
/*Disable Motors*/
if (stepAz == 0 && stepEl == 0 && millis()-t1 > T_DEALY)
{
digitalWrite(EN_AZ, HIGH);
digitalWrite(EN_EL, HIGH);
}
digitalWrite(EN, HIGH);
/*Enable Motors*/
else
{
digitalWrite(EN_AZ, LOW);
digitalWrite(EN_EL, LOW);
}
digitalWrite(EN, LOW);
cmd_proc();

View File

@ -1,3 +1,4 @@
/* Send pulses to stepper motor drivers */
void stepper_move()
{
if(stepAz>0)
@ -36,13 +37,13 @@ void stepper_move()
delay(T_STEPPER);
}
/* Convert degrees to steps */
int deg2step(double deg)
{
return(60*SPD*deg/360);
return(60*SPR*deg/360);
}
/* Convert steps to degrees */
float step2deg(int Step)
{
return(360*Step/(SPD*60));
return(360*Step/(SPR*60));
}