working remote

This commit is contained in:
interfisch 2019-03-13 00:40:20 +01:00
parent 7731dc598c
commit 39d95147e1
13 changed files with 9432 additions and 0 deletions

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
# For PCBs designed using KiCad: http://www.kicad-pcb.org/
# Format documentation: http://kicad-pcb.org/help/file-formats/
# Temporary files
*.000
*.bak
*.bck
*.kicad_pcb-bak
*~
_autosave-*
*.tmp
*-rescue.lib
*-save.pro
*-save.kicad_pcb
# Netlist files (exported from Eeschema)
*.net
# Autorouter files (exported from Pcbnew)
*.dsn
*.ses
# Exported BOM files
*.xml
*.csv

View File

@ -0,0 +1,478 @@
0
SECTION
2
HEADER
9
$INSUNITS
70
4
9
$ACADVER
1
AC1014
9
$HANDSEED
5
FFFF
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
VPORT
5
8
100
AcDbSymbolTable
0
ENDTAB
0
TABLE
2
LTYPE
5
5
100
AcDbSymbolTable
0
LTYPE
5
14
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYBLOCK
70
0
0
LTYPE
5
15
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYLAYER
70
0
0
ENDTAB
0
TABLE
2
LAYER
5
2
100
AcDbSymbolTable
70
2
0
LAYER
5
50
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
6
CONTINUOUS
0
ENDTAB
0
TABLE
2
STYLE
5
3
100
AcDbSymbolTable
70
1
0
STYLE
5
11
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
2
STANDARD
70
0
0
ENDTAB
0
TABLE
2
VIEW
5
6
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
UCS
5
7
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
APPID
5
9
100
AcDbSymbolTable
70
2
0
APPID
5
12
100
AcDbSymbolTableRecord
100
AcDbRegAppTableRecord
2
ACAD
70
0
0
ENDTAB
0
TABLE
2
DIMSTYLE
5
A
100
AcDbSymbolTable
70
1
0
ENDTAB
0
TABLE
2
BLOCK_RECORD
5
1
100
AcDbSymbolTable
70
1
0
BLOCK_RECORD
5
1F
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*MODEL_SPACE
0
BLOCK_RECORD
5
1B
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*PAPER_SPACE
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
BLOCK
5
20
100
AcDbEntity
100
AcDbBlockBegin
2
*MODEL_SPACE
0
ENDBLK
5
21
100
AcDbEntity
100
AcDbBlockEnd
0
BLOCK
5
1C
100
AcDbEntity
100
AcDbBlockBegin
2
*PAPER_SPACE
0
ENDBLK
5
1D
100
AcDbEntity
100
AcDbBlockEnd
0
ENDSEC
0
SECTION
2
ENTITIES
0
LWPOLYLINE
5
100
100
AcDbEntity
8
0
100
AcDbPolyline
90
12
70
1
43
0.0
10
36
20
-78
10
0
20
-78
10
0
20
0
10
36
20
0
10
36
20
-34
10
33
20
-34
10
33
20
-2.9999999999999982
10
2.9999999999999982
20
-2.9999999999999982
10
2.9999999999999982
20
-75.000000000000014
10
33
20
-75.000000000000014
10
33
20
-48
10
36
20
-48
0
LWPOLYLINE
5
101
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
36
20
0
10
0
20
0
10
0
20
-78
10
36
20
-78
0
CIRCLE
5
102
100
AcDbEntity
8
0
100
AcDbCircle
10
18.999999999999996
20
-10.999999999999998
30
0
40
5
0
LWPOLYLINE
5
103
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
19.999999999999996
20
-42.5
10
4.9999999999999982
20
-42.5
10
4.9999999999999982
20
-49.499999999999993
10
19.999999999999996
20
-49.499999999999993
0
LWPOLYLINE
5
104
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
24.5
20
-51.000000000000007
10
9.4999999999999982
20
-51.000000000000007
10
9.4999999999999964
20
-58
10
24.5
20
-58
0
ENDSEC
0
SECTION
2
OBJECTS
0
DICTIONARY
5
C
100
AcDbDictionary
3
ACAD_GROUP
350
D
3
ACAD_MLINESTYLE
350
17
0
DICTIONARY
5
D
100
AcDbDictionary
0
DICTIONARY
5
1A
330
C
100
AcDbDictionary
0
DICTIONARY
5
17
100
AcDbDictionary
0
ENDSEC
0
EOF

View File

@ -0,0 +1,396 @@
0
SECTION
2
HEADER
9
$INSUNITS
70
4
9
$ACADVER
1
AC1014
9
$HANDSEED
5
FFFF
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
VPORT
5
8
100
AcDbSymbolTable
0
ENDTAB
0
TABLE
2
LTYPE
5
5
100
AcDbSymbolTable
0
LTYPE
5
14
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYBLOCK
70
0
0
LTYPE
5
15
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYLAYER
70
0
0
ENDTAB
0
TABLE
2
LAYER
5
2
100
AcDbSymbolTable
70
2
0
LAYER
5
50
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
6
CONTINUOUS
0
ENDTAB
0
TABLE
2
STYLE
5
3
100
AcDbSymbolTable
70
1
0
STYLE
5
11
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
2
STANDARD
70
0
0
ENDTAB
0
TABLE
2
VIEW
5
6
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
UCS
5
7
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
APPID
5
9
100
AcDbSymbolTable
70
2
0
APPID
5
12
100
AcDbSymbolTableRecord
100
AcDbRegAppTableRecord
2
ACAD
70
0
0
ENDTAB
0
TABLE
2
DIMSTYLE
5
A
100
AcDbSymbolTable
70
1
0
ENDTAB
0
TABLE
2
BLOCK_RECORD
5
1
100
AcDbSymbolTable
70
1
0
BLOCK_RECORD
5
1F
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*MODEL_SPACE
0
BLOCK_RECORD
5
1B
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*PAPER_SPACE
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
BLOCK
5
20
100
AcDbEntity
100
AcDbBlockBegin
2
*MODEL_SPACE
0
ENDBLK
5
21
100
AcDbEntity
100
AcDbBlockEnd
0
BLOCK
5
1C
100
AcDbEntity
100
AcDbBlockBegin
2
*PAPER_SPACE
0
ENDBLK
5
1D
100
AcDbEntity
100
AcDbBlockEnd
0
ENDSEC
0
SECTION
2
ENTITIES
0
LWPOLYLINE
5
100
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
-1.8488927466117464e-31
20
-78
10
0
20
0
10
36
20
0
10
36
20
-78
0
LWPOLYLINE
5
101
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
36
20
0
10
0
20
0
10
0
20
-78
10
36
20
-78
0
LWPOLYLINE
5
102
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
33
20
-3.0000000000000004
10
3.0000000000000004
20
-2.9999999999999982
10
2.9999999999999982
20
-75.000000000000014
10
33
20
-75.000000000000014
0
ENDSEC
0
SECTION
2
OBJECTS
0
DICTIONARY
5
C
100
AcDbDictionary
3
ACAD_GROUP
350
D
3
ACAD_MLINESTYLE
350
17
0
DICTIONARY
5
D
100
AcDbDictionary
0
DICTIONARY
5
1A
330
C
100
AcDbDictionary
0
DICTIONARY
5
17
100
AcDbDictionary
0
ENDSEC
0
EOF

View File

