Browse Source

ok

master
Your Name 4 years ago
commit
4564c20a40
388 changed files with 375894 additions and 0 deletions
  1. +46
    -0
      README.md
  2. +796
    -0
      ZMHW_Map.ino
  3. +0
    -0
      arduino/lcd_test/lcd_test.ino
  4. +4
    -0
      bom/bom1.csv
  5. BIN
      bom/bom1.ods
  6. BIN
      cad/hanger/hanger_mesh.stl
  7. BIN
      cad/hanger/hanger_mesh_rev2.stl
  8. BIN
      cad/hanger/mesh.fcstd
  9. BIN
      cad/hanger/mesh.fcstd1
  10. BIN
      cad/hanger/meshrev2.fcstd
  11. BIN
      cad/hanger/meshrev2.fcstd1
  12. BIN
      cad/hanger/start1.fcstd
  13. BIN
      cad/hanger/start2.fcstd
  14. BIN
      cad/hanger/start3.fcstd
  15. BIN
      cad/spacers/mesh.fcstd
  16. BIN
      cad/spacers/mesh.fcstd1
  17. BIN
      cad/spacers/spacer_mesh.stl
  18. BIN
      cad/spacers/start.fcstd
  19. BIN
      cad/spacers/start1.fcstd
  20. BIN
      cad/spacers/start2.fcstd
  21. +52899
    -0
      datasheets/ILI9486L.pdf
  22. +78
    -0
      docs/10.tex~
  23. +88
    -0
      docs/11.tex~
  24. +195
    -0
      docs/14.tex~
  25. +19
    -0
      docs/15.aux
  26. +346
    -0
      docs/15.log
  27. BIN
      docs/15.pdf
  28. +208
    -0
      docs/15.tex
  29. +204
    -0
      docs/15.tex~
  30. +12
    -0
      docs/15.toc
  31. +78
    -0
      docs/9.tex~
  32. +8
    -0
      enclosure/README
  33. BIN
      enclosure/rev1_freecad/creatingmesh.fcstd
  34. BIN
      enclosure/rev1_freecad/creatingmesh.fcstd1
  35. BIN
      enclosure/rev1_freecad/mesh/mesh_rev1.stl
  36. BIN
      enclosure/rev1_freecad/mesh/revb_withtext.stl
  37. BIN
      enclosure/rev1_freecad/revb_withtext.fcstd
  38. BIN
      enclosure/rev1_freecad/revb_withtext2.fcstd
  39. BIN
      enclosure/rev1_freecad/start.fcstd
  40. BIN
      enclosure/rev1_freecad/start.fcstd1
  41. BIN
      enclosure/rev1_freecad/start1.fcstd
  42. BIN
      enclosure/rev1_freecad/start1.fcstd1
  43. BIN
      enclosure/rev1_freecad/start2.fcstd
  44. BIN
      enclosure/rev1_freecad/start2.fcstd1
  45. BIN
      enclosure/rev1_freecad/start3.fcstd
  46. BIN
      enclosure/rev1_freecad/start3.fcstd1
  47. BIN
      enclosure/rev1_freecad/start4.fcstd
  48. BIN
      enclosure/rev2_freecad/mesh/mesh.fcstd
  49. BIN
      enclosure/rev2_freecad/mesh/zmhwmap_rev2.stl
  50. BIN
      enclosure/rev2_freecad/start1.fcstd
  51. BIN
      enclosure/rev2_freecad/start10.fcstd
  52. BIN
      enclosure/rev2_freecad/start2.fcstd
  53. BIN
      enclosure/rev2_freecad/start2.fcstd1
  54. BIN
      enclosure/rev2_freecad/start3.fcstd
  55. BIN
      enclosure/rev2_freecad/start3.fcstd1
  56. BIN
      enclosure/rev2_freecad/start4.fcstd
  57. BIN
      enclosure/rev2_freecad/start5.fcstd
  58. BIN
      enclosure/rev2_freecad/start6.fcstd
  59. BIN
      enclosure/rev2_freecad/start7.fcstd
  60. BIN
      enclosure/rev2_freecad/start8.fcstd
  61. BIN
      enclosure/rev2_freecad/start9.fcstd
  62. BIN
      enclosure/rev2_freecad/start9.fcstd1
  63. +5955
    -0
      footprints/animepic.pretty/fantasyffchar.kicad_mod
  64. +128
    -0
      pcb_mega/WS2812_single.bak
  65. +128
    -0
      pcb_mega/WS2812_single.sch
  66. +580
    -0
      pcb_mega/ZMHW_Map-cache.lib
  67. +3
    -0
      pcb_mega/ZMHW_Map-rescue.dcm
  68. +535
    -0
      pcb_mega/ZMHW_Map-rescue.lib
  69. +1216
    -0
      pcb_mega/ZMHW_Map.bak
  70. +1264
    -0
      pcb_mega/ZMHW_Map.dsn
  71. +15019
    -0
      pcb_mega/ZMHW_Map.kicad_pcb
  72. +15023
    -0
      pcb_mega/ZMHW_Map.kicad_pcb-bak
  73. +1175
    -0
      pcb_mega/ZMHW_Map.net
  74. +41
    -0
      pcb_mega/ZMHW_Map.pro
  75. +108
    -0
      pcb_mega/ZMHW_Map.rules
  76. +1238
    -0
      pcb_mega/ZMHW_Map.sch
  77. +3150
    -0
      pcb_mega/ZMHW_Map.ses
  78. BIN
      pcb_mega/ZMHW_Map_Documentation.pdf
  79. +208
    -0
      pcb_mega/enc28j60_arduino.bak
  80. +224
    -0
      pcb_mega/enc28j60_arduino.sch
  81. +5
    -0
      pcb_mega/fp-lib-table
  82. +4785
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-B.Cu.gbl
  83. +14
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-B.Fab.gbr
  84. +8578
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-B.Mask.gbs
  85. +15
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-B.SilkS.gbo
  86. +60
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-Edge.Cuts.gm1
  87. +4800
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-F.Cu.gtl
  88. +2313
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-F.Fab.gbr
  89. +9028
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-F.Mask.gts
  90. +2998
    -0
      pcb_mega/gerber_rev1/ZMHW_Map-F.SilkS.gto
  91. +181
    -0
      pcb_mega/gerber_rev1/ZMHW_Map.drl
  92. BIN
      pcb_mega/gerber_rev1/ZMHW_Map_rev1.zip
  93. +15
    -0
      pcb_mega/gerber_rev1/not needed/ZMHW_Map-B.Paste.gbp
  94. +129
    -0
      pcb_mega/gerber_rev1/not needed/ZMHW_Map-F.Paste.gtp
  95. +4652
    -0
      pcb_mega/gerber_rev2/ZMHW_Map-B.Cu.gbl
  96. +14
    -0
      pcb_mega/gerber_rev2/ZMHW_Map-B.Fab.gbr
  97. +10315
    -0
      pcb_mega/gerber_rev2/ZMHW_Map-B.Mask.gbs
  98. +15
    -0
      pcb_mega/gerber_rev2/ZMHW_Map-B.Paste.gbp
  99. +10388
    -0
      pcb_mega/gerber_rev2/ZMHW_Map-B.SilkS.gbo
  100. +52
    -0
      pcb_mega/gerber_rev2/ZMHW_Map-Edge.Cuts.gm1

+ 46
- 0
README.md View File

@ -0,0 +1,46 @@
#ZMHW Map
WIP. Come back soon.
#Footprints and Symbols
The mega shields are not to my liking. Freetronics has one, it's more akin
to the avrs pinout than the shields on the symbol. Annoying.
This one is better, but not perfect - he divides up the Serial and I2C sections.
Also, the mega project from template in kicad is broken. Not similar to the
Uno template. It includes all kinds of things you don't need for a shield.
All I want is a breakout board for the pins.
#Libraries
MCUfriend_kbv
Covers what I have as the ILI9486 LCD 480x320.
Available from Arduino Repos.
reference:
https://forum.arduino.cc/index.php?topic=537903.0
also need adafruit_gfx
sd card bitmap read, on mega uses software spi, so needs sd_fat (read example
sketch). Also need to edit that library, so be careful if you use sd fat
later...! You might have broken things down the line.
I tried a few other libraries that did not work:
Ucglib, TFTx27something from Bodmar...
Convert bulk files from whatever to BMP:
mogrify -format bmp *.*
#note: needs fine tuning, as some bmps won't display on tft (too high resolution?)
Rename files to fit the SD Card:
As I don't want to load long names on the sd card, use this to rename files
j=1;for i in *.txt; do mv "$i" file"$j".txt; let j=j+1;done
I put some pictures in testsuite, so you can see what to expect with showing
graphics on this display, using this library.

+ 796
- 0
ZMHW_Map.ino View File

@ -0,0 +1,796 @@
/*
* ZMHW Project: Map
*
* A device to give you a visual representation of what Monitors
* are active in your camera network.
*
* SteakElectronics, December 2018
* Rare steak, well done electronics.
*
* Based on: telnet client
*
* Requires: UIPEthernet library
*
* Nice to haves in future:
* PWM dimming, after alarms are off, so you know what was recently on.
* Blinking on active alarms, instead of solid light, maybe.
* Faster direct port access than digitalwrite. There are some libraries
* but I don't know if they support the Mega. Instead, I'm going to rebuild the board
* with a led matrix, and then use pwm pins, and I will deal with it then.
* EDIT: instead maybre I'll use two 0402 resistors, and make a voltage divider, to allow for
* dimmer led, with hardware instead of software.
*
* Troubleshooting Programming: When connecting, it can take 30-60 seconds
* to speed this up, run the test suite telnet connect and it should connect
* immediately after. The idea is that, it seems to connect as soon as a packet is
* sent from zmtrigger. So send a test telnet packet, then it will connect after.
*/
/*
Telnet client
This sketch connects to a a telnet server (http://www.google.com)
using an Arduino Wiznet Ethernet shield. You'll need a telnet server
to test this with.
Processing's ChatServer example (part of the network library) works well,
running on port 10002. It can be found as part of the examples
in the Processing application, available at
http://processing.org/
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
created 14 Sep 2010
modified 9 Apr 2012
by Tom Igoe
*/
#include <SPI.h>
#include <UIPEthernet.h>
#define DEBUGMODE 0 // 1:on 0:off
#define DEBUGMODE2 0
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0x00, 0x41
};
IPAddress ip(192, 168, 78, 60);
// Enter the IP address of the server you're connecting to:
IPAddress server(192, 168, 78, 123);
// Port of ZMTrigger
#define ZMTRIGGERPORT 6802
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 23 is default for telnet;
// if you're using Processing's ChatServer, use port 10002):
EthernetClient client;
//Make a server
//Not currently working.
#define LISTENPORT 80 // (port 80 is default for HTTP)
EthernetServer server2 = EthernetServer(LISTENPORT);
//Globals
char* zmtrigarray[50] = {0};
uint8_t x = 0;
uint8_t y = 0;
uint8_t Mon1 = 0;
uint8_t Mon2 = 0;
uint8_t MonFIN = 0;
char mask = 0x0F; //get last nibble
uint8_t Mon1Nib = Mon1 & mask;
uint8_t Mon2Nib = Mon2 & mask;
char on = 0b01101110; //n (ascii)
char off = 0b01100110; //f (ascii)
int value = 0;
int ADD = 3; //We start at digital pin 4. so add 3 to everything.
//e.g. Monitor 3 is digital pin 6.
uint8_t NEEDCOLOUR = 0;
// Simple PWM
//if this is 1, bypass interrupt / softpwm, else do softpwm
uint8_t BypassSoftPWM[50] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int ledState[50] = {0}; // ledState used to set the LED
#define LEDTIME 10000 // 2000 comes out to about 8 seconds
uint16_t onInterval[50] = {LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME,LEDTIME}; // How long to display dimmed led
uint8_t FLIP[50] = {0};
uint8_t PWMCounter = 0;
uint8_t OffOverride[50] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t OffCtr[50] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
//during interrupt, we SoftPWM any LEDs that are ready to be done so
ISR(TIMER3_COMPA_vect) {
for(x=1;x<51;x++){
if(BypassSoftPWM[x] == 1){
//Serial.print("Bypass activated for monitor: ");
//Serial.println(x);
///FLIP[x] = 0;
if(onInterval[x] == LEDTIME){
//note: These serial prints, cause delays that mess up softpwm
if(DEBUGMODE){
Serial.print(F("Turning on SoftPWM for Monitor: "));
Serial.println(x);
}
}
//turn off
//might be better to do equals for all cases
if(PWMCounter < 7){
digitalWrite(x + ADD, 0);
}
//turn on
//must be after turn off, otherwise, if before, it will
//immediately be turned off
if(PWMCounter > 7){
digitalWrite(x + ADD, 1);
PWMCounter = 0;
//Serial.print(F("Dim Led #: "));
//Serial.println(x);
}
PWMCounter = PWMCounter + 1;
//Serial.print("PWM Count is: ");
//Serial.println(PWMCounter);
//This is only for debug. Slows delay down.
//Serial.print("oninterval is:");
//Serial.println(onInterval[x]);
onInterval[x] = onInterval[x] - 1;
if (onInterval[x] == 0){
BypassSoftPWM[x] = 0;
//note: These serial prints, cause delays that mess up softpwm
if(DEBUGMODE){
Serial.print("Turning off softPWM on Monitor: ");
Serial.println(x);
}
digitalWrite(x + ADD, 0);
onInterval[x] = LEDTIME;
//no need for softpwm override
OffOverride[x] = 0;
OffCtr[x] = 0;
}
}
}
}
//Check if any monitors that didn't get the shutdown message
ISR(TIMER4_COMPA_vect) {
for(x=1;x<51;x++){
if (OffOverride[x] == 1){
OffCtr[x]++;
if (OffCtr[x] == 50){
OffOverride[x] = 0;
OffCtr[x] = 0;
digitalWrite(x + ADD, 0);
Serial.print(F("Turning off due to override. Monitor #: "));
Serial.println(x);
sendPixel(0,10,10);
}
}
}
}
void setup() {
// in case we are restarting the setup loop because we didn't connect,
// we don't want timer to interfere
TCCR3A = 0;
TCCR3B = 0;
TCNT3 = 0;
//RGB LED
/*define Pin 2/PE4 as output*/
/*Libraries included w/arduino IDE*/
DDRE = 0b00010000;
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
sendPixel(10,0,0);
delay(500);
sendPixel(0,10,0);
delay(500);
sendPixel(0,0,10);
Serial.println("ZMHW Project: Map");
//Using pins 4 to 49
for (x=4;x<49;x++){
pinMode(x, OUTPUT);
digitalWrite(x, LOW);
}
// start the Ethernet connection:
Ethernet.begin(mac, ip);
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");
// if you get a connection, report back via serial:
if (client.connect(server, ZMTRIGGERPORT)) {
Serial.println("connected");
//Test all LEDs
for (x=4;x<49;x++){
digitalWrite(x, HIGH);
delay(50);
digitalWrite(x, LOW);
}
} else {
// if you didn't get a connection to the server:
Serial.println("connection failed");
for(int err = 0; err<3;err++){
sendPixel(0,10,0);
delay(100);
sendPixel(0,0,0);
delay(100);
}
}
// AVR Timer CTC Interrupts Calculator
// v. 8
// http://www.arduinoslovakia.eu/application/timer-calculator
// Microcontroller: ATmega2560
// Created: 2019-02-02T06:08:33.492Z
//dimming is buggy. doesn't quite work.
//problem is viewed with a scope, the timers seem to fault
//only pwming on one led occasionally
//setupTimer3();
sendPixel(0,10,10);
setupTimer4();
}
void loop() {
// if there are incoming bytes available
// from the server, read them and print them:
//original
/*if (client.available()) {
char c = client.read();
Serial.print(c);
}*/
//if (client.available()) {
// char* zmtrigarray = client.read();
// Serial.print(zmtrigarray);
//}
if (client.available()){
for(int x=0;x<40;x++){
//there are two UIPClient.ccp client.read functions. this is the 2nd
zmtrigarray[x] = client.read();
if(zmtrigarray[x] == 0b00001010){ //if line break is found in telnet
y = x;
goto PRINT;
}
}
PRINT:
uint8_t WhereInTheWorldIsThe1stLine = 0;
uint8_t WhereInTheWorldIsThe2ndLine = 0;
//Serial.println("Finished reading client");
if(DEBUGMODE){
for(int x=0;x<y;x++){
Serial.print((char)zmtrigarray[x]);
}
Serial.println(F(""));
//debugging
for(int x=0;x<y;x++){
Serial.print(F("x is: "));
Serial.print(x);
Serial.print(F(" val is: "));
Serial.print((char)zmtrigarray[x]);
Serial.print(F(" bytecode is: "));
Serial.print((char)zmtrigarray[x], DEC); //print int rep of byte
Serial.print(F(" binary is: "));
Serial.print((char)zmtrigarray[x], BIN); //print int rep of byte
//line break is 10 in telnet
Serial.println(F(""));
}
Serial.println(F(""));
}//end DEBUG
//Find out monitor we have
//
if(zmtrigarray[1] == 0b01111100) { //looking for vertical dash, in spot 2 (1 of array)
Mon1 = zmtrigarray[0];
Mon1Nib = Mon1 & mask;
MonFIN = Mon1Nib;
WhereInTheWorldIsThe1stLine = 1;
if(DEBUGMODE){
Serial.print(F("Mon1 is: "));
Serial.println(Mon1Nib, BIN);
Serial.print(F("Monitor number is: "));
Serial.println(MonFIN, DEC);
Serial.println(MonFIN, BIN);
}
}
if(zmtrigarray[1] != 0b01111100){ //looking for vertical dash, for two digit number
Mon1 = zmtrigarray[0];
Mon1Nib = Mon1 & mask; //convert from ascii to decimal
WhereInTheWorldIsThe1stLine = 2;
if(DEBUGMODE){
Serial.print(F("Mon1 is: "));
Serial.println(Mon1Nib, BIN);
}
Mon2 = zmtrigarray[1];
Mon2Nib = Mon2 & mask; //convert from ascii to decimal
if(DEBUGMODE){
Serial.print(F("Mon2 is: "));
Serial.println(Mon2Nib, BIN);
}
MonFIN = Mon1Nib & Mon2Nib;
char MonBUF[2];
sprintf(MonBUF,"%d%d", Mon1Nib,Mon2Nib);
MonFIN = atoi(MonBUF); //To convert from Ascii to dec, we take the lower 4 bits,
//convert to a string, then convert to int.
if(DEBUGMODE){
Serial.print(F("Monitor number is: "));
Serial.println(MonFIN, DEC);
Serial.println(MonFIN, BIN);
}
}//end vertical dash search (when in spot 3)
//Looking for an N or an F (for ON or OFF)
//possible values: On, Off
char OnOffSwitch = 0;
OnOffSwitch = zmtrigarray[WhereInTheWorldIsThe1stLine+2];
if(DEBUGMODE){
Serial.print(F("On/Off Switch is: "));
Serial.println(OnOffSwitch);
}
if(OnOffSwitch == on){
//Now, we block SoftPWM, in case LED was dimmed
BypassSoftPWM[MonFIN] = 0;
//Reset this, in case LED was dimmed
onInterval[MonFIN] = LEDTIME;
OffOverride[MonFIN] = 0;
OffCtr[MonFIN] = 0;
if (DEBUGMODE){
Serial.print("Bypass soft pwm value is:");
Serial.println(BypassSoftPWM[MonFIN], DEC);
Serial.print(F("On Detected for Monitor: "));
Serial.println(MonFIN, DEC);
}
value = (MonFIN + ADD);
//minus 1 as array starts at 0
//BypassSoftPWM[MonFIN - 1] = 1;
//Serial.print("Bypass soft pwm value is:");
//Serial.println(BypassSoftPWM[MonFIN - 1], DEC);
LEDAlight(value, 0xFF);
//Visual notification alarm has been off lately
sendPixel(20,20,20);
}
else if(OnOffSwitch == off){
if (DEBUGMODE){
Serial.print(F("Off Detected for Monitor: "));
Serial.println(MonFIN, DEC);
}
value = (MonFIN + ADD);
//Start watchdog timer to shutdown leds that dont stop
OffOverride[MonFIN] = 1;
//Now, we allow SoftPWM, as LED was just turned off.
//minus 1 as array starts at 0
BypassSoftPWM[MonFIN] = 1;
if (DEBUGMODE){
Serial.print(F("Bypass soft pwm value is:"));
Serial.println(BypassSoftPWM[MonFIN], DEC);
}
LEDAlight(value, 0x00); //turn led off
//SoftPWM_LED_dim(value, Interval, MonFIN);
}
else if (OnOffSwitch != on && OnOffSwitch != off){
Serial.println(F("Incorrect On/Off Value"));
}
}
//WebServer(); //todo
// as long as there are bytes in the serial queue,
// read them and send them out the socket if it's open:
while (Serial.available() > 0) {
char inChar = Serial.read();
if (client.connected()) {
client.print(inChar);
}
}
// if the server's disconnected, stop the client:
if (!client.connected()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
// do nothing:
//while (true);
//GREEN to RED Error
for(int err = 0; err<9;err++){
sendPixel(10,0,0);
delay(100);
sendPixel(0,10,0);
delay(100);
}
//start over
setup();
}
}
uint8_t LEDAlight (int Monitor, int Switch){
//Enable or Disable GPIO based on Monitor
//and Switch value
digitalWrite(Monitor, Switch);
if (DEBUGMODE){
Serial.print(F("LED # has been switched: "));
Serial.print(Monitor);
Serial.print(F(" "));
}
if(Switch == 0xFF){
if (DEBUGMODE){
Serial.println(F(" On"));
}
}
else{
if (DEBUGMODE){
Serial.println(F(" Off"));
}
}
}
//This will fade out the LED
uint8_t SoftPWM_LED_dim (uint8_t Monbitbangpwm, uint16_t *ptr, uint8_t ptrarraynum){
//arrays start at 0
ptrarraynum = ptrarraynum - 1;
if(DEBUGMODE){
//check I did my pointers right...
Serial.println(F("SoftPWM: ...."));
Serial.print(F("Mega Pin is:"));
Serial.println(Monbitbangpwm);
int TempMon = Monbitbangpwm - ADD;
Serial.print(F("Monitor is:"));
Serial.println(TempMon);
Serial.print(F("Interval from within softPWM is:"));
//It's easier to understand, if you call it pass reference to pointer, not pass by reference to pointer.
//aka pointer can pass value (the value of the data, but not the original data), or pass reference (a reference to the original data)
//that little "by" word, makes things much more incomprehensible.
for( int x = 0 ; x <= 50 ; x++ ){
Serial.println( ptr[x], HEX );
//ptr[x] = ptr[x] + 1; //looks like by default arrays pass a reference to array
//no need for ptr magic
// https://forum.arduino.cc/index.php?topic=42546.0
}
}
if(DEBUGMODE)
{
Serial.println( ptr[ptrarraynum], DEC );
//Now start LED dimming timer
//ptr[ptrarraynum] = 200;
//Serial.println( "now 200: ");
//Serial.println( ptr[ptrarraynum], DEC );
}
//start LED dimming timer
ptr[ptrarraynum] = 2000;
Serial.println( ptr[ptrarraynum], DEC );
Serial.println( ptrarraynum, DEC );
Serial.println( "Is now at what was above the num.");
}
//interrupt 15hz
//from https://www.arduinoslovakia.eu/application/timer-calculator
//would be nice if it was downloadable...
void setupTimer3() {
noInterrupts();
// Clear registers
TCCR3A = 0;
TCCR3B = 0;
TCNT3 = 0;
/*
// 15.00060002400096 Hz (16000000/((16665+1)*64))
OCR3A = 16665;
// CTC
TCCR3B |= (1 << WGM32);
// Prescaler 64
TCCR3B |= (1 << CS31) | (1 << CS30);
// Output Compare Match A Interrupt Enable
TIMSK3 |= (1 << OCIE3A);
*/
/*
// 60.00060000600006 Hz (16000000/((33332+1)*8))
OCR3A = 33332;
// CTC
TCCR3B |= (1 << WGM32);
// Prescaler 8
TCCR3B |= (1 << CS31);
// Output Compare Match A Interrupt Enable
TIMSK3 |= (1 << OCIE3A);
*/
// 240.00960038401536 Hz (16000000/((8332+1)*8))
OCR3A = 8332;
// CTC
TCCR3B |= (1 << WGM32);
// Prescaler 8
TCCR3B |= (1 << CS31);
// Output Compare Match A Interrupt Enable
TIMSK3 |= (1 << OCIE3A);
interrupts();
}
//using this to count 1hz, in case any buggy reports from telnet
//sometimes i see a lot of monitors light up, then immediately turn off
//on telnet, so accounting for that.
void setupTimer4() {
noInterrupts();
// Clear registers
TCCR4A = 0;
TCCR4B = 0;
TCNT4 = 0;
// 1 Hz (16000000/((15624+1)*1024))
OCR4A = 15624;
// CTC
TCCR4B |= (1 << WGM42);
// Prescaler 1024
TCCR4B |= (1 << CS42) | (1 << CS40);
// Output Compare Match A Interrupt Enable
TIMSK4 |= (1 << OCIE4A);
interrupts();
}
void WebServer (void){
/********************SERVER STATUS PAGE*********************/
/*
* With this, you can logon to the Sensor from your LAN to find
* out just what device this IP address is, in case you happen to
* forget.
*/
//Serial.println("In server");
//Server Status Page
// listen for incoming clients
EthernetClient client3 = server2.available();
if (client3) {
Serial.println(F("web visitor"));
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client3.connected()) {
if (client3.available()) {
char c = client3.read();
Serial.write(c);
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client3.println("HTTP/1.1 200 OK");
client3.println("Content-Type: text/html");
client3.println();
client3.println("<!DOCTYPE HTML>");
client3.println("<html><pre>");
client3.println("<b>Steak Electronics</b>");
client3.println("\"Steak it One Steak at a time.\"");
client3.println("");
//client.println("<b>IP Address:</b>");
//client.println(Ethernet.localIP());
//client.print("Sensor Location:");
//client.println(LOCATIONOFSENSOR);
client3.print("Type:");
client3.println("ZMHW Map");
client3.print("Last Activity was Monitor: ");
client3.println(MonFIN);
client3.println("</pre></html>");
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
} else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
Serial.println(F("web visitor disconnected"));
}
}
void PixZero (void){
PORTE = 0b00010000;
//_delay_us(0.25);
PORTE = 0x00;
//_delay_us(0.25);
}
void PixOne (void){
PORTE = 0b00010000;
//_delay_us(0.55);
_delay_us(0.55);
PORTE = 0x00;
}
void PixBit (bool res){
if (res == false){
PixZero();
}
if (res == true){
PixOne();
}
}
void PixByte (char input){
uint8_t changer = 0;
//WS2812 reads bits as left is lowest (high in first), so go backwards
for(changer=8;changer>0;changer--){
PixBit(bitRead(input, changer));
//input <<= 1; //Atmega didn't like this, so instead, using changer
//instead of shifting input
}
}
void sendPixel(uint8_t g, uint8_t r, uint8_t b){
/*ws2812, reads bits left side as lowest*/
/*PixByte(0b10100000); //This is dim green
PixByte(0b00000000);
PixByte(0b00000000);
PixByte(0b00000000); //no white on my LED*/
PixByte(g);
PixByte(r);
PixByte(b);
//PixByte(w);
PORTE = 0x00;
}
void PulseRGB_g (uint8_t max, uint8_t r, uint8_t b){
int rgbfunc = 0;
for (rgbfunc = 0; rgbfunc < max; rgbfunc++){
sendPixel(rgbfunc,r,b);
delay(22);
}
for (rgbfunc = max; rgbfunc > 0; rgbfunc--){
sendPixel(rgbfunc,r,b);
delay(22);
}
}
void PulseRGB_r (uint8_t max, uint8_t g, uint8_t b){
int rgbfunc = 0;
for (rgbfunc = 0; rgbfunc < max; rgbfunc++){
sendPixel(g,rgbfunc, b);
delay(22);
}
for (rgbfunc = max; rgbfunc > 0; rgbfunc--){
sendPixel(g,rgbfunc, b);
delay(22);
}
}
void PulseRGB_b (uint8_t max, uint8_t g, uint8_t r){
int rgbfunc = 0;
for (rgbfunc = 0; rgbfunc < max; rgbfunc++){
sendPixel(g,r,rgbfunc);
delay(22);
}
for (rgbfunc = max; rgbfunc > 0; rgbfunc--){
sendPixel(g,r,rgbfunc);
delay(22);
}
}

