change crystal to 16MHz

This commit is contained in:
2020-11-28 20:51:02 +03:00
parent 9a25fef65f
commit ab32581d48
8 changed files with 1004 additions and 1001 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3733,7 +3733,7 @@
(gr_line (start 137.364 77.528) (end 19.364 77.528) (layer Edge.Cuts) (width 0.05)) (gr_line (start 137.364 77.528) (end 19.364 77.528) (layer Edge.Cuts) (width 0.05))
(gr_line (start 137.364 37.528) (end 137.364 77.528) (layer Edge.Cuts) (width 0.05)) (gr_line (start 137.364 37.528) (end 137.364 77.528) (layer Edge.Cuts) (width 0.05))
(gr_line (start 19.364 37.528) (end 137.364 37.528) (layer Edge.Cuts) (width 0.05)) (gr_line (start 19.364 37.528) (end 137.364 37.528) (layer Edge.Cuts) (width 0.05))
(gr_text "Eggbot Wireless v1.5" (at 29.764 75.128) (layer F.SilkS) (tstamp 5F034B25) (gr_text "Eggbot Wireless v2.0\n" (at 29.764 75.128) (layer F.SilkS) (tstamp 5F034B25)
(effects (font (size 1.5 1.5) (thickness 0.3)) (justify left)) (effects (font (size 1.5 1.5) (thickness 0.3)) (justify left))
) )

View File

@@ -270,7 +270,7 @@ L EggbotWireless-rescue:Crystal-Device Y1
U 1 1 5CED63CD U 1 1 5CED63CD
P 2700 1500 P 2700 1500
F 0 "Y1" V 2746 1369 50 0000 R CNN F 0 "Y1" V 2746 1369 50 0000 R CNN
F 1 "12MHz" V 2655 1369 50 0000 R CNN F 1 "16MHz" V 2655 1369 50 0000 R CNN
F 2 "Crystal:Crystal_HC49-4H_Vertical" H 2700 1500 50 0001 C CNN F 2 "Crystal:Crystal_HC49-4H_Vertical" H 2700 1500 50 0001 C CNN
F 3 "~" H 2700 1500 50 0001 C CNN F 3 "~" H 2700 1500 50 0001 C CNN
1 2700 1500 1 2700 1500

View File

@@ -3,7 +3,7 @@ EELAYER 30 0
EELAYER END EELAYER END
$Descr A4 11693 8268 $Descr A4 11693 8268
encoding utf-8 encoding utf-8
Sheet 1 2 Sheet 1 1
Title "" Title ""
Date "" Date ""
Rev "" Rev ""
@@ -2131,13 +2131,13 @@ F 3 "" H 2500 4000 50 0001 C CNN
0 -1 -1 0 0 -1 -1 0
$EndComp $EndComp
$Comp $Comp
L EggbotWireless-rescue:CP-Device C? L EggbotWireless-rescue:CP-Device C18
U 1 1 5FB522B1 U 1 1 5FB522B1
P 2700 4150 P 2700 4150
AR Path="/5FB522B1" Ref="C?" Part="1" AR Path="/5FB522B1" Ref="C18" Part="1"
AR Path="/5E1045DA/5FB522B1" Ref="C?" Part="1" AR Path="/5E1045DA/5FB522B1" Ref="C?" Part="1"
AR Path="/5FB4B9D9/5FB522B1" Ref="C?" Part="1" AR Path="/5FB4B9D9/5FB522B1" Ref="C?" Part="1"
F 0 "C?" H 2818 4196 50 0000 L CNN F 0 "C18" H 2818 4196 50 0000 L CNN
F 1 "68uF" H 2818 4105 50 0000 L CNN F 1 "68uF" H 2818 4105 50 0000 L CNN
F 2 "Capacitor_SMD:CP_Elec_4x5.8" H 2738 4000 50 0001 C CNN F 2 "Capacitor_SMD:CP_Elec_4x5.8" H 2738 4000 50 0001 C CNN
F 3 "~" H 2700 4150 50 0001 C CNN F 3 "~" H 2700 4150 50 0001 C CNN
@@ -2145,15 +2145,15 @@ F 3 "~" H 2700 4150 50 0001 C CNN
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
$Comp $Comp
L EggbotWireless-rescue:C-Device C? L EggbotWireless-rescue:C-Device C19
U 1 1 5FB522B7 U 1 1 5FB522B7
P 3150 4150 P 3150 4150
AR Path="/5FB522B7" Ref="C?" Part="1" AR Path="/5FB522B7" Ref="C19" Part="1"
AR Path="/5E1045DA/5FB522B7" Ref="C?" Part="1" AR Path="/5E1045DA/5FB522B7" Ref="C?" Part="1"
AR Path="/5FB4B9D9/5FB522B7" Ref="C?" Part="1" AR Path="/5FB4B9D9/5FB522B7" Ref="C?" Part="1"
F 0 "C?" H 3265 4196 50 0000 L CNN F 0 "C19" H 3265 4196 50 0000 L CNN
F 1 "10uF" H 3265 4105 50 0000 L CNN F 1 "10uF" H 3265 4105 50 0000 L CNN
F 2 "Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 3188 4000 50 0001 C CNN F 2 "Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder" H 3188 4000 50 0001 C CNN
F 3 "~" H 3150 4150 50 0001 C CNN F 3 "~" H 3150 4150 50 0001 C CNN
1 3150 4150 1 3150 4150
1 0 0 -1 1 0 0 -1
@@ -2171,10 +2171,10 @@ Connection ~ 2850 4000
Wire Wire Line Wire Wire Line
2850 4000 2700 4000 2850 4000 2700 4000
$Comp $Comp
L EggbotWireless-rescue:GND-power-Catfi-rescue #PWR? L EggbotWireless-rescue:GND-power-Catfi-rescue #PWR0154
U 1 1 5FB95FEE U 1 1 5FB95FEE
P 2900 4350 P 2900 4350
F 0 "#PWR?" H 2900 4100 50 0001 C CNN F 0 "#PWR0154" H 2900 4100 50 0001 C CNN
F 1 "GND" H 2905 4177 50 0000 C CNN F 1 "GND" H 2905 4177 50 0000 C CNN
F 2 "" H 2900 4350 50 0001 C CNN F 2 "" H 2900 4350 50 0001 C CNN
F 3 "" H 2900 4350 50 0001 C CNN F 3 "" H 2900 4350 50 0001 C CNN