@ -0,0 +1,628 @@
0
SECTION
2
HEADER
9
$INSUNITS
70
4
9
$ACADVER
1
AC1014
9
$HANDSEED
5
FFFF
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
VPORT
5
8
100
AcDbSymbolTable
0
ENDTAB
0
TABLE
2
LTYPE
5
5
100
AcDbSymbolTable
0
LTYPE
5
14
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYBLOCK
70
0
0
LTYPE
5
15
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYLAYER
70
0
0
ENDTAB
0
TABLE
2
LAYER
5
2
100
AcDbSymbolTable
70
2
0
LAYER
5
50
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
6
CONTINUOUS
0
ENDTAB
0
TABLE
2
STYLE
5
3
100
AcDbSymbolTable
70
1
0
STYLE
5
11
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
2
STANDARD
70
0
0
ENDTAB
0
TABLE
2
VIEW
5
6
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
UCS
5
7
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
APPID
5
9
100
AcDbSymbolTable
70
2
0
APPID
5
12
100
AcDbSymbolTableRecord
100
AcDbRegAppTableRecord
2
ACAD
70
0
0
ENDTAB
0
TABLE
2
DIMSTYLE
5
A
100
AcDbSymbolTable
70
1
0
ENDTAB
0
TABLE
2
BLOCK_RECORD
5
1
100
AcDbSymbolTable
70
1
0
BLOCK_RECORD
5
1F
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*MODEL_SPACE
0
BLOCK_RECORD
5
1B
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*PAPER_SPACE
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
BLOCK
5
20
100
AcDbEntity
100
AcDbBlockBegin
2
*MODEL_SPACE
0
ENDBLK
5
21
100
AcDbEntity
100
AcDbBlockEnd
0
BLOCK
5
1C
100
AcDbEntity
100
AcDbBlockBegin
2
*PAPER_SPACE
0
ENDBLK
5
1D
100
AcDbEntity
100
AcDbBlockEnd
0
ENDSEC
0
SECTION
2
ENTITIES
0
LWPOLYLINE
5
100
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
2.9999999999999982
20
-75.000000000000014
10
33
20
-75.000000000000014
10
33
20
-2.9999999999999982
10
2.9999999999999982
20
-2.9999999999999982
0
LWPOLYLINE
5
101
100
AcDbEntity
8
0
100
AcDbPolyline
90
4
70
1
43
0.0
10
36
20
-78
10
0
20
-78
10
0
20
0
10
36
20
0
0
LINE
5
102
100
AcDbEntity
8
0
100
AcDbLine
10
0
20
0
30
0
11
36
21
0
31
0
0
LINE
5
103
100
AcDbEntity
8
0
100
AcDbLine
10
36
20
0
30
0
11
36
21
-34
31
0
0
LINE
5
104
100
AcDbEntity
8
0
100
AcDbLine
10
36
20
-34
30
0
11
33
21
-34
31
0
0
LINE
5
105
100
AcDbEntity
8
0
100
AcDbLine
10
33
20
-34
30
0
11
33
21
-2.9999999999999982
31
0
0
LINE
5
106
100
AcDbEntity
8
0
100
AcDbLine
10
33
20
-2.9999999999999982
30
0
11
2.9999999999999982
21
-2.9999999999999982
31
0
0
LINE
5
107
100
AcDbEntity
8
0
100
AcDbLine
10
2.9999999999999982
20
-2.9999999999999982
30
0
11
2.9999999999999982
21
-75.000000000000014
31
0
0
LINE
5
108
100
AcDbEntity
8
0
100
AcDbLine
10
2.9999999999999982
20
-75.000000000000014
30
0
11
33
21
-75.000000000000014
31
0
0
LINE
5
109
100
AcDbEntity
8
0
100
AcDbLine
10
33
20
-75.000000000000014
30
0
11
33
21
-47
31
0
0
LINE
5
110
100
AcDbEntity
8
0
100
AcDbLine
10
33
20
-47
30
0
11
36
21
-47
31
0
0
LINE
5
111
100
AcDbEntity
8
0
100
AcDbLine
10
36
20
-47
30
0
11
36
21
-78
31
0
0
LINE
5
112
100
AcDbEntity
8
0
100
AcDbLine
10
36
20
-78
30
0
11
0
21
-78
31
0
0
LINE
5
113
100
AcDbEntity
8
0
100
AcDbLine
10
0
20
-78
30
0
11
0
21
0
31
0
0
ENDSEC
0
SECTION
2
OBJECTS
0
DICTIONARY
5
C
100
AcDbDictionary
3
ACAD_GROUP
350
D
3
ACAD_MLINESTYLE
350
17
0
DICTIONARY
5
D
100
AcDbDictionary
0
DICTIONARY
5
1A
330
C
100
AcDbDictionary
0
DICTIONARY
5
17
100
AcDbDictionary
0
ENDSEC
0
EOF

View File