+ 0
- 0
arduino/lcd_test/lcd_test.ino View File


+ 4
- 0
bom/bom1.csv View File

@ -0,0 +1,4 @@
Quantity,Manufacturer Part #,Digikey Part #,Notes
1,SJ1-3533NG ,CP1-3533NG-ND ,serial UART to headphone jack (optional)
40,RC0805FR-071KL,311-1.00KCRCT-ND ,0805 resistors for LEDs. Atmega has 100mA available. These run at 5mA. Make sure no more than 20 cameras are lighting map at a time.
,,,"also need, speaker, 0.1” headers (see ebay), enc28J60 module (ebay), enclosure"

BIN
bom/bom1.ods View File


BIN
cad/hanger/hanger_mesh.stl View File


BIN
cad/hanger/hanger_mesh_rev2.stl View File


BIN
cad/hanger/mesh.fcstd View File


BIN
cad/hanger/mesh.fcstd1 View File


BIN
cad/hanger/meshrev2.fcstd View File


BIN
cad/hanger/meshrev2.fcstd1 View File


BIN
cad/hanger/start1.fcstd View File


BIN
cad/hanger/start2.fcstd View File


BIN
cad/hanger/start3.fcstd View File


BIN
cad/spacers/mesh.fcstd View File


BIN
cad/spacers/mesh.fcstd1 View File


BIN
cad/spacers/spacer_mesh.stl View File


BIN
cad/spacers/start.fcstd View File


BIN
cad/spacers/start1.fcstd View File


BIN
cad/spacers/start2.fcstd View File


+ 52899
- 0
datasheets/ILI9486L.pdf
File diff suppressed because it is too large
View File


+ 78
- 0
docs/10.tex~ View File

@ -0,0 +1,78 @@
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption} % for \captionof
%Gummi|065|=)
\title{\textbf{ZMHW Project: Map}}
\author{Steak Electronics}
\date{11/2018 - 3/2019}
\begin{document}
%\maketitle
\maketitle
\tableofcontents
\section{Overview}
ZMHW Map is a device to generate a type of heat map, or map whereby you can visually see where on your property alarms are occuring. It does this by connecting to the Zoneminder server\footnote{Via zmtrigger.pl}, and lighting LEDs on a PCB, with a CAD layout of your property on the PCB. By lighting certain LEDs that correspond to an alarm (with either motion, or better $\rightarrow$ hardware detection. See ZMHW Motion Detector \footnote{https://git.steakelectronics.com/adminguy/ZMHWProject}).
ZMHW Map is built as an Arduino sketch around the common Arduino Mega 2560, with a PCB layout (gerber files) that you can have fabbed\footnote{Fabbing can be done in the US within a span of about two weeks from purchase to delivery for a low price at MakerBright aka https://pcbs.io in Florida or OSH Park, https://oshpark.com based in Oregon. Users can also use overseas PCB services - see https://pcbshopper.com}. Minimal experience with a soldering iron is required. The current layout allows for up to 45 alarms to be set. As not all alarms will be active at any given time, each LED is set to output at 5mA, and should be within the 100-200mA output pin limit of the atmega 2560.
\begin{center}
\includegraphics[scale=0.8]{../pics/absolutemaximum.jpg}
\captionof{figure}{Atmega2560 Maximums}
\end{center}
\section{PCB Revision 1}
Upon Building the first rev, I noticed a few things that I've found important with the other shields I've been making with the ENC28J60. First off, I want the ENC to be upside down, so that it fits snug between the Mega USB and Barrel plug. The ENC module is sold with male pin headers (not female) so it's a matter of placing it and soldering. However, I didn't realize how well it fit until I made the first shield of ZMHW Motion Sensor, so I hadn't yet flipped the pins. Rev2 will have the ENC upside down. The 5x2 pins are enough to hold it in place. Ideally, a custom enclosure would add additional support.
\begin{center}
\includegraphics[scale=0.5]{../pics/DSCN0974.JPG}
\captionof{figure}{Board assembled with ENC, speaker, and pre-wired LEDs}
\end{center}
\subsection{Troubleshooting the board:}
In this type of shield (NOTE that this won't be required in later revisions. This is one of the reasons, I flipped the ENC), where you must cut off the old ENC 0.1" headers, there is a trick to getting them off without damaging the module. You must cut each pair of headers at the plastic part (don't cut the actual pins) with a pair of flush cut pliers, then desolder each pair off. I accidentally pulled a pad when doing this, and found the error with a microscope.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0966.JPG}
\captionof{figure}{Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!}
\end{center}
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0976.JPG}
\captionof{figure}{If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.}
\end{center}
\subsection{Build Considerations}
After I built this up, I realized that it was quite laborious to do soldering for the LEDs. The original idea was to buy a canvas print with an image of the property, and put LEDs through the canvas to alight where alarms were found. However, that would mean I might have to soldering wires for 30 LEDs (if you have 30 monitors), which is a slow, slow process. Instead, since I have already made PCBs of fairly large sizes, I will put the business property map on a PCB as the silk screen layer, and connect the board directly to the shield. I won't use a cable, as cables are an additional BOM item, and setup required, which is mentioned on the Amp Hour podcast (270 or so).
As for the option of using a shield with 30 wired LEDs vs. a large PCB, I've weighed the options of each. While the 30 wired LEDs may be a 'better' solution, the labour involved outweighs the benefits, and instead a PCB is the more practical choice. I can make large PCBs and solder LEDs on a board much quicker than I can make 30 wired LEDs. I intend to make a type of picture frame for the board, and mount it behind glass, so dust doesn't collect on it. This means each property requires its own PCB, but the building PCB is a simple one to make.
\section{PCB - Revision 2}
PCB Revision 2 was made, and while it works there were some caveats. First, I accidentally made my business property maps to start at the opposite end of the 50 Pin header than the main board. Oops. Second, the ENC pins were not placed correctly. Otherwise, I was able to hack around and get 1 prototype working, but I'll go to revision 3 to eliminate these issues. I also tested a PCB that was white, and a black PCB. While I've only actually lit lights on the white PCB, I think I prefer the black for this application.
\begin{center}
\includegraphics[scale=1.5]{../pics/DSCN1150.JPG}
\captionof{figure}{Revision 2 build, with Map PCB}
\end{center}
\vspace{0.2in}
On the plus side, the software code, which I had already made, is working without issue (in my short time testing) and overall, I am pleased with how the map works. It's a tool, and it gets the job done. You can quickly get an overview of where people are on your property. If you were to try to do this without the map, it would necessitate reviewing each camera stream, which means perhaps, 10-30 seconds. The map is more efficient. This is a new avenue of Zoneminder that isn't addressed currently. In addition, the random nature of the alarms going off, means that the map is always lighting up a new pattern of lights.
\begin{center}
\includegraphics[scale=0.8]{../pics/bottomrev3.png}
\captionof{figure}{Revision 3 Back}
\end{center}
\vspace{0.2in}
\section{PCB - Revision 3 Layout}
On this PCB revision I did the following things:
\begin{itemize}
\item Flipped IO to start at the right side, instead of the left
\item Fixed error with ENC28J60 Pins
\item Added screw terminal for external RESET button
\item Added picture to back
\end{itemize}
One thing I would like to do for the next revision: When I shortened the length of the MEGA footprint, I removed some pins, and RESET is one of the pins removed. I'd like to reinstate it. I'd also like to remove the silkscreen outline of the mega on the footprint.
\subsection{PCB - Revision 3 Build}
This revision works 100\%. That is good. The bad thing is: assembly takes too long. I'm going to remake this with a led matrix, to avoid the need for 50 pins outside of the mega.
\end{document}

+ 88
- 0
docs/11.tex~ View File

@ -0,0 +1,88 @@
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption} % for \captionof
%Gummi|065|=)
\title{\textbf{ZMHW Project: Map}}
\author{Steak Electronics}
\date{11/2018 - 3/2019}
\begin{document}
%\maketitle
\maketitle
\tableofcontents
\section{Overview}
ZMHW Map is a device to generate a type of heat map, or map whereby you can visually see where on your property alarms are occuring. It does this by connecting to the Zoneminder server\footnote{Via zmtrigger.pl}, and lighting LEDs on a PCB, with a CAD layout of your property on the PCB. By lighting certain LEDs that correspond to an alarm (with either motion, or better $\rightarrow$ hardware detection. See ZMHW Motion Detector \footnote{https://git.steakelectronics.com/adminguy/ZMHWProject}).
ZMHW Map is built as an Arduino sketch around the common Arduino Mega 2560, with a PCB layout (gerber files) that you can have fabbed\footnote{Fabbing can be done in the US within a span of about two weeks from purchase to delivery for a low price at MakerBright aka https://pcbs.io in Florida or OSH Park, https://oshpark.com based in Oregon. Users can also use overseas PCB services - see https://pcbshopper.com}. Minimal experience with a soldering iron is required. The current layout allows for up to 45 alarms to be set. As not all alarms will be active at any given time, each LED is set to output at 5mA, and should be within the 100-200mA output pin limit of the atmega 2560.
\begin{center}
\includegraphics[scale=0.8]{../pics/absolutemaximum.jpg}
\captionof{figure}{Atmega2560 Maximums}
\end{center}
\section{PCB Revision 1}
Upon Building the first rev, I noticed a few things that I've found important with the other shields I've been making with the ENC28J60. First off, I want the ENC to be upside down, so that it fits snug between the Mega USB and Barrel plug. The ENC module is sold with male pin headers (not female) so it's a matter of placing it and soldering. However, I didn't realize how well it fit until I made the first shield of ZMHW Motion Sensor, so I hadn't yet flipped the pins. Rev2 will have the ENC upside down. The 5x2 pins are enough to hold it in place. Ideally, a custom enclosure would add additional support.
\begin{center}
\includegraphics[scale=0.5]{../pics/DSCN0974.JPG}
\captionof{figure}{Board assembled with ENC, speaker, and pre-wired LEDs}
\end{center}
\subsection{Troubleshooting the board:}
In this type of shield (NOTE that this won't be required in later revisions. This is one of the reasons, I flipped the ENC), where you must cut off the old ENC 0.1" headers, there is a trick to getting them off without damaging the module. You must cut each pair of headers at the plastic part (don't cut the actual pins) with a pair of flush cut pliers, then desolder each pair off. I accidentally pulled a pad when doing this, and found the error with a microscope.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0966.JPG}
\captionof{figure}{Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!}
\end{center}
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0976.JPG}
\captionof{figure}{If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.}
\end{center}
\subsection{Build Considerations}
After I built this up, I realized that it was quite laborious to do soldering for the LEDs. The original idea was to buy a canvas print with an image of the property, and put LEDs through the canvas to alight where alarms were found. However, that would mean I might have to soldering wires for 30 LEDs (if you have 30 monitors), which is a slow, slow process. Instead, since I have already made PCBs of fairly large sizes, I will put the business property map on a PCB as the silk screen layer, and connect the board directly to the shield. I won't use a cable, as cables are an additional BOM item, and setup required, which is mentioned on the Amp Hour podcast (270 or so).
As for the option of using a shield with 30 wired LEDs vs. a large PCB, I've weighed the options of each. While the 30 wired LEDs may be a 'better' solution, the labour involved outweighs the benefits, and instead a PCB is the more practical choice. I can make large PCBs and solder LEDs on a board much quicker than I can make 30 wired LEDs. I intend to make a type of picture frame for the board, and mount it behind glass, so dust doesn't collect on it. This means each property requires its own PCB, but the building PCB is a simple one to make.
\section{PCB - Revision 2}
PCB Revision 2 was made, and while it works there were some caveats. First, I accidentally made my business property maps to start at the opposite end of the 50 Pin header than the main board. Oops. Second, the ENC pins were not placed correctly. Otherwise, I was able to hack around and get 1 prototype working, but I'll go to revision 3 to eliminate these issues. I also tested a PCB that was white, and a black PCB. While I've only actually lit lights on the white PCB, I think I prefer the black for this application.
\begin{center}
\includegraphics[scale=1.5]{../pics/DSCN1150.JPG}
\captionof{figure}{Revision 2 build, with Map PCB}
\end{center}
\vspace{0.2in}
On the plus side, the software code, which I had already made, is working without issue (in my short time testing) and overall, I am pleased with how the map works. It's a tool, and it gets the job done. You can quickly get an overview of where people are on your property. If you were to try to do this without the map, it would necessitate reviewing each camera stream, which means perhaps, 10-30 seconds. The map is more efficient. This is a new avenue of Zoneminder that isn't addressed currently. In addition, the random nature of the alarms going off, means that the map is always lighting up a new pattern of lights.
\begin{center}
\includegraphics[scale=0.8]{../pics/bottomrev3.png}
\captionof{figure}{Revision 3 Back}
\end{center}
\vspace{0.2in}
\section{PCB - Revision 3 Layout}
On this PCB revision I did the following things:
\begin{itemize}
\item Flipped IO to start at the right side, instead of the left
\item Fixed error with ENC28J60 Pins
\item Added screw terminal for external RESET button
\item Added picture to back
\end{itemize}
One thing I would like to do for the next revision: When I shortened the length of the MEGA footprint, I removed some pins, and RESET is one of the pins removed. I'd like to reinstate it. I'd also like to remove the silkscreen outline of the mega on the footprint.
\subsection{PCB - Revision 3 Build}
This revision works 100\%. That is good. The bad thing is: assembly takes too long. I'm going to remake this with a led matrix, to avoid the need for 50 pins outside of the mega.
\subsection{RGB Code, and Future Plans}
I was able to build a mount out of a wooden board, and by sanding, and finishing with Urethane, I have a protected surface for the board.
I added RGB code, so that an LED can give a visual indication of the status. I found the RGB led shows program routines that you might not be aware were happening, as it can quickly indicate points in the code, well.
Future plans, are to use a smaller board, with an LED matrix, and an Arduino Uno instead of a Mega. With LED Matrix, I should be able to use the Uno, or even the Nano. There is no other need for all the pins. I don't think the telnet needs the SRAM of the Mega but I should double-check. If I make a board compatible with the uno, I can bring it to the Mega if necessary (compatible shield). I also plan to have the board behind the piece (or pieces) of wood, so only the map is visible. A connecter will be connected to the back of the map via a routed hole on the wood. Should look quite professional. I will make a new repo for this revision, to not obliterate the older code.
\subsection{Mounting the boards to look Professional}
The first time I made a board, I put the micro on the outside of the oak board. I've decided to instead hide the micro behind the board, and show only the map on the front. I will use a connector for this, and route a hole in the wood board so the map is not visible.
\end{document}

+ 195
- 0
docs/14.tex~ View File

@ -0,0 +1,195 @@
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption} % for \captionof
%Gummi|065|=)
\title{\textbf{ZMHW Project: Map}}
\author{Steak Electronics}
\date{11/2018 - 8/2019}
\begin{document}
%\maketitle
\maketitle
\tableofcontents
\section{Overview}
ZMHW Map is a device to generate a type of heat map, or map whereby you can visually see where on your property alarms are occuring. It does this by connecting to the Zoneminder server\footnote{Via zmtrigger.pl}, and lighting LEDs on a PCB, with a CAD layout of your property on the PCB. By lighting certain LEDs that correspond to an alarm (with either motion, or better $\rightarrow$ hardware detection. See ZMHW Motion Detector \footnote{https://git.steakelectronics.com/adminguy/ZMHWProject}).
ZMHW Map is built as an Arduino sketch around the common Arduino Mega 2560, with a PCB layout (gerber files) that you can have fabbed\footnote{Fabbing can be done in the US within a span of about two weeks from purchase to delivery for a low price at MakerBright aka https://pcbs.io in Florida or OSH Park, https://oshpark.com based in Oregon. Users can also use overseas PCB services - see https://pcbshopper.com}. Minimal experience with a soldering iron is required. The current layout allows for up to 45 alarms to be set. As not all alarms will be active at any given time, each LED is set to output at 5mA, and should be within the 100-200mA output pin limit of the atmega 2560.
\begin{center}
\includegraphics[scale=0.8]{../pics/absolutemaximum.jpg}
\captionof{figure}{Atmega2560 Maximums}
\end{center}
\section{PCB Revision 1}
Upon Building the first rev, I noticed a few things that I've found important with the other shields I've been making with the ENC28J60. First off, I want the ENC to be upside down, so that it fits snug between the Mega USB and Barrel plug. The ENC module is sold with male pin headers (not female) so it's a matter of placing it and soldering. However, I didn't realize how well it fit until I made the first shield of ZMHW Motion Sensor, so I hadn't yet flipped the pins. Rev2 will have the ENC upside down. The 5x2 pins are enough to hold it in place. Ideally, a custom enclosure would add additional support.
\begin{center}
\includegraphics[scale=0.5]{../pics/DSCN0974.JPG}
\captionof{figure}{Board assembled with ENC, speaker, and pre-wired LEDs}
\end{center}
\subsection{Troubleshooting the board:}
In this type of shield (NOTE that this won't be required in later revisions. This is one of the reasons, I flipped the ENC), where you must cut off the old ENC 0.1" headers, there is a trick to getting them off without damaging the module. You must cut each pair of headers at the plastic part (don't cut the actual pins) with a pair of flush cut pliers, then desolder each pair off. I accidentally pulled a pad when doing this, and found the error with a microscope.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0966.JPG}
\captionof{figure}{Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!}
\end{center}
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0976.JPG}
\captionof{figure}{If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.}
\end{center}
\subsection{Build Considerations}
After I built this up, I realized that it was quite laborious to do soldering for the LEDs. The original idea was to buy a canvas print with an image of the property, and put LEDs through the canvas to alight where alarms were found. However, that would mean I might have to soldering wires for 30 LEDs (if you have 30 monitors), which is a slow, slow process. Instead, since I have already made PCBs of fairly large sizes, I will put the business property map on a PCB as the silk screen layer, and connect the board directly to the shield. I won't use a cable, as cables are an additional BOM item, and setup required, which is mentioned on the Amp Hour podcast (270 or so).
As for the option of using a shield with 30 wired LEDs vs. a large PCB, I've weighed the options of each. While the 30 wired LEDs may be a 'better' solution, the labour involved outweighs the benefits, and instead a PCB is the more practical choice. I can make large PCBs and solder LEDs on a board much quicker than I can make 30 wired LEDs. I intend to make a type of picture frame for the board, and mount it behind glass, so dust doesn't collect on it. This means each property requires its own PCB, but the building PCB is a simple one to make.
\section{PCB - Revision 2}
PCB Revision 2 was made, and while it works there were some caveats. First, I accidentally made my business property maps to start at the opposite end of the 50 Pin header than the main board. Oops. Second, the ENC pins were not placed correctly. Otherwise, I was able to hack around and get 1 prototype working, but I'll go to revision 3 to eliminate these issues. I also tested a PCB that was white, and a black PCB. While I've only actually lit lights on the white PCB, I think I prefer the black for this application.
%\begin{center}
%\includegraphics[scale=1.5]{../pics/DSCN1150.JPG}
%\captionof{figure}{Revision 2 build, with Map PCB}
%\end{center}
\vspace{0.2in}
On the plus side, the software code, which I had already made, is working without issue (in my short time testing) and overall, I am pleased with how the map works. It's a tool, and it gets the job done. You can quickly get an overview of where people are on your property. If you were to try to do this without the map, it would necessitate reviewing each camera stream, which means perhaps, 10-30 seconds. The map is more efficient. This is a new avenue of Zoneminder that isn't addressed currently. In addition, the random nature of the alarms going off, means that the map is always lighting up a new pattern of lights.
\begin{center}
\includegraphics[scale=0.8]{../pics/bottomrev3.png}
\captionof{figure}{Revision 3 Back}
\end{center}
\vspace{0.2in}
\section{PCB - Revision 3 Layout}
On this PCB revision I did the following things:
\begin{itemize}
\item Flipped IO to start at the right side, instead of the left
\item Fixed error with ENC28J60 Pins
\item Added screw terminal for external RESET button
\item Added picture to back
\end{itemize}
One thing I would like to do for the next revision: When I shortened the length of the MEGA footprint, I removed some pins, and RESET is one of the pins removed. I'd like to reinstate it. I'd also like to remove the silkscreen outline of the mega on the footprint.
\subsection{PCB - Revision 3 Build}
This revision works 100\%. That is good. The bad thing is: assembly takes too long. I'm going to remake this with a led matrix, to avoid the need for 50 pins outside of the mega.
\subsection{RGB Code, and Future Plans}
I was able to build a mount out of a wooden board, and by sanding, and finishing with Urethane, I have a protected surface for the board.
I added RGB code, so that an LED can give a visual indication of the status. I found the RGB led shows program routines that you might not be aware were happening, as it can quickly indicate points in the code, well.
Future plans, are to use a smaller board, with an LED matrix, and an Arduino Uno instead of a Mega. With LED Matrix, I should be able to use the Uno, or even the Nano. There is no other need for all the pins. I don't think the telnet needs the SRAM of the Mega but I should double-check. If I make a board compatible with the uno, I can bring it to the Mega if necessary (compatible shield). I also plan to have the board behind the piece (or pieces) of wood, so only the map is visible. A connecter will be connected to the back of the map via a routed hole on the wood. Should look quite professional. I will make a new repo for this revision, to not obliterate the older code.
\subsection{Mounting the boards to look Professional}
%\begin{center}
%\includegraphics[scale=0.3]{../pics/DSCN1486.JPG}
%\captionof{figure}{Original idea, with micro in front of board}
%\end{center}
The first time I made a board, I put the micro on the outside of the oak board. I've decided to instead hide the micro behind the board, and show only the map on the front. I will use a connector for this, and route a hole in the wood board so the micro is not visible. I'll connect to the back of the board.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN1537.JPG}
\captionof{figure}{Instead, we will hide the micro behind the oak board, for a more professional look}
\end{center}
I've also decided to stain the wood, before finishing. Stain makes it look a bit older and more rustic. See the Pictures.
\section{480x320 TFT LCD Test}
Some notes are in the readme.
To change brightness, contrast, etc... there are registers in the ILI9486 data sheet.
the command in the MCUFriend library is readreg32.
An example is given in the readID command of MCUFriend_kbv.cpp.
\begin{verbatim}
ret = readReg32(0xD3); //for ILI9488, 9486, 9340, 9341
msb = ret >> 8;
if (msb == 0x93 || msb == 0x94 || msb == 0x98 || msb == 0x77 || msb == 0x16)
return ret; //0x9488, 9486, 9340, 9341, 7796
\end{verbatim}
In the datasheet, d3h (hex D3) is the register that can be read, with ID info.
Brightness is a register for writing, and one for reading.
Write registers is e.g.
\begin{verbatim}
WriteCmdData(0xB0, 0x0000);
\end{verbatim}
I assume it is register,data.
There are some register init data sort of examples in:
extras/unused/mcufriend_special_2.h:
of MCUfriend library.
But to test the register peek/poke access, if I write
\begin{verbatim}
tft.WriteCmdData(0x51,0x55); //*Needs tft. to access MCUFriend commands
\end{verbatim}
That should lower brightness. So use that in a loop.
At first try, it didn't work. I'm trying to read a register, but it complains, readReg32 is protected, and error within this context. Bull.
So I added this command to the bottom of the sketch.
\begin{verbatim}
uint32_t readReg32(uint16_t reg)
{
uint16_t h = tft.readReg(reg, 0);
uint16_t l = tft.readReg(reg, 1);
return ((uint32_t) h << 16) | (l);
}
\end{verbatim}
Maybe I should get myself a computer that allows writing and reading registers.
Seems the Arduino can't do this.
Documentation for this is abysmal. Poor documentation is job security.
Perhaps I have to use the Adafruit commands in this case. i doubt it, though. Hardware support is in MCUFriend.
Seems that OLEDs aren't supposed to adjust brightness, says adafruit forums. I hope that's not true.
I gave up on this.
I was unable to get the screen to print out text. Not letters, but I want it to passthrough sentences from
serial. This way, whatever I send to it via UART displays on screen. I tried
the serial.event tutorial (copied 1:1) from the official ide docs, but it did nothing...
\subsection{The deal with brightness on this ILI9486}
I found a discussion on this thankfully. It looks like there is 0 way to adjust brightness
for these TFT screens. Here's what the comment says on
\\
https://github.com/prenticedavid/MCUFRIEND_kbv/issues/25
\begin{verbatim}
Both ILI9486 and ILI9481 are MIPI controllers.
You should use pushCommand() rather than WriteCmdData().
e.g. uint8_t val = 0x2C; tft.pushCommand(0x53, &val, 1);
Neither of the displays in your photos have access to the backlight. It is permanently on.
There is little point in playing with reg(0x53) unless you have control of the backlight.
Just accept that you always lose ~200mA to a backlight whether the TFT is displaying Black or White.
If you are battery powered, you will just have to go to the shops every few hours.
David.
\end{verbatim}
I have no comments.
extras/unused/ILI9341_regValues.txt: init_table(ILI9486_regValues, sizeof(ILI9486_regValues));
seems notable.
also notable:
https://forums.adafruit.com/viewtopic.php?f=47&t=63229&p=320378&hilit=0xef+ili9341#p320378
Seems tft's are corrupt. People shouldn't use bullshit.
Search for this code,
\begin{verbatim}
case 0x9486:
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS; //Red 3.5", Blue 3.5"
// _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN; //old Red 3.5"
static const uint8_t ILI9486_regValues[] PROGMEM = {
0xC0, 2, 0x0d, 0x0d, //Power Control 1 [0E 0E]
0xC1, 2, 0x43, 0x00, //Power Control 2 [43 00]
0xC2, 1, 0x00, //Power Control 3 [33]
0xC5, 4, 0x00, 0x48, 0x00, 0x48, //VCOM Control 1 [00 40 00 40]
0xB4, 1, 0x00, //Inversion Control [00]
0xB6, 3, 0x02, 0x02, 0x3B, // Display Function Control [02 02 3B]
\end{verbatim}
This is in MCUFriend_kbv.cpp. Let's change this to what the user had.
link:
https://github.com/prenticedavid/MCUFRIEND_kbv/issues/31
https://www.ebay.com/itm/240x320-2-4-SPI-TFT-LCD-Touch-Panel-Serial-Port-Module-with-PCB-ILI9341-3-3V/
Seems this might be a better screen, as it has a LED pin, to adjust brightness.
\end{document}

+ 19
- 0
docs/15.aux View File

@ -0,0 +1,19 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Atmega2560 Maximums\relax }}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {2}PCB Revision 1}{2}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Board assembled with ENC, speaker, and pre-wired LEDs\relax }}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Troubleshooting the board:}{3}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!\relax }}{4}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.\relax }}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Build Considerations}{4}}
\@writefile{toc}{\contentsline {section}{\numberline {3}PCB - Revision 2}{5}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Revision 3 Back\relax }}{6}}
\@writefile{toc}{\contentsline {section}{\numberline {4}PCB - Revision 3 Layout}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}PCB - Revision 3 Build}{7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}RGB Code, and Future Plans}{7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Mounting the boards to look Professional}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Instead, we will hide the micro behind the oak board, for a more professional look\relax }}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {5}480x320 TFT LCD Test}{8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}The deal with brightness on this ILI9486}{9}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}External Links}{10}}