View File

@@ -16,19 +16,19 @@ framework = arduino
; PlatformIO requires the board parameter. Must match your actual hardware ; PlatformIO requires the board parameter. Must match your actual hardware
board = ATmega328P board = ATmega328P
; Clock frequency in [Hz] ; Clock frequency in [Hz]
board_build.f_cpu = 12000000L board_build.f_cpu = 16000000L
board_hardware.oscillator = external board_hardware.oscillator = external
; Hardware UART for serial upload ; Hardware UART for serial upload
board_hardware.uart = no_bootloader board_hardware.uart = no_bootloader
; Brown-out detection ; Brown-out detection
board_hardware.bod = 1.8v board_hardware.bod = 2.7v
board_upload.speed = 115200 board_upload.speed = 115200
monitor_speed = 9600 monitor_speed = 9600
upload_protocol = stk500 upload_protocol = stk500
upload_port = COM3
upload_flags = upload_flags =
-PCOM8
lib_deps = 883 #Servo lib_deps = 883 #Servo

View File

@@ -1,14 +1,14 @@
#include "Pen.h"
#include <Arduino.h> #include <Arduino.h>
#include <Servo.h> #include <Servo.h>
#include "Pen.h"
Pen::Pen(int pin, int posEngaged, int posDisengaged) Pen::Pen(int pin, int posEngaged, int posDisengaged)
: posEngaged(posEngaged), posDisengaged(posDisengaged), pin(pin) {} : posEngaged(posEngaged), posDisengaged(posDisengaged), pin(pin) {}
void Pen::engage() { void Pen::engage() {
if (!engaged) { if (!engaged) {
for(int i = posDisengaged; i > posEngaged; i--) { for (int i = posDisengaged; i > posEngaged; i--) {
servo.write(i); servo.write(i);
delay(5); delay(5);
} }

View File

@@ -1,4 +1,5 @@
#include "Stepper.h" #include "Stepper.h"
#include <Arduino.h> #include <Arduino.h>
#include <util/atomic.h> #include <util/atomic.h>

View File

@@ -3,6 +3,7 @@
#include <Wire.h> #include <Wire.h>
#include <avr/wdt.h> #include <avr/wdt.h>
#include <util/atomic.h> #include <util/atomic.h>
#include "Config.h" #include "Config.h"
#include "Globals.h" #include "Globals.h"
#include "common/Commands.h" #include "common/Commands.h"
@@ -12,9 +13,10 @@ int curRPM = defRPM;
bool needAdjust; bool needAdjust;
int calculateDelay(float rpm, int stepsPerRevolution) { int calculateDelay(float rpm, int stepsPerRevolution) {
//Delay between steps in a timer routine // Delay between steps in a timer routine
// Delay = (ticks/sec)/(rpm/60 * steps/rev) // Delay = (ticks/sec)/(rpm/60 * steps/rev)
return ((float)ticksPerSecond * (float)60) / (rpm * (float)stepsPerRevolution); return ((float)ticksPerSecond * (float)60) /
(rpm * (float)stepsPerRevolution);
} }
void adjustRPM() { void adjustRPM() {