@ -0,0 +1,476 @@
//from left to right. pins at bottom. chips on top
//1 GND (black)
//2 Data
//3 Clock
//4 Reset
//5 +5V (red)
//6 Right BTN
//7 Middle BTN
//8 Left BTN
//Arduino Pro Mini 328P 5V 16MHz
//hold power button pressed during flashing
//pinout: https://martin-prochnow.de/projects/thinkpad_keyboard
//see also https://github.com/feklee/usb-trackpoint/blob/master/code/code.ino
//#define DEBUG
#include "Trackpoint.h"
//Default:
/*Trackpoint trackpoint(8, // CLK
9, // DATA
12); // RESET
*/
/*funktioniert
* Trackpoint trackpoint(2, // CLK (rosa)
3, // DATA (gelb)
4); // RESET (gruen)
*/
Trackpoint trackpoint(3, // CLK (rosa, TP3)
4, // DATA (gelb, TP2)
2); // RESET (gruen, TP4)
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
bool radioOk=false; //true, if sending was successfull. can be false, even if data was send and received
RF24 radio(9,10); //ce, cs
//SCK D13
//Miso D12
//Mosi D11
// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
struct nrfdata {
uint8_t steer; //between 0 and 255, 127 is stop. will be scaled to -1000 to 1000
uint8_t speed; //between 0 and 255, 127 is stop. will be scaled to -1000 to 1000
uint8_t commands; //bit 0 set = motor enable
uint8_t checksum;
};
long last_sendNRF=0;
#define NRFSEND_DELAY 10 //ms
#define PIN_TOUCH 5
long last_touch=0;
#define TOUCH_TIMEOUT 300
//command variables
boolean motorenabled=false;
#define PIN_LED A1
#define PIN_BUTTON 6
#define PIN_POWERON 7
#define TRACKPOINT_MAX 70 //value for maximum stick movement
float speedscale=0.7;
float steerscale=0.3;
int16_t last_xin=0;
int16_t last_yin=0;
int16_t xin_smooth=0;
int16_t yin_smooth=0;
int16_t maxacc=0;
#define SETUP_NONE 0
#define SETUP_WAIT 1 //waiting for input
#define SETUP_DONE 2 //waiting after input (do not move motors)
uint8_t setupmode=SETUP_NONE;
long setupmode_waitstarttime=0; //starttime of SETUP_WAIT mode
#define SETUP_WAIT_TIMEOUT 10000 //maximum time to wait for input before canceling
#define SETUP_DONE_TIME 1000 //time to keep motors disabled after exiting setup
#define SETUP_MOVE_THRESHOLD 275 //500*TRACKPOINT_MAX/127
uint8_t speedmode=1; //0 (slow), 1(medium), 2(fast)
#define SETUP_SPEEDMODE_MAX 2
uint16_t led_ton=0; //never. time in ms for on time
uint16_t led_toff=65535; //always
long led_nextswitch=0;
#define TIME_INACTIVITY_POWEROFF 120000
long time_lastactivity=0;
#define ACTIVITYMOVEMENT 5//Stick movement for activity recognition
int voltage=4000;
#define VOLTAGE_WARN 3400
/*
* 3681=3.725V
*/
void setup() {
//Mouse.begin();
pinMode(PIN_TOUCH, INPUT_PULLUP);
pinMode(PIN_LED, OUTPUT);
pinMode(PIN_BUTTON, INPUT_PULLUP);
pinMode(PIN_POWERON, OUTPUT);
digitalWrite(PIN_LED, LOW);
digitalWrite(PIN_POWERON, HIGH); //keep unit powered on
Serial.begin(115200);
printf_begin();
Serial.println("Booting");
radio.begin();
//Serial.print("CRC Length=");
//Serial.println(radio.getCRCLength());
radio.setRetries(15,15); // optionally, increase the delay between retries & # of retries
radio.setPayloadSize(8); // optionally, reduce the payload size. seems to improve reliability
//radio.openWritingPipe(pipes[0]); //write on pipe 0
//radio.openReadingPipe(1,pipes[1]); //read on pipe 1
radio.openWritingPipe(pipes[1]); //write on pipe 1
radio.openReadingPipe(1,pipes[0]); //read on pipe 0
radio.printDetails();
radio.startListening();
#ifdef DEBUG
Serial.println("Radio initialized");
#endif
trackpoint.reset();
trackpoint.setRemoteMode();
trackpoint.setSensitivityFactor(0xc0); // more sensitive than by default
#ifdef DEBUG
Serial.println("Trackpoint initialized");
#endif
voltage=readVcc();
Serial.print("Voltage=");
Serial.println( voltage, DEC );
}
/*
void sendButtonState(byte state) {
static const char hidStates[] = {MOUSE_LEFT, MOUSE_RIGHT};
for (byte i = 0; i < sizeof(hidStates); i++) {
byte hidState = hidStates[i];
if (state & (1 << i)) {
Mouse.press(hidState);
} else if (Mouse.isPressed(hidState)) {
Mouse.release(hidState);
}
}
}
*/
// Reads TrackPoint data and sends data to computer.
void loop() {
if (millis()-last_sendNRF >= NRFSEND_DELAY)
{
voltage=readVcc(); //read own voltage
last_sendNRF=millis();
trackpoint.readData(); //discard last value. otherwise values are scales way too high
Trackpoint::DataReport d = trackpoint.readData(); //d.x and d.y between 128 to 255=-1000 to 0, and 0 to 127=0 to +1000
#ifdef DEBUG
Serial.print("DataReport: ");
Serial.print(d.x);
Serial.print(", ");
Serial.println(d.y);
#endif
nrfdata senddata;
//senddata.steer=map(constrain((uint8_t)(d.x+127),127-TRACKPOINT_MAX,127+TRACKPOINT_MAX) , 127-TRACKPOINT_MAX,127+TRACKPOINT_MAX, 127+(127*steerscale), 127-(127*steerscale) ); //steer
//senddata.speed=map(constrain((uint8_t)(d.y+127),127-TRACKPOINT_MAX,127+TRACKPOINT_MAX) , 127-TRACKPOINT_MAX,127+TRACKPOINT_MAX, 127-(127*speedscale), 127+(127*speedscale) ); //speed
//map x and y to -1000 to 1000
int16_t xin;
if (d.x>=0 && d.x<=127){ //positive range
xin=map(constrain((int16_t)d.x,0,TRACKPOINT_MAX) , 0,TRACKPOINT_MAX, 0, 1000 );
}else{ //negative range 128(=-1000) to 255(0)
xin=map(constrain((int16_t)d.x,127+TRACKPOINT_MAX,255) , 127+TRACKPOINT_MAX,255, -1000, 0 );
}
int16_t yin;
if (d.y>=0 && d.y<=127){ //positive range
yin=map(constrain((float)d.y,0,TRACKPOINT_MAX) , 0,TRACKPOINT_MAX, 0, 1000 );
}else{ //negative range 128(=-1000) to 255(0)
yin=map(constrain((float)d.y,127+TRACKPOINT_MAX,255) , 127+TRACKPOINT_MAX,255, -1000, 0 );
}
last_xin=xin; //save position values for other stuff than control
last_yin=yin;
if (abs(xin)>ACTIVITYMOVEMENT){
time_lastactivity=millis(); //reset activity timeout
}else if (abs(yin)>ACTIVITYMOVEMENT){
time_lastactivity=millis(); //reset activity timeout
}
/*
float r=sqrt((xin*xin) + (yin*yin));
float phi=atan2(yin,xin); // arc tangent of y/x. 0 is right
Serial.print(xin,0);
Serial.print(", ");
Serial.print(yin,0);
Serial.print(": ");
Serial.print(r,0);
Serial.print(", ");
Serial.println(phi,4);*/
//xin_smooth=smoothfilter*xin_smooth + (1-smoothfilter)*xin;
//yin_smooth=smoothfilter*yin_smooth + (1-smoothfilter)*yin;
if (maxacc>0){
int16_t _xaccel=xin_smooth-xin;
if (_xaccel<-maxacc){ //limit acceleration
_xaccel=-maxacc;
}else if (_xaccel>maxacc){
_xaccel=maxacc;
}
xin_smooth-=_xaccel; //update value
int16_t _yaccel=yin_smooth-yin;
if (_yaccel<-maxacc){ //limit acceleration
_yaccel=-maxacc;
}else if (_yaccel>maxacc){
_yaccel=maxacc;
}
yin_smooth-=_yaccel; //update value
}else{ //no acc limit
xin_smooth=xin; //update immediately
yin_smooth=yin;
}
senddata.steer=map(xin_smooth, -1000,1000, 127+(128*steerscale), 127-(127*steerscale) ); //steer
senddata.speed=map(yin_smooth, -1000,1000, 127-(127*speedscale), 127+(128*speedscale) ); //speed
Serial.print(senddata.steer);
Serial.print(", ");
Serial.println(senddata.speed);
senddata.commands=0;
if (!radioOk || setupmode!=SETUP_NONE){ //if last transmission failed or in setup mode
//senddata.steer=127; //stop
//senddata.speed=127;
senddata.commands|= 0 << 0; //motorenabled send false
xin_smooth=0; //reset smooth value
yin_smooth=0;
}else{
senddata.commands|= motorenabled << 0; //motorenabled is bit 0
}
#ifdef DEBUG
Serial.print(senddata.steer);
Serial.print(", ");
Serial.println(senddata.speed);
#endif
senddata.checksum=(uint8_t)((senddata.steer+3)*(senddata.speed+13));
sendRF(senddata);
#ifdef DEBUG
Serial.println( readVcc(), DEC );
#endif
}
if(!digitalRead(PIN_TOUCH)){ //check touch
last_touch=millis();
}
boolean touching=false;
if(millis()-last_touch <= TOUCH_TIMEOUT){
touching=true;
motorenabled=true;
}else{
touching=false;
motorenabled=false;
}
if (!digitalRead(PIN_BUTTON)){ //Button pressed
setupmode=SETUP_WAIT;
setupmode_waitstarttime=millis();
Serial.println("Entering Setup");
//digitalWrite(PIN_POWERON, LOW); //Power off
}
//inactivity poweroff
if (millis()>time_lastactivity+TIME_INACTIVITY_POWEROFF){
Serial.println("Inactivity Poweroff");
digitalWrite(PIN_POWERON, LOW); //Power off
}
switch(setupmode){
case SETUP_WAIT:
if (millis()>setupmode_waitstarttime+SETUP_WAIT_TIMEOUT){ //waittime over
setupmode=SETUP_NONE; //exit setup
}else if(last_yin > SETUP_MOVE_THRESHOLD){ //y moved up
Serial.print("Moved Up");
if (speedmode<SETUP_SPEEDMODE_MAX){ //if not already at maximum
speedmode+=1;
}
setup_updateSpeedmode();
setupmode=SETUP_DONE; //exit setupmode
setupmode_waitstarttime=millis(); //use this value for done timer
}else if(last_yin < -SETUP_MOVE_THRESHOLD){ //y moved down
Serial.print("Moved Down");
if (speedmode>0){ //if not already at minimum
speedmode-=1;
}
setup_updateSpeedmode();
setupmode=SETUP_DONE; //exit setupmode
setupmode_waitstarttime=millis();//use this value for done timer
}else if(last_xin < -SETUP_MOVE_THRESHOLD){ //y moved left
Serial.print("Moved Left");
maxacc=50;
setupmode=SETUP_DONE; //exit setupmode
setupmode_waitstarttime=millis();//use this value for done timer
}else if(last_xin > SETUP_MOVE_THRESHOLD){ //y moved right
Serial.print("Moved Right");
maxacc=0;
setupmode=SETUP_DONE; //exit setupmode
setupmode_waitstarttime=millis();//use this value for done timer
}
if (!touching){ //remote got put away (not touch)
Serial.println("Poweroff");
digitalWrite(PIN_POWERON, LOW); //Power off
}
break;
case SETUP_DONE:
if (millis()>setupmode_waitstarttime+SETUP_DONE_TIME){
setupmode=SETUP_NONE; //return to control mode, allows enabling motors
}
break;
}
//LED Blink Codes
switch(setupmode){
case SETUP_NONE:
if (radioOk){
if (touching){ //=touching
led_ton=500; //always on
led_toff=0;
}else{
led_ton=1000; //blink slowly regulary
led_toff=1000;
}
}else{
led_ton=0; //off
led_toff=500;
}
if (voltage<=VOLTAGE_WARN){
led_ton=25; //flash on fast
led_toff=75;
}
break;
case SETUP_WAIT:
led_ton=200; //blink fast
led_toff=200;
break;
case SETUP_DONE:
led_ton=20; //blink fast
led_toff=20;
break;
}
if (millis()>=led_nextswitch){ //Set LED State by timings
if (digitalRead(PIN_LED)){ //led was on
if (led_toff>0){
digitalWrite(PIN_LED, LOW); //led off
}
led_nextswitch=millis()+led_toff;
}else{
if (led_ton>0){
digitalWrite(PIN_LED, HIGH); //led on
}
led_nextswitch=millis()+led_ton;
}
}
}
void sendRF(nrfdata senddata){
#ifdef DEBUG
Serial.println("Transmitting...");
#endif
radio.stopListening(); //stop listening to be able to transmit
radioOk = radio.write( &senddata, sizeof(nrfdata) );
if (radioOk){
#ifdef DEBUG
Serial.println("ok");
#endif
}else{
#ifdef DEBUG
Serial.println("failed");
#endif
}
radio.startListening();
}
long readVcc() {
long result; // Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate AVcc in mV
return result;
}
void setup_updateSpeedmode(){
switch(speedmode){
case 0: //slow
speedscale=0.3;
steerscale=0.2;
break;
case 1: //medium
speedscale=0.6;
steerscale=0.4;
break;
case 2: //fast
speedscale=1.0;
steerscale=0.8;
break;
default:
speedscale=0.1;
steerscale=0.1;
break;
}
}

View File

@ -0,0 +1,37 @@
/*
Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
*/
/**
* @file printf.h
*
* Setup necessary to direct stdout to the Arduino Serial library, which
* enables 'printf'
*/
#ifndef __PRINTF_H__
#define __PRINTF_H__
#ifdef ARDUINO
int serial_putc( char c, FILE * )
{
Serial.write( c );
return c;
}
void printf_begin(void)
{
fdevopen( &serial_putc, 0 );
}
#else
#error This example is only for use on Arduino.
#endif // ARDUINO
#endif // __PRINTF_H__

View File