+ 346
- 0
docs/15.log View File

@ -0,0 +1,346 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2019.8.17) 15 JUL 2020 03:21
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**/home/layoutdev/Desktop/code/documentation_general/zmhw_arduino_shields/mega/
ZMHW_Map/docs/15.tex
(/home/layoutdev/Desktop/code/documentation_general/zmhw_arduino_shields/mega/Z
MHW_Map/docs/15.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2017/01/12 v0.06k Graphics/color for pdfTeX
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package caption3 Info: TeX engine: e-TeX on input line 67.
\captionmargin=\dimen105
\captionmargin@=\dimen106
\captionwidth=\dimen107
\caption@tempdima=\dimen108
\caption@indent=\dimen109
\caption@parindent=\dimen110
\caption@hangindent=\dimen111
)
\c@ContinuedFloat=\count88
) (./15.aux)
\openout1 = `15.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen112
\scratchbox=\box26
\nofMPsegments=\count90
\nofMParguments=\count91
\everyMPshowfont=\toks15
\MPscratchCnt=\count92
\MPscratchDim=\dimen113
\MPnumerator=\count93
\makeMPintoPDFobject=\count94
\everyMPtoPDFconversion=\toks16
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 12.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 12.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 12.
(./15.toc)
\tf@toc=\write3
\openout3 = `15.toc'.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <9> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 17.
<../pics/absolutemaximum.jpg, id=1, 284.56313pt x 197.98969pt>
File: ../pics/absolutemaximum.jpg Graphic file (type jpg)
<use ../pics/absolutemaximum.jpg>
Package pdftex.def Info: ../pics/absolutemaximum.jpg used on input line 22.
(pdftex.def) Requested size: 227.6508pt x 158.39195pt.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] <../pics/DSCN0974.JPG, id=
14, 803.0pt x 602.25pt>
File: ../pics/DSCN0974.JPG Graphic file (type jpg)
<use ../pics/DSCN0974.JPG>
Package pdftex.def Info: ../pics/DSCN0974.JPG used on input line 30.
(pdftex.def) Requested size: 401.49902pt x 301.12425pt.
Overfull \hbox (41.49902pt too wide) in paragraph at lines 30--31
[]
[]
[2 <../pics/absolutemaximum.jpg>]
<../pics/DSCN0966.JPG, id=18, 803.0pt x 602.25pt>
File: ../pics/DSCN0966.JPG Graphic file (type jpg)
<use ../pics/DSCN0966.JPG>
Package pdftex.def Info: ../pics/DSCN0966.JPG used on input line 36.
(pdftex.def) Requested size: 240.90186pt x 180.67639pt.
[3 <../pics/DSCN0974.JPG>] <../pics/DSCN0976.JPG, id=22, 803.0pt x 602.25pt>
File: ../pics/DSCN0976.JPG Graphic file (type jpg)
<use ../pics/DSCN0976.JPG>
Package pdftex.def Info: ../pics/DSCN0976.JPG used on input line 40.
(pdftex.def) Requested size: 240.90186pt x 180.67639pt.
[4 <../pics/DSCN0966.JPG> <../pics/DSCN0976.JPG>]
<../pics/bottomrev3.png, id=26, 401.5pt x 357.335pt>
File: ../pics/bottomrev3.png Graphic file (type png)
<use ../pics/bottomrev3.png>
Package pdftex.def Info: ../pics/bottomrev3.png used on input line 61.
(pdftex.def) Requested size: 321.20042pt x 285.86838pt.
[5]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 68.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10.95> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 68.
[6 <../pics/bottomrev3.png>] <../pics/DSCN1537.JPG, id=35, 803.0pt x 602.25pt>
File: ../pics/DSCN1537.JPG Graphic file (type jpg)
<use ../pics/DSCN1537.JPG>
Package pdftex.def Info: ../pics/DSCN1537.JPG used on input line 92.
(pdftex.def) Requested size: 240.90186pt x 180.67639pt.
[7]
Overfull \hbox (99.89502pt too wide) in paragraph at lines 108--108
[] \OT1/cmtt/m/n/10.95 if (msb == 0x93 || msb == 0x94 || msb == 0x98 || msb
== 0x77 || msb == 0x16)[]
[]
Overfull \hbox (7.91602pt too wide) in paragraph at lines 108--108
[] \OT1/cmtt/m/n/10.95 return ret; //0x9488, 9486, 9340, 934
1, 7796[]
[]
Overfull \hbox (48.15683pt too wide) in paragraph at lines 124--124
[]\OT1/cmtt/m/n/10.95 tft.WriteCmdData(0x51,0x55); //*Needs tft. to access MCUF
riend commands[]
[]
[8 <../pics/DSCN1537.JPG>]
Overfull \hbox (157.3819pt too wide) in paragraph at lines 166--166
[]\OT1/cmtt/m/n/10.95 Neither of the displays in your photos have access to the
backlight. It is permanently on.[]
[]
Overfull \hbox (151.63321pt too wide) in paragraph at lines 166--166
[]\OT1/cmtt/m/n/10.95 There is little point in playing with reg(0x53) unless yo
u have control of the backlight.[]
[]
Overfull \hbox (214.86877pt too wide) in paragraph at lines 166--166
[]\OT1/cmtt/m/n/10.95 Just accept that you always lose ~200mA to a backlight wh
ether the TFT is displaying Black or White.[]
[]
Overfull \hbox (111.3924pt too wide) in paragraph at lines 166--166
[]\OT1/cmtt/m/n/10.95 If you are battery powered, you will just have to go to t
he shops every few hours.[]
[]
[9]
Overfull \hbox (220.61746pt too wide) in paragraph at lines 171--171
[]\OT1/cmtt/m/n/10.95 extras/unused/ILI9341_regValues.txt: init_table(IL
I9486_regValues, sizeof(ILI9486_regValues));[]
[]
Overfull \hbox (157.3819pt too wide) in paragraph at lines 177--177
[]\OT1/cmtt/m/n/10.95 https://forums.adafruit.com/viewtopic.php?f=47&t=63229&p=
320378&hilit=0xef+ili9341#p320378[]
[]
Overfull \hbox (122.88977pt too wide) in paragraph at lines 192--192
[] \OT1/cmtt/m/n/10.95 _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_
AXIS; //Red 3.5", Blue 3.5"[]
[]
Overfull \hbox (168.87927pt too wide) in paragraph at lines 192--192
[]\OT1/cmtt/m/n/10.95 // _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | M
V_AXIS | REV_SCREEN; //old Red 3.5"[]
[]
Overfull \hbox (13.6647pt too wide) in paragraph at lines 192--192
[] \OT1/cmtt/m/n/10.95 0xC0, 2, 0x0d, 0x0d, //Power Control 1
[0E 0E][]
[]
Overfull \hbox (13.6647pt too wide) in paragraph at lines 192--192
[] \OT1/cmtt/m/n/10.95 0xC1, 2, 0x43, 0x00, //Power Control 2
[43 00][]
[]
Overfull \hbox (94.14633pt too wide) in paragraph at lines 192--192
[] \OT1/cmtt/m/n/10.95 0xC5, 4, 0x00, 0x48, 0x00, 0x48, //VCOM C
ontrol 1 [00 40 00 40][]
[]
Overfull \hbox (88.39764pt too wide) in paragraph at lines 192--192
[] \OT1/cmtt/m/n/10.95 0xB6, 3, 0x02, 0x02, 0x3B, // Display Functi
on Control [02 02 3B][]
[]
Overfull \hbox (232.11484pt too wide) in paragraph at lines 199--199
[] \OT1/cmtt/m/n/10.95 https://www.ebay.com/itm/240x320-2-4-SPI-TFT-LCD-Touch-P
anel-Serial-Port-Module-with-PCB-ILI9341-3-3V/[]
[]
[10] (./15.aux) )
Here is how much of TeX's memory you used:
2630 strings out of 494945
42123 string characters out of 6181032
96837 words of memory out of 5000000
5909 multiletter control sequences out of 15000+600000
9890 words of font info for 35 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
39i,8n,39p,803b,286s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share
/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive
/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on 15.pdf (10 pages, 816416 bytes).
PDF statistics:
77 PDF objects out of 1000 (max. 8388607)
49 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
31 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
docs/15.pdf View File


+ 208
- 0
docs/15.tex View File