@ -0,0 +1,22 @@
(module trackpoint_module (layer F.Cu) (tedit 5C698326)
(fp_text reference REF** (at 0 0.5) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value trackpoint_module (at 0 -0.5) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -8.925 -24.99) (end -14.28 -19.635) (layer F.SilkS) (width 0.15))
(fp_line (start 14.28 -19.635) (end 8.925 -24.99) (layer F.SilkS) (width 0.15))
(fp_line (start 14.28 3.57) (end 14.28 -19.635) (layer F.SilkS) (width 0.15))
(fp_line (start -14.28 -19.635) (end -14.28 3.57) (layer F.SilkS) (width 0.15))
(fp_line (start 8.925 -24.99) (end -8.925 -24.99) (layer F.SilkS) (width 0.15))
(fp_line (start -14.28 3.57) (end 14.28 3.57) (layer F.SilkS) (width 0.15))
(pad 8 smd roundrect (at 6.2475 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 7 smd roundrect (at 4.4625 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 6 smd roundrect (at 2.6775 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 5 smd roundrect (at 0.8925 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 4 smd roundrect (at -0.8925 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 3 smd roundrect (at -2.6775 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 2 smd roundrect (at -4.4625 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
(pad 1 smd roundrect (at -6.2475 3.57) (size 1 3) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.25))
)

View File

@ -0,0 +1,3 @@
(fp_lib_table
(lib (name library)(type KiCad)(uri /media/fisch/HDD/Projects/hoverbrett/nippleremote_pcb/library)(options "")(descr ""))
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,389 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# Connector_Conn_01x01_Male
#
DEF Connector_Conn_01x01_Male J 0 40 Y N 1 F N
F0 "J" 0 100 50 H V C CNN
F1 "Connector_Conn_01x01_Male" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Connector*:*
$ENDFPLIST
DRAW
S 34 5 0 -5 1 1 6 F
P 2 1 1 6 50 0 34 0 N
X Pin_1 1 200 0 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Connector_Conn_01x05_Female
#
DEF Connector_Conn_01x05_Female J 0 40 Y N 1 F N
F0 "J" 0 300 50 H V C CNN
F1 "Connector_Conn_01x05_Female" 0 -300 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Connector*:*_1x??_*
$ENDFPLIST
DRAW
A 0 -200 20 901 -901 1 1 6 N 0 -180 0 -220
A 0 -100 20 901 -901 1 1 6 N 0 -80 0 -120
A 0 0 20 901 -901 1 1 6 N 0 20 0 -20
A 0 100 20 901 -901 1 1 6 N 0 120 0 80
A 0 200 20 901 -901 1 1 6 N 0 220 0 180
P 2 1 1 6 -50 -200 -20 -200 N
P 2 1 1 6 -50 -100 -20 -100 N
P 2 1 1 6 -50 0 -20 0 N
P 2 1 1 6 -50 100 -20 100 N
P 2 1 1 6 -50 200 -20 200 N
X Pin_1 1 -200 200 150 R 50 50 1 1 P
X Pin_2 2 -200 100 150 R 50 50 1 1 P
X Pin_3 3 -200 0 150 R 50 50 1 1 P
X Pin_4 4 -200 -100 150 R 50 50 1 1 P
X Pin_5 5 -200 -200 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Connector_Conn_01x08_Male
#
DEF Connector_Conn_01x08_Male J 0 40 Y N 1 F N
F0 "J" 0 400 50 H V C CNN
F1 "Connector_Conn_01x08_Male" 0 -500 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Connector*:*_1x??_*
$ENDFPLIST
DRAW
S 34 -395 0 -405 1 1 6 F
S 34 -295 0 -305 1 1 6 F
S 34 -195 0 -205 1 1 6 F
S 34 -95 0 -105 1 1 6 F
S 34 5 0 -5 1 1 6 F
S 34 105 0 95 1 1 6 F
S 34 205 0 195 1 1 6 F
S 34 305 0 295 1 1 6 F
P 2 1 1 6 50 -400 34 -400 N
P 2 1 1 6 50 -300 34 -300 N
P 2 1 1 6 50 -200 34 -200 N
P 2 1 1 6 50 -100 34 -100 N
P 2 1 1 6 50 0 34 0 N
P 2 1 1 6 50 100 34 100 N
P 2 1 1 6 50 200 34 200 N
P 2 1 1 6 50 300 34 300 N
X Pin_1 1 200 300 150 L 50 50 1 1 P
X Pin_2 2 200 200 150 L 50 50 1 1 P
X Pin_3 3 200 100 150 L 50 50 1 1 P
X Pin_4 4 200 0 150 L 50 50 1 1 P
X Pin_5 5 200 -100 150 L 50 50 1 1 P
X Pin_6 6 200 -200 150 L 50 50 1 1 P
X Pin_7 7 200 -300 150 L 50 50 1 1 P
X Pin_8 8 200 -400 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Connector_Generic_Conn_02x04_Odd_Even
#
DEF Connector_Generic_Conn_02x04_Odd_Even J 0 40 Y N 1 F N
F0 "J" 50 200 50 H V C CNN
F1 "Connector_Generic_Conn_02x04_Odd_Even" 50 -300 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Connector*:*_2x??_*
$ENDFPLIST
DRAW
S -50 -195 0 -205 1 1 6 N
S -50 -95 0 -105 1 1 6 N
S -50 5 0 -5 1 1 6 N
S -50 105 0 95 1 1 6 N
S -50 150 150 -250 1 1 10 f
S 150 -195 100 -205 1 1 6 N
S 150 -95 100 -105 1 1 6 N
S 150 5 100 -5 1 1 6 N
S 150 105 100 95 1 1 6 N
X Pin_1 1 -200 100 150 R 50 50 1 1 P
X Pin_2 2 300 100 150 L 50 50 1 1 P
X Pin_3 3 -200 0 150 R 50 50 1 1 P
X Pin_4 4 300 0 150 L 50 50 1 1 P
X Pin_5 5 -200 -100 150 R 50 50 1 1 P
X Pin_6 6 300 -100 150 L 50 50 1 1 P
X Pin_7 7 -200 -200 150 R 50 50 1 1 P
X Pin_8 8 300 -200 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Connector_TestPoint
#
DEF Connector_TestPoint TP 0 30 N N 1 F N
F0 "TP" 0 270 50 H V C CNN
F1 "Connector_TestPoint" 0 200 50 H V C CNN
F2 "" 200 0 50 H I C CNN
F3 "" 200 0 50 H I C CNN
$FPLIST
Pin*
Test*
$ENDFPLIST
DRAW
C 0 130 30 0 1 0 N
X 1 1 0 0 100 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_C
#
DEF Device_C C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "Device_C" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
C_*
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_CP
#
DEF Device_CP C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "Device_CP" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
CP_*
$ENDFPLIST
DRAW
S -90 20 -90 40 0 1 0 N
S -90 20 90 20 0 1 0 N
S 90 -20 -90 -40 0 1 0 F
S 90 40 -90 40 0 1 0 N
S 90 40 90 20 0 1 0 N
P 2 0 1 0 -70 90 -30 90 N
P 2 0 1 0 -50 110 -50 70 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_Crystal_GND2
#
DEF Device_Crystal_GND2 Y 0 40 Y N 1 F N
F0 "Y" 0 225 50 H V C CNN
F1 "Device_Crystal_GND2" 0 150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Crystal*
$ENDFPLIST
DRAW
S -45 100 45 -100 0 1 12 N
P 2 0 1 0 -100 0 -75 0 N
P 2 0 1 20 -75 -50 -75 50 N
P 2 0 1 0 0 -150 0 -140 N
P 2 0 1 0 75 0 100 0 N
P 2 0 1 20 75 50 75 -50 N
P 4 0 1 0 -100 -90 -100 -140 100 -140 100 -90 N
X 1 1 -150 0 50 R 50 50 1 1 P
X 2 2 0 -200 50 U 50 50 1 1 P
X 3 3 150 0 50 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_LED
#
DEF Device_LED D 0 40 N N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "Device_LED" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
LED*
LED_SMD:*
LED_THT:*
$ENDFPLIST
DRAW
P 2 0 1 8 -50 -50 -50 50 N
P 2 0 1 0 -50 0 50 0 N
P 4 0 1 8 50 -50 50 50 -50 0 50 -50 N
P 5 0 1 0 -120 -30 -180 -90 -150 -90 -180 -90 -180 -60 N
P 5 0 1 0 -70 -30 -130 -90 -100 -90 -130 -90 -130 -60 N
X K 1 -150 0 100 R 50 50 1 1 P
X A 2 150 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_Q_NPN_BEC
#
DEF Device_Q_NPN_BEC Q 0 0 Y N 1 F N
F0 "Q" 200 50 50 H V L CNN
F1 "Device_Q_NPN_BEC" 200 -50 50 H V L CNN
F2 "" 200 100 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
C 50 0 111 0 1 10 N
P 2 0 1 0 25 25 100 100 N
P 3 0 1 0 25 -25 100 -100 100 -100 N
P 3 0 1 20 25 75 25 -75 25 -75 N
P 5 0 1 0 50 -70 70 -50 90 -90 50 -70 50 -70 F
X B 1 -200 0 225 R 50 50 1 1 I
X E 2 100 -200 100 U 50 50 1 1 P
X C 3 100 200 100 D 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_Q_PNP_BCE
#
DEF Device_Q_PNP_BCE Q 0 0 Y N 1 F N
F0 "Q" 200 50 50 H V L CNN
F1 "Device_Q_PNP_BCE" 200 -50 50 H V L CNN
F2 "" 200 100 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
C 50 0 111 0 1 10 N
P 2 0 1 0 25 25 100 100 N
P 3 0 1 0 25 -25 100 -100 100 -100 N
P 3 0 1 20 25 75 25 -75 25 -75 N
P 5 0 1 0 90 -70 70 -90 50 -50 90 -70 90 -70 F
X B 1 -200 0 225 R 50 50 1 1 I
X C 2 100 200 100 D 50 50 1 1 P
X E 3 100 -200 100 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_R
#
DEF Device_R R 0 0 N Y 1 F N
F0 "R" 80 0 50 V V C CNN
F1 "Device_R" 0 0 50 V V C CNN
F2 "" -70 0 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
S -40 -100 40 100 0 1 10 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# MCU_Microchip_ATmega_ATmega328P-AU
#
DEF MCU_Microchip_ATmega_ATmega328P-AU U 0 20 Y Y 1 F N
F0 "U" -500 1450 50 H V L BNN
F1 "MCU_Microchip_ATmega_ATmega328P-AU" 100 -1450 50 H V L TNN
F2 "Package_QFP:TQFP-32_7x7mm_P0.8mm" 0 0 50 H I C CIN
F3 "" 0 0 50 H I C CNN
ALIAS ATmega48P-20AU ATmega48A-AU ATmega48PA-AU ATmega88PV-10AU ATmega88P-20AU ATmega88A-AU ATmega88PA-AU ATmega168PV-10AU ATmega168P-20AU ATmega168A-AU ATmega168PA-AU ATmega328-AU ATmega328P-AU
$FPLIST
TQFP*7x7mm*P0.8mm*
$ENDFPLIST
DRAW
S -500 -1400 500 1400 0 1 10 f
X PD3 1 600 -800 100 L 50 50 1 1 T
X PD6 10 600 -1100 100 L 50 50 1 1 T
X PD7 11 600 -1200 100 L 50 50 1 1 T
X PB0 12 600 1200 100 L 50 50 1 1 T
X PB1 13 600 1100 100 L 50 50 1 1 T
X PB2 14 600 1000 100 L 50 50 1 1 T
X PB3 15 600 900 100 L 50 50 1 1 T
X PB4 16 600 800 100 L 50 50 1 1 T
X PB5 17 600 700 100 L 50 50 1 1 T
X AVCC 18 100 1500 100 D 50 50 1 1 W
X ADC6 19 -600 1000 100 R 50 50 1 1 I
X PD4 2 600 -900 100 L 50 50 1 1 T
X AREF 20 -600 1200 100 R 50 50 1 1 P
X GND 21 0 -1500 100 U 50 50 1 1 P N
X ADC7 22 -600 900 100 R 50 50 1 1 I
X PC0 23 600 300 100 L 50 50 1 1 T
X PC1 24 600 200 100 L 50 50 1 1 T
X PC2 25 600 100 100 L 50 50 1 1 T
X PC3 26 600 0 100 L 50 50 1 1 T
X PC4 27 600 -100 100 L 50 50 1 1 T
X PC5 28 600 -200 100 L 50 50 1 1 T
X ~RESET~/PC6 29 600 -300 100 L 50 50 1 1 T
X GND 3 0 -1500 100 U 50 50 1 1 W
X PD0 30 600 -500 100 L 50 50 1 1 T
X PD1 31 600 -600 100 L 50 50 1 1 T
X PD2 32 600 -700 100 L 50 50 1 1 T
X VCC 4 0 1500 100 D 50 50 1 1 W
X GND 5 0 -1500 100 U 50 50 1 1 P N
X VCC 6 0 1500 100 D 50 50 1 1 P N
X XTAL1/PB6 7 600 600 100 L 50 50 1 1 T
X XTAL2/PB7 8 600 500 100 L 50 50 1 1 T
X PD5 9 600 -1000 100 L 50 50 1 1 T
ENDDRAW
ENDDEF
#
# Regulator_Linear_MCP1700-3002E_SOT23
#
DEF Regulator_Linear_MCP1700-3002E_SOT23 U 0 10 Y Y 1 F N
F0 "U" -150 125 50 H V C CNN
F1 "Regulator_Linear_MCP1700-3002E_SOT23" 0 125 50 H V L CNN
F2 "Package_TO_SOT_SMD:SOT-23" 0 225 50 H I C CNN
F3 "" 0 0 50 H I C CNN
ALIAS MCP1700-1202E_SOT23 MCP1700-1802E_SOT23 MCP1700-2502E_SOT23 MCP1700-2802E_SOT23 MCP1700-3302E_SOT23 MCP1700-5002E_SOT23
$FPLIST
SOT?23*
$ENDFPLIST
DRAW
S -200 75 200 -200 0 1 10 f
X GND 1 0 -300 100 U 50 50 1 1 W
X VO 2 300 0 100 L 50 50 1 1 w
X VI 3 -300 0 100 R 50 50 1 1 W
ENDDRAW
ENDDEF
#
# Switch_SW_SPST
#
DEF Switch_SW_SPST SW 0 0 Y N 1 F N
F0 "SW" 0 125 50 H V C CNN
F1 "Switch_SW_SPST" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
C -80 0 20 0 0 0 N
C 80 0 20 0 0 0 N
P 2 0 0 0 -60 10 60 70 N
X A 1 -200 0 100 R 50 50 1 1 P
X B 2 200 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# power_GND
#
DEF power_GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -250 50 H I C CNN
F1 "power_GND" 0 -150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
X GND 1 0 0 0 D 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# power_VCC
#
DEF power_VCC #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -150 50 H I C CNN
F1 "power_VCC" 0 150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
C 0 75 25 0 1 0 N
P 2 0 1 0 0 0 0 50 N
X VCC 1 0 0 0 U 50 50 1 1 W N
ENDDRAW
ENDDEF
#
#End Library

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
update=22/05/2015 07:44:53
version=1
last_client=kicad
[general]
version=1
RootSch=
BoardNm=
[pcbnew]
version=1
LastNetListRead=
UseCmpFile=1
PadDrill=0.600000000000
PadDrillOvalY=0.600000000000
PadSizeH=1.500000000000
PadSizeV=1.500000000000
PcbTextSizeV=1.500000000000
PcbTextSizeH=1.500000000000
PcbTextThickness=0.300000000000
ModuleTextSizeV=1.000000000000
ModuleTextSizeH=1.000000000000
ModuleTextSizeThickness=0.150000000000
SolderMaskClearance=0.000000000000
SolderMaskMinWidth=0.000000000000
DrawSegmentWidth=0.200000000000
BoardOutlineThickness=0.100000000000
ModuleOutlineThickness=0.150000000000
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]

View File

@ -0,0 +1,893 @@
EESchema Schematic File Version 4
LIBS:nippleremote-cache
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L MCU_Microchip_ATmega:ATmega328P-AU U1
U 1 1 5C694862
P 5050 3650
F 0 "U1" H 5050 3750 50 0000 C CNN
F 1 "ATmega328P-AU" H 4950 3650 50 0000 C CNN
F 2 "Package_QFP:TQFP-32_7x7mm_P0.8mm" H 5050 3650 50 0001 C CIN
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega328_P%20AVR%20MCU%20with%20picoPower%20Technology%20Data%20Sheet%2040001984A.pdf" H 5050 3650 50 0001 C CNN
1 5050 3650
1 0 0 -1
$EndComp
$Comp
L Device:Crystal_GND2 Y1
U 1 1 5C694DE4
P 6400 3100
F 0 "Y1" V 6446 3231 50 0000 L CNN
F 1 "Crystal_GND2" V 6355 3231 50 0000 L CNN
F 2 "Crystal:Resonator_SMD_muRata_CSTxExxV-3Pin_3.0x1.1mm" H 6400 3100 50 0001 C CNN
F 3 "~" H 6400 3100 50 0001 C CNN
1 6400 3100
0 -1 -1 0
$EndComp
Wire Wire Line
6400 2950 6200 2950
Wire Wire Line
6200 2950 6200 3050
Wire Wire Line
6200 3050 5650 3050
Wire Wire Line
5650 3150 5750 3150
Wire Wire Line
5750 3150 5750 3250
Wire Wire Line
5750 3250 6400 3250
$Comp
L power:GND #PWR0101
U 1 1 5C694F03
P 6800 3150
F 0 "#PWR0101" H 6800 2900 50 0001 C CNN
F 1 "GND" H 6805 2977 50 0000 C CNN
F 2 "" H 6800 3150 50 0001 C CNN
F 3 "" H 6800 3150 50 0001 C CNN
1 6800 3150
1 0 0 -1
$EndComp
Wire Wire Line
6800 3150 6800 3100
Wire Wire Line
6800 3100 6600 3100
$Comp
L power:VCC #PWR0102
U 1 1 5C69518E
P 4300 2350
F 0 "#PWR0102" H 4300 2200 50 0001 C CNN
F 1 "VCC" H 4317 2523 50 0000 C CNN
F 2 "" H 4300 2350 50 0001 C CNN
F 3 "" H 4300 2350 50 0001 C CNN
1 4300 2350
1 0 0 -1
$EndComp
Wire Wire Line
4450 2450 4300 2450
Wire Wire Line
4300 2450 4300 2350
$Comp
L power:VCC #PWR0103
U 1 1 5C69527A
P 5050 1950
F 0 "#PWR0103" H 5050 1800 50 0001 C CNN
F 1 "VCC" H 5067 2123 50 0000 C CNN
F 2 "" H 5050 1950 50 0001 C CNN
F 3 "" H 5050 1950 50 0001 C CNN
1 5050 1950
1 0 0 -1
$EndComp
Wire Wire Line
5050 1950 5050 2050
Wire Wire Line
5150 2150 5150 2050
Wire Wire Line
5150 2050 5050 2050
Connection ~ 5050 2050
Wire Wire Line
5050 2050 5050 2150
$Comp
L power:GND #PWR0104
U 1 1 5C6953E4
P 5050 5500
F 0 "#PWR0104" H 5050 5250 50 0001 C CNN
F 1 "GND" H 5055 5327 50 0000 C CNN
F 2 "" H 5050 5500 50 0001 C CNN
F 3 "" H 5050 5500 50 0001 C CNN
1 5050 5500
1 0 0 -1
$EndComp
Wire Wire Line
5050 5150 5050 5500
Text GLabel 6000 4250 2 50 Input ~ 0
tx
Text GLabel 6000 4150 2 50 Input ~ 0
rx
Wire Wire Line
6000 4150 5650 4150
Wire Wire Line
5650 4250 6000 4250
$Comp
L Device:R R2
U 1 1 5C6958FC
P 5950 3450
F 0 "R2" V 5743 3450 50 0000 C CNN
F 1 "R" V 5834 3450 50 0000 C CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 5880 3450 50 0001 C CNN
F 3 "~" H 5950 3450 50 0001 C CNN
1 5950 3450
0 1 1 0
$EndComp
$Comp
L Device:LED D1
U 1 1 5C695B66
P 6300 3450
F 0 "D1" H 6292 3195 50 0000 C CNN
F 1 "LED" H 6292 3286 50 0000 C CNN
F 2 "LED_SMD:LED_0603_1608Metric" H 6300 3450 50 0001 C CNN
F 3 "~" H 6300 3450 50 0001 C CNN
1 6300 3450
-1 0 0 1
$EndComp
Wire Wire Line
6150 3450 6100 3450
$Comp
L power:GND #PWR0105
U 1 1 5C695DA8
P 6550 3450
F 0 "#PWR0105" H 6550 3200 50 0001 C CNN
F 1 "GND" H 6555 3277 50 0000 C CNN
F 2 "" H 6550 3450 50 0001 C CNN
F 3 "" H 6550 3450 50 0001 C CNN
1 6550 3450
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0106
U 1 1 5C6965C3
P 8200 2150
F 0 "#PWR0106" H 8200 1900 50 0001 C CNN
F 1 "GND" H 8205 1977 50 0000 C CNN
F 2 "" H 8200 2150 50 0001 C CNN
F 3 "" H 8200 2150 50 0001 C CNN
1 8200 2150
1 0 0 -1
$EndComp
Wire Wire Line
8200 2150 8850 2150
Text GLabel 8650 2250 0 50 Input ~ 0
nrf_ce
Wire Wire Line
8850 2250 8650 2250
Text GLabel 8650 2350 0 50 Input ~ 0
nrf_sck
Wire Wire Line
8650 2350 8850 2350
Text GLabel 8650 2450 0 50 Input ~ 0
nrf_mi
Wire Wire Line
8650 2450 8850 2450
Text GLabel 9550 2450 2 50 Input ~ 0
nrf_ro
Text GLabel 9550 2350 2 50 Input ~ 0
nrf_mo
Text GLabel 9550 2250 2 50 Input ~ 0
nrf_csn
Wire Wire Line
9550 2250 9350 2250
Wire Wire Line
9550 2350 9350 2350
Wire Wire Line
9350 2450 9550 2450
$Comp
L power:VCC #PWR0107
U 1 1 5C697A08
P 8550 1100
F 0 "#PWR0107" H 8550 950 50 0001 C CNN
F 1 "VCC" H 8567 1273 50 0000 C CNN
F 2 "" H 8550 1100 50 0001 C CNN
F 3 "" H 8550 1100 50 0001 C CNN
1 8550 1100
1 0 0 -1
$EndComp
Text GLabel 5850 2550 2 50 Input ~ 0
nrf_ce
Text GLabel 5850 2950 2 50 Input ~ 0
nrf_sck
Wire Wire Line
5850 2950 5650 2950
Text GLabel 5850 2750 2 50 Input ~ 0
nrf_mo
Wire Wire Line
5850 2750 5650 2750
Text GLabel 5850 2850 2 50 Input ~ 0
nrf_mi
Wire Wire Line
5850 2850 5650 2850
Text GLabel 5850 2650 2 50 Input ~ 0
nrf_csn
Wire Wire Line
6550 3450 6450 3450
$Comp
L Device:R R1
U 1 1 5C69CAF9
P 6300 3950
F 0 "R1" V 6093 3950 50 0000 C CNN
F 1 "10k" V 6184 3950 50 0000 C CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 6230 3950 50 0001 C CNN
F 3 "~" H 6300 3950 50 0001 C CNN
1 6300 3950
0 1 1 0
$EndComp
$Comp
L power:VCC #PWR0108
U 1 1 5C69CB69
P 6500 3900
F 0 "#PWR0108" H 6500 3750 50 0001 C CNN
F 1 "VCC" H 6517 4073 50 0000 C CNN
F 2 "" H 6500 3900 50 0001 C CNN
F 3 "" H 6500 3900 50 0001 C CNN
1 6500 3900
1 0 0 -1
$EndComp
Wire Wire Line
6500 3900 6500 3950
Wire Wire Line
6500 3950 6450 3950
Wire Wire Line
6150 3950 5750 3950
$Comp
L Connector:Conn_01x08_Male J2
U 1 1 5C69DCE8
P 9800 3600
F 0 "J2" V 9728 3527 50 0000 C CNN
F 1 "trackpoint" V 9637 3527 50 0000 C CNN
F 2 "library:trackpoint_module" H 9800 3600 50 0001 C CNN
F 3 "~" H 9800 3600 50 0001 C CNN
1 9800 3600
0 -1 -1 0
$EndComp
$Comp
L power:GND #PWR0109
U 1 1 5C69E592
P 9300 3300
F 0 "#PWR0109" H 9300 3050 50 0001 C CNN
F 1 "GND" H 9305 3127 50 0000 C CNN
F 2 "" H 9300 3300 50 0001 C CNN
F 3 "" H 9300 3300 50 0001 C CNN
1 9300 3300
1 0 0 -1
$EndComp
Wire Wire Line
9300 3300 9500 3300
Wire Wire Line
9500 3300 9500 3400
$Comp
L power:VCC #PWR0110
U 1 1 5C69ED8C
P 9900 3200
F 0 "#PWR0110" H 9900 3050 50 0001 C CNN
F 1 "VCC" H 9917 3373 50 0000 C CNN
F 2 "" H 9900 3200 50 0001 C CNN
F 3 "" H 9900 3200 50 0001 C CNN
1 9900 3200
1 0 0 -1
$EndComp
Wire Wire Line
9900 3200 9900 3400
Text GLabel 9600 3150 1 50 Input ~ 0
tp_2
Text GLabel 9700 3150 1 50 Input ~ 0
tp_3
Text GLabel 9800 3150 1 50 Input ~ 0
tp_4
Wire Wire Line
9800 3150 9800 3400
Wire Wire Line
9700 3400 9700 3150
Wire Wire Line
9600 3150 9600 3400
Text GLabel 6000 4550 2 50 Input ~ 0
tp_2
Text GLabel 6000 4450 2 50 Input ~ 0
tp_3
Text GLabel 6000 4350 2 50 Input ~ 0
tp_4
$Comp
L Connector:Conn_01x05_Female J3
U 1 1 5C6A30F7
P 8450 4600
F 0 "J3" H 8478 4626 50 0000 L CNN
F 1 "serial_conn" H 8478 4535 50 0000 L CNN
F 2 "Connector_PinSocket_2.54mm:PinSocket_1x05_P2.54mm_Horizontal" H 8450 4600 50 0001 C CNN
F 3 "~" H 8450 4600 50 0001 C CNN
1 8450 4600
1 0 0 -1
$EndComp
$Comp
L power:VCC #PWR0111
U 1 1 5C6A31B6
P 7900 4600
F 0 "#PWR0111" H 7900 4450 50 0001 C CNN
F 1 "VCC" V 7918 4727 50 0000 L CNN
F 2 "" H 7900 4600 50 0001 C CNN
F 3 "" H 7900 4600 50 0001 C CNN
1 7900 4600
0 -1 -1 0
$EndComp
$Comp
L power:GND #PWR0112
U 1 1 5C6A3200
P 7500 4400
F 0 "#PWR0112" H 7500 4150 50 0001 C CNN
F 1 "GND" H 7505 4227 50 0000 C CNN
F 2 "" H 7500 4400 50 0001 C CNN
F 3 "" H 7500 4400 50 0001 C CNN
1 7500 4400
1 0 0 -1
$EndComp
Wire Wire Line
7500 4400 8250 4400
Wire Wire Line
8250 4600 7900 4600
Text GLabel 7100 4050 2 50 Input ~ 0
reset
Connection ~ 5750 3950
Wire Wire Line
5750 3950 5650 3950
Text GLabel 8050 4500 0 50 Input ~ 0
reset
Wire Wire Line
8050 4500 8250 4500
Text GLabel 7900 4700 0 50 Input ~ 0
rx
Text GLabel 7900 4800 0 50 Input ~ 0
tx
Wire Wire Line
8250 4800 7900 4800
Wire Wire Line
7900 4700 8250 4700
$Comp
L Device:CP C1
U 1 1 5C699371
P 3850 2200
F 0 "C1" H 3968 2246 50 0000 L CNN
F 1 "CP" H 3968 2155 50 0000 L CNN
F 2 "Capacitor_Tantalum_SMD:CP_EIA-3216-10_Kemet-I" H 3888 2050 50 0001 C CNN
F 3 "~" H 3850 2200 50 0001 C CNN
1 3850 2200
1 0 0 -1
$EndComp
$Comp
L power:VCC #PWR0113
U 1 1 5C699537
P 3850 2050
F 0 "#PWR0113" H 3850 1900 50 0001 C CNN
F 1 "VCC" H 3867 2223 50 0000 C CNN
F 2 "" H 3850 2050 50 0001 C CNN
F 3 "" H 3850 2050 50 0001 C CNN
1 3850 2050
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0114
U 1 1 5C699556
P 3850 2350
F 0 "#PWR0114" H 3850 2100 50 0001 C CNN
F 1 "GND" H 3855 2177 50 0000 C CNN
F 2 "" H 3850 2350 50 0001 C CNN
F 3 "" H 3850 2350 50 0001 C CNN
1 3850 2350
1 0 0 -1
$EndComp
$Comp
L power:VCC #PWR0115
U 1 1 5C69993F
P 9700 900
F 0 "#PWR0115" H 9700 750 50 0001 C CNN
F 1 "VCC" H 9717 1073 50 0000 C CNN
F 2 "" H 9700 900 50 0001 C CNN
F 3 "" H 9700 900 50 0001 C CNN
1 9700 900
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0116
U 1 1 5C699960
P 9700 1200
F 0 "#PWR0116" H 9700 950 50 0001 C CNN
F 1 "GND" H 9705 1027 50 0000 C CNN
F 2 "" H 9700 1200 50 0001 C CNN
F 3 "" H 9700 1200 50 0001 C CNN
1 9700 1200
1 0 0 -1
$EndComp
Wire Wire Line
10050 1200 9700 1200
Connection ~ 9700 1200
Wire Wire Line
9700 1200 9350 1200
Wire Wire Line
9350 900 9700 900
Connection ~ 9700 900
Wire Wire Line
9700 900 10050 900
$Comp
L Device:C C3
U 1 1 5C69EA98
P 9700 1050
F 0 "C3" H 9815 1096 50 0000 L CNN
F 1 "C" H 9815 1005 50 0000 L CNN
F 2 "Capacitor_SMD:C_0805_2012Metric" H 9738 900 50 0001 C CNN
F 3 "~" H 9700 1050 50 0001 C CNN
1 9700 1050
1 0 0 -1
$EndComp
$Comp
L Device:C C4
U 1 1 5C69EAFE
P 10050 1050
F 0 "C4" H 10165 1096 50 0000 L CNN
F 1 "C" H 10165 1005 50 0000 L CNN
F 2 "Capacitor_SMD:C_0805_2012Metric" H 10088 900 50 0001 C CNN
F 3 "~" H 10050 1050 50 0001 C CNN
1 10050 1050
1 0 0 -1
$EndComp
$Comp
L Device:C C2
U 1 1 5C69EB34
P 9350 1050
F 0 "C2" H 9465 1096 50 0000 L CNN
F 1 "C" H 9465 1005 50 0000 L CNN
F 2 "Capacitor_SMD:C_0805_2012Metric" H 9388 900 50 0001 C CNN
F 3 "~" H 9350 1050 50 0001 C CNN
1 9350 1050
1 0 0 -1
$EndComp
$Comp
L Connector:Conn_01x01_Male J5
U 1 1 5C69EF87
P 2600 3500
F 0 "J5" H 2706 3678 50 0000 C CNN
F 1 "Bat GND" H 2706 3587 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical" H 2600 3500 50 0001 C CNN
F 3 "~" H 2600 3500 50 0001 C CNN
1 2600 3500
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0117
U 1 1 5C69F12C
P 2900 3550
F 0 "#PWR0117" H 2900 3300 50 0001 C CNN
F 1 "GND" H 2905 3377 50 0000 C CNN
F 2 "" H 2900 3550 50 0001 C CNN
F 3 "" H 2900 3550 50 0001 C CNN
1 2900 3550
1 0 0 -1
$EndComp
Wire Wire Line
2900 3550 2900 3500
Wire Wire Line
2900 3500 2800 3500
$Comp
L Device:Q_PNP_BCE Q2
U 1 1 5C6A4201
P 3450 5100
F 0 "Q2" H 3641 5054 50 0000 L CNN
F 1 "Q_PNP_BCE" H 3641 5145 50 0000 L CNN
F 2 "Package_TO_SOT_SMD:SOT-89-3_Handsoldering" H 3650 5200 50 0001 C CNN
F 3 "~" H 3450 5100 50 0001 C CNN
1 3450 5100
1 0 0 1
$EndComp
$Comp
L Device:R R6
U 1 1 5C6A42F6
P 2950 5250
F 0 "R6" H 3020 5296 50 0000 L CNN
F 1 "100" H 3020 5205 50 0000 L CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 2880 5250 50 0001 C CNN
F 3 "~" H 2950 5250 50 0001 C CNN
1 2950 5250
1 0 0 -1
$EndComp
$Comp
L Device:R R5
U 1 1 5C6A4362
P 2700 5100
F 0 "R5" H 2770 5146 50 0000 L CNN
F 1 "10k" H 2770 5055 50 0000 L CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 2630 5100 50 0001 C CNN
F 3 "~" H 2700 5100 50 0001 C CNN
1 2700 5100
1 0 0 -1
$EndComp
Wire Wire Line
2950 5600 2950 5500
Wire Wire Line
2950 5500 2700 5500
Wire Wire Line
2700 5500 2700 5250
Wire Wire Line
2950 5400 2950 5500
Connection ~ 2950 5500
Wire Wire Line
3250 5100 2950 5100
$Comp
L power:GND #PWR0119
U 1 1 5C6A88CC
P 2950 6100
F 0 "#PWR0119" H 2950 5850 50 0001 C CNN
F 1 "GND" H 2955 5927 50 0000 C CNN
F 2 "" H 2950 6100 50 0001 C CNN
F 3 "" H 2950 6100 50 0001 C CNN
1 2950 6100
1 0 0 -1
$EndComp
Wire Wire Line
2950 6100 2950 6000
$Comp
L Device:R R4
U 1 1 5C6AA155
P 2500 6000
F 0 "R4" H 2570 6046 50 0000 L CNN
F 1 "10k" H 2570 5955 50 0000 L CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 2430 6000 50 0001 C CNN
F 3 "~" H 2500 6000 50 0001 C CNN
1 2500 6000
1 0 0 -1
$EndComp
$Comp
L Device:R R3
U 1 1 5C6AA235
P 2250 5800
F 0 "R3" V 2043 5800 50 0000 C CNN
F 1 "1k" V 2134 5800 50 0000 C CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 2180 5800 50 0001 C CNN
F 3 "~" H 2250 5800 50 0001 C CNN
1 2250 5800
0 1 1 0
$EndComp
Wire Wire Line
2650 5800 2500 5800
Wire Wire Line
2500 5850 2500 5800
Connection ~ 2500 5800
Wire Wire Line
2500 5800 2400 5800
$Comp
L power:GND #PWR0120
U 1 1 5C6AD652
P 2500 6150
F 0 "#PWR0120" H 2500 5900 50 0001 C CNN
F 1 "GND" H 2505 5977 50 0000 C CNN
F 2 "" H 2500 6150 50 0001 C CNN
F 3 "" H 2500 6150 50 0001 C CNN
1 2500 6150
1 0 0 -1
$EndComp
Wire Wire Line
2700 4900 2700 4950
$Comp
L Connector:Conn_01x01_Male J4
U 1 1 5C6AF357
P 2300 4900
F 0 "J4" H 2406 5078 50 0000 C CNN
F 1 "Bat+" H 2406 4987 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical" H 2300 4900 50 0001 C CNN
F 3 "~" H 2300 4900 50 0001 C CNN
1 2300 4900
1 0 0 -1
$EndComp
Wire Wire Line
2700 4900 2500 4900
Connection ~ 2700 4900
$Comp
L Switch:SW_SPST SW2
U 1 1 5C6B11D6
P 3450 5600
F 0 "SW2" H 3450 5835 50 0000 C CNN
F 1 "SW_SPST" H 3450 5744 50 0000 C CNN
F 2 "Button_Switch_SMD:SW_SPST_B3SL-1022P" H 3450 5600 50 0001 C CNN
F 3 "" H 3450 5600 50 0001 C CNN
1 3450 5600
1 0 0 -1
$EndComp
$Comp
L power:VCC #PWR0121
U 1 1 5C6B538E
P 4200 5350
F 0 "#PWR0121" H 4200 5200 50 0001 C CNN
F 1 "VCC" H 4217 5523 50 0000 C CNN
F 2 "" H 4200 5350 50 0001 C CNN
F 3 "" H 4200 5350 50 0001 C CNN
1 4200 5350
1 0 0 -1
$EndComp
Wire Wire Line
4200 5350 4100 5350
Wire Wire Line
3550 5350 3550 5300
Text GLabel 1900 5800 0 50 Input ~ 0
power_on
Wire Wire Line
2100 5800 1900 5800
$Comp
L power:GND #PWR0122
U 1 1 5C6B31F3
P 3750 5800
F 0 "#PWR0122" H 3750 5550 50 0001 C CNN
F 1 "GND" H 3755 5627 50 0000 C CNN
F 2 "" H 3750 5800 50 0001 C CNN
F 3 "" H 3750 5800 50 0001 C CNN
1 3750 5800
1 0 0 -1
$EndComp
Wire Wire Line
3250 5600 3250 5500
Wire Wire Line
3250 5500 2950 5500
Wire Wire Line
3650 5600 3750 5600
Wire Wire Line
3750 5600 3750 5800
Wire Wire Line
2700 4900 3550 4900
$Comp
L Switch:SW_SPST SW3
U 1 1 5C6C7DF8
P 6850 4850
F 0 "SW3" H 6850 5085 50 0000 C CNN
F 1 "SW_SPST" H 6850 4994 50 0000 C CNN
F 2 "Button_Switch_SMD:SW_SPST_B3SL-1022P" H 6850 4850 50 0001 C CNN
F 3 "" H 6850 4850 50 0001 C CNN
1 6850 4850
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0123
U 1 1 5C6CA9D1
P 7100 4900
F 0 "#PWR0123" H 7100 4650 50 0001 C CNN
F 1 "GND" H 7105 4727 50 0000 C CNN
F 2 "" H 7100 4900 50 0001 C CNN
F 3 "" H 7100 4900 50 0001 C CNN
1 7100 4900
1 0 0 -1
$EndComp
Wire Wire Line
7100 4900 7100 4850
Wire Wire Line
7100 4850 7050 4850
$Comp
L Device:R R7
U 1 1 5C6C63F7
P 4100 5500
F 0 "R7" H 4170 5546 50 0000 L CNN
F 1 "220" H 4170 5455 50 0000 L CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 4030 5500 50 0001 C CNN
F 3 "~" H 4100 5500 50 0001 C CNN
1 4100 5500
1 0 0 -1
$EndComp
Connection ~ 4100 5350
Wire Wire Line
4100 5350 3550 5350
$Comp
L Device:LED D3
U 1 1 5C6C64DB
P 4100 5800
F 0 "D3" H 4092 5545 50 0000 C CNN
F 1 "LED" H 4092 5636 50 0000 C CNN
F 2 "LED_SMD:LED_0603_1608Metric" H 4100 5800 50 0001 C CNN
F 3 "~" H 4100 5800 50 0001 C CNN
1 4100 5800
0 -1 -1 0
$EndComp
$Comp
L power:GND #PWR0118
U 1 1 5C6C65ED
P 4100 5950
F 0 "#PWR0118" H 4100 5700 50 0001 C CNN
F 1 "GND" H 4105 5777 50 0000 C CNN
F 2 "" H 4100 5950 50 0001 C CNN
F 3 "" H 4100 5950 50 0001 C CNN
1 4100 5950
1 0 0 -1
$EndComp
$Comp
L Device:Q_NPN_BEC Q1
U 1 1 5C6C7023
P 2850 5800
F 0 "Q1" H 3041 5846 50 0000 L CNN
F 1 "Q_NPN_BEC" H 3041 5755 50 0000 L CNN
F 2 "Package_TO_SOT_SMD:SOT-23" H 3050 5900 50 0001 C CNN
F 3 "~" H 2850 5800 50 0001 C CNN
1 2850 5800
1 0 0 -1
$EndComp
$Comp
L Device:Q_NPN_BEC Q4
U 1 1 5C6C73B8
P 7800 6000
F 0 "Q4" H 7991 6046 50 0000 L CNN
F 1 "Q_NPN_BEC" H 7991 5955 50 0000 L CNN
F 2 "Package_TO_SOT_SMD:SOT-23" H 8000 6100 50 0001 C CNN
F 3 "~" H 7800 6000 50 0001 C CNN
1 7800 6000
1 0 0 -1
$EndComp
$Comp
L Device:Q_NPN_BEC Q3
U 1 1 5C6C783E
P 7350 5750
F 0 "Q3" H 7541 5796 50 0000 L CNN
F 1 "Q_NPN_BEC" H 7541 5705 50 0000 L CNN
F 2 "Package_TO_SOT_SMD:SOT-23" H 7550 5850 50 0001 C CNN
F 3 "~" H 7350 5750 50 0001 C CNN
1 7350 5750
1 0 0 -1
$EndComp
$Comp
L Device:R R8
U 1 1 5C6C78B7
P 7450 5400
F 0 "R8" H 7520 5446 50 0000 L CNN
F 1 "220" H 7520 5355 50 0000 L CNN
F 2 "Resistor_SMD:R_0603_1608Metric" V 7380 5400 50 0001 C CNN
F 3 "~" H 7450 5400 50 0001 C CNN
1 7450 5400
1 0 0 -1
$EndComp
Text GLabel 7950 5500 2 50 Input ~ 0
output_touch_sensor
Wire Wire Line
7900 5800 7900 5500
Wire Wire Line
7900 5500 7950 5500
$Comp
L power:VCC #PWR0124
U 1 1 5C6CC55D
P 7350 5200
F 0 "#PWR0124" H 7350 5050 50 0001 C CNN
F 1 "VCC" V 7368 5327 50 0000 L CNN
F 2 "" H 7350 5200 50 0001 C CNN
F 3 "" H 7350 5200 50 0001 C CNN
1 7350 5200
0 -1 -1 0
$EndComp
Wire Wire Line
7350 5200 7450 5200
Wire Wire Line
7450 5200 7450 5250
Wire Wire Line
7450 5950 7450 6000
Wire Wire Line
7450 6000 7600 6000
$Comp
L power:GND #PWR0125
U 1 1 5C6D152B
P 7900 6200
F 0 "#PWR0125" H 7900 5950 50 0001 C CNN
F 1 "GND" H 7905 6027 50 0000 C CNN
F 2 "" H 7900 6200 50 0001 C CNN
F 3 "" H 7900 6200 50 0001 C CNN
1 7900 6200
1 0 0 -1
$EndComp
Text Notes 8000 5700 0 50 ~ 0
with pullup to vcc\ninternal pullup of atmega
$Comp
L Connector:TestPoint TP1
U 1 1 5C6D1AB3
P 6950 5750
F 0 "TP1" V 7145 5824 50 0000 C CNN
F 1 "TestPoint" V 7054 5824 50 0000 C CNN
F 2 "TestPoint:TestPoint_Pad_1.0x1.0mm" H 7150 5750 50 0001 C CNN
F 3 "~" H 7150 5750 50 0001 C CNN
1 6950 5750
0 -1 -1 0
$EndComp
Wire Wire Line
7150 5750 6950 5750
Text GLabel 5850 4850 2 50 Input ~ 0
power_on
Text GLabel 5850 4650 2 50 Input ~ 0
output_touch_sensor
Wire Wire Line
6000 4350 5650 4350
Wire Wire Line
5650 4450 6000 4450
Wire Wire Line
6000 4550 5650 4550
Text Notes 6250 4400 0 50 ~ 0
Todo:\ntesten ob geanderte pinbelegung geht
Wire Wire Line
5850 4650 5650 4650
Wire Wire Line
5800 3450 5650 3450
Wire Wire Line
5650 4850 5850 4850
Wire Wire Line
5650 4750 6450 4750
Wire Wire Line
6450 4750 6450 4850
Wire Wire Line
6450 4850 6650 4850
$Comp
L Connector_Generic:Conn_02x04_Odd_Even J1
U 1 1 5C6CA917
P 9050 2250
F 0 "J1" H 9100 2567 50 0000 C CNN
F 1 "2x4 NRF24" H 9200 2450 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_Vertical" H 9050 2250 50 0001 C CNN
F 3 "~" H 9050 2250 50 0001 C CNN
1 9050 2250
1 0 0 -1
$EndComp
Wire Wire Line
5650 2550 5850 2550
Wire Wire Line
5850 2650 5650 2650
$Comp
L Regulator_Linear:MCP1700-3002E_SOT23 U2
U 1 1 5C75A1A4
P 8850 1550
F 0 "U2" H 8850 1792 50 0000 C CNN
F 1 "MCP1700-3002E_SOT23" H 8850 1701 50 0000 C CNN
F 2 "Package_TO_SOT_SMD:SOT-23" H 8850 1775 50 0001 C CNN
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/20001826C.pdf" H 8850 1550 50 0001 C CNN
1 8850 1550
1 0 0 -1
$EndComp
Wire Wire Line
9150 1550 9500 1550
Wire Wire Line
9500 1550 9500 2150
Wire Wire Line
9350 2150 9500 2150
Wire Wire Line
8550 1550 8550 1100
$Comp
L power:GND #PWR0126
U 1 1 5C762D73
P 8850 1850
F 0 "#PWR0126" H 8850 1600 50 0001 C CNN
F 1 "GND" H 8855 1677 50 0000 C CNN
F 2 "" H 8850 1850 50 0001 C CNN
F 3 "" H 8850 1850 50 0001 C CNN
1 8850 1850
1 0 0 -1
$EndComp
$Comp
L Device:C C5
U 1 1 5C787470
P 6850 4050
F 0 "C5" H 6965 4096 50 0000 L CNN
F 1 "100nF" H 6965 4005 50 0000 L CNN
F 2 "Capacitor_SMD:C_0603_1608Metric" H 6888 3900 50 0001 C CNN
F 3 "~" H 6850 4050 50 0001 C CNN
1 6850 4050
0 1 1 0
$EndComp
Wire Wire Line
6700 4050 5750 4050
Wire Wire Line
5750 3950 5750 4050
Wire Wire Line
7000 4050 7100 4050
$EndSCHEMATC