@ -0,0 +1,208 @@
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption} % for \captionof
%Gummi|065|=)
\title{\textbf{ZMHW Project: Map}}
\author{Steak Electronics}
\date{11/2018 - 8/2019}
\begin{document}
%\maketitle
\maketitle
\tableofcontents
\section{Overview}
ZMHW Map is a device to generate a type of heat map, or map whereby you can visually see where on your property alarms are occuring. It does this by connecting to the Zoneminder server\footnote{Via zmtrigger.pl}, and lighting LEDs on a PCB, with a CAD layout of your property on the PCB. By lighting certain LEDs that correspond to an alarm (with either motion, or better $\rightarrow$ hardware detection. See ZMHW Motion Detector \footnote{https://git.steakelectronics.com/adminguy/ZMHWProject}).
ZMHW Map is built as an Arduino sketch around the common Arduino Mega 2560, with a PCB layout (gerber files) that you can have fabbed\footnote{Fabbing can be done in the US within a span of about two weeks from purchase to delivery for a low price at MakerBright aka https://pcbs.io in Florida or OSH Park, https://oshpark.com based in Oregon. Users can also use overseas PCB services - see https://pcbshopper.com}. Minimal experience with a soldering iron is required. The current layout allows for up to 45 alarms to be set. As not all alarms will be active at any given time, each LED is set to output at 5mA, and should be within the 100-200mA output pin limit of the atmega 2560.
\begin{center}
\includegraphics[scale=0.8]{../pics/absolutemaximum.jpg}
\captionof{figure}{Atmega2560 Maximums}
\end{center}
\section{PCB Revision 1}
Upon Building the first rev, I noticed a few things that I've found important with the other shields I've been making with the ENC28J60. First off, I want the ENC to be upside down, so that it fits snug between the Mega USB and Barrel plug. The ENC module is sold with male pin headers (not female) so it's a matter of placing it and soldering. However, I didn't realize how well it fit until I made the first shield of ZMHW Motion Sensor, so I hadn't yet flipped the pins. Rev2 will have the ENC upside down. The 5x2 pins are enough to hold it in place. Ideally, a custom enclosure would add additional support.
\begin{center}
\includegraphics[scale=0.5]{../pics/DSCN0974.JPG}
\captionof{figure}{Board assembled with ENC, speaker, and pre-wired LEDs}
\end{center}
\subsection{Troubleshooting the board:}
In this type of shield (NOTE that this won't be required in later revisions. This is one of the reasons, I flipped the ENC), where you must cut off the old ENC 0.1" headers, there is a trick to getting them off without damaging the module. You must cut each pair of headers at the plastic part (don't cut the actual pins) with a pair of flush cut pliers, then desolder each pair off. I accidentally pulled a pad when doing this, and found the error with a microscope.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0966.JPG}
\captionof{figure}{Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!}
\end{center}
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0976.JPG}
\captionof{figure}{If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.}
\end{center}
\subsection{Build Considerations}
After I built this up, I realized that it was quite laborious to do soldering for the LEDs. The original idea was to buy a canvas print with an image of the property, and put LEDs through the canvas to alight where alarms were found. However, that would mean I might have to soldering wires for 30 LEDs (if you have 30 monitors), which is a slow, slow process. Instead, since I have already made PCBs of fairly large sizes, I will put the business property map on a PCB as the silk screen layer, and connect the board directly to the shield. I won't use a cable, as cables are an additional BOM item, and setup required, which is mentioned on the Amp Hour podcast (270 or so).
As for the option of using a shield with 30 wired LEDs vs. a large PCB, I've weighed the options of each. While the 30 wired LEDs may be a 'better' solution, the labour involved outweighs the benefits, and instead a PCB is the more practical choice. I can make large PCBs and solder LEDs on a board much quicker than I can make 30 wired LEDs. I intend to make a type of picture frame for the board, and mount it behind glass, so dust doesn't collect on it. This means each property requires its own PCB, but the building PCB is a simple one to make.
\section{PCB - Revision 2}
PCB Revision 2 was made, and while it works there were some caveats. First, I accidentally made my business property maps to start at the opposite end of the 50 Pin header than the main board. Oops. Second, the ENC pins were not placed correctly. Otherwise, I was able to hack around and get 1 prototype working, but I'll go to revision 3 to eliminate these issues. I also tested a PCB that was white, and a black PCB. While I've only actually lit lights on the white PCB, I think I prefer the black for this application.
%\begin{center}
%\includegraphics[scale=1.5]{../pics/DSCN1150.JPG}
%\captionof{figure}{Revision 2 build, with Map PCB}
%\end{center}
\vspace{0.2in}
On the plus side, the software code, which I had already made, is working without issue (in my short time testing) and overall, I am pleased with how the map works. It's a tool, and it gets the job done. You can quickly get an overview of where people are on your property. If you were to try to do this without the map, it would necessitate reviewing each camera stream, which means perhaps, 10-30 seconds. The map is more efficient. This is a new avenue of Zoneminder that isn't addressed currently. In addition, the random nature of the alarms going off, means that the map is always lighting up a new pattern of lights.
\begin{center}
\includegraphics[scale=0.8]{../pics/bottomrev3.png}
\captionof{figure}{Revision 3 Back}
\end{center}
\vspace{0.2in}
\section{PCB - Revision 3 Layout}
On this PCB revision I did the following things:
\begin{itemize}
\item Flipped IO to start at the right side, instead of the left
\item Fixed error with ENC28J60 Pins
\item Added screw terminal for external RESET button
\item Added picture to back
\end{itemize}
One thing I would like to do for the next revision: When I shortened the length of the MEGA footprint, I removed some pins, and RESET is one of the pins removed. I'd like to reinstate it. I'd also like to remove the silkscreen outline of the mega on the footprint.
\subsection{PCB - Revision 3 Build}
This revision works 100\%. That is good. The bad thing is: assembly takes too long. I'm going to remake this with a led matrix, to avoid the need for 50 pins outside of the mega.
\subsection{RGB Code, and Future Plans}
I was able to build a mount out of a wooden board, and by sanding, and finishing with Urethane, I have a protected surface for the board.
I added RGB code, so that an LED can give a visual indication of the status. I found the RGB led shows program routines that you might not be aware were happening, as it can quickly indicate points in the code, well.
Future plans, are to use a smaller board, with an LED matrix, and an Arduino Uno instead of a Mega. With LED Matrix, I should be able to use the Uno, or even the Nano. There is no other need for all the pins. I don't think the telnet needs the SRAM of the Mega but I should double-check. If I make a board compatible with the uno, I can bring it to the Mega if necessary (compatible shield). I also plan to have the board behind the piece (or pieces) of wood, so only the map is visible. A connecter will be connected to the back of the map via a routed hole on the wood. Should look quite professional. I will make a new repo for this revision, to not obliterate the older code.
\subsection{Mounting the boards to look Professional}
%\begin{center}
%\includegraphics[scale=0.3]{../pics/DSCN1486.JPG}
%\captionof{figure}{Original idea, with micro in front of board}
%\end{center}
The first time I made a board, I put the micro on the outside of the oak board. I've decided to instead hide the micro behind the board, and show only the map on the front. I will use a connector for this, and route a hole in the wood board so the micro is not visible. I'll connect to the back of the board.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN1537.JPG}
\captionof{figure}{Instead, we will hide the micro behind the oak board, for a more professional look}
\end{center}
I've also decided to stain the wood, before finishing. Stain makes it look a bit older and more rustic. See the Pictures.
\section{480x320 TFT LCD Test}
Some notes are in the readme.
To change brightness, contrast, etc... there are registers in the ILI9486 data sheet.
the command in the MCUFriend library is readreg32.
An example is given in the readID command of MCUFriend\_kbv.cpp.
\begin{verbatim}
ret = readReg32(0xD3); //for ILI9488, 9486, 9340, 9341
msb = ret >> 8;
if (msb == 0x93 || msb == 0x94 || msb == 0x98 || msb == 0x77 || msb == 0x16)
return ret; //0x9488, 9486, 9340, 9341, 7796
\end{verbatim}
In the datasheet, d3h (hex D3) is the register that can be read, with ID info.
Brightness is a register for writing, and one for reading.
Write registers is e.g.
\begin{verbatim}
WriteCmdData(0xB0, 0x0000);
\end{verbatim}
I assume it is register,data.
There are some register init data sort of examples in:
extras/unused/mcufriend\_special\_2.h:
of MCUfriend library.
But to test the register peek/poke access, if I write
\begin{verbatim}
tft.WriteCmdData(0x51,0x55); //*Needs tft. to access MCUFriend commands
\end{verbatim}
That should lower brightness. So use that in a loop.
At first try, it didn't work. I'm trying to read a register, but it complains, readReg32 is protected, and error within this context. Bull.
So I added this command to the bottom of the sketch.
\begin{verbatim}
uint32_t readReg32(uint16_t reg)
{
uint16_t h = tft.readReg(reg, 0);
uint16_t l = tft.readReg(reg, 1);
return ((uint32_t) h << 16) | (l);
}
\end{verbatim}
Maybe I should get myself a computer that allows writing and reading registers.
Seems the Arduino can't do this.
Documentation for this is abysmal. Poor documentation is job security.
Perhaps I have to use the Adafruit commands in this case. i doubt it, though. Hardware support is in MCUFriend.
Seems that OLEDs aren't supposed to adjust brightness, says adafruit forums. I hope that's not true.
I gave up on this.
I was unable to get the screen to print out text. Not letters, but I want it to passthrough sentences from
serial. This way, whatever I send to it via UART displays on screen. I tried
the serial.event tutorial (copied 1:1) from the official ide docs, but it did nothing...
\subsection{The deal with brightness on this ILI9486}
I found a discussion on this thankfully. It looks like there is 0 way to adjust brightness
for these TFT screens. Here's what the comment says on
\\
https://github.com/prenticedavid/MCUFRIEND\_kbv/issues/25
\begin{verbatim}
Both ILI9486 and ILI9481 are MIPI controllers.
You should use pushCommand() rather than WriteCmdData().
e.g. uint8_t val = 0x2C; tft.pushCommand(0x53, &val, 1);
Neither of the displays in your photos have access to the backlight. It is permanently on.
There is little point in playing with reg(0x53) unless you have control of the backlight.
Just accept that you always lose ~200mA to a backlight whether the TFT is displaying Black or White.
If you are battery powered, you will just have to go to the shops every few hours.
David.
\end{verbatim}
I have no comments.
\begin{verbatim}
extras/unused/ILI9341_regValues.txt: init_table(ILI9486_regValues, sizeof(ILI9486_regValues));
\end{verbatim}
seems notable.
also notable:
\begin{verbatim}
https://forums.adafruit.com/viewtopic.php?f=47&t=63229&p=320378&hilit=0xef+ili9341#p320378
Seems tft's are corrupt. People shouldn't use bullshit.
\end{verbatim}
Search for this code,
\begin{verbatim}
case 0x9486:
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS; //Red 3.5", Blue 3.5"
// _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN; //old Red 3.5"
static const uint8_t ILI9486_regValues[] PROGMEM = {
0xC0, 2, 0x0d, 0x0d, //Power Control 1 [0E 0E]
0xC1, 2, 0x43, 0x00, //Power Control 2 [43 00]
0xC2, 1, 0x00, //Power Control 3 [33]
0xC5, 4, 0x00, 0x48, 0x00, 0x48, //VCOM Control 1 [00 40 00 40]
0xB4, 1, 0x00, //Inversion Control [00]
0xB6, 3, 0x02, 0x02, 0x3B, // Display Function Control [02 02 3B]
\end{verbatim}
This is in MCUFriend\_kbv.cpp. Let's change this to what the user had.
link:
\begin{verbatim}
https://github.com/prenticedavid/MCUFRIEND_kbv/issues/31
https://www.ebay.com/itm/240x320-2-4-SPI-TFT-LCD-Touch-Panel-Serial-Port-Module-with-PCB-ILI9341-3-3V/
\end{verbatim}
Seems this might be a better screen, as it has a LED pin, to adjust brightness.
\subsection{External Links}
https://www.traintrackr.io/ - Here's a similar project. They made the same mistake I made - putting the leds on the front. I won't be doing that for rev 3.
\end{document}

+ 204
- 0
docs/15.tex~ View File

@ -0,0 +1,204 @@
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption} % for \captionof
%Gummi|065|=)
\title{\textbf{ZMHW Project: Map}}
\author{Steak Electronics}
\date{11/2018 - 8/2019}
\begin{document}
%\maketitle
\maketitle
\tableofcontents
\section{Overview}
ZMHW Map is a device to generate a type of heat map, or map whereby you can visually see where on your property alarms are occuring. It does this by connecting to the Zoneminder server\footnote{Via zmtrigger.pl}, and lighting LEDs on a PCB, with a CAD layout of your property on the PCB. By lighting certain LEDs that correspond to an alarm (with either motion, or better $\rightarrow$ hardware detection. See ZMHW Motion Detector \footnote{https://git.steakelectronics.com/adminguy/ZMHWProject}).
ZMHW Map is built as an Arduino sketch around the common Arduino Mega 2560, with a PCB layout (gerber files) that you can have fabbed\footnote{Fabbing can be done in the US within a span of about two weeks from purchase to delivery for a low price at MakerBright aka https://pcbs.io in Florida or OSH Park, https://oshpark.com based in Oregon. Users can also use overseas PCB services - see https://pcbshopper.com}. Minimal experience with a soldering iron is required. The current layout allows for up to 45 alarms to be set. As not all alarms will be active at any given time, each LED is set to output at 5mA, and should be within the 100-200mA output pin limit of the atmega 2560.
\begin{center}
\includegraphics[scale=0.8]{../pics/absolutemaximum.jpg}
\captionof{figure}{Atmega2560 Maximums}
\end{center}
\section{PCB Revision 1}
Upon Building the first rev, I noticed a few things that I've found important with the other shields I've been making with the ENC28J60. First off, I want the ENC to be upside down, so that it fits snug between the Mega USB and Barrel plug. The ENC module is sold with male pin headers (not female) so it's a matter of placing it and soldering. However, I didn't realize how well it fit until I made the first shield of ZMHW Motion Sensor, so I hadn't yet flipped the pins. Rev2 will have the ENC upside down. The 5x2 pins are enough to hold it in place. Ideally, a custom enclosure would add additional support.
\begin{center}
\includegraphics[scale=0.5]{../pics/DSCN0974.JPG}
\captionof{figure}{Board assembled with ENC, speaker, and pre-wired LEDs}
\end{center}
\subsection{Troubleshooting the board:}
In this type of shield (NOTE that this won't be required in later revisions. This is one of the reasons, I flipped the ENC), where you must cut off the old ENC 0.1" headers, there is a trick to getting them off without damaging the module. You must cut each pair of headers at the plastic part (don't cut the actual pins) with a pair of flush cut pliers, then desolder each pair off. I accidentally pulled a pad when doing this, and found the error with a microscope.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0966.JPG}
\captionof{figure}{Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!}
\end{center}
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0976.JPG}
\captionof{figure}{If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.}
\end{center}
\subsection{Build Considerations}
After I built this up, I realized that it was quite laborious to do soldering for the LEDs. The original idea was to buy a canvas print with an image of the property, and put LEDs through the canvas to alight where alarms were found. However, that would mean I might have to soldering wires for 30 LEDs (if you have 30 monitors), which is a slow, slow process. Instead, since I have already made PCBs of fairly large sizes, I will put the business property map on a PCB as the silk screen layer, and connect the board directly to the shield. I won't use a cable, as cables are an additional BOM item, and setup required, which is mentioned on the Amp Hour podcast (270 or so).
As for the option of using a shield with 30 wired LEDs vs. a large PCB, I've weighed the options of each. While the 30 wired LEDs may be a 'better' solution, the labour involved outweighs the benefits, and instead a PCB is the more practical choice. I can make large PCBs and solder LEDs on a board much quicker than I can make 30 wired LEDs. I intend to make a type of picture frame for the board, and mount it behind glass, so dust doesn't collect on it. This means each property requires its own PCB, but the building PCB is a simple one to make.
\section{PCB - Revision 2}
PCB Revision 2 was made, and while it works there were some caveats. First, I accidentally made my business property maps to start at the opposite end of the 50 Pin header than the main board. Oops. Second, the ENC pins were not placed correctly. Otherwise, I was able to hack around and get 1 prototype working, but I'll go to revision 3 to eliminate these issues. I also tested a PCB that was white, and a black PCB. While I've only actually lit lights on the white PCB, I think I prefer the black for this application.
%\begin{center}
%\includegraphics[scale=1.5]{../pics/DSCN1150.JPG}
%\captionof{figure}{Revision 2 build, with Map PCB}
%\end{center}
\vspace{0.2in}
On the plus side, the software code, which I had already made, is working without issue (in my short time testing) and overall, I am pleased with how the map works. It's a tool, and it gets the job done. You can quickly get an overview of where people are on your property. If you were to try to do this without the map, it would necessitate reviewing each camera stream, which means perhaps, 10-30 seconds. The map is more efficient. This is a new avenue of Zoneminder that isn't addressed currently. In addition, the random nature of the alarms going off, means that the map is always lighting up a new pattern of lights.
\begin{center}
\includegraphics[scale=0.8]{../pics/bottomrev3.png}
\captionof{figure}{Revision 3 Back}
\end{center}
\vspace{0.2in}
\section{PCB - Revision 3 Layout}
On this PCB revision I did the following things:
\begin{itemize}
\item Flipped IO to start at the right side, instead of the left
\item Fixed error with ENC28J60 Pins
\item Added screw terminal for external RESET button
\item Added picture to back
\end{itemize}
One thing I would like to do for the next revision: When I shortened the length of the MEGA footprint, I removed some pins, and RESET is one of the pins removed. I'd like to reinstate it. I'd also like to remove the silkscreen outline of the mega on the footprint.
\subsection{PCB - Revision 3 Build}
This revision works 100\%. That is good. The bad thing is: assembly takes too long. I'm going to remake this with a led matrix, to avoid the need for 50 pins outside of the mega.
\subsection{RGB Code, and Future Plans}
I was able to build a mount out of a wooden board, and by sanding, and finishing with Urethane, I have a protected surface for the board.
I added RGB code, so that an LED can give a visual indication of the status. I found the RGB led shows program routines that you might not be aware were happening, as it can quickly indicate points in the code, well.
Future plans, are to use a smaller board, with an LED matrix, and an Arduino Uno instead of a Mega. With LED Matrix, I should be able to use the Uno, or even the Nano. There is no other need for all the pins. I don't think the telnet needs the SRAM of the Mega but I should double-check. If I make a board compatible with the uno, I can bring it to the Mega if necessary (compatible shield). I also plan to have the board behind the piece (or pieces) of wood, so only the map is visible. A connecter will be connected to the back of the map via a routed hole on the wood. Should look quite professional. I will make a new repo for this revision, to not obliterate the older code.
\subsection{Mounting the boards to look Professional}
%\begin{center}
%\includegraphics[scale=0.3]{../pics/DSCN1486.JPG}
%\captionof{figure}{Original idea, with micro in front of board}
%\end{center}
The first time I made a board, I put the micro on the outside of the oak board. I've decided to instead hide the micro behind the board, and show only the map on the front. I will use a connector for this, and route a hole in the wood board so the micro is not visible. I'll connect to the back of the board.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN1537.JPG}
\captionof{figure}{Instead, we will hide the micro behind the oak board, for a more professional look}
\end{center}
I've also decided to stain the wood, before finishing. Stain makes it look a bit older and more rustic. See the Pictures.
\section{480x320 TFT LCD Test}
Some notes are in the readme.
To change brightness, contrast, etc... there are registers in the ILI9486 data sheet.
the command in the MCUFriend library is readreg32.
An example is given in the readID command of MCUFriend\_kbv.cpp.
\begin{verbatim}
ret = readReg32(0xD3); //for ILI9488, 9486, 9340, 9341
msb = ret >> 8;
if (msb == 0x93 || msb == 0x94 || msb == 0x98 || msb == 0x77 || msb == 0x16)
return ret; //0x9488, 9486, 9340, 9341, 7796
\end{verbatim}
In the datasheet, d3h (hex D3) is the register that can be read, with ID info.
Brightness is a register for writing, and one for reading.
Write registers is e.g.
\begin{verbatim}
WriteCmdData(0xB0, 0x0000);
\end{verbatim}
I assume it is register,data.
There are some register init data sort of examples in:
extras/unused/mcufriend\_special\_2.h:
of MCUfriend library.
But to test the register peek/poke access, if I write
\begin{verbatim}
tft.WriteCmdData(0x51,0x55); //*Needs tft. to access MCUFriend commands
\end{verbatim}
That should lower brightness. So use that in a loop.
At first try, it didn't work. I'm trying to read a register, but it complains, readReg32 is protected, and error within this context. Bull.
So I added this command to the bottom of the sketch.
\begin{verbatim}
uint32_t readReg32(uint16_t reg)
{
uint16_t h = tft.readReg(reg, 0);
uint16_t l = tft.readReg(reg, 1);
return ((uint32_t) h << 16) | (l);
}
\end{verbatim}
Maybe I should get myself a computer that allows writing and reading registers.
Seems the Arduino can't do this.
Documentation for this is abysmal. Poor documentation is job security.
Perhaps I have to use the Adafruit commands in this case. i doubt it, though. Hardware support is in MCUFriend.
Seems that OLEDs aren't supposed to adjust brightness, says adafruit forums. I hope that's not true.
I gave up on this.
I was unable to get the screen to print out text. Not letters, but I want it to passthrough sentences from
serial. This way, whatever I send to it via UART displays on screen. I tried
the serial.event tutorial (copied 1:1) from the official ide docs, but it did nothing...
\subsection{The deal with brightness on this ILI9486}
I found a discussion on this thankfully. It looks like there is 0 way to adjust brightness
for these TFT screens. Here's what the comment says on
\\
https://github.com/prenticedavid/MCUFRIEND\_kbv/issues/25
\begin{verbatim}
Both ILI9486 and ILI9481 are MIPI controllers.
You should use pushCommand() rather than WriteCmdData().
e.g. uint8_t val = 0x2C; tft.pushCommand(0x53, &val, 1);
Neither of the displays in your photos have access to the backlight. It is permanently on.
There is little point in playing with reg(0x53) unless you have control of the backlight.
Just accept that you always lose ~200mA to a backlight whether the TFT is displaying Black or White.
If you are battery powered, you will just have to go to the shops every few hours.
David.
\end{verbatim}
I have no comments.
\begin{verbatim}
extras/unused/ILI9341_regValues.txt: init_table(ILI9486_regValues, sizeof(ILI9486_regValues));
\end{verbatim}
seems notable.
also notable:
\begin{verbatim}
https://forums.adafruit.com/viewtopic.php?f=47&t=63229&p=320378&hilit=0xef+ili9341#p320378
Seems tft's are corrupt. People shouldn't use bullshit.
\end{verbatim}
Search for this code,
\begin{verbatim}
case 0x9486:
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS; //Red 3.5", Blue 3.5"
// _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN; //old Red 3.5"
static const uint8_t ILI9486_regValues[] PROGMEM = {
0xC0, 2, 0x0d, 0x0d, //Power Control 1 [0E 0E]
0xC1, 2, 0x43, 0x00, //Power Control 2 [43 00]
0xC2, 1, 0x00, //Power Control 3 [33]
0xC5, 4, 0x00, 0x48, 0x00, 0x48, //VCOM Control 1 [00 40 00 40]
0xB4, 1, 0x00, //Inversion Control [00]
0xB6, 3, 0x02, 0x02, 0x3B, // Display Function Control [02 02 3B]
\end{verbatim}
This is in MCUFriend\_kbv.cpp. Let's change this to what the user had.
link:
\begin{verbatim}
https://github.com/prenticedavid/MCUFRIEND_kbv/issues/31
https://www.ebay.com/itm/240x320-2-4-SPI-TFT-LCD-Touch-Panel-Serial-Port-Module-with-PCB-ILI9341-3-3V/
\end{verbatim}
Seems this might be a better screen, as it has a LED pin, to adjust brightness.
\end{document}

+ 12
- 0
docs/15.toc View File

@ -0,0 +1,12 @@
\contentsline {section}{\numberline {1}Overview}{1}
\contentsline {section}{\numberline {2}PCB Revision 1}{2}
\contentsline {subsection}{\numberline {2.1}Troubleshooting the board:}{3}
\contentsline {subsection}{\numberline {2.2}Build Considerations}{4}
\contentsline {section}{\numberline {3}PCB - Revision 2}{5}
\contentsline {section}{\numberline {4}PCB - Revision 3 Layout}{6}
\contentsline {subsection}{\numberline {4.1}PCB - Revision 3 Build}{7}
\contentsline {subsection}{\numberline {4.2}RGB Code, and Future Plans}{7}
\contentsline {subsection}{\numberline {4.3}Mounting the boards to look Professional}{7}
\contentsline {section}{\numberline {5}480x320 TFT LCD Test}{8}
\contentsline {subsection}{\numberline {5.1}The deal with brightness on this ILI9486}{9}
\contentsline {subsection}{\numberline {5.2}External Links}{10}

+ 78
- 0
docs/9.tex~ View File

@ -0,0 +1,78 @@
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{caption} % for \captionof
%Gummi|065|=)
\title{\textbf{ZMHW Project: Map}}
\author{Steak Electronics}
\date{11/2018 - 1/2019}
\begin{document}
%\maketitle
\maketitle
\tableofcontents
\section{Overview}
ZMHW Map is a device to generate a type of heat map, or map whereby you can visually see where on your property alarms are occuring. It does this by connecting to the Zoneminder server\footnote{Via zmtrigger.pl}, and lighting LEDs on a PCB, with a CAD layout of your property on the PCB. By lighting certain LEDs that correspond to an alarm (with either motion, or better $\rightarrow$ hardware detection. See ZMHW Motion Detector \footnote{https://git.steakelectronics.com/adminguy/ZMHWProject}).
ZMHW Map is built as an Arduino sketch around the common Arduino Mega 2560, with a PCB layout (gerber files) that you can have fabbed\footnote{Fabbing can be done in the US within a span of about two weeks from purchase to delivery for a low price at MakerBright aka https://pcbs.io in Florida or OSH Park, https://oshpark.com based in Oregon. Users can also use overseas PCB services - see https://pcbshopper.com}. Minimal experience with a soldering iron is required. The current layout allows for up to 45 alarms to be set. As not all alarms will be active at any given time, each LED is set to output at 5mA, and should be within the 100-200mA output pin limit of the atmega 2560.
\begin{center}
\includegraphics[scale=0.8]{../pics/absolutemaximum.jpg}
\captionof{figure}{Atmega2560 Maximums}
\end{center}
\section{PCB Revision 1}
Upon Building the first rev, I noticed a few things that I've found important with the other shields I've been making with the ENC28J60. First off, I want the ENC to be upside down, so that it fits snug between the Mega USB and Barrel plug. The ENC module is sold with male pin headers (not female) so it's a matter of placing it and soldering. However, I didn't realize how well it fit until I made the first shield of ZMHW Motion Sensor, so I hadn't yet flipped the pins. Rev2 will have the ENC upside down. The 5x2 pins are enough to hold it in place. Ideally, a custom enclosure would add additional support.
\begin{center}
\includegraphics[scale=0.5]{../pics/DSCN0974.JPG}
\captionof{figure}{Board assembled with ENC, speaker, and pre-wired LEDs}
\end{center}
\subsection{Troubleshooting the board:}
In this type of shield (NOTE that this won't be required in later revisions. This is one of the reasons, I flipped the ENC), where you must cut off the old ENC 0.1" headers, there is a trick to getting them off without damaging the module. You must cut each pair of headers at the plastic part (don't cut the actual pins) with a pair of flush cut pliers, then desolder each pair off. I accidentally pulled a pad when doing this, and found the error with a microscope.
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0966.JPG}
\captionof{figure}{Cut plastic part off in pairs, then desolder. OR, design your board so you don't have to remove the pin headers!}
\end{center}
\begin{center}
\includegraphics[scale=0.3]{../pics/DSCN0976.JPG}
\captionof{figure}{If you are going to be soldering high gauge magnet wire, you should use a microscope. It makes the process much more enjoyable, and efficient.}
\end{center}
\subsection{Build Considerations}
After I built this up, I realized that it was quite laborious to do soldering for the LEDs. The original idea was to buy a canvas print with an image of the property, and put LEDs through the canvas to alight where alarms were found. However, that would mean I might have to soldering wires for 30 LEDs (if you have 30 monitors), which is a slow, slow process. Instead, since I have already made PCBs of fairly large sizes, I will put the business property map on a PCB as the silk screen layer, and connect the board directly to the shield. I won't use a cable, as cables are an additional BOM item, and setup required, which is mentioned on the Amp Hour podcast (270 or so).
As for the option of using a shield with 30 wired LEDs vs. a large PCB, I've weighed the options of each. While the 30 wired LEDs may be a 'better' solution, the labour involved outweighs the benefits, and instead a PCB is the more practical choice. I can make large PCBs and solder LEDs on a board much quicker than I can make 30 wired LEDs. I intend to make a type of picture frame for the board, and mount it behind glass, so dust doesn't collect on it. This means each property requires its own PCB, but the building PCB is a simple one to make.
\section{PCB - Revision 2}
PCB Revision 2 was made, and while it works there were some caveats. First, I accidentally made my business property maps to start at the opposite end of the 50 Pin header than the main board. Oops. Second, the ENC pins were not placed correctly. Otherwise, I was able to hack around and get 1 prototype working, but I'll go to revision 3 to eliminate these issues. I also tested a PCB that was white, and a black PCB. While I've only actually lit lights on the white PCB, I think I prefer the black for this application.
\begin{center}
\includegraphics[scale=1.5]{../pics/DSCN1150.JPG}
\captionof{figure}{Revision 2 build, with Map PCB}
\end{center}
\vspace{0.2in}
On the plus side, the software code, which I had already made, is working without issue (in my short time testing) and overall, I am pleased with how the map works. It's a tool, and it gets the job done. You can quickly get an overview of where people are on your property. If you were to try to do this without the map, it would necessitate reviewing each camera stream, which means perhaps, 10-30 seconds. The map is more efficient. This is a new avenue of Zoneminder that isn't addressed currently. In addition, the random nature of the alarms going off, means that the map is always lighting up a new pattern of lights.
\begin{center}
\includegraphics[scale=0.8]{../pics/bottomrev3.png}
\captionof{figure}{Revision 3 Back}
\end{center}
\vspace{0.2in}
\section{PCB - Revision 3 Layout}
On this PCB revision I did the following things:
\begin{itemize}
\item Flipped IO to start at the right side, instead of the left
\item Fixed error with ENC28J60 Pins
\item Added screw terminal for external RESET button
\item Added picture to back
\end{itemize}
One thing I would like to do for the next revision: When I shortened the length of the MEGA footprint, I removed some pins, and RESET is one of the pins removed. I'd like to reinstate it. I'd also like to remove the silkscreen outline of the mega on the footprint.
\subsection{PCB - Revision 3 Build}
This revision works 100\%. That is good. The bad thing is:
\end{document}

+ 8
- 0
enclosure/README View File

@ -0,0 +1,8 @@
For the enclosure, I put them on a wooden board, sand and finish the board with urethane, or some
other varnish, then mount the ZMHW shield, Mega, plus the Map on the wood. I then print this
enclosure with a 3D printer, and use it to add some short circuit protection to the device
in a commercial environment.
This current enclosure is for Rev 1, and as such, Rev 1 PCB has no fuse.
Future revisions will add a fuse, and be smaller, at that.

BIN
enclosure/rev1_freecad/creatingmesh.fcstd View File


BIN
enclosure/rev1_freecad/creatingmesh.fcstd1 View File


BIN
enclosure/rev1_freecad/mesh/mesh_rev1.stl View File


BIN
enclosure/rev1_freecad/mesh/revb_withtext.stl View File


BIN
enclosure/rev1_freecad/revb_withtext.fcstd View File


BIN
enclosure/rev1_freecad/revb_withtext2.fcstd View File


BIN
enclosure/rev1_freecad/start.fcstd View File


BIN
enclosure/rev1_freecad/start.fcstd1 View File


BIN
enclosure/rev1_freecad/start1.fcstd View File


BIN
enclosure/rev1_freecad/start1.fcstd1 View File


BIN
enclosure/rev1_freecad/start2.fcstd View File


BIN
enclosure/rev1_freecad/start2.fcstd1 View File


BIN
enclosure/rev1_freecad/start3.fcstd View File


BIN
enclosure/rev1_freecad/start3.fcstd1 View File


BIN
enclosure/rev1_freecad/start4.fcstd View File


BIN
enclosure/rev2_freecad/mesh/mesh.fcstd View File


BIN
enclosure/rev2_freecad/mesh/zmhwmap_rev2.stl View File


BIN
enclosure/rev2_freecad/start1.fcstd View File


BIN
enclosure/rev2_freecad/start10.fcstd View File


BIN
enclosure/rev2_freecad/start2.fcstd View File


BIN
enclosure/rev2_freecad/start2.fcstd1 View File


BIN
enclosure/rev2_freecad/start3.fcstd View File


BIN
enclosure/rev2_freecad/start3.fcstd1 View File


BIN
enclosure/rev2_freecad/start4.fcstd View File


BIN
enclosure/rev2_freecad/start5.fcstd View File


BIN
enclosure/rev2_freecad/start6.fcstd View File


BIN
enclosure/rev2_freecad/start7.fcstd View File


BIN
enclosure/rev2_freecad/start8.fcstd View File


BIN
enclosure/rev2_freecad/start9.fcstd View File


BIN
enclosure/rev2_freecad/start9.fcstd1 View File


+ 5955
- 0
footprints/animepic.pretty/fantasyffchar.kicad_mod
File diff suppressed because it is too large
View File


+ 128
- 0
pcb_mega/WS2812_single.bak View File

@ -0,0 +1,128 @@
EESchema Schematic File Version 4
LIBS:ZMHW_Map-cache
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 3 3
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Worldsemi:WS2812 LED1
U 1 1 5C18C0A2
P 4150 3400
F 0 "LED1" H 4150 3725 50 0000 C CNN
F 1 "WS2812" H 4150 3634 50 0000 C CNN
F 2 "LEDs:LED_WS2812-PLCC6" H 4150 3633 50 0001 C CNN
F 3 "http://www.world-semi.com/uploads/soft/140305/1-140305113P8.pdf" H 4150 3634 50 0001 C CNN
1 4150 3400
1 0 0 -1
$EndComp
$Comp
L power:+5V #PWR0117
U 1 1 5C18C129
P 3750 3300
F 0 "#PWR0117" H 3750 3150 50 0001 C CNN
F 1 "+5V" H 3765 3473 50 0000 C CNN
F 2 "" H 3750 3300 50 0000 C CNN
F 3 "" H 3750 3300 50 0000 C CNN
1 3750 3300
1 0 0 -1
$EndComp
Wire Wire Line
3750 3300 3750 3400
Connection ~ 3750 3300
Wire Wire Line
3750 3400 3450 3400
Wire Wire Line
3450 3400 3450 3500
Connection ~ 3750 3400
$Comp
L device:C_Small C1
U 1 1 5C18C1BA
P 3450 3600
F 0 "C1" H 3542 3646 50 0000 L CNN
F 1 "1uf" H 3542 3555 50 0000 L CNN
F 2 "Resistors_SMD:R_0805_HandSoldering" H 3450 3600 50 0001 C CNN
F 3 "" H 3450 3600 50 0000 C CNN
1 3450 3600
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0118
U 1 1 5C18C3CB
P 3450 3700
F 0 "#PWR0118" H 3450 3450 50 0001 C CNN
F 1 "GND" H 3455 3527 50 0000 C CNN
F 2 "" H 3450 3700 50 0000 C CNN
F 3 "" H 3450 3700 50 0000 C CNN
1 3450 3700
1 0 0 -1
$EndComp
$Comp
L device:R R47
U 1 1 5C18C5CB
P 4250 3850
F 0 "R47" V 4150 3850 50 0000 C CNN
F 1 "470" V 4250 3850 50 0000 C CNN
F 2 "Resistors_SMD:R_0805_HandSoldering" V 4180 3850 50 0001 C CNN
F 3 "" H 4250 3850 50 0000 C CNN
1 4250 3850
0 1 1 0
$EndComp
Wire Wire Line
4100 3850 3750 3850
Wire Wire Line
3750 3850 3750 3500
Wire Wire Line
4400 3850 4600 3850
$Comp
L power:GND #PWR0119
U 1 1 5C18C698
P 4550 3500
F 0 "#PWR0119" H 4550 3250 50 0001 C CNN
F 1 "GND" H 4555 3327 50 0000 C CNN
F 2 "" H 4550 3500 50 0000 C CNN
F 3 "" H 4550 3500 50 0000 C CNN
1 4550 3500
1 0 0 -1
$EndComp
Wire Wire Line
4550 3400 4750 3400
Wire Wire Line
4750 3400 4750 3200
$Comp
L conn:CONN_01X01 P10
U 1 1 5C18C73C
P 4750 3000
F 0 "P10" V 4715 2912 50 0000 R CNN
F 1 "CONN_01X01" V 4624 2912 50 0000 R CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x01" H 4750 3000 50 0001 C CNN
F 3 "" H 4750 3000 50 0000 C CNN
1 4750 3000
0 -1 -1 0
$EndComp
Text Label 4750 3400 0 50 ~ 0
UNUSEDRGBLED
Text HLabel 4600 3850 2 50 Input ~ 0
RGBDATAIN
Text HLabel 4750 3300 2 50 Input ~ 0
RGBDATAOUT
Text Notes 2900 2500 0 50 ~ 0
I have 470 ohm 0805\nfrom LED board proj.
Wire Notes Line
2750 2600 3900 2600
Wire Notes Line
3900 2600 3900 2200
Wire Notes Line
3900 2200 2750 2200
Wire Notes Line
2750 2200 2750 2600
$EndSCHEMATC

+ 128
- 0
pcb_mega/WS2812_single.sch View File

@ -0,0 +1,128 @@
EESchema Schematic File Version 4
LIBS:ZMHW_Map-cache
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 3 3
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Worldsemi:WS2812 LED1
U 1 1 5C18C0A2
P 4150 3400
F 0 "LED1" H 4150 3725 50 0000 C CNN
F 1 "WS2812" H 4150 3634 50 0000 C CNN
F 2 "LEDs:LED_WS2812-PLCC6" H 4150 3633 50 0001 C CNN
F 3 "http://www.world-semi.com/uploads/soft/140305/1-140305113P8.pdf" H 4150 3634 50 0001 C CNN
1 4150 3400
1 0 0 -1
$EndComp
$Comp
L power:+5V #PWR0117
U 1 1 5C18C129
P 3750 3300
F 0 "#PWR0117" H 3750 3150 50 0001 C CNN
F 1 "+5V" H 3765 3473 50 0000 C CNN
F 2 "" H 3750 3300 50 0000 C CNN
F 3 "" H 3750 3300 50 0000 C CNN
1 3750 3300
1 0 0 -1
$EndComp
Wire Wire Line
3750 3300 3750 3400
Connection ~ 3750 3300
Wire Wire Line
3750 3400 3450 3400
Wire Wire Line
3450 3400 3450 3500
Connection ~ 3750 3400
$Comp
L device:C_Small C1
U 1 1 5C18C1BA
P 3450 3600
F 0 "C1" H 3542 3646 50 0000 L CNN
F 1 "1uf" H 3542 3555 50 0000 L CNN
F 2 "Resistors_SMD:R_0805_HandSoldering" H 3450 3600 50 0001 C CNN
F 3 "" H 3450 3600 50 0000 C CNN
1 3450 3600
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0118
U 1 1 5C18C3CB
P 3450 3700
F 0 "#PWR0118" H 3450 3450 50 0001 C CNN
F 1 "GND" H 3455 3527 50 0000 C CNN
F 2 "" H 3450 3700 50 0000 C CNN
F 3 "" H 3450 3700 50 0000 C CNN
1 3450 3700
1 0 0 -1
$EndComp
$Comp
L device:R R47
U 1 1 5C18C5CB
P 4250 3850
F 0 "R47" V 4150 3850 50 0000 C CNN
F 1 "470" V 4250 3850 50 0000 C CNN
F 2 "Resistors_SMD:R_0805_HandSoldering" V 4180 3850 50 0001 C CNN
F 3 "" H 4250 3850 50 0000 C CNN
1 4250 3850
0 1 1 0
$EndComp
Wire Wire Line
4100 3850 3750 3850
Wire Wire Line
3750 3850 3750 3500
Wire Wire Line
4400 3850 4600 3850
$Comp
L power:GND #PWR0119
U 1 1 5C18C698
P 4550 3500
F 0 "#PWR0119" H 4550 3250 50 0001 C CNN
F 1 "GND" H 4555 3327 50 0000 C CNN
F 2 "" H 4550 3500 50 0000 C CNN
F 3 "" H 4550 3500 50 0000 C CNN
1 4550 3500
1 0 0 -1
$EndComp
Wire Wire Line
4550 3400 4750 3400
Wire Wire Line
4750 3400 4750 3200
$Comp
L conn:CONN_01X01 P10
U 1 1 5C18C73C
P 4750 3000
F 0 "P10" V 4715 2912 50 0000 R CNN
F 1 "CONN_01X01" V 4624 2912 50 0000 R CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x01" H 4750 3000 50 0001 C CNN
F 3 "" H 4750 3000 50 0000 C CNN
1 4750 3000
0 -1 -1 0
$EndComp
Text Label 4750 3400 0 50 ~ 0
UNUSEDRGBLED
Text HLabel 4600 3850 2 50 Input ~ 0
RGBDATAIN
Text HLabel 4750 3300 2 50 Input ~ 0
RGBDATAOUT
Text Notes 2900 2500 0 50 ~ 0
I have 470 ohm 0805\nfrom LED board proj.
Wire Notes Line
2750 2600 3900 2600
Wire Notes Line
3900 2600 3900 2200
Wire Notes Line
3900 2200 2750 2200
Wire Notes Line
2750 2200 2750 2600
$EndSCHEMATC

+ 580
- 0
pcb_mega/ZMHW_Map-cache.lib View File

@ -0,0 +1,580 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# Worldsemi:WS2812
#
DEF Worldsemi:WS2812 LED 0 40 Y Y 1 F N
F0 "LED" 0 -200 50 H V C CNN
F1 "Worldsemi:WS2812" 0 200 50 H V C CNN
F2 "LEDs:LED_WS2812-PLCC6" -100 -300 50 H V C CNN
F3 "" 0 0 50 H V C CNN
ALIAS WS2812
DRAW
S -300 150 300 -150 0 1 10 f
X DOUT 1 400 0 100 L 50 50 1 1 O
X DIN 2 -400 -100 100 R 50 50 1 1 I
X VCC 3 -400 100 100 R 50 50 1 1 W
X VDD 5 -400 0 100 R 50 50 1 1 W
X VSS 6 400 -100 100 L 50 50 1 1 W
ENDDRAW
ENDDEF
#
# arduino:Arduino_Mega2560_Shield
#
DEF arduino:Arduino_Mega2560_Shield XA 0 40 Y Y 1 F N
F0 "XA" 100 0 60 V V C CNN
F1 "arduino:Arduino_Mega2560_Shield" -100 0 60 V V C CNN
F2 "" 700 2750 60 H I C CNN
F3 "" 700 2750 60 H I C CNN
$FPLIST
Arduino_Mega2560_Shield
$ENDFPLIST
DRAW
T 900 -500 50 60 0 0 0 "Analogue I/O" Normal 0 C C
T 900 -500 1200 60 0 0 0 I²C Normal 0 C C
T 900 -500 -1000 60 0 0 0 Misc. Normal 0 C C
T 900 -500 -1700 60 0 0 0 Power Normal 0 C C
T 900 600 -1350 60 0 0 0 PWM Normal 0 C C
T 900 600 1600 60 0 0 0 PWM Normal 0 C C
T 900 -500 1800 60 0 0 0 Serial Normal 0 C C
T 0 0 1800 60 0 0 0 SPI Normal 0 C C
T 900 500 0 60 0 1 0 GPIO Normal 0 C C
S -1000 -2300 1000 2300 0 0 0 f
S -800 -2150 -500 -2150 0 0 0 N
S -750 -1250 -500 -1250 0 0 0 N
S -750 -750 -500 -750 0 0 0 N
S -750 1050 -500 1050 0 0 0 N
S -700 -1050 -650 -1050 0 0 0 N
S -700 -950 -650 -950 0 0 0 N
S -650 -1000 -550 -1000 0 0 0 N
S -650 -950 -650 -1050 0 0 0 N
S -650 2150 -500 2150 0 0 0 N
S -600 1350 -500 1350 0 0 0 N
S -600 1450 -500 1450 0 0 0 N
S -500 -2150 -500 -1900 0 0 0 N
S -500 -1250 -500 -1500 0 0 0 N
S -500 1050 -500 1100 0 0 0 N
S -500 1350 -500 1300 0 0 0 N
S -500 1650 -500 1450 0 0 0 N
S -500 1950 -500 2150 0 0 0 N
S -250 1900 -250 1800 0 0 0 N
S -100 1800 -250 1800 0 0 0 N
S 250 1800 100 1800 0 0 0 N
S 250 1850 250 1800 0 0 0 N
S 500 -2150 500 -150 1 0 0 N
S 500 2150 500 150 1 0 0 N
P 2 0 0 0 -850 850 -500 850 N
P 2 0 0 0 -500 -750 -500 -300 N
P 2 0 0 0 -500 400 -500 850 N
P 2 0 0 0 500 -2150 650 -2150 N
P 2 0 0 0 500 2150 650 2150 N
P 2 0 0 0 700 -1350 650 -1350 N
P 3 0 0 0 600 1450 600 1100 800 1050 N
P 3 0 0 0 600 1750 600 2100 650 2150 N
P 4 0 0 0 800 -1250 700 -1300 700 -1400 800 -1450 N
X 3.3V 3V3 -1300 -1750 300 R 50 50 1 1 W
X 5V 5V1 -1300 -1850 300 R 50 50 1 1 W
X SPI_5V 5V2 50 2600 300 D 50 50 1 1 W
X 5V 5V3 -1300 -1950 300 R 50 50 1 1 W
X 5V 5V4 -1300 -2050 300 R 50 50 1 1 W
X A0 A0 -1300 850 300 R 50 50 1 1 B
X A1 A1 -1300 750 300 R 50 50 1 1 B
X A10 A10 -1300 -150 300 R 50 50 1 1 B
X A11 A11 -1300 -250 300 R 50 50 1 1 B
X A12 A12 -1300 -350 300 R 50 50 1 1 B
X A13 A13 -1300 -450 300 R 50 50 1 1 B
X A14 A14 -1300 -550 300 R 50 50 1 1 B
X A15 A15 -1300 -650 300 R 50 50 1 1 B
X A2 A2 -1300 650 300 R 50 50 1 1 B
X A3 A3 -1300 550 300 R 50 50 1 1 B
X A4 A4 -1300 450 300 R 50 50 1 1 B
X A5 A5 -1300 350 300 R 50 50 1 1 B
X A6 A6 -1300 250 300 R 50 50 1 1 B
X A7 A7 -1300 150 300 R 50 50 1 1 B
X A8 A8 -1300 50 300 R 50 50 1 1 B
X A9 A9 -1300 -50 300 R 50 50 1 1 B
X AREF AREF -1300 -750 300 R 50 50 1 1 I
X D0_RX0 D0 -1300 2150 300 R 50 50 1 1 B
X D1_TX0 D1 -1300 2050 300 R 50 50 1 1 B
X D10 D10 1300 1350 300 L 50 50 1 1 B
X D11 D11 1300 1250 300 L 50 50 1 1 B
X D12 D12 1300 1150 300 L 50 50 1 1 B
X D13 D13 1300 1050 300 L 50 50 1 1 B
X D14_TX3 D14 -1300 1450 300 R 50 50 1 1 B
X D15_RX3 D15 -1300 1550 300 R 50 50 1 1 B
X D16_TX2 D16 -1300 1650 300 R 50 50 1 1 B
X D17_RX2 D17 -1300 1750 300 R 50 50 1 1 B
X D18_TX1 D18 -1300 1850 300 R 50 50 1 1 B
X D19_RX1 D19 -1300 1950 300 R 50 50 1 1 B
X D2_INT0 D2 1300 2150 300 L 50 50 1 1 B
X D20_SDA D20 -1300 1350 300 R 50 50 1 1 B
X D21_SCL D21 -1300 1250 300 R 50 50 1 1 B C
X D22 D22 1300 950 300 L 50 50 1 1 B
X D23 D23 1300 850 300 L 50 50 1 1 B
X D24 D24 1300 750 300 L 50 50 1 1 B
X D25 D25 1300 650 300 L 50 50 1 1 B
X D26 D26 1300 550 300 L 50 50 1 1 B
X D27 D27 1300 450 300 L 50 50 1 1 B
X D28 D28 1300 350 300 L 50 50 1 1 B
X D29 D29 1300 250 300 L 50 50 1 1 B
X D3_INT1 D3 1300 2050 300 L 50 50 1 1 B
X D30 D30 1300 150 300 L 50 50 1 1 B
X D31 D31 1300 50 300 L 50 50 1 1 B
X D32 D32 1300 -50 300 L 50 50 1 1 B
X D33 D33 1300 -150 300 L 50 50 1 1 B
X D34 D34 1300 -250 300 L 50 50 1 1 B
X D35 D35 1300 -350 300 L 50 50 1 1 B
X D36 D36 1300 -450 300 L 50 50 1 1 B
X D37 D37 1300 -550 300 L 50 50 1 1 B
X D38 D38 1300 -650 300 L 50 50 1 1 B
X D39 D39 1300 -750 300 L 50 50 1 1 B
X D4 D4 1300 1950 300 L 50 50 1 1 B
X D40 D40 1300 -850 300 L 50 50 1 1 B
X D41 D41 1300 -950 300 L 50 50 1 1 B
X D42 D42 1300 -1050 300 L 50 50 1 1 B
X D43 D43 1300 -1150 300 L 50 50 1 1 B
X D44 D44 1300 -1250 300 L 50 50 1 1 B
X D45 D45 1300 -1350 300 L 50 50 1 1 B
X D46 D46 1300 -1450 300 L 50 50 1 1 B
X D47 D47 1300 -1550 300 L 50 50 1 1 B
X D48 D48 1300 -1650 300 L 50 50 1 1 B
X D49 D49 1300 -1750 300 L 50 50 1 1 B
X D5 D5 1300 1850 300 L 50 50 1 1 B
X D50 D50 1300 -1850 300 L 50 50 1 1 B
X D51 D51 1300 -1950 300 L 50 50 1 1 B
X D52 D52 1300 -2050 300 L 50 50 1 1 B
X D53_SS D53 1300 -2150 300 L 50 50 1 1 B
X D6 D6 1300 1750 300 L 50 50 1 1 B
X D7 D7 1300 1650 300 L 50 50 1 1 B
X D8 D8 1300 1550 300 L 50 50 1 1 B
X D9 D9 1300 1450 300 L 50 50 1 1 B
X GND GND1 -1300 -1250 300 R 50 50 1 1 W
X GND GND2 -1300 -1350 300 R 50 50 1 1 W
X GND GND3 -1300 -1450 300 R 50 50 1 1 W
X SPI_GND GND4 150 2600 300 D 50 50 1 1 W
X GND GND5 -1300 -1550 300 R 50 50 1 1 W
X GND GND6 -1300 -1650 300 R 50 50 1 1 W
X IOREF IORF -1300 -1050 300 R 50 50 1 1 O
X SPI_MISO MISO -250 2600 300 D 50 50 1 1 I
X SPI_MOSI MOSI -150 2600 300 D 50 50 1 1 O
X RESET RST1 -1300 -950 300 R 50 50 1 1 C L
X SPI_RESET RST2 250 2600 300 D 50 50 1 1 C L
X SPI_SCK SCK -50 2600 300 D 50 50 1 1 O C
X SCL SCL -1300 1050 300 R 50 50 1 1 B C
X SDA SDA -1300 1150 300 R 50 50 1 1 B
X VIN VIN -1300 -2150 300 R 50 50 1 1 W
ENDDRAW
ENDDEF
#
# conn:CONN_01X01
#
DEF conn:CONN_01X01 P 0 40 Y N 1 F N
F0 "P" 0 100 50 H V C CNN
F1 "conn:CONN_01X01" 100 0 50 V V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
Pin_Header_Straight_1X01
Pin_Header_Angled_1X01
Socket_Strip_Straight_1X01
Socket_Strip_Angled_1X01
$ENDFPLIST
DRAW
S -50 5 10 -5 0 1 0 N
S -50 50 50 -50 0 1 0 N
X P1 1 -200 0 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:CONN_01X02
#
DEF conn:CONN_01X02 P 0 40 Y N 1 F N
F0 "P" 0 150 50 H V C CNN
F1 "conn:CONN_01X02" 100 0 50 V V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
Pin_Header_Straight_1X02
Pin_Header_Angled_1X02
Socket_Strip_Straight_1X02
Socket_Strip_Angled_1X02
$ENDFPLIST
DRAW
S -50 -45 10 -55 0 1 0 N
S -50 55 10 45 0 1 0 N
S -50 100 50 -100 0 1 0 N
X P1 1 -200 50 150 R 50 50 1 1 P
X P2 2 -200 -50 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:CONN_01X04
#
DEF conn:CONN_01X04 P 0 40 Y N 1 F N
F0 "P" 0 250 50 H V C CNN
F1 "conn:CONN_01X04" 100 0 50 V V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
Pin_Header_Straight_1X04
Pin_Header_Angled_1X04
Socket_Strip_Straight_1X04
Socket_Strip_Angled_1X04
$ENDFPLIST
DRAW
S -50 -145 10 -155 0 1 0 N
S -50 -45 10 -55 0 1 0 N
S -50 55 10 45 0 1 0 N
S -50 155 10 145 0 1 0 N
S -50 200 50 -200 0 1 0 N
X P1 1 -200 150 150 R 50 50 1 1 P
X P2 2 -200 50 150 R 50 50 1 1 P
X P3 3 -200 -50 150 R 50 50 1 1 P
X P4 4 -200 -150 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:CONN_02X05
#
DEF conn:CONN_02X05 P 0 1 Y N 1 F N
F0 "P" 0 300 50 H V C CNN
F1 "conn:CONN_02X05" 0 -300 50 H V C CNN
F2 "" 0 -1200 50 H V C CNN
F3 "" 0 -1200 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X05
Pin_Header_Angled_2X05
Socket_Strip_Straight_2X05
Socket_Strip_Angled_2X05
$ENDFPLIST
DRAW
S -100 -195 -50 -205 0 1 0 N
S -100 -95 -50 -105 0 1 0 N
S -100 5 -50 -5 0 1 0 N
S -100 105 -50 95 0 1 0 N
S -100 205 -50 195 0 1 0 N
S -100 250 100 -250 0 1 0 N
S 50 -195 100 -205 0 1 0 N
S 50 -95 100 -105 0 1 0 N
S 50 5 100 -5 0 1 0 N
S 50 105 100 95 0 1 0 N
S 50 205 100 195 0 1 0 N
X P1 1 -250 200 150 R 50 50 1 1 P
X P10 10 250 -200 150 L 50 50 1 1 P
X P2 2 250 200 150 L 50 50 1 1 P
X P3 3 -250 100 150 R 50 50 1 1 P
X P4 4 250 100 150 L 50 50 1 1 P
X P5 5 -250 0 150 R 50 50 1 1 P
X P6 6 250 0 150 L 50 50 1 1 P
X P7 7 -250 -100 150 R 50 50 1 1 P
X P8 8 250 -100 150 L 50 50 1 1 P
X P9 9 -250 -200 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:CONN_02X06
#
DEF conn:CONN_02X06 P 0 1 Y N 1 F N
F0 "P" 0 350 50 H V C CNN
F1 "conn:CONN_02X06" 0 -350 50 H V C CNN
F2 "" 0 -1200 50 H V C CNN
F3 "" 0 -1200 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X06
Pin_Header_Angled_2X06
Socket_Strip_Straight_2X06
Socket_Strip_Angled_2X06
$ENDFPLIST
DRAW
S -100 -245 -50 -255 0 1 0 N
S -100 -145 -50 -155 0 1 0 N
S -100 -45 -50 -55 0 1 0 N
S -100 55 -50 45 0 1 0 N
S -100 155 -50 145 0 1 0 N
S -100 255 -50 245 0 1 0 N
S -100 300 100 -300 0 1 0 N
S 50 -245 100 -255 0 1 0 N
S 50 -145 100 -155 0 1 0 N
S 50 -45 100 -55 0 1 0 N
S 50 55 100 45 0 1 0 N
S 50 155 100 145 0 1 0 N
S 50 255 100 245 0 1 0 N
X P1 1 -250 250 150 R 50 50 1 1 P
X P10 10 250 -150 150 L 50 50 1 1 P
X P11 11 -250 -250 150 R 50 50 1 1 P
X P12 12 250 -250 150 L 50 50 1 1 P
X P2 2 250 250 150 L 50 50 1 1 P
X P3 3 -250 150 150 R 50 50 1 1 P
X P4 4 250 150 150 L 50 50 1 1 P
X P5 5 -250 50 150 R 50 50 1 1 P
X P6 6 250 50 150 L 50 50 1 1 P
X P7 7 -250 -50 150 R 50 50 1 1 P
X P8 8 250 -50 150 L 50 50 1 1 P
X P9 9 -250 -150 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:CONN_02X25
#
DEF conn:CONN_02X25 P 0 1 Y N 1 F N
F0 "P" 0 1300 50 H V C CNN
F1 "conn:CONN_02X25" 0 0 50 V V C CNN
F2 "" 0 -750 50 H V C CNN
F3 "" 0 -750 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X25
Pin_Header_Angled_2X25
Socket_Strip_Straight_2X25
Socket_Strip_Angled_2X25
$ENDFPLIST
DRAW
S -100 -1195 -50 -1205 0 1 0 N
S -100 -1095 -50 -1105 0 1 0 N
S -100 -995 -50 -1005 0 1 0 N
S -100 -895 -50 -905 0 1 0 N
S -100 -795 -50 -805 0 1 0 N
S -100 -695 -50 -705 0 1 0 N
S -100 -595 -50 -605 0 1 0 N
S -100 -495 -50 -505 0 1 0 N
S -100 -395 -50 -405 0 1 0 N
S -100 -295 -50 -305 0 1 0 N
S -100 -195 -50 -205 0 1 0 N
S -100 -95 -50 -105 0 1 0 N
S -100 5 -50 -5 0 1 0 N
S -100 105 -50 95 0 1 0 N
S -100 205 -50 195 0 1 0 N
S -100 305 -50 295 0 1 0 N
S -100 405 -50 395 0 1 0 N
S -100 505 -50 495 0 1 0 N
S -100 605 -50 595 0 1 0 N
S -100 705 -50 695 0 1 0 N
S -100 805 -50 795 0 1 0 N
S -100 905 -50 895 0 1 0 N
S -100 1005 -50 995 0 1 0 N
S -100 1105 -50 1095 0 1 0 N
S -100 1205 -50 1195 0 1 0 N
S -100 1250 100 -1250 0 1 0 N
S 50 -1195 100 -1205 0 1 0 N
S 50 -1095 100 -1105 0 1 0 N
S 50 -995 100 -1005 0 1 0 N
S 50 -895 100 -905 0 1 0 N
S 50 -795 100 -805 0 1 0 N
S 50 -695 100 -705 0 1 0 N
S 50 -595 100 -605 0 1 0 N
S 50 -495 100 -505 0 1 0 N
S 50 -395 100 -405 0 1 0 N
S 50 -295 100 -305 0 1 0 N
S 50 -195 100 -205 0 1 0 N
S 50 -95 100 -105 0 1 0 N
S 50 5 100 -5 0 1 0 N
S 50 105 100 95 0 1 0 N
S 50 205 100 195 0 1 0 N
S 50 305 100 295 0 1 0 N
S 50 405 100 395 0 1 0 N
S 50 505 100 495 0 1 0 N
S 50 605 100 595 0 1 0 N
S 50 705 100 695 0 1 0 N
S 50 805 100 795 0 1 0 N
S 50 905 100 895 0 1 0 N
S 50 1005 100 995 0 1 0 N
S 50 1105 100 1095 0 1 0 N
S 50 1205 100 1195 0 1 0 N
X P1 1 -250 1200 150 R 50 50 1 1 P
X P10 10 250 800 150 L 50 50 1 1 P
X P11 11 -250 700 150 R 50 50 1 1 P
X P12 12 250 700 150 L 50 50 1 1 P
X P13 13 -250 600 150 R 50 50 1 1 P
X P14 14 250 600 150 L 50 50 1 1 P
X P15 15 -250 500 150 R 50 50 1 1 P
X P16 16 250 500 150 L 50 50 1 1 P
X P17 17 -250 400 150 R 50 50 1 1 P
X P18 18 250 400 150 L 50 50 1 1 P
X P19 19 -250 300 150 R 50 50 1 1 P
X P2 2 250 1200 150 L 50 50 1 1 P
X P20 20 250 300 150 L 50 50 1 1 P
X P21 21 -250 200 150 R 50 50 1 1 P
X P22 22 250 200 150 L 50 50 1 1 P
X P23 23 -250 100 150 R 50 50 1 1 P
X P24 24 250 100 150 L 50 50 1 1 P
X P25 25 -250 0 150 R 50 50 1 1 P
X P26 26 250 0 150 L 50 50 1 1 P
X P27 27 -250 -100 150 R 50 50 1 1 P
X P28 28 250 -100 150 L 50 50 1 1 P
X P29 29 -250 -200 150 R 50 50 1 1 P
X P3 3 -250 1100 150 R 50 50 1 1 P
X P30 30 250 -200 150 L 50 50 1 1 P
X P31 31 -250 -300 150 R 50 50 1 1 P
X P32 32 250 -300 150 L 50 50 1 1 P
X P33 33 -250 -400 150 R 50 50 1 1 P
X P34 34 250 -400 150 L 50 50 1 1 P
X P35 35 -250 -500 150 R 50 50 1 1 P
X P36 36 250 -500 150 L 50 50 1 1 P
X P37 37 -250 -600 150 R 50 50 1 1 P
X P38 38 250 -600 150 L 50 50 1 1 P
X P39 39 -250 -700 150 R 50 50 1 1 P
X P4 4 250 1100 150 L 50 50 1 1 P
X P40 40 250 -700 150 L 50 50 1 1 P
X P41 41 -250 -800 150 R 50 50 1 1 P
X P42 42 250 -800 150 L 50 50 1 1 P
X P43 43 -250 -900 150 R 50 50 1 1 P
X P44 44 250 -900 150 L 50 50 1 1 P
X P45 45 -250 -1000 150 R 50 50 1 1 P
X P46 46 250 -1000 150 L 50 50 1 1 P
X P47 47 -250 -1100 150 R 50 50 1 1 P
X P48 48 250 -1100 150 L 50 50 1 1 P
X P49 49 -250 -1200 150 R 50 50 1 1 P
X P5 5 -250 1000 150 R 50 50 1 1 P
X P50 50 250 -1200 150 L 50 50 1 1 P
X P6 6 250 1000 150 L 50 50 1 1 P
X P7 7 -250 900 150 R 50 50 1 1 P
X P8 8 250 900 150 L 50 50 1 1 P
X P9 9 -250 800 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:JACK_2P
#
DEF conn:JACK_2P J 0 40 Y Y 1 F N
F0 "J" -350 -200 50 H V C CNN
F1 "conn:JACK_2P" -150 250 50 H V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
DRAW
S -450 150 -400 -100 0 1 0 F
S 300 -150 -400 200 0 1 0 N
P 3 0 1 0 150 0 300 0 300 0 N
P 4 0 1 0 0 -100 -50 -50 -100 -100 -100 -100 N
P 4 0 1 0 0 -100 300 -100 300 -100 300 -100 N
P 4 0 1 0 50 -50 100 -100 150 -50 150 -50 N
P 4 0 1 0 150 0 100 0 100 -100 100 -100 N
P 5 0 1 0 300 150 -250 150 -300 100 -350 150 -350 150 N
X ~ 1 450 -100 150 L 50 50 1 1 P
X ~ 2 450 0 150 L 50 50 1 1 P
X ~ 3 450 150 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# conn:Screw_Terminal_1x02
#
DEF conn:Screw_Terminal_1x02 J 0 30 Y N 1 F N
F0 "J" 0 250 50 H V C TNN
F1 "conn:Screw_Terminal_1x02" -150 0 50 V V C TNN
F2 "" 0 -225 50 H I C CNN
F3 "" -25 0 50 H I C CNN
$FPLIST
bornier2
TerminalBlock*2pol
$ENDFPLIST
DRAW
C 25 -100 50 0 1 10 N
C 25 100 50 0 1 10 N
S -50 175 100 -175 0 1 10 f
P 2 0 1 10 -15 -75 50 -140 N
P 2 0 1 10 0 140 65 75 N
P 2 0 1 10 50 60 -15 125 N
P 2 0 1 10 65 -125 0 -60 N
X ~ 1 200 100 100 L 50 50 1 1 P
X ~ 2 200 -100 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# device:C_Small
#
DEF device:C_Small C 0 10 N N 1 F N
F0 "C" 10 70 50 H V L CNN
F1 "device:C_Small" 10 -80 50 H V L CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
C?
C_????_*
C_????
SMD*_c
Capacitor*
$ENDFPLIST
DRAW
P 2 0 1 13 -60 -20 60 -20 N
P 2 0 1 12 -60 20 60 20 N
X ~ 1 0 100 80 D 50 50 1 1 P
X ~ 2 0 -100 80 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 V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
R_*
Resistor_*
$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
#
# device:Speaker
#
DEF device:Speaker LS 0 0 Y N 1 F N
F0 "LS" 50 225 50 H V R CNN
F1 "device:Speaker" 50 150 50 H V R CNN
F2 "" 0 -200 50 H V C CNN
F3 "" -10 -50 50 H V C CNN
DRAW
S -100 50 40 -150 0 0 10 N
P 4 0 0 10 40 50 140 150 140 -250 40 -150 N
X 1 1 -200 0 100 R 50 50 1 1 I
X 2 2 -200 -100 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# power:+3.3V
#
DEF power:+3.3V #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -150 50 H I C CNN
F1 "power:+3.3V" 0 140 50 H V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
ALIAS +3.3V
DRAW
P 2 0 1 0 -30 50 0 100 N
P 2 0 1 0 0 0 0 100 N
P 2 0 1 0 0 100 30 50 N
X +3V3 1 0 0 0 U 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# power:+5V
#
DEF power:+5V #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -150 50 H I C CNN
F1 "power:+5V" 0 140 50 H V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
DRAW
P 2 0 1 0 -30 50 0 100 N
P 2 0 1 0 0 0 0 100 N
P 2 0 1 0 0 100 30 50 N
X +5V 1 0 0 0 U 50 50 1 1 W N
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 V C CNN
F3 "" 0 0 50 H V 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
#
#End Library

+ 3
- 0
pcb_mega/ZMHW_Map-rescue.dcm View File

@ -0,0 +1,3 @@
EESchema-DOCLIB Version 2.0
#
#End Doc Library

+ 535
- 0
pcb_mega/ZMHW_Map-rescue.lib View File

@ -0,0 +1,535 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# Arduino_Mega2560_Shield-arduino
#
DEF Arduino_Mega2560_Shield-arduino XA 0 40 Y Y 1 F N
F0 "XA" 100 0 60 V V C CNN
F1 "Arduino_Mega2560_Shield-arduino" -100 0 60 V V C CNN
F2 "" 700 2750 60 H I C CNN
F3 "" 700 2750 60 H I C CNN
$FPLIST
Arduino_Mega2560_Shield
$ENDFPLIST
DRAW
T 900 -500 50 60 0 0 0 "Analogue I/O" Normal 0 C C
T 900 -500 1200 60 0 0 0 I²C Normal 0 C C
T 900 -500 -1000 60 0 0 0 Misc. Normal 0 C C
T 900 -500 -1700 60 0 0 0 Power Normal 0 C C
T 900 600 -1350 60 0 0 0 PWM Normal 0 C C
T 900 600 1600 60 0 0 0 PWM Normal 0 C C
T 900 -500 1800 60 0 0 0 Serial Normal 0 C C
T 0 0 1800 60 0 0 0 SPI Normal 0 C C
T 900 500 0 60 0 1 0 GPIO Normal 0 C C
S -1000 -2300 1000 2300 0 0 0 f
S -800 -2150 -500 -2150 0 0 0 N
S -750 -1250 -500 -1250 0 0 0 N
S -750 -750 -500 -750 0 0 0 N
S -750 1050 -500 1050 0 0 0 N
S -700 -1050 -650 -1050 0 0 0 N
S -700 -950 -650 -950 0 0 0 N
S -650 -1000 -550 -1000 0 0 0 N
S -650 -950 -650 -1050 0 0 0 N
S -650 2150 -500 2150 0 0 0 N
S -600 1350 -500 1350 0 0 0 N
S -600 1450 -500 1450 0 0 0 N
S -500 -2150 -500 -1900 0 0 0 N
S -500 -1250 -500 -1500 0 0 0 N
S -500 1050 -500 1100 0 0 0 N
S -500 1350 -500 1300 0 0 0 N
S -500 1650 -500 1450 0 0 0 N
S -500 1950 -500 2150 0 0 0 N
S -250 1900 -250 1800 0 0 0 N
S -100 1800 -250 1800 0 0 0 N
S 250 1800 100 1800 0 0 0 N
S 250 1850 250 1800 0 0 0 N
S 500 -2150 500 -150 1 0 0 N
S 500 2150 500 150 1 0 0 N
P 2 0 0 0 -850 850 -500 850 N
P 2 0 0 0 -500 -750 -500 -300 N
P 2 0 0 0 -500 400 -500 850 N
P 2 0 0 0 500 -2150 650 -2150 N
P 2 0 0 0 500 2150 650 2150 N
P 2 0 0 0 700 -1350 650 -1350 N
P 3 0 0 0 600 1450 600 1100 800 1050 N
P 3 0 0 0 600 1750 600 2100 650 2150 N
P 4 0 0 0 800 -1250 700 -1300 700 -1400 800 -1450 N
X 3.3V 3V3 -1300 -1750 300 R 50 50 1 1 W
X 5V 5V1 -1300 -1850 300 R 50 50 1 1 W
X SPI_5V 5V2 50 2600 300 D 50 50 1 1 W
X 5V 5V3 -1300 -1950 300 R 50 50 1 1 W
X 5V 5V4 -1300 -2050 300 R 50 50 1 1 W
X A0 A0 -1300 850 300 R 50 50 1 1 B
X A1 A1 -1300 750 300 R 50 50 1 1 B
X A10 A10 -1300 -150 300 R 50 50 1 1 B
X A11 A11 -1300 -250 300 R 50 50 1 1 B
X A12 A12 -1300 -350 300 R 50 50 1 1 B
X A13 A13 -1300 -450 300 R 50 50 1 1 B
X A14 A14 -1300 -550 300 R 50 50 1 1 B
X A15 A15 -1300 -650 300 R 50 50 1 1 B
X A2 A2 -1300 650 300 R 50 50 1 1 B
X A3 A3 -1300 550 300 R 50 50 1 1 B
X A4 A4 -1300 450 300 R 50 50 1 1 B
X A5 A5 -1300 350 300 R 50 50 1 1 B
X A6 A6 -1300 250 300 R 50 50 1 1 B
X A7 A7 -1300 150 300 R 50 50 1 1 B
X A8 A8 -1300 50 300 R 50 50 1 1 B
X A9 A9 -1300 -50 300 R 50 50 1 1 B
X AREF AREF -1300 -750 300 R 50 50 1 1 I
X D0_RX0 D0 -1300 2150 300 R 50 50 1 1 B
X D1_TX0 D1 -1300 2050 300 R 50 50 1 1 B
X D10 D10 1300 1350 300 L 50 50 1 1 B
X D11 D11 1300 1250 300 L 50 50 1 1 B
X D12 D12 1300 1150 300 L 50 50 1 1 B
X D13 D13 1300 1050 300 L 50 50 1 1 B
X D14_TX3 D14 -1300 1450 300 R 50 50 1 1 B
X D15_RX3 D15 -1300 1550 300 R 50 50 1 1 B
X D16_TX2 D16 -1300 1650 300 R 50 50 1 1 B
X D17_RX2 D17 -1300 1750 300 R 50 50 1 1 B
X D18_TX1 D18 -1300 1850 300 R 50 50 1 1 B
X D19_RX1 D19 -1300 1950 300 R 50 50 1 1 B
X D2_INT0 D2 1300 2150 300 L 50 50 1 1 B
X D20_SDA D20 -1300 1350 300 R 50 50 1 1 B
X D21_SCL D21 -1300 1250 300 R 50 50 1 1 B C
X D22 D22 1300 950 300 L 50 50 1 1 B
X D23 D23 1300 850 300 L 50 50 1 1 B
X D24 D24 1300 750 300 L 50 50 1 1 B
X D25 D25 1300 650 300 L 50 50 1 1 B
X D26 D26 1300 550 300 L 50 50 1 1 B
X D27 D27 1300 450 300 L 50 50 1 1 B
X D28 D28 1300 350 300 L 50 50 1 1 B
X D29 D29 1300 250 300 L 50 50 1 1 B
X D3_INT1 D3 1300 2050 300 L 50 50 1 1 B
X D30 D30 1300 150 300 L 50 50 1 1 B
X D31 D31 1300 50 300 L 50 50 1 1 B
X D32 D32 1300 -50 300 L 50 50 1 1 B
X D33 D33 1300 -150 300 L 50 50 1 1 B
X D34 D34 1300 -250 300 L 50 50 1 1 B
X D35 D35 1300 -350 300 L 50 50 1 1 B
X D36 D36 1300 -450 300 L 50 50 1 1 B
X D37 D37 1300 -550 300 L 50 50 1 1 B
X D38 D38 1300 -650 300 L 50 50 1 1 B
X D39 D39 1300 -750 300 L 50 50 1 1 B
X D4 D4 1300 1950 300 L 50 50 1 1 B
X D40 D40 1300 -850 300 L 50 50 1 1 B
X D41 D41 1300 -950 300 L 50 50 1 1 B
X D42 D42 1300 -1050 300 L 50 50 1 1 B
X D43 D43 1300 -1150 300 L 50 50 1 1 B
X D44 D44 1300 -1250 300 L 50 50 1 1 B
X D45 D45 1300 -1350 300 L 50 50 1 1 B
X D46 D46 1300 -1450 300 L 50 50 1 1 B
X D47 D47 1300 -1550 300 L 50 50 1 1 B
X D48 D48 1300 -1650 300 L 50 50 1 1 B
X D49 D49 1300 -1750 300 L 50 50 1 1 B
X D5 D5 1300 1850 300 L 50 50 1 1 B
X D50 D50 1300 -1850 300 L 50 50 1 1 B
X D51 D51 1300 -1950 300 L 50 50 1 1 B
X D52 D52 1300 -2050 300 L 50 50 1 1 B
X D53_SS D53 1300 -2150 300 L 50 50 1 1 B
X D6 D6 1300 1750 300 L 50 50 1 1 B
X D7 D7 1300 1650 300 L 50 50 1 1 B
X D8 D8 1300 1550 300 L 50 50 1 1 B
X D9 D9 1300 1450 300 L 50 50 1 1 B
X GND GND1 -1300 -1250 300 R 50 50 1 1 W
X GND GND2 -1300 -1350 300 R 50 50 1 1 W
X GND GND3 -1300 -1450 300 R 50 50 1 1 W
X SPI_GND GND4 150 2600 300 D 50 50 1 1 W
X GND GND5 -1300 -1550 300 R 50 50 1 1 W
X GND GND6 -1300 -1650 300 R 50 50 1 1 W
X IOREF IORF -1300 -1050 300 R 50 50 1 1 O
X SPI_MISO MISO -250 2600 300 D 50 50 1 1 I
X SPI_MOSI MOSI -150 2600 300 D 50 50 1 1 O
X RESET RST1 -1300 -950 300 R 50 50 1 1 C L
X SPI_RESET RST2 250 2600 300 D 50 50 1 1 C L
X SPI_SCK SCK -50 2600 300 D 50 50 1 1 O C
X SCL SCL -1300 1050 300 R 50 50 1 1 B C
X SDA SDA -1300 1150 300 R 50 50 1 1 B
X VIN VIN -1300 -2150 300 R 50 50 1 1 W
ENDDRAW
ENDDEF
#
# CONN_01X01-conn
#
DEF CONN_01X01-conn P 0 40 Y N 1 F N
F0 "P" 0 100 50 H V C CNN
F1 "CONN_01X01-conn" 100 0 50 V V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
Pin_Header_Straight_1X01
Pin_Header_Angled_1X01
Socket_Strip_Straight_1X01
Socket_Strip_Angled_1X01
$ENDFPLIST
DRAW
S -50 5 10 -5 0 1 0 N
S -50 50 50 -50 0 1 0 N
X P1 1 -200 0 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_01X02-conn
#
DEF CONN_01X02-conn P 0 40 Y N 1 F N
F0 "P" 0 150 50 H V C CNN
F1 "CONN_01X02-conn" 100 0 50 V V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
Pin_Header_Straight_1X02
Pin_Header_Angled_1X02
Socket_Strip_Straight_1X02
Socket_Strip_Angled_1X02
$ENDFPLIST
DRAW
S -50 -45 10 -55 0 1 0 N
S -50 55 10 45 0 1 0 N
S -50 100 50 -100 0 1 0 N
X P1 1 -200 50 150 R 50 50 1 1 P
X P2 2 -200 -50 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_01X04-conn
#
DEF CONN_01X04-conn P 0 40 Y N 1 F N
F0 "P" 0 250 50 H V C CNN
F1 "CONN_01X04-conn" 100 0 50 V V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
Pin_Header_Straight_1X04
Pin_Header_Angled_1X04
Socket_Strip_Straight_1X04
Socket_Strip_Angled_1X04
$ENDFPLIST
DRAW
S -50 -145 10 -155 0 1 0 N
S -50 -45 10 -55 0 1 0 N
S -50 55 10 45 0 1 0 N
S -50 155 10 145 0 1 0 N
S -50 200 50 -200 0 1 0 N
X P1 1 -200 150 150 R 50 50 1 1 P
X P2 2 -200 50 150 R 50 50 1 1 P
X P3 3 -200 -50 150 R 50 50 1 1 P
X P4 4 -200 -150 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_02X05-conn
#
DEF CONN_02X05-conn P 0 1 Y N 1 F N
F0 "P" 0 300 50 H V C CNN
F1 "CONN_02X05-conn" 0 -300 50 H V C CNN
F2 "" 0 -1200 50 H V C CNN
F3 "" 0 -1200 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X05
Pin_Header_Angled_2X05
Socket_Strip_Straight_2X05
Socket_Strip_Angled_2X05
$ENDFPLIST
DRAW
S -100 -195 -50 -205 0 1 0 N
S -100 -95 -50 -105 0 1 0 N
S -100 5 -50 -5 0 1 0 N
S -100 105 -50 95 0 1 0 N
S -100 205 -50 195 0 1 0 N
S -100 250 100 -250 0 1 0 N
S 50 -195 100 -205 0 1 0 N
S 50 -95 100 -105 0 1 0 N
S 50 5 100 -5 0 1 0 N
S 50 105 100 95 0 1 0 N
S 50 205 100 195 0 1 0 N
X P1 1 -250 200 150 R 50 50 1 1 P
X P10 10 250 -200 150 L 50 50 1 1 P
X P2 2 250 200 150 L 50 50 1 1 P
X P3 3 -250 100 150 R 50 50 1 1 P
X P4 4 250 100 150 L 50 50 1 1 P
X P5 5 -250 0 150 R 50 50 1 1 P
X P6 6 250 0 150 L 50 50 1 1 P
X P7 7 -250 -100 150 R 50 50 1 1 P
X P8 8 250 -100 150 L 50 50 1 1 P
X P9 9 -250 -200 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_02X06-conn
#
DEF CONN_02X06-conn P 0 1 Y N 1 F N
F0 "P" 0 350 50 H V C CNN
F1 "CONN_02X06-conn" 0 -350 50 H V C CNN
F2 "" 0 -1200 50 H V C CNN
F3 "" 0 -1200 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X06
Pin_Header_Angled_2X06
Socket_Strip_Straight_2X06
Socket_Strip_Angled_2X06
$ENDFPLIST
DRAW
S -100 -245 -50 -255 0 1 0 N
S -100 -145 -50 -155 0 1 0 N
S -100 -45 -50 -55 0 1 0 N
S -100 55 -50 45 0 1 0 N
S -100 155 -50 145 0 1 0 N
S -100 255 -50 245 0 1 0 N
S -100 300 100 -300 0 1 0 N
S 50 -245 100 -255 0 1 0 N
S 50 -145 100 -155 0 1 0 N
S 50 -45 100 -55 0 1 0 N
S 50 55 100 45 0 1 0 N
S 50 155 100 145 0 1 0 N
S 50 255 100 245 0 1 0 N
X P1 1 -250 250 150 R 50 50 1 1 P
X P10 10 250 -150 150 L 50 50 1 1 P
X P11 11 -250 -250 150 R 50 50 1 1 P
X P12 12 250 -250 150 L 50 50 1 1 P
X P2 2 250 250 150 L 50 50 1 1 P
X P3 3 -250 150 150 R 50 50 1 1 P
X P4 4 250 150 150 L 50 50 1 1 P
X P5 5 -250 50 150 R 50 50 1 1 P
X P6 6 250 50 150 L 50 50 1 1 P
X P7 7 -250 -50 150 R 50 50 1 1 P
X P8 8 250 -50 150 L 50 50 1 1 P
X P9 9 -250 -150 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_02X25-conn
#
DEF CONN_02X25-conn P 0 1 Y N 1 F N
F0 "P" 0 1300 50 H V C CNN
F1 "CONN_02X25-conn" 0 0 50 V V C CNN
F2 "" 0 -750 50 H V C CNN
F3 "" 0 -750 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X25
Pin_Header_Angled_2X25
Socket_Strip_Straight_2X25
Socket_Strip_Angled_2X25
$ENDFPLIST
DRAW
S -100 -1195 -50 -1205 0 1 0 N
S -100 -1095 -50 -1105 0 1 0 N
S -100 -995 -50 -1005 0 1 0 N
S -100 -895 -50 -905 0 1 0 N
S -100 -795 -50 -805 0 1 0 N
S -100 -695 -50 -705 0 1 0 N
S -100 -595 -50 -605 0 1 0 N
S -100 -495 -50 -505 0 1 0 N
S -100 -395 -50 -405 0 1 0 N
S -100 -295 -50 -305 0 1 0 N
S -100 -195 -50 -205 0 1 0 N
S -100 -95 -50 -105 0 1 0 N
S -100 5 -50 -5 0 1 0 N
S -100 105 -50 95 0 1 0 N
S -100 205 -50 195 0 1 0 N
S -100 305 -50 295 0 1 0 N
S -100 405 -50 395 0 1 0 N
S -100 505 -50 495 0 1 0 N
S -100 605 -50 595 0 1 0 N
S -100 705 -50 695 0 1 0 N
S -100 805 -50 795 0 1 0 N
S -100 905 -50 895 0 1 0 N
S -100 1005 -50 995 0 1 0 N
S -100 1105 -50 1095 0 1 0 N
S -100 1205 -50 1195 0 1 0 N
S -100 1250 100 -1250 0 1 0 N
S 50 -1195 100 -1205 0 1 0 N
S 50 -1095 100 -1105 0 1 0 N
S 50 -995 100 -1005 0 1 0 N
S 50 -895 100 -905 0 1 0 N
S 50 -795 100 -805 0 1 0 N
S 50 -695 100 -705 0 1 0 N
S 50 -595 100 -605 0 1 0 N
S 50 -495 100 -505 0 1 0 N
S 50 -395 100 -405 0 1 0 N
S 50 -295 100 -305 0 1 0 N
S 50 -195 100 -205 0 1 0 N
S 50 -95 100 -105 0 1 0 N
S 50 5 100 -5 0 1 0 N
S 50 105 100 95 0 1 0 N
S 50 205 100 195 0 1 0 N
S 50 305 100 295 0 1 0 N
S 50 405 100 395 0 1 0 N
S 50 505 100 495 0 1 0 N
S 50 605 100 595 0 1 0 N
S 50 705 100 695 0 1 0 N
S 50 805 100 795 0 1 0 N
S 50 905 100 895 0 1 0 N
S 50 1005 100 995 0 1 0 N
S 50 1105 100 1095 0 1 0 N
S 50 1205 100 1195 0 1 0 N
X P1 1 -250 1200 150 R 50 50 1 1 P
X P10 10 250 800 150 L 50 50 1 1 P
X P11 11 -250 700 150 R 50 50 1 1 P
X P12 12 250 700 150 L 50 50 1 1 P
X P13 13 -250 600 150 R 50 50 1 1 P
X P14 14 250 600 150 L 50 50 1 1 P
X P15 15 -250 500 150 R 50 50 1 1 P
X P16 16 250 500 150 L 50 50 1 1 P
X P17 17 -250 400 150 R 50 50 1 1 P
X P18 18 250 400 150 L 50 50 1 1 P
X P19 19 -250 300 150 R 50 50 1 1 P
X P2 2 250 1200 150 L 50 50 1 1 P
X P20 20 250 300 150 L 50 50 1 1 P
X P21 21 -250 200 150 R 50 50 1 1 P
X P22 22 250 200 150 L 50 50 1 1 P
X P23 23 -250 100 150 R 50 50 1 1 P
X P24 24 250 100 150 L 50 50 1 1 P
X P25 25 -250 0 150 R 50 50 1 1 P
X P26 26 250 0 150 L 50 50 1 1 P
X P27 27 -250 -100 150 R 50 50 1 1 P
X P28 28 250 -100 150 L 50 50 1 1 P
X P29 29 -250 -200 150 R 50 50 1 1 P
X P3 3 -250 1100 150 R 50 50 1 1 P
X P30 30 250 -200 150 L 50 50 1 1 P
X P31 31 -250 -300 150 R 50 50 1 1 P
X P32 32 250 -300 150 L 50 50 1 1 P
X P33 33 -250 -400 150 R 50 50 1 1 P
X P34 34 250 -400 150 L 50 50 1 1 P
X P35 35 -250 -500 150 R 50 50 1 1 P
X P36 36 250 -500 150 L 50 50 1 1 P
X P37 37 -250 -600 150 R 50 50 1 1 P
X P38 38 250 -600 150 L 50 50 1 1 P
X P39 39 -250 -700 150 R 50 50 1 1 P
X P4 4 250 1100 150 L 50 50 1 1 P
X P40 40 250 -700 150 L 50 50 1 1 P
X P41 41 -250 -800 150 R 50 50 1 1 P
X P42 42 250 -800 150 L 50 50 1 1 P
X P43 43 -250 -900 150 R 50 50 1 1 P
X P44 44 250 -900 150 L 50 50 1 1 P
X P45 45 -250 -1000 150 R 50 50 1 1 P
X P46 46 250 -1000 150 L 50 50 1 1 P
X P47 47 -250 -1100 150 R 50 50 1 1 P
X P48 48 250 -1100 150 L 50 50 1 1 P
X P49 49 -250 -1200 150 R 50 50 1 1 P
X P5 5 -250 1000 150 R 50 50 1 1 P
X P50 50 250 -1200 150 L 50 50 1 1 P
X P6 6 250 1000 150 L 50 50 1 1 P
X P7 7 -250 900 150 R 50 50 1 1 P
X P8 8 250 900 150 L 50 50 1 1 P
X P9 9 -250 800 150 R 50 50 1 1 P
ENDDRAW
ENDDEF
#
# C_Small-device
#
DEF C_Small-device C 0 10 N N 1 F N
F0 "C" 10 70 50 H V L CNN
F1 "C_Small-device" 10 -80 50 H V L CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
C?
C_????_*
C_????
SMD*_c
Capacitor*
$ENDFPLIST
DRAW
P 2 0 1 13 -60 -20 60 -20 N
P 2 0 1 12 -60 20 60 20 N
X ~ 1 0 100 80 D 50 50 1 1 P
X ~ 2 0 -100 80 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# JACK_2P-conn
#
DEF JACK_2P-conn J 0 40 Y Y 1 F N
F0 "J" -350 -200 50 H V C CNN
F1 "JACK_2P-conn" -150 250 50 H V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
DRAW
S -450 150 -400 -100 0 1 0 F
S 300 -150 -400 200 0 1 0 N
P 3 0 1 0 150 0 300 0 300 0 N
P 4 0 1 0 0 -100 -50 -50 -100 -100 -100 -100 N
P 4 0 1 0 0 -100 300 -100 300 -100 300 -100 N
P 4 0 1 0 50 -50 100 -100 150 -50 150 -50 N
P 4 0 1 0 150 0 100 0 100 -100 100 -100 N
P 5 0 1 0 300 150 -250 150 -300 100 -350 150 -350 150 N
X ~ 1 450 -100 150 L 50 50 1 1 P
X ~ 2 450 0 150 L 50 50 1 1 P
X ~ 3 450 150 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# R-device
#
DEF R-device R 0 0 N Y 1 F N
F0 "R" 80 0 50 V V C CNN
F1 "R-device" 0 0 50 V V C CNN
F2 "" -70 0 50 V V C CNN
F3 "" 0 0 50 H V C CNN
$FPLIST
R_*
Resistor_*
$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
#
# Screw_Terminal_1x02-conn
#
DEF Screw_Terminal_1x02-conn J 0 30 Y N 1 F N
F0 "J" 0 250 50 H V C TNN
F1 "Screw_Terminal_1x02-conn" -150 0 50 V V C TNN
F2 "" 0 -225 50 H I C CNN
F3 "" -25 0 50 H I C CNN
$FPLIST
bornier2
TerminalBlock*2pol
$ENDFPLIST
DRAW
C 25 -100 50 0 1 10 N
C 25 100 50 0 1 10 N
S -50 175 100 -175 0 1 10 f
P 2 0 1 10 -15 -75 50 -140 N
P 2 0 1 10 0 140 65 75 N
P 2 0 1 10 50 60 -15 125 N
P 2 0 1 10 65 -125 0 -60 N
X ~ 1 200 100 100 L 50 50 1 1 P
X ~ 2 200 -100 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Speaker-device
#
DEF Speaker-device LS 0 0 Y N 1 F N
F0 "LS" 50 225 50 H V R CNN
F1 "Speaker-device" 50 150 50 H V R CNN
F2 "" 0 -200 50 H V C CNN
F3 "" -10 -50 50 H V C CNN
DRAW
S -100 50 40 -150 0 0 10 N
P 4 0 0 10 40 50 140 150 140 -250 40 -150 N
X 1 1 -200 0 100 R 50 50 1 1 I
X 2 2 -200 -100 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# WS2812-Worldsemi
#
DEF WS2812-Worldsemi LED 0 40 Y Y 1 F N
F0 "LED" 0 -200 50 H V C CNN
F1 "WS2812-Worldsemi" 0 200 50 H V C CNN
F2 "LEDs:LED_WS2812-PLCC6" -100 -300 50 H V C CNN
F3 "" 0 0 50 H V C CNN
DRAW
S -300 150 300 -150 0 1 10 f
X DOUT 1 400 0 100 L 50 50 1 1 O
X DIN 2 -400 -100 100 R 50 50 1 1 I
X VCC 3 -400 100 100 R 50 50 1 1 W
X VDD 5 -400 0 100 R 50 50 1 1 W
X VSS 6 400 -100 100 L 50 50 1 1 W
ENDDRAW
ENDDEF
#
#End Library

+ 1216
- 0
pcb_mega/ZMHW_Map.bak
File diff suppressed because it is too large
View File


+ 1264
- 0
pcb_mega/ZMHW_Map.dsn
File diff suppressed because it is too large
View File


+ 15019
- 0
pcb_mega/ZMHW_Map.kicad_pcb
File diff suppressed because it is too large
View File


+ 15023
- 0
pcb_mega/ZMHW_Map.kicad_pcb-bak
File diff suppressed because it is too large
View File


+ 1175
- 0
pcb_mega/ZMHW_Map.net
File diff suppressed because it is too large
View File


+ 41
- 0
pcb_mega/ZMHW_Map.pro View File

@ -0,0 +1,41 @@
update=Tue 11 Oct 2016 05:25:07 PM PDT
version=1
last_client=kicad
[cvpcb]
version=1
NetIExt=net
[pcbnew]
version=1
PageLayoutDescrFile=
LastNetListRead=
PadDrill=0.600000000000
PadDrillOvalY=0.600000000000
PadSizeH=1.500000000000
PadSizeV=1.500000000000
PcbTextSizeV=1.016000000000
PcbTextSizeH=1.016000000000
PcbTextThickness=0.152400000000
ModuleTextSizeV=1.016000000000
ModuleTextSizeH=1.016000000000
ModuleTextSizeThickness=0.152400000000
SolderMaskClearance=0.003000000000
SolderMaskMinWidth=0.004000000000
DrawSegmentWidth=0.152400000000
BoardOutlineThickness=0.152400000000
ModuleOutlineThickness=0.152400000000
[eeschema]
version=1
LibDir=
[eeschema/libraries]
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=
SpiceForceRefPrefix=0
SpiceUseNetNumbers=0
LabSize=50
[general]
version=1

+ 108
- 0
pcb_mega/ZMHW_Map.rules View File

@ -0,0 +1,108 @@
(rules PCB ZMHW_Map
(snap_angle
fortyfive_degree
)
(autoroute_settings
(fanout off)
(autoroute on)
(postroute on)
(vias on)
(via_costs 50)
(plane_via_costs 5)
(start_ripup_costs 100)
(start_pass_no 126)
(layer_rule F.Cu
(active on)
(preferred_direction horizontal)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 2.1)
)
(layer_rule B.Cu
(active on)
(preferred_direction vertical)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 1.9)
)
)
(rule
(width 254.0)
(clear 254.2)
(clear 127.0 (type smd_to_turn_gap))
(clear 63.6 (type smd_smd))
)
(padstack "Via[0-1]_685.8:330.2_um"
(shape
(circle F.Cu 685.8 0.0 0.0)
)
(shape
(circle B.Cu 685.8 0.0 0.0)
)
(attach off)
)
(via
"Via[0-1]_685.8:330.2_um" "Via[0-1]_685.8:330.2_um" default
)
(via
"Via[0-1]_685.8:330.2_um-kicad_default" "Via[0-1]_685.8:330.2_um" "kicad_default"
)
(via
"Via[0-1]_685.8:330.2_um-freeroute" "Via[0-1]_685.8:330.2_um" freeroute
)
(via_rule
default "Via[0-1]_685.8:330.2_um"
)
(via_rule
"kicad_default" "Via[0-1]_685.8:330.2_um-kicad_default"
)
(via_rule
freeroute "Via[0-1]_685.8:330.2_um-freeroute"
)
(class default
(clearance_class default)
(via_rule default)
(rule
(width 254.0)
)
(circuit
(use_layer F.Cu B.Cu)
)
)
(class "kicad_default"
"Net-(P8-Pad1)" "Net-(P8-Pad2)" "Net-(P8-Pad3)" "Net-(P8-Pad4)" "Net-(P8-Pad5)" "Net-(P8-Pad6)" "Net-(P8-Pad7)" "Net-(P8-Pad8)"
"Net-(P8-Pad9)" "Net-(P8-Pad10)" "Net-(P8-Pad11)" "Net-(P8-Pad12)" "Net-(P8-Pad13)" "Net-(P8-Pad14)" "Net-(P8-Pad15)" "Net-(P8-Pad16)"
"Net-(P8-Pad17)" "Net-(P8-Pad18)" "Net-(P8-Pad19)" "Net-(P8-Pad20)" "Net-(P8-Pad21)" "Net-(P8-Pad22)" "Net-(P8-Pad23)" "Net-(P8-Pad24)"
"Net-(P8-Pad25)" "Net-(P8-Pad26)" "Net-(P8-Pad27)" "Net-(P8-Pad28)" "Net-(P8-Pad29)" "Net-(P8-Pad30)" "Net-(P8-Pad31)" "Net-(P8-Pad32)"
"Net-(P8-Pad33)" "Net-(P8-Pad34)" "Net-(P8-Pad35)" "Net-(P8-Pad36)" "Net-(P8-Pad37)" "Net-(P8-Pad38)" "Net-(P8-Pad39)" "Net-(P8-Pad40)"
"Net-(P8-Pad41)" "Net-(P8-Pad42)" "Net-(P8-Pad43)" "Net-(P8-Pad44)" "Net-(P8-Pad45)" "Net-(P8-Pad46)" "Net-(P8-Pad47)" "Net-(P8-Pad48)"
"Net-(P8-Pad49)" "Net-(P8-Pad50)" /D6 /D8 /D10 /D12 /D14 /D16
/D18 /D20 /D5 /D7 /D9 /D11 /D13 /D4
/D15 /D17 /D19 /D21 "Net-(LED1-Pad2)" /filesksksdlf/RGBDATAOUT /D2 "Net-(J2-Pad1)"
(clearance_class "kicad_default")
(via_rule kicad_default)
(rule
(width 254.0)
)
(circuit
(use_layer F.Cu B.Cu)
)
)
(class freeroute
GND "Net-(J1-Pad1)" "Net-(LS1-Pad2)" +5V +3V3 "/ENC28J60/VCC_Branch" /ENC28J60/RSTENC CS
SCK MOSI MISO /ENC28J60/WOL /ENC28J60/INT /ENC28J60/CLKOUT /ENC28J60/Q3 /D22
/D23 /D24 /D25 /D26 /D27 /D28 /D29 /D30
/D31 /D32 /D33 /D34 /D35 /D36 /D37 /D38
/D39 /D40 /D41 /D42 /D43 /D44 /D45 /D46
/D47 /D48 /D49 "Net-(XA1-PadA0)" "Net-(XA1-PadVIN)" "Net-(J1-Pad2)" "Net-(XA1-PadA1)" "Net-(XA1-PadA2)"
"Net-(XA1-PadA3)" "Net-(XA1-PadA4)" "Net-(XA1-PadA5)" "Net-(XA1-PadA6)" "Net-(XA1-PadA7)" "Net-(XA1-PadA8)" "Net-(XA1-PadA9)" "Net-(XA1-PadA10)"
"Net-(XA1-PadA11)" "Net-(XA1-PadA12)" "Net-(XA1-PadA13)" "Net-(XA1-PadA14)" "Net-(XA1-PadA15)"
(clearance_class freeroute)
(via_rule freeroute)
(rule
(width 152.4)
)
(circuit
(use_layer F.Cu B.Cu)
)
)
)

+ 1238
- 0
pcb_mega/ZMHW_Map.sch
File diff suppressed because it is too large
View File


+ 3150
- 0
pcb_mega/ZMHW_Map.ses
File diff suppressed because it is too large
View File


BIN
pcb_mega/ZMHW_Map_Documentation.pdf View File


+ 208
- 0
pcb_mega/enc28j60_arduino.bak View File

@ -0,0 +1,208 @@
EESchema Schematic File Version 4
LIBS:ZMHW_Map-cache
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 2 3
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L conn:CONN_02X05 P6
U 1 1 5BF754F5
P 3050 3600
F 0 "P6" H 3050 4015 50 0000 C CNN
F 1 "CONN_02X05" H 3050 3924 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x05" H 3050 2400 50 0001 C CNN
F 3 "" H 3050 2400 50 0000 C CNN
1 3050 3600
1 0 0 -1
$EndComp
$Comp
L conn:CONN_02X06 P7
U 1 1 5BF7553B
P 4750 3650
F 0 "P7" H 4750 4115 50 0000 C CNN
F 1 "CONN_02X06" H 4750 4024 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x06" H 4750 2450 50 0001 C CNN
F 3 "" H 4750 2450 50 0000 C CNN
1 4750 3650
1 0 0 -1
$EndComp
Text Label 2800 3600 2 50 ~ 0
SCK
Text Label 2800 3500 2 50 ~ 0
MISO
Text Label 2800 3400 2 50 ~ 0
INT
Text Label 3300 3400 0 50 ~ 0
CLKOUT
Text Label 3300 3500 0 50 ~ 0
WOL
Text Label 3300 3600 0 50 ~ 0
MOSI
Text Label 3300 3700 0 50 ~ 0
CS
Text Label 3300 3800 0 50 ~ 0
VCC_Branch
Text Label 4500 3900 2 50 ~ 0
VCC_Branch
Text Label 4500 3800 2 50 ~ 0
INT
Text Label 4500 3700 2 50 ~ 0
MISO
Text Label 4500 3600 2 50 ~ 0
SCK
Text Label 4500 3400 2 50 ~ 0
Q3
Text Label 5000 3800 0 50 ~ 0
CLKOUT
Text Label 5000 3700 0 50 ~ 0
WOL
Text Label 5000 3600 0 50 ~ 0
MOSI
Text Label 5000 3500 0 50 ~ 0
CS
$Comp
L power:GND #PWR0104
U 1 1 5BF757EE
P 5400 3400
F 0 "#PWR0104" H 5400 3150 50 0001 C CNN
F 1 "GND" H 5405 3227 50 0000 C CNN
F 2 "" H 5400 3400 50 0000 C CNN
F 3 "" H 5400 3400 50 0000 C CNN
1 5400 3400
-1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0105
U 1 1 5BF75816
P 5000 3900
F 0 "#PWR0105" H 5000 3650 50 0001 C CNN
F 1 "GND" H 5005 3727 50 0000 C CNN
F 2 "" H 5000 3900 50 0000 C CNN
F 3 "" H 5000 3900 50 0000 C CNN
1 5000 3900
-1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0106
U 1 1 5BF7585C
P 2800 3800
F 0 "#PWR0106" H 2800 3550 50 0001 C CNN
F 1 "GND" H 2805 3627 50 0000 C CNN
F 2 "" H 2800 3800 50 0000 C CNN
F 3 "" H 2800 3800 50 0000 C CNN
1 2800 3800
-1 0 0 -1
$EndComp
$Comp
L conn:CONN_01X02 P4
U 1 1 5BF75EA3
P 2650 4400
F 0 "P4" H 2728 4441 50 0000 L CNN
F 1 "CONN_01X02" H 2728 4350 50 0000 L CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 2650 4400 50 0001 C CNN
F 3 "" H 2650 4400 50 0000 C CNN
1 2650 4400
1 0 0 -1
$EndComp
$Comp
L conn:CONN_01X02 P5
U 1 1 5BF75ED4
P 2650 4900
F 0 "P5" H 2728 4941 50 0000 L CNN
F 1 "CONN_01X02" H 2728 4850 50 0000 L CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 2650 4900 50 0001 C CNN
F 3 "" H 2650 4900 50 0000 C CNN
1 2650 4900
1 0 0 -1
$EndComp
$Comp
L power:+3.3V #PWR0107
U 1 1 5BF75F40
P 2450 4350
F 0 "#PWR0107" H 2450 4200 50 0001 C CNN
F 1 "+3.3V" H 2465 4523 50 0000 C CNN
F 2 "" H 2450 4350 50 0000 C CNN
F 3 "" H 2450 4350 50 0000 C CNN
1 2450 4350
1 0 0 -1
$EndComp
$Comp
L power:+5V #PWR0108
U 1 1 5BF75F75
P 2450 4850
F 0 "#PWR0108" H 2450 4700 50 0001 C CNN
F 1 "+5V" H 2465 5023 50 0000 C CNN
F 2 "" H 2450 4850 50 0000 C CNN
F 3 "" H 2450 4850 50 0000 C CNN
1 2450 4850
1 0 0 -1
$EndComp
Text Label 2450 4950 2 50 ~ 0
VCC_Branch
Text Label 2450 4450 2 50 ~ 0
VCC_Branch
Text Notes 4050 5000 0 50 ~ 0
Jumpers. Most ENC28J60 Modules\n are 3.3v, but some have vregs, or\nvdividers. There are two possible\npinouts, from my collection that\nI see. 2x5 or 2x6. On my 2x6 module\nVCC is labeled as 5V. On the 2x5 it is\nunlabeled.
Wire Notes Line
3950 5100 5650 5100
Wire Notes Line
5650 5100 5650 4400
Wire Notes Line
5650 4400 3950 4400
Wire Notes Line
3950 4400 3950 5100
Text Notes 2900 1750 0 150 ~ 0
ENC28J60 Arduino Module
Text GLabel 2800 3600 0 50 Input ~ 0
SCK
Text GLabel 2800 3500 0 50 Input ~ 0
MISO
Text GLabel 3300 3600 2 50 Input ~ 0
MOSI
Text GLabel 3300 3700 2 50 Input ~ 0
CS
Text GLabel 4500 3700 0 50 Input ~ 0
MISO
Text GLabel 4500 3600 0 50 Input ~ 0
SCK
Text GLabel 5000 3600 2 50 Input ~ 0
MOSI
Text GLabel 5000 3500 2 50 Input ~ 0
CS
Text Label 2800 3700 2 50 ~ 0
RSTENC
Text Label 4500 3500 2 50 ~ 0
RSTENC
Wire Wire Line
5000 3400 5400 3400
Text Notes 1200 3700 0 50 ~ 0
ENC28J60 modules\nare loaded facing\ndown on the top \nlayer of the PCB.\nThis is good to double\ncheck. The VCC here is \non the inside of the board.\nCompare to existing PCBs.
Wire Notes Line
1100 3800 2350 3800
Wire Notes Line
2350 3800 2350 3000
Wire Notes Line
2350 3000 1100 3000
Wire Notes Line
1100 3000 1100 3800
Text Notes 2650 2700 0 50 ~ 0
HOW TO DOUBLE CHECK PINOUTS\nPick one pin, i.e. pin 10 which is VCC on this board.\n(for the 5x2 connector)\nLook at layout. make sure its in the right place,\nso that the enc will be loaded correctly.
Wire Notes Line
2550 2850 4800 2850
Wire Notes Line
4800 2850 4800 2200
Wire Notes Line
4800 2200 2550 2200
Wire Notes Line
2550 2200 2550 2850
$EndSCHEMATC

+ 224
- 0
pcb_mega/enc28j60_arduino.sch View File

@ -0,0 +1,224 @@
EESchema Schematic File Version 4
LIBS:ZMHW_Map-cache
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 2 3
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L conn:CONN_02X05 P6
U 1 1 5BF754F5
P 3050 3600
F 0 "P6" H 3050 4015 50 0000 C CNN
F 1 "CONN_02X05" H 3050 3924 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x05" H 3050 2400 50 0001 C CNN
F 3 "" H 3050 2400 50 0000 C CNN
1 3050 3600
1 0 0 -1
$EndComp
$Comp
L conn:CONN_02X06 P7
U 1 1 5BF7553B
P 4750 3650
F 0 "P7" H 4750 4115 50 0000 C CNN
F 1 "CONN_02X06" H 4750 4024 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x06" H 4750 2450 50 0001 C CNN
F 3 "" H 4750 2450 50 0000 C CNN
1 4750 3650
1 0 0 -1
$EndComp
Text Label 2800 3600 2 50 ~ 0
SCK
Text Label 2800 3500 2 50 ~ 0
MISO
Text Label 2800 3400 2 50 ~ 0
INT
Text Label 3300 3400 0 50 ~ 0
CLKOUT
Text Label 3300 3500 0 50 ~ 0
WOL
Text Label 3300 3600 0 50 ~ 0
MOSI
Text Label 3300 3700 0 50 ~ 0
CS
Text Label 3300 3800 0 50 ~ 0
VCC_Branch
Text Label 4500 3900 2 50 ~ 0
VCC_Branch
Text Label 4500 3800 2 50 ~ 0
INT
Text Label 4500 3700 2 50 ~ 0
MISO
Text Label 4500 3600 2 50 ~ 0
SCK
Text Label 4500 3400 2 50 ~ 0
Q3
Text Label 5000 3800 0 50 ~ 0
CLKOUT
Text Label 5000 3700 0 50 ~ 0
WOL
Text Label 5000 3600 0 50 ~ 0
MOSI
Text Label 5000 3500 0 50 ~ 0
CS
$Comp
L power:GND #PWR0104
U 1 1 5BF757EE
P 5400 3400
F 0 "#PWR0104" H 5400 3150 50 0001 C CNN
F 1 "GND" H 5405 3227 50 0000 C CNN
F 2 "" H 5400 3400 50 0000 C CNN
F 3 "" H 5400 3400 50 0000 C CNN
1 5400 3400
-1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0105
U 1 1 5BF75816
P 5000 3900
F 0 "#PWR0105" H 5000 3650 50 0001 C CNN
F 1 "GND" H 5005 3727 50 0000 C CNN
F 2 "" H 5000 3900 50 0000 C CNN
F 3 "" H 5000 3900 50 0000 C CNN
1 5000 3900
-1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0106
U 1 1 5BF7585C
P 2800 3800
F 0 "#PWR0106" H 2800 3550 50 0001 C CNN
F 1 "GND" H 2805 3627 50 0000 C CNN
F 2 "" H 2800 3800 50 0000 C CNN
F 3 "" H 2800 3800 50 0000 C CNN
1 2800 3800
-1 0 0 -1
$EndComp
$Comp
L conn:CONN_01X02 P4
U 1 1 5BF75EA3
P 2650 4400
F 0 "P4" H 2728 4441 50 0000 L CNN
F 1 "CONN_01X02" H 2728 4350 50 0000 L CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 2650 4400 50 0001 C CNN
F 3 "" H 2650 4400 50 0000 C CNN
1 2650 4400
1 0 0 -1
$EndComp
$Comp
L conn:CONN_01X02 P5
U 1 1 5BF75ED4
P 2650 4900
F 0 "P5" H 2728 4941 50 0000 L CNN
F 1 "CONN_01X02" H 2728 4850 50 0000 L CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 2650 4900 50 0001 C CNN
F 3 "" H 2650 4900 50 0000 C CNN
1 2650 4900
1 0 0 -1
$EndComp
$Comp
L power:+3.3V #PWR0107
U 1 1 5BF75F40
P 2450 4350
F 0 "#PWR0107" H 2450 4200 50 0001 C CNN
F 1 "+3.3V" H 2465 4523 50 0000 C CNN
F 2 "" H 2450 4350 50 0000 C CNN
F 3 "" H 2450 4350 50 0000 C CNN
1 2450 4350
1 0 0 -1
$EndComp
$Comp
L power:+5V #PWR0108
U 1 1 5BF75F75
P 2450 4850
F 0 "#PWR0108" H 2450 4700 50 0001 C CNN
F 1 "+5V" H 2465 5023 50 0000 C CNN
F 2 "" H 2450 4850 50 0000 C CNN
F 3 "" H 2450 4850 50 0000 C CNN
1 2450 4850
1 0 0 -1
$EndComp
Text Label 2450 4950 2 50 ~ 0
VCC_Branch
Text Label 2450 4450 2 50 ~ 0
VCC_Branch
Text Notes 4050 5000 0 50 ~ 0
Jumpers. Most ENC28J60 Modules\n are 3.3v, but some have vregs, or\nvdividers. There are two possible\npinouts, from my collection that\nI see. 2x5 or 2x6. On my 2x6 module\nVCC is labeled as 5V. On the 2x5 it is\nunlabeled.
Wire Notes Line
3950 5100 5650 5100
Wire Notes Line
5650 5100 5650 4400
Wire Notes Line
5650 4400 3950 4400
Wire Notes Line
3950 4400 3950 5100
Text Notes 2900 1750 0 150 ~ 0
ENC28J60 Arduino Module
Text Label 2800 3700 2 50 ~ 0
RSTENC
Text Label 4500 3500 2 50 ~ 0
RSTENC
Wire Wire Line
5000 3400 5400 3400
Text Notes 950 2250 0 50 ~ 0
ENC28J60 modules\nare loaded facing\ndown on the top \nlayer of the PCB.\nThis is good to double\ncheck. The VCC here is \non the inside of the board.\nCompare to existing PCBs.
Wire Notes Line
850 2350 2100 2350
Wire Notes Line
2100 2350 2100 1550
Wire Notes Line
2100 1550 850 1550
Wire Notes Line
850 1550 850 2350
Text Notes 2650 2700 0 50 ~ 0
HOW TO DOUBLE CHECK PINOUTS\nPick one pin, i.e. pin 10 which is VCC on this board.\n(for the 5x2 connector)\nLook at layout. make sure its in the right place,\nso that the enc will be loaded correctly.
Wire Notes Line
2550 2850 4800 2850
Wire Notes Line
4800 2850 4800 2200
Wire Notes Line
4800 2200 2550 2200
Wire Notes Line
2550 2200 2550 2850
Text HLabel 2400 3500 0 50 Input ~ 0
MISO
Wire Wire Line
2400 3500 2800 3500
Text HLabel 2400 3600 0 50 Input ~ 0
SCK
Wire Wire Line
2400 3600 2800 3600
Text HLabel 3650 3600 2 50 Input ~ 0
MOSI
Text HLabel 3650 3700 2 50 Input ~ 0
CS
Text HLabel 5600 3600 2 50 Input ~ 0
MOSI
Text HLabel 5600 3500 2 50 Input ~ 0
CS
Text HLabel 4200 3700 0 50 Input ~ 0
MISO
Text HLabel 4200 3600 0 50 Input ~ 0
SCK
Wire Wire Line
3650 3600 3300 3600
Wire Wire Line
3650 3700 3300 3700
Wire Wire Line
4200 3600 4500 3600
Wire Wire Line
4200 3700 4500 3700
Wire Wire Line
5000 3600 5600 3600
Wire Wire Line
5600 3500 5000 3500
$EndSCHEMATC

+ 5
- 0
pcb_mega/fp-lib-table View File

@ -0,0 +1,5 @@
(fp_lib_table
(lib (name Arduino)(type KiCad)(uri "$(KIPRJMOD)/resources/arduino-kicad-library/Arduino.pretty")(options "")(descr ""))
(lib (name Connector_Audio)(type KiCad)(uri "$(KIPRJMOD)/resources/Connector_Audio.pretty")(options "")(descr ""))
(lib (name animepic)(type KiCad)(uri "$(KIPRJMOD)/footprints/animepic.pretty")(options "")(descr ""))
)

+ 4785
- 0
pcb_mega/gerber_rev1/ZMHW_Map-B.Cu.gbl
File diff suppressed because it is too large
View File


+ 14
- 0
pcb_mega/gerber_rev1/ZMHW_Map-B.Fab.gbr View File

@ -0,0 +1,14 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-11-23T00:10:12-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Other,Fab,Bot*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Fri Nov 23 00:10:12 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*

+ 8578
- 0
pcb_mega/gerber_rev1/ZMHW_Map-B.Mask.gbs
File diff suppressed because it is too large
View File


+ 15
- 0
pcb_mega/gerber_rev1/ZMHW_Map-B.SilkS.gbo View File

@ -0,0 +1,15 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-11-23T00:10:12-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Legend,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Fri Nov 23 00:10:12 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*

+ 60
- 0
pcb_mega/gerber_rev1/ZMHW_Map-Edge.Cuts.gm1 View File

@ -0,0 +1,60 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-11-23T00:10:12-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Profile,NP*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Fri Nov 23 00:10:12 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%ADD10C,0.152400*%
G04 APERTURE END LIST*
D10*
X178435000Y-45847000D02*
X185420000Y-45847000D01*
X171450000Y-55372000D02*
X171450000Y-52832000D01*
X185420000Y-62357000D02*
X178435000Y-62357000D01*
X192405000Y-52832000D02*
X192405000Y-55372000D01*
X178435000Y-62357000D02*
G75*
G02X171450000Y-55372000I0J6985000D01*
G01*
X171450000Y-52832000D02*
G75*
G02X178435000Y-45847000I6985000J0D01*
G01*
X185420000Y-45847000D02*
G75*
G02X192405000Y-52832000I0J-6985000D01*
G01*
X192405000Y-55372000D02*
G75*
G02X185420000Y-62357000I-6985000J0D01*
G01*
X148844000Y-31496000D02*
G75*
G02X150368000Y-29972000I1524000J0D01*
G01*
X148844000Y-82296000D02*
X148844000Y-31496000D01*
X149860000Y-83312000D02*
G75*
G02X148844000Y-82296000I0J1016000D01*
G01*
X219456000Y-83312000D02*
X149860000Y-83312000D01*
X243332000Y-72136000D02*
X219456000Y-83312000D01*
X243332000Y-41148000D02*
X243332000Y-72136000D01*
X219964000Y-29972000D02*
X243332000Y-41148000D01*
X150368000Y-29972000D02*
X219964000Y-29972000D01*
M02*

+ 4800
- 0
pcb_mega/gerber_rev1/ZMHW_Map-F.Cu.gtl
File diff suppressed because it is too large
View File


+ 2313
- 0
pcb_mega/gerber_rev1/ZMHW_Map-F.Fab.gbr
File diff suppressed because it is too large
View File


+ 9028
- 0
pcb_mega/gerber_rev1/ZMHW_Map-F.Mask.gts
File diff suppressed because it is too large
View File


+ 2998
- 0
pcb_mega/gerber_rev1/ZMHW_Map-F.SilkS.gto
File diff suppressed because it is too large
View File


+ 181
- 0
pcb_mega/gerber_rev1/ZMHW_Map.drl View File

@ -0,0 +1,181 @@
M48
;DRILL file {KiCad 5.0.0-rc2} date Fri Nov 23 00:10:14 2018
;FORMAT={-:-/ absolute / inch / decimal}
FMAT,2
INCH,TZ
T1C0.0130
T2C0.0130
T3C0.0400
T4C0.0787
T5C0.1260
%
G90
G05
M72
T1
X6.282Y-2.74
X6.3Y-2.55
T2
X6.26Y-2.865
X6.44Y-2.9
X6.552Y-2.84
X6.66Y-2.52
X6.66Y-2.72
T3
X7.15Y-2.6
X7.15Y-2.7
X6.95Y-2.6
X6.95Y-2.7
X6.4495Y-2.3473
X6.4495Y-2.4473
X6.4495Y-2.5473
X6.4495Y-2.6473
X6.4495Y-2.7473
X6.5495Y-2.3473
X6.5495Y-2.4473
X6.5495Y-2.5473
X6.5495Y-2.6473
X6.5495Y-2.7473
X8.68Y-3.18
X8.7706Y-3.1377
X8.8613Y-3.0955
X8.9519Y-3.0532
X9.0425Y-3.011
X9.1331Y-2.9687
X9.2238Y-2.9264
X9.3144Y-2.8842
X9.405Y-2.8419
X9.4957Y-2.7996
X6.68Y-1.54
X6.78Y-1.54
X6.88Y-1.54
X6.98Y-1.54
X5.953Y-1.2798
X6.013Y-3.1798
X6.053Y-1.2798
X6.113Y-3.1798
X6.153Y-1.2798
X6.213Y-3.1798
X6.253Y-1.2798
X6.313Y-3.1798
X6.413Y-1.2798
X6.413Y-3.1798
X6.513Y-1.2798
X6.613Y-1.2798
X6.613Y-3.1798
X6.713Y-1.2798
X6.713Y-3.1798
X6.813Y-1.2798
X6.813Y-3.1798
X6.913Y-1.2798
X6.913Y-3.1798
X7.013Y-1.2798
X7.013Y-3.1798
X7.113Y-1.2798
X7.113Y-3.1798
X7.213Y-3.1798
X7.313Y-1.2798
X7.313Y-3.1798
X7.413Y-1.2798
X7.513Y-1.2798
X7.513Y-3.1798
X7.613Y-1.2798
X7.613Y-3.1798
X7.713Y-1.2798
X7.713Y-3.1798
X7.813Y-1.2798
X7.813Y-3.1798
X7.913Y-1.2798
X7.913Y-3.1798
X8.013Y-1.2798
X8.013Y-3.1798
X8.113Y-3.1798
X8.213Y-3.1798
X8.313Y-1.2798
X8.313Y-1.3798
X8.313Y-1.4798
X8.313Y-1.5798
X8.313Y-1.6798
X8.313Y-1.7798
X8.313Y-1.8798
X8.313Y-1.9798
X8.313Y-2.0798
X8.313Y-2.1798
X8.313Y-2.2798
X8.313Y-2.3798
X8.313Y-2.4798
X8.313Y-2.5798
X8.313Y-2.6798
X8.313Y-2.7798
X8.313Y-2.8798
X8.313Y-2.9798
X8.413Y-1.2798
X8.413Y-1.3798
X8.413Y-1.4798
X8.413Y-1.5798
X8.413Y-1.6798
X8.413Y-1.7798
X8.413Y-1.8798
X8.413Y-1.9798
X8.413Y-2.0798
X8.413Y-2.1798
X8.413Y-2.2798
X8.413Y-2.3798
X8.413Y-2.4798
X8.413Y-2.5798
X8.413Y-2.6798
X8.413Y-2.7798
X8.413Y-2.8798
X8.413Y-2.9798
X7.22Y-1.54
X7.32Y-1.54
X7.42Y-1.54
X7.52Y-1.54
X6.0432Y-2.3473
X6.0432Y-2.4473
X6.0432Y-2.5473
X6.0432Y-2.6473
X6.0432Y-2.7473
X6.0432Y-2.8473
X6.1432Y-2.3473
X6.1432Y-2.4473
X6.1432Y-2.5473
X6.1432Y-2.6473
X6.1432Y-2.7473
X6.1432Y-2.8473
X9.5Y-1.78
X9.5Y-1.88
X9.5Y-1.98
X9.5Y-2.08
X9.5Y-2.18
X9.5Y-2.28
X9.5Y-2.38
X9.5Y-2.48
X9.5Y-2.58
X9.5Y-2.68
X7.62Y-2.96
X7.72Y-2.96
X7.82Y-2.96
X7.92Y-2.96
X8.68Y-1.28
X8.7706Y-1.3223
X8.8613Y-1.3645
X8.9519Y-1.4068
X9.0425Y-1.449
X9.1332Y-1.4913
X9.2238Y-1.5336
X9.3144Y-1.5758
X9.405Y-1.6181
X9.4957Y-1.6604
X6.16Y-1.52
X6.26Y-1.52
T4
X6.05Y-1.95
X6.1445Y-1.8713
X6.361Y-1.8713
T5
X7.213Y-2.9798
X8.163Y-1.2798
X8.413Y-3.1798
T0
M30

BIN
pcb_mega/gerber_rev1/ZMHW_Map_rev1.zip View File


+ 15
- 0
pcb_mega/gerber_rev1/not needed/ZMHW_Map-B.Paste.gbp View File

@ -0,0 +1,15 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-11-23T00:10:12-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Paste,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Fri Nov 23 00:10:12 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*

+ 129
- 0
pcb_mega/gerber_rev1/not needed/ZMHW_Map-F.Paste.gtp View File

@ -0,0 +1,129 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-11-23T00:10:12-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Paste,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Fri Nov 23 00:10:12 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%ADD10R,1.500000X1.300000*%
G04 APERTURE END LIST*
D10*
G04 #@! TO.C,R1*
X208614000Y-35052000D03*
X205914000Y-35052000D03*
G04 #@! TD*
G04 #@! TO.C,R2*
X216074000Y-35052000D03*
X218774000Y-35052000D03*
G04 #@! TD*
G04 #@! TO.C,R3*
X208614000Y-37592000D03*
X205914000Y-37592000D03*
G04 #@! TD*
G04 #@! TO.C,R4*
X218774000Y-37592000D03*
X216074000Y-37592000D03*
G04 #@! TD*
G04 #@! TO.C,R5*
X208614000Y-40132000D03*
X205914000Y-40132000D03*
G04 #@! TD*
G04 #@! TO.C,R6*
X218774000Y-40132000D03*
X216074000Y-40132000D03*
G04 #@! TD*
G04 #@! TO.C,R7*
X208614000Y-42672000D03*
X205914000Y-42672000D03*
G04 #@! TD*
G04 #@! TO.C,R8*
X218774000Y-42672000D03*
X216074000Y-42672000D03*
G04 #@! TD*
G04 #@! TO.C,R9*
X208614000Y-45212000D03*
X205914000Y-45212000D03*
G04 #@! TD*
G04 #@! TO.C,R10*
X216074000Y-45212000D03*
X218774000Y-45212000D03*
G04 #@! TD*
G04 #@! TO.C,R11*
X208614000Y-47752000D03*
X205914000Y-47752000D03*
G04 #@! TD*
G04 #@! TO.C,R12*
X216074000Y-47752000D03*
X218774000Y-47752000D03*
G04 #@! TD*
G04 #@! TO.C,R13*
X208614000Y-50292000D03*
X205914000Y-50292000D03*
G04 #@! TD*
G04 #@! TO.C,R14*
X218774000Y-50292000D03*
X216074000Y-50292000D03*
G04 #@! TD*
G04 #@! TO.C,R15*
X208614000Y-52832000D03*
X205914000Y-52832000D03*
G04 #@! TD*
G04 #@! TO.C,R16*
X218774000Y-52832000D03*
X216074000Y-52832000D03*
G04 #@! TD*
G04 #@! TO.C,R17*
X208614000Y-55372000D03*
X205914000Y-55372000D03*
G04 #@! TD*
G04 #@! TO.C,R18*
X218774000Y-55372000D03*
X216074000Y-55372000D03*
G04 #@! TD*
G04 #@! TO.C,R19*
X208614000Y-57912000D03*
X205914000Y-57912000D03*
G04 #@! TD*
G04 #@! TO.C,R20*
X218774000Y-57912000D03*
X216074000Y-57912000D03*
G04 #@! TD*
G04 #@! TO.C,R21*
X205914000Y-60452000D03*
X208614000Y-60452000D03*
G04 #@! TD*
G04 #@! TO.C,R22*
X218774000Y-60452000D03*
X216074000Y-60452000D03*
G04 #@! TD*
G04 #@! TO.C,R23*
X205914000Y-62992000D03*
X208614000Y-62992000D03*
G04 #@! TD*
G04 #@! TO.C,R24*
X216074000Y-62992000D03*
X218774000Y-62992000D03*
G04 #@! TD*
G04 #@! TO.C,R25*
X206088000Y-65532000D03*
X208788000Y-65532000D03*
G04 #@! TD*
G04 #@! TO.C,R26*
X218774000Y-65532000D03*
X216074000Y-65532000D03*
G04 #@! TD*
G04 #@! TO.C,R27*
X208788000Y-68072000D03*
X206088000Y-68072000D03*
G04 #@! TD*
G04 #@! TO.C,R28*
X218774000Y-68072000D03*
X216074000Y-68072000D03*
G04 #@! TD*
M02*

+ 4652
- 0
pcb_mega/gerber_rev2/ZMHW_Map-B.Cu.gbl
File diff suppressed because it is too large
View File


+ 14
- 0
pcb_mega/gerber_rev2/ZMHW_Map-B.Fab.gbr View File

@ -0,0 +1,14 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-12-17T23:44:03-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Other,Fab,Bot*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Mon Dec 17 23:44:03 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*

+ 10315
- 0
pcb_mega/gerber_rev2/ZMHW_Map-B.Mask.gbs
File diff suppressed because it is too large
View File


+ 15
- 0
pcb_mega/gerber_rev2/ZMHW_Map-B.Paste.gbp View File

@ -0,0 +1,15 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-12-17T23:44:03-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Paste,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Mon Dec 17 23:44:03 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*

+ 10388
- 0
pcb_mega/gerber_rev2/ZMHW_Map-B.SilkS.gbo
File diff suppressed because it is too large
View File


+ 52
- 0
pcb_mega/gerber_rev2/ZMHW_Map-Edge.Cuts.gm1 View File

@ -0,0 +1,52 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.0-rc2*
G04 #@! TF.CreationDate,2018-12-17T23:44:03-05:00*
G04 #@! TF.ProjectId,ZMHW_Map,5A4D48575F4D61702E6B696361645F70,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Profile,NP*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.0.0-rc2) date Mon Dec 17 23:44:03 2018*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%ADD10C,0.152400*%
G04 APERTURE END LIST*
D10*
X148590000Y-93980000D02*
X148590000Y-27940000D01*
X154940000Y-100330000D02*
X148590000Y-93980000D01*
X229870000Y-100330000D02*
X154940000Y-100330000D01*
X229870000Y-34290000D02*
X229870000Y-100330000D01*
X223520000Y-27940000D02*
X229870000Y-34290000D01*
X148590000Y-27940000D02*
X223520000Y-27940000D01*
X178435000Y-45847000D02*
X185420000Y-45847000D01*
X171450000Y-55372000D02*
X171450000Y-52832000D01*
X185420000Y-62357000D02*
X178435000Y-62357000D01*
X192405000Y-52832000D02*
X192405000Y-55372000D01*
X178435000Y-62357000D02*
G75*
G02X171450000Y-55372000I0J6985000D01*
G01*
X171450000Y-52832000D02*
G75*
G02X178435000Y-45847000I6985000J0D01*
G01*
X185420000Y-45847000D02*
G75*
G02X192405000Y-52832000I0J-6985000D01*
G01*
X192405000Y-55372000D02*
G75*
G02X185420000Y-62357000I-6985000J0D01*
G01*
M02*

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save