Compare commits

...

5 Commits

  1. 13
      CHANGELOG.md
  2. 299
      MQTT_energymeter.ino
  3. 45
      README.md
  4. BIN
      hardware/MQTT_energy_meter-B_Cu.pdf
  5. BIN
      hardware/MQTT_energy_meter-F_SilkS.pdf
  6. 402
      hardware/MQTT_energy_meter-cache.lib
  7. 1957
      hardware/MQTT_energy_meter.kicad_pcb
  8. 1957
      hardware/MQTT_energy_meter.kicad_pcb-bak
  9. 650
      hardware/MQTT_energy_meter.net
  10. BIN
      hardware/MQTT_energy_meter.pdf
  11. BIN
      hardware/MQTT_energy_meter.png
  12. 252
      hardware/MQTT_energy_meter.pro
  13. 1462
      hardware/MQTT_energy_meter.sch
  14. 1462
      hardware/MQTT_energy_meter.sch-bak
  15. BIN
      hardware/MQTT_energy_meter_3D_view.png
  16. 72122
      hardware/fp-info-cache
  17. BIN
      hardware/prototype-small.jpg
  18. BIN
      hardware/prototype.jpg
  19. BIN
      hardware/sensor-small.jpg
  20. BIN
      hardware/sensor.jpg

@ -0,0 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.
Added : for new features.
Changed : for changes in existing functionality.
Deprecated: for soon-to-be removed features.
Removed : for now removed features.
Fixed : for any bug fixes.
Security : in case of vulnerabilities.
## [1.0.0] - 2023-01-06
First working version.

@ -0,0 +1,299 @@
/**********************************************************************************/
/* */
/* MQTT_energymeter counts light pulses from an energy meter, converts it to Wh */
/* and publishes it to an MQTT broker via ethernet. Every 1000Wh the counter is */
/* saved to EEPROM. Every power up this value is read from EERPOM as the starting */
/* value for the counter, preventing data loss after a power outage. */
/* */
/* (C)2022 M.T. Konstapel https://meezenest.nl/mees */
/* */
/* This file is part of MQTT_energymeter. */
/* */
/* MQTT_energymeter is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* MQTT_energymeter is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with MQTT_energymeter. If not, see <https://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
#include <UIPEthernet.h>
// The connection_data struct needs to be defined in an external file.
#include <UIPServer.h>
#include <UIPClient.h>
//#include "utility/logging.h"
#include "PubSubClient.h"
#include <EEPROM.h> //Internal EEPROM
#define MACADDRESS 0x12,0x7C,0x54,0x33,0xB4,0xA2
#define MYIPADDR 192,168,88,120
#define MYIPMASK 255,255,255,0
#define MYDNS 192,168,88,1
#define MYGW 192,168,88,1
#define LISTENPORT 1000
#define UARTBAUD 115200
/* CHANGE THESE VALUES TO CUSTOMIZE DATA LOGGER */
#define CLIENT_ID "MeesElectronics" // Our MQTT client ID
#define CLIENT_TOPIC "distributioncabinet/energy/solar" // Name of the topic we publish
//IPAddress IP_MQTT_broker(192, 168, 89, 10); // IP address of the MQTT broker
//String string_ip_mqtt_broker = "192.168.88.10";
char IP_string_MQTT_broker[20] = "192.168.88.11";
uint16_t MQTT_port = 1883;
IPAddress IP_MQTT_broker;
#define PULSES_PER_KWH 1000 // 500 pulses from the energy meter is one kWh
/* END USER DEFINABLE VALUES */
uint8_t mac[6] = {MACADDRESS};
uint8_t myIP[4] = {MYIPADDR};
uint8_t myMASK[4] = {MYIPMASK};
uint8_t myDNS[4] = {MYDNS};
uint8_t myGW[4] = {MYGW};
EthernetServer server = EthernetServer(LISTENPORT);
EthernetClient ethClient;
PubSubClient mqttClient;
#define PULSES_PER_WH 1000/PULSES_PER_KWH // Calculates how many pulses corresponds to a Wh
#define INTERVAL 60000 // 60 sec delay between MQTT publishings
long previousMillis;
char numberArray[20];
uint32_t PulseCount=0; // This variable holds the pulse count from the energy meter
uint32_t EnergyReading=0; // This variable holds the number of Watt-hours
uint32_t stored_kwh_count=0; // Counted whole kWh value sored in EEPROM
#define LED 9
void onDetectInterrupt()
{
// The Arduino calls this function when it detects a falling edge on pin 2.
// Received a pulse from the energy meter: add one to the counter
PulseCount++;
}
void setup() {
// setup serial communication
Serial.begin(UARTBAUD);
Serial.println(F("Energy meter with MQTT client."));
// Read EEPROM address 0. If it is 0xFF the EEPROM is probaly empty and we set EEPROM address 0 to 0x5A
if (EEPROM.read(0) == 0xFF) {
Serial.println(F("Powered up for the first time. Saving the default settings to the EEPROM."));
EEPROM.write(0, 0x5A);
EEPROM.put(1, stored_kwh_count); // Save zero to EEPROM
EEPROM.put(5, MQTT_port); // Save MQTT broker port
EEPROM.put(9,IP_string_MQTT_broker); //Save default IP address of MQTT broker
}
// Now we test if the first address of the EEPROM is 0x5A. If so, te EEPROM is correctly initialized. We can assume that the stored
// stored_kwh_count at address 1-4 is valid.
if (EEPROM.read(0) == 0x5A) {
Serial.print(F("Valid configuration found in EEPROM.\nLast stored kWh value: "));
EEPROM.get(1,stored_kwh_count);
Serial.println(stored_kwh_count);
EEPROM.get(9,IP_string_MQTT_broker); //Save default IP address of MQTT broker
Serial.print(F("IP of MQTT broker: "));
Serial.println(IP_string_MQTT_broker);
EEPROM.get(5, MQTT_port);
Serial.print(F("Port of MQTT broker: "));
Serial.println(MQTT_port);
} else {
// There was a problem reading the EEPROM. Try resetting the EEPROM settings and halt. A reboot of the device might solve the issue.
Serial.println(F("Error reading the EEPROM. Try rebooting the device."));
EEPROM.write(0, 0x5A);
EEPROM.put(1, stored_kwh_count); // Save zero to EEPROM
EEPROM.put(5, MQTT_port); // Save MQTT broker port
EEPROM.put(9,IP_string_MQTT_broker); //Save default IP address of MQTT broker
while(1);
}
// Attach interrupt to input pin connected to pulse input
pinMode(2, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(2), onDetectInterrupt, FALLING);
pinMode(LED, OUTPUT);
digitalWrite(LED, HIGH);
// initialize the ethernet device
//Ethernet.begin(mac,myIP,myDNS,myGW,myMASK);
Serial.print(F("Configuring ethernet..."));
//Ethernet.begin(mac,myIP,myDNS,myGW,myMASK);
// setup ethernet communication using DHCP
if (Ethernet.begin(mac) == 0) {
Serial.println("[FAIL]");
while(1);
};
Serial.println(F("[OK]"));
// start listening for clients
server.begin();
// setup mqtt client
IP_MQTT_broker.fromString(IP_string_MQTT_broker);
mqttClient.setClient(ethClient);
mqttClient.setServer(IP_MQTT_broker,MQTT_port);
Serial.println(F("MQTT client configured"));
previousMillis = millis();
}
void loop() {
size_t size;
uint16_t cnt;
char tmp_string[6];
// Telnet loop
if (EthernetClient client = server.available())
{
if (client)
{
while((size = client.available()) > 0)
{
uint8_t* msg = (uint8_t*)malloc(size+1); //make memory allocation one byte larger to accomodate for the NULL string terminator.
size = client.read(msg,size);
msg[size-1] = 0; //Add NULL to terminate the string
// Set IP of MQTT broker
if (msg[0] == ':' && size>9 && size<20)
{
// Extract IP address from command
for (cnt=2; cnt < (size-2); cnt++)
{
IP_string_MQTT_broker[cnt-2] = msg[cnt];
}
IP_string_MQTT_broker[cnt-2] = 0; // Add NULL to string
if (IP_MQTT_broker.fromString((char*)IP_string_MQTT_broker))
{
client.write("MQTT server set to ",19);
Serial.print(F("MQTT server set to : "));
Serial.println(IP_string_MQTT_broker);
client.write(msg,size);
}
else
{
client.write("?",1);
Serial.println(F("?"));
}
}
// Set port of MQTT broker
else if (msg[0] == 'P' && size>3 && size<10)
{
// Clear temporary string
for (cnt=0; cnt < sizeof(tmp_string); cnt++)
tmp_string[cnt]=0;
// Extract port number from command
uint16_t port=0;
for (cnt=2; cnt < (size-2); cnt++)
{
if (msg[cnt]>=48 && msg[cnt]<=57)
{
port = 10*port + (msg[cnt]-48);
tmp_string[cnt-2] = msg[cnt];
}
}
tmp_string[cnt-2] = 0; // Add NULL to string
if (port>0 && port<=0xFFFF)
{
MQTT_port=port;
client.write("MQTT port set to ",17);
Serial.print(F("Set port : "));
Serial.println(MQTT_port);
client.write(tmp_string,cnt-2);
}
else
{
client.write("?",1);
Serial.println(F("?"));
}
}
// Print IP and port of MQTT broker
else if (msg[0] == 'I')
{
client.write("MQTT server set to : ",21);
Serial.print(F("MQTT server set to : "));
Serial.print(IP_string_MQTT_broker);
Serial.print(F(" port : "));
Serial.println(MQTT_port);
client.write(IP_string_MQTT_broker,sizeof(IP_string_MQTT_broker));
client.write(" port : ",8);
itoa(MQTT_port,tmp_string,10); //(integer, yourBuffer, base)
client.write(tmp_string,sizeof(tmp_string));
}
// Save IP of MQTT broker to EEPROM
else if (msg[0] == 'S')
{
EEPROM.put(5, MQTT_port); //Save port address of MQTT broker
EEPROM.put(9,IP_string_MQTT_broker); //Save IP address of MQTT broker
client.write("SAVED",5);
Serial.println(F("SAVED"));
}
// Unknown command
else
{
client.write("?",1);
//client.write("?\n",2);
//client.write(": <IP> sets ip of broker.\n",26);
//client.write("P <port> set port op broker.\n",29);
//client.write("I prints ip and port of broker.\n",32);
//client.write("S saves settings to EEPROM.,27");
Serial.println(F("?"));
}
client.write("\n",1);
free(msg);
}
}
}
// check interval
if(millis() - previousMillis > INTERVAL)
{
sendData();
Serial.print(F(CLIENT_TOPIC));Serial.print(F(" : "));Serial.println(EnergyReading);
previousMillis = millis();
}
mqttClient.loop();
readEnergymeter();
if (digitalRead(2))
digitalWrite(LED, HIGH);
else
digitalWrite(LED, LOW);
}
void sendData() {
if(mqttClient.connect(CLIENT_ID)) {
//Convert unsigned long to string (base 10) and send it to our MQTT broker
mqttClient.publish(CLIENT_TOPIC, ultoa(EnergyReading, numberArray, 10));
}
}
// Counts pulses from energy meter. Every pulse is equivalent to a certain amount of energy in Wh. This is almost always stated on te front of the meter.
// With variable PULSES_PER_KWH you can define this value.
// Every PULSES_PER_KWH pulses is saved to EEPROM. After a powercycle this value is read from EEPROM.
void readEnergymeter(){
// Every kWh (PULSES_PER_KWH) we increment and save kWh value to EEPROM
if (PulseCount >= PULSES_PER_KWH) {
PulseCount=0;
//Serial.println(F("Store kWh counter to EEPROM."));
stored_kwh_count++;
EEPROM.put(1,stored_kwh_count);
}
// Convert pulses to Wh for sending to the MQTT broker
EnergyReading=1000*stored_kwh_count + PulseCount*PULSES_PER_WH;
}

@ -1,2 +1,45 @@
# atmega328p_mqtt_energy_meter
# Datalogger reading kWh pulses from a utility grid meter and publising it via MQTT
(C) 2023 M. Konstapel https://meezenest.nl/mees
Inspired by https://www.instructables.com/A-Simple-MQTT-PubSub-Node-With-Arduino-UNO-and-ENC/
![Board layout](./hardware/MQTT_energy_meter_3D_view.png "board layout")
## Design
Most mains energy meters have an LED which flashes 500 or 1000 pulses for every measured kWh. A photo-diode mounted in front of this LED detects the flashes. Every pulse is converted to a clean digital signal by an adjustable comparator with hysteresis followed by a 74HC14 Schmitt-trigger. The resulting pulses can be inverted by means of a jumper. A falling edge triggers an interrupt of the ATMega328. The firmware counts the interrupts and calculates the equivalent energy in Wh. Every 60 seconds the result is published to the MQTT broker on topic 'distributioncabinet/energy/solar'.
![Schematic](./hardware/MQTT_energy_meter.png "schematic")
## Features
- Runs on low spec microcontroller (Uno, Nano, Mini, and other ATMega328-based boards)
- Wired ethernet via ENC28J60 Ethernet module
- Gets ip address via DHCP
- Stores data in EEPROM to prevent data loss
- Easy to configure via telnet port 1000
![Prototype](./hardware/prototype-small.jpg "prototype")
## Requirements
- Arduino IDE (version 2.0.2)
- UIPEthernet library by Norbert Truchsess, CassyArduino and Juraj Andrassy (version 2.0.12)
- PubSubClient library by Nick O'Leary (version 2.8)
## Configure
The Device gets its IP address via DHCP. Make sure you have a working DHCP server on the network.
The ip address and port of the MQTT broker can be set by connecting to the device via telnet on port 1000.
To set the ip address of the MQTT broker use the command ": <ip address>". For example, to set the ip address to 192.168.1.10 type ": 192.168.1.10" and hit enter.
To set the port number of the MQTT broker use the command "P <port number>". For example, to set the port number to 1883 type "P 1883" and hit enter.
To show the current settings type "I".
To save the settings to EEPROM type "S" and hit enter.
IMPORTANT: after making changes, power cycle the device.

@ -0,0 +1,402 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# 74xx_74HC14
#
DEF 74xx_74HC14 U 0 40 Y Y 7 L N
F0 "U" 0 50 50 H V C CNN
F1 "74xx_74HC14" 0 -50 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
ALIAS 74LS14
$FPLIST
DIP*W7.62mm*
$ENDFPLIST
DRAW
S -200 300 200 -300 7 1 10 f
P 4 1 0 10 -150 150 -150 -150 150 0 -150 150 f
P 4 2 0 10 -150 150 -150 -150 150 0 -150 150 f
P 4 3 0 10 -150 150 -150 -150 150 0 -150 150 f
P 4 4 0 10 -150 150 -150 -150 150 0 -150 150 f
P 4 5 0 10 -150 150 -150 -150 150 0 -150 150 f
P 4 6 0 10 -150 150 -150 -150 150 0 -150 150 f
P 3 1 1 0 -75 -50 -75 50 -25 50 N
P 4 1 1 0 -100 -50 -25 -50 -25 50 0 50 N
P 3 2 1 0 -75 -50 -75 50 -25 50 N
P 4 2 1 0 -100 -50 -25 -50 -25 50 0 50 N
P 3 3 1 0 -75 -50 -75 50 -25 50 N
P 4 3 1 0 -100 -50 -25 -50 -25 50 0 50 N
P 3 4 1 0 -75 -50 -75 50 -25 50 N
P 4 4 1 0 -100 -50 -25 -50 -25 50 0 50 N
P 3 5 1 0 -75 -50 -75 50 -25 50 N
P 4 5 1 0 -100 -50 -25 -50 -25 50 0 50 N
P 3 6 1 0 -75 -50 -75 50 -25 50 N
P 4 6 1 0 -100 -50 -25 -50 -25 50 0 50 N
X ~ 1 -300 0 150 R 50 50 1 0 I
X ~ 2 300 0 150 L 50 50 1 0 O I
X ~ 3 -300 0 150 R 50 50 2 0 I
X ~ 4 300 0 150 L 50 50 2 0 O I
X ~ 5 -300 0 150 R 50 50 3 0 I
X ~ 6 300 0 150 L 50 50 3 0 O I
X ~ 8 300 0 150 L 50 50 4 0 O I
X ~ 9 -300 0 150 R 50 50 4 0 I
X ~ 10 300 0 150 L 50 50 5 0 O I
X ~ 11 -300 0 150 R 50 50 5 0 I
X ~ 12 300 0 150 L 50 50 6 0 O I
X ~ 13 -300 0 150 R 50 50 6 0 I
X VCC 14 0 500 200 D 50 50 7 0 W
X GND 7 0 -500 200 U 50 50 7 0 W
ENDDRAW
ENDDEF
#
# Amplifier_Operational_TL072
#
DEF Amplifier_Operational_TL072 U 0 5 Y Y 3 L N
F0 "U" 0 200 50 H V L CNN
F1 "Amplifier_Operational_TL072" 0 -200 50 H V L CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
ALIAS LM358 AD8620 LMC6062 LMC6082 TL062 TL072 TL082 NE5532 SA5532 RC4558 RC4560 RC4580 LMV358 TS912 TSV912IDT TSV912IST TLC272 TLC277 MCP602 OPA1678 OPA2134 OPA2340 OPA2376xxD OPA2376xxDGK MC33078 MC33178 LM4562 OP249 OP275 ADA4075-2 MCP6002-xP MCP6002-xSN MCP6002-xMS LM7332 OPA2333xxD OPA2333xxDGK LMC6482 LT1492 LTC6081xMS8 LM6172 MCP6L92 NJM2043 NJM2114 NJM4556A NJM4558 NJM4559 NJM4560 NJM4580 NJM5532 ADA4807-2ARM OPA2691 LT6234 OPA2356xxD OPA2356xxDGK OPA1612AxD MC33172 OPA1602 TLV2372 LT6237
$FPLIST
SOIC*3.9x4.9mm*P1.27mm*
DIP*W7.62mm*
TO*99*
OnSemi*Micro8*
TSSOP*3x3mm*P0.65mm*
TSSOP*4.4x3mm*P0.65mm*
MSOP*3x3mm*P0.65mm*
SSOP*3.9x4.9mm*P0.635mm*
LFCSP*2x2mm*P0.5mm*
*SIP*
SOIC*5.3x6.2mm*P1.27mm*
$ENDFPLIST
DRAW
P 4 1 1 10 -200 200 200 0 -200 -200 -200 200 f
P 4 2 1 10 -200 200 200 0 -200 -200 -200 200 f
X ~ 1 300 0 100 L 50 50 1 1 O
X - 2 -300 -100 100 R 50 50 1 1 I
X + 3 -300 100 100 R 50 50 1 1 I
X + 5 -300 100 100 R 50 50 2 1 I
X - 6 -300 -100 100 R 50 50 2 1 I
X ~ 7 300 0 100 L 50 50 2 1 O
X V- 4 -100 -300 150 U 50 50 3 1 W
X V+ 8 -100 300 150 D 50 50 3 1 W
ENDDRAW
ENDDEF
#
# Connector_Conn_01x02_Male
#
DEF Connector_Conn_01x02_Male J 0 40 Y N 1 F N
F0 "J" 0 100 50 H V C CNN
F1 "Connector_Conn_01x02_Male" 0 -200 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Connector*:*_1x??_*
$ENDFPLIST
DRAW
S 34 -95 0 -105 1 1 6 F
S 34 5 0 -5 1 1 6 F
P 2 1 1 6 50 -100 34 -100 N
P 2 1 1 6 50 0 34 0 N
X Pin_1 1 200 0 150 L 50 50 1 1 P
X Pin_2 2 200 -100 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_CP_Small
#
DEF Device_CP_Small C 0 10 N N 1 F N
F0 "C" 10 70 50 H V L CNN
F1 "Device_CP_Small" 10 -80 50 H V L CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
CP_*
$ENDFPLIST
DRAW
S -60 -12 60 -27 0 1 0 F
S -60 27 60 12 0 1 0 N
P 2 0 1 0 -50 60 -30 60 N
P 2 0 1 0 -40 50 -40 70 N
X ~ 1 0 100 73 D 50 50 1 1 P
X ~ 2 0 -100 73 U 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 I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
C_*
$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_Jumper_NO_Small
#
DEF Device_Jumper_NO_Small JP 0 30 N N 1 F N
F0 "JP" 0 80 50 H V C CNN
F1 "Device_Jumper_NO_Small" 10 -60 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
SolderJumper*Open*
$ENDFPLIST
DRAW
C -40 0 20 0 1 0 N
C 40 0 20 0 1 0 N
X 1 1 -100 0 40 R 50 50 0 1 P
X 2 2 100 0 40 L 50 50 0 1 P
ENDDRAW
ENDDEF
#
# Device_LED_Small_ALT
#
DEF Device_LED_Small_ALT D 0 10 N N 1 F N
F0 "D" -50 125 50 H V L CNN
F1 "Device_LED_Small_ALT" -175 -100 50 H V L CNN
F2 "" 0 0 50 V I C CNN
F3 "" 0 0 50 V I C CNN
$FPLIST
LED*
LED_SMD:*
LED_THT:*
$ENDFPLIST
DRAW
P 2 0 1 0 -30 -40 -30 40 N
P 2 0 1 0 40 0 -30 0 N
P 4 0 1 0 30 -40 -30 0 30 40 30 -40 F
P 5 0 1 0 0 30 -20 50 -10 50 -20 50 -20 40 N
P 5 0 1 0 20 50 0 70 10 70 0 70 0 60 N
X K 1 -100 0 70 R 50 50 1 1 P
X A 2 100 0 70 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_R_POT_Small
#
DEF Device_R_POT_Small RV 0 40 Y N 1 F N
F0 "RV" -175 0 50 V V C CNN
F1 "Device_R_POT_Small" -100 0 50 V V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Potentiometer*
$ENDFPLIST
DRAW
S 30 71 -30 -71 0 1 10 N
P 6 0 1 0 35 0 25 0 65 15 65 -15 25 0 35 0 F
X 1 1 0 100 25 D 25 25 1 1 P
X 2 2 100 0 39 L 25 25 1 1 P
X 3 3 0 -100 25 U 25 25 1 1 P
ENDDRAW
ENDDEF
#
# Device_R_Small
#
DEF Device_R_Small R 0 10 N N 1 F N
F0 "R" 30 20 50 H V L CNN
F1 "Device_R_Small" 30 -40 50 H V L CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
S -30 70 30 -70 0 1 8 N
X ~ 1 0 100 30 D 50 50 1 1 P
X ~ 2 0 -100 30 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Graphic_Logo_Open_Hardware_Small
#
DEF Graphic_Logo_Open_Hardware_Small #LOGO 0 40 Y Y 1 F N
F0 "#LOGO" 0 275 50 H I C CNN
F1 "Graphic_Logo_Open_Hardware_Small" 0 -225 50 H I C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 277 0 1 0 132 -171 130 -170 125 -167 118 -162 109 -156 100 -150 93 -146 88 -142 86 -141 85 -142 81 -144 75 -147 71 -149 66 -151 63 -151 63 -151 61 -147 58 -139 53 -130 49 -119 44 -107 38 -95 34 -83 29 -72 26 -64 24 -58 23 -55 23 -55 26 -52 31 -49 41 -40 51 -27 57 -13 60 3 58 18 52 32 42 45 30 54 16 60 0 62 -15 61 -29 55 -42 45 -48 39 -55 26 -60 12 -60 9 -59 -7 -55 -21 -47 -34 -36 -45 -34 -46 -29 -50 -25 -53 -23 -55 -42 -102 -45 -110 -51 -123 -55 -134 -59 -143 -62 -149 -63 -151 -63 -151 -65 -151 -68 -150 -75 -147 -79 -145 -84 -142 -87 -141 -89 -142 -93 -145 -100 -150 -109 -156 -117 -161 -124 -166 -130 -170 -132 -171 -133 -171 -135 -170 -139 -166 -146 -160 -155 -151 -156 -150 -164 -142 -170 -136 -174 -131 -175 -129 -175 -129 -174 -127 -170 -121 -166 -114 -160 -105 -144 -82 -153 -61 -155 -54 -159 -46 -161 -41 -162 -38 -165 -37 -170 -36 -179 -34 -189 -32 -199 -31 -207 -29 -214 -28 -217 -27 -217 -27 -218 -25 -218 -22 -218 -17 -219 -9 -219 3 -219 5 -218 16 -218 25 -218 30 -218 33 -218 33 -215 33 -209 35 -200 36 -190 38 -189 39 -179 41 -170 42 -164 44 -161 45 -161 45 -159 49 -156 56 -152 64 -149 72 -146 79 -144 85 -143 87 -143 87 -145 90 -148 95 -153 102 -160 111 -160 112 -166 121 -171 128 -174 133 -175 136 -175 136 -173 138 -169 143 -162 150 -155 158 -152 160 -144 169 -138 174 -134 177 -132 178 -132 178 -130 176 -124 172 -117 167 -108 161 -107 161 -98 155 -91 150 -86 146 -84 145 -83 145 -80 146 -73 148 -66 151 -58 155 -50 158 -45 160 -42 162 -42 162 -41 165 -40 171 -38 180 -36 191 -35 193 -33 203 -32 212 -31 218 -30 220 -28 221 -23 221 -16 221 -6 221 3 221 13 221 21 221 27 220 29 220 29 220 30 217 32 210 33 201 36 190 36 188 38 178 40 169 41 163 42 161 42 161 47 159 54 156 62 152 82 144 107 161 109 163 118 169 125 174 130 177 133 178 133 178 135 176 140 171 147 165 154 157 160 151 167 144 171 140 174 137 174 135 174 134 173 131 169 126 164 118 158 110 153 102 148 94 144 88 143 85 143 84 145 79 148 72 152 63 160 44 173 41 181 40 192 38 202 36 218 33 219 -26 216 -27 214 -27 208 -29 199 -30 189 -32 181 -34 172 -36 166 -37 163 -37 162 -38 160 -42 157 -49 154 -57 150 -65 147 -73 145 -79 144 -82 145 -84 149 -89 153 -97 159 -105 165 -114 170 -121 173 -126 175 -129 174 -131 171 -135 164 -141 155 -151 153 -152 145 -160 139 -166 134 -170 132 -171 F
ENDDRAW
ENDDEF
#
# Jumper_Jumper_3_Bridged12
#
DEF Jumper_Jumper_3_Bridged12 JP 0 0 Y N 1 F N
F0 "JP" -100 -100 50 H V C CNN
F1 "Jumper_Jumper_3_Bridged12" 0 110 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
SolderJumper*Bridged12*
$ENDFPLIST
DRAW
A -65 -50 89 1282 518 0 1 0 N -120 20 -10 20
C -130 0 20 0 0 0 N
C 0 0 20 0 0 0 N
C 130 0 20 0 0 0 N
P 2 0 1 0 0 -50 0 -20 N
X A 1 -250 0 100 R 50 50 1 1 P
X C 2 0 -150 100 U 50 50 1 1 I
X B 3 250 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Mechanical_MountingHole
#
DEF Mechanical_MountingHole H 0 40 Y Y 1 F N
F0 "H" 0 200 50 H V C CNN
F1 "Mechanical_MountingHole" 0 125 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
MountingHole*
$ENDFPLIST
DRAW
C 0 0 50 0 1 50 N
ENDDRAW
ENDDEF
#
# Regulator_Switching_TSR_1-2450
#
DEF Regulator_Switching_TSR_1-2450 U 0 20 Y Y 1 F N
F0 "U" -300 250 50 H V L CNN
F1 "Regulator_Switching_TSR_1-2450" -50 250 50 H V L CNN
F2 "Converter_DCDC:Converter_DCDC_TRACO_TSR-1_THT" 0 -150 50 H I L CIN
F3 "" 0 0 50 H I C CNN
ALIAS TSR_1-2412 TSR_1-2415 TSR_1-2418 TSR_1-2425 TSR_1-2433 TSR_1-2465 TSR_1-2490 TSR_1-24120 TSR_1-24150
$FPLIST
Converter*DCDC*TRACO*TSR?1*
$ENDFPLIST
DRAW
S -300 200 300 -100 0 1 10 f
X Vin 1 -400 100 100 R 50 50 1 1 W
X GND 2 0 -200 100 U 50 50 1 1 W
X Vout 3 400 100 100 L 50 50 1 1 w
ENDDRAW
ENDDEF
#
# Sensor_Optical_BPW34
#
DEF Sensor_Optical_BPW34 D 0 40 N N 1 F N
F0 "D" 20 70 50 H V L CNN
F1 "Sensor_Optical_BPW34" -40 -110 50 H V C CNN
F2 "OptoDevice:Osram_DIL2_4.3x4.65mm_P5.08mm" 0 175 50 H I C CNN
F3 "" -50 0 50 H I C CNN
ALIAS BP104
$FPLIST
Osram*DIL2*4.3x4.65mm*P5.08*
$ENDFPLIST
DRAW
P 2 0 1 6 -100 50 -100 -50 N
P 2 0 1 0 -80 70 -60 70 N
P 2 0 1 0 0 -50 0 50 N
P 2 0 1 0 0 0 -100 0 N
P 3 0 1 0 -20 130 -80 70 -80 90 N
P 3 0 1 0 0 50 -100 0 0 -50 N
P 5 0 1 0 30 130 -30 70 -30 90 -30 70 -10 70 N
X K 1 -200 0 100 R 50 50 1 1 P
X A 2 100 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# mtk_processor_ENC28J60
#
DEF mtk_processor_ENC28J60 U 0 40 Y Y 1 F N
F0 "U" 50 -50 50 H V C CNN
F1 "mtk_processor_ENC28J60" 600 -1250 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
S 0 -100 700 -1200 0 1 0 f
X GND 1 350 -1400 200 U 50 50 1 1 P
X INT 10 -200 -1100 200 R 50 50 1 1 O
X GND 11 500 -1400 200 U 50 50 1 1 P
X VCC 12 350 100 200 D 50 50 1 1 W
X 3V3 2 500 100 200 D 50 50 1 1 W
X CS 3 -200 -200 200 R 50 50 1 1 I
X RESET 4 -200 -300 200 R 50 50 1 1 I
X SI 5 -200 -500 200 R 50 50 1 1 I
X SCK 6 -200 -600 200 R 50 50 1 1 I
X WOL 7 -200 -1000 200 R 50 50 1 1 O
X SO 8 -200 -700 200 R 50 50 1 1 O
X CLKO 9 -200 -900 200 R 50 50 1 1 O
ENDDRAW
ENDDEF
#
# mtk_processor_arduino_pro_mini
#
DEF mtk_processor_arduino_pro_mini U 0 40 Y Y 1 F N
F0 "U" -350 1900 60 H V C BNN
F1 "mtk_processor_arduino_pro_mini" 900 -200 60 H I C TNN
F2 "" 300 300 60 H I C CNN
F3 "" 300 300 60 H I C CNN
DRAW
S -400 1850 350 -50 0 1 0 f
X IO10 1 -600 1600 200 R 50 50 1 1 B
X RESET 10 -600 300 200 R 50 50 1 1 I
X GND 11 50 -250 200 U 50 50 1 1 W
X +9V 12 -100 2050 200 D 50 50 1 1 W
X TX 13 550 500 200 L 50 50 1 1 O
X RX 14 550 600 200 L 50 50 1 1 I
X RESET 15 -600 200 200 R 50 50 1 1 I
X GND 16 -100 -250 200 U 50 50 1 1 W
X IO2 17 550 900 200 L 50 50 1 1 B
X IO3 18 550 1000 200 L 50 50 1 1 B
X IO4 19 550 1100 200 L 50 50 1 1 B
X IO11 2 -600 1500 200 R 50 50 1 1 B
X IO5 20 550 1200 200 L 50 50 1 1 B
X IO6 21 550 1300 200 L 50 50 1 1 B
X IO7 22 550 1400 200 L 50 50 1 1 B
X IO8 23 550 1500 200 L 50 50 1 1 B
X IO9 24 550 1600 200 L 50 50 1 1 B
X IO12 3 -600 1400 200 R 50 50 1 1 B
X IO13 4 -600 1300 200 R 50 50 1 1 B
X ADC0 5 -600 950 200 R 50 50 1 1 B
X ADC1 6 -600 850 200 R 50 50 1 1 B
X ADC2 7 -600 750 200 R 50 50 1 1 B
X ADC3 8 -600 650 200 R 50 50 1 1 B
X +5V 9 50 2050 200 D 50 50 1 1 W
ENDDRAW
ENDDEF
#
# power_GND
#
DEF power_GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -250 50 H I C CNN
F1 "power_GND" 0 -150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
X GND 1 0 0 0 D 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# power_VCC
#
DEF power_VCC #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -150 50 H I C CNN
F1 "power_VCC" 0 150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
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 VCC 1 0 0 0 U 50 50 1 1 W N
ENDDRAW
ENDDEF
#
#End Library

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,650 @@
(export (version D)
(design
(source /home/marcel/Documenten/electronische_projecten/atmega328p_mqtt_energy_meter/firmware/atmega328p_mqtt_energy_meter/hardware/MQTT_energy_meter.sch)
(date "di 10 jan 2023 21:21:15 CET")
(tool "Eeschema 5.1.8-5.1.8")
(sheet (number 1) (name /) (tstamps /)
(title_block
(title "MQTT ethernet energy meter")
(company "M. Konstapel")
(rev 1)
(date 2023-01-02)
(source MQTT_energy_meter.sch)
(comment (number 1) (value meezenest.nl/mees))
(comment (number 2) (value "Mees Electronics"))
(comment (number 3) (value ""))
(comment (number 4) (value "")))))
(components
(comp (ref U3)
(value "Arduino Mini Plus")
(footprint mtk_processor:Arduino_Mini_Plus)
(libsource (lib mtk_processor) (part arduino_pro_mini) (description ""))
(sheetpath (names /) (tstamps /))
(tstamp 637B78BA))
(comp (ref U1)
(value ENC28J60)
(footprint Connector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_Vertical)
(datasheet http://www.ti.com/lit/gpn/sn74HC14)
(libsource (lib mtk_processor) (part ENC28J60) (description ""))
(sheetpath (names /) (tstamps /))
(tstamp 637B9F6F))
(comp (ref U2)
(value TL072)
(footprint Package_DIP:DIP-8_W7.62mm_LongPads)
(libsource (lib Amplifier_Operational) (part TL072) (description "Dual Low-Noise JFET-Input Operational Amplifiers, DIP-8/SOIC-8"))
(sheetpath (names /) (tstamps /))
(tstamp 637C1842))
(comp (ref D1)
(value BPW34)
(footprint Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical)
(datasheet http://www.vishay.com/docs/81521/bpw34.pdf)
(libsource (lib Sensor_Optical) (part BPW34) (description "Silicon PIN Photodiode"))
(sheetpath (names /) (tstamps /))
(tstamp 637CAE56))
(comp (ref R1)
(value 10k)
(footprint Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal)
(datasheet ~)
(libsource (lib Device) (part R_Small) (description "Resistor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 637CBD86))
(comp (ref R2)
(value 10k)
(footprint Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal)
(datasheet ~)
(libsource (lib Device) (part R_Small) (description "Resistor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 637CC5CF))
(comp (ref RV1)
(value 500k)
(footprint Potentiometer_THT:Potentiometer_ACP_CA9-H5_Horizontal)
(datasheet ~)
(libsource (lib Device) (part R_POT_Small) (description Potentiometer))
(sheetpath (names /) (tstamps /))
(tstamp 637CCCD9))
(comp (ref R3)
(value 33k)
(footprint Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal)
(datasheet ~)
(libsource (lib Device) (part R_Small) (description "Resistor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 637CEB9B))
(comp (ref C2)
(value 100n)
(footprint Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm)
(datasheet ~)
(libsource (lib Device) (part C_Small) (description "Unpolarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 637DF69F))
(comp (ref C1)
(value 10U)
(footprint Capacitor_THT:CP_Radial_D5.0mm_P2.50mm)
(datasheet ~)
(libsource (lib Device) (part CP_Small) (description "Polarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 637E7E46))
(comp (ref U5)
(value 74HC14)
(footprint Package_DIP:DIP-14_W7.62mm_LongPads)
(datasheet http://www.ti.com/lit/gpn/sn74HC14)
(libsource (lib 74xx) (part 74HC14) (description "Hex inverter schmitt trigger"))
(sheetpath (names /) (tstamps /))
(tstamp 637FF23E))
(comp (ref C6)
(value 100n)
(footprint Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm)
(datasheet ~)
(libsource (lib Device) (part C_Small) (description "Unpolarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 6382F4A6))
(comp (ref JP1)
(value SET)
(footprint Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical)
(datasheet ~)
(libsource (lib Device) (part Jumper_NO_Small) (description "Jumper, normally open, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 6383FB12))
(comp (ref R4)
(value 1k)
(footprint Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal)
(datasheet ~)
(libsource (lib Device) (part R_Small) (description "Resistor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 6385274C))
(comp (ref D2)
(value STATUS)
(footprint LED_THT:LED_D3.0mm_IRGrey)
(datasheet ~)
(libsource (lib Device) (part LED_Small_ALT) (description "Light emitting diode, small symbol, filled shape"))
(sheetpath (names /) (tstamps /))
(tstamp 63852E70))
(comp (ref U6)
(value TSR_1-2450)
(footprint Converter_DCDC:Converter_DCDC_TRACO_TSR-1_THT)
(datasheet http://www.tracopower.com/products/tsr1.pdf)
(libsource (lib Regulator_Switching) (part TSR_1-2450) (description "1A step-down regulator module, fixed 5V output voltage, 5-36V input voltage, -40°C to +85°C temperature range, TO-220 compatible LM78xx replacement"))
(sheetpath (names /) (tstamps /))
(tstamp 639103C8))
(comp (ref C4)
(value 10U)
(footprint Capacitor_THT:CP_Radial_D5.0mm_P2.50mm)
(datasheet ~)
(libsource (lib Device) (part CP_Small) (description "Polarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 639134F2))
(comp (ref C5)
(value 100n)
(footprint Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm)
(datasheet ~)
(libsource (lib Device) (part C_Small) (description "Unpolarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 6391A1B5))
(comp (ref C7)
(value 100n)
(footprint Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm)
(datasheet ~)
(libsource (lib Device) (part C_Small) (description "Unpolarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 6391C15A))
(comp (ref J1)
(value "8-24V in")
(footprint TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal)
(datasheet ~)
(libsource (lib Connector) (part Conn_01x02_Male) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 6392A12E))
(comp (ref C3)
(value 100n)
(footprint Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm)
(datasheet ~)
(libsource (lib Device) (part C_Small) (description "Unpolarized capacitor, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 6398D053))
(comp (ref JP2)
(value "Invert pulse")
(footprint Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical)
(datasheet ~)
(libsource (lib Jumper) (part Jumper_3_Bridged12) (description "Jumper, 3-pole, pins 1+2 closed/bridged"))
(sheetpath (names /) (tstamps /))
(tstamp 63B25D42))
(comp (ref H4)
(value MountingHole)
(footprint MountingHole:MountingHole_3.2mm_M3_DIN965_Pad)
(datasheet ~)
(libsource (lib Mechanical) (part MountingHole) (description "Mounting Hole without connection"))
(sheetpath (names /) (tstamps /))
(tstamp 63B91EC4))
(comp (ref H3)
(value MountingHole)
(footprint MountingHole:MountingHole_3.2mm_M3_DIN965_Pad)
(datasheet ~)
(libsource (lib Mechanical) (part MountingHole) (description "Mounting Hole without connection"))
(sheetpath (names /) (tstamps /))
(tstamp 63B92CBB))
(comp (ref H2)
(value MountingHole)
(footprint MountingHole:MountingHole_3.2mm_M3_DIN965_Pad)
(datasheet ~)
(libsource (lib Mechanical) (part MountingHole) (description "Mounting Hole without connection"))
(sheetpath (names /) (tstamps /))
(tstamp 63B92FD1))
(comp (ref H1)
(value MountingHole)
(footprint MountingHole:MountingHole_3.2mm_M3_DIN965_Pad)
(datasheet ~)
(libsource (lib Mechanical) (part MountingHole) (description "Mounting Hole without connection"))
(sheetpath (names /) (tstamps /))
(tstamp 63B932DF)))
(libparts
(libpart (lib 74xx) (part 74HC14)
(aliases
(alias 74LS14))
(description "Hex inverter schmitt trigger")
(docs http://www.ti.com/lit/gpn/sn74HC14)
(footprints
(fp DIP*W7.62mm*))
(fields
(field (name Reference) U)
(field (name Value) 74HC14))
(pins
(pin (num 1) (name ~) (type input))
(pin (num 2) (name ~) (type output))
(pin (num 3) (name ~) (type input))
(pin (num 4) (name ~) (type output))
(pin (num 5) (name ~) (type input))
(pin (num 6) (name ~) (type output))
(pin (num 7) (name GND) (type power_in))
(pin (num 8) (name ~) (type output))
(pin (num 9) (name ~) (type input))
(pin (num 10) (name ~) (type output))
(pin (num 11) (name ~) (type input))
(pin (num 12) (name ~) (type output))
(pin (num 13) (name ~) (type input))
(pin (num 14) (name VCC) (type power_in))))
(libpart (lib Amplifier_Operational) (part LM2904)
(aliases
(alias LM358)
(alias AD8620)
(alias LMC6062)
(alias LMC6082)
(alias TL062)
(alias TL072)
(alias TL082)
(alias NE5532)
(alias SA5532)
(alias RC4558)
(alias RC4560)
(alias RC4580)
(alias LMV358)
(alias TS912)
(alias TSV912IDT)
(alias TSV912IST)
(alias TLC272)
(alias TLC277)
(alias MCP602)
(alias OPA1678)
(alias OPA2134)
(alias OPA2340)
(alias OPA2376xxD)
(alias OPA2376xxDGK)
(alias MC33078)
(alias MC33178)
(alias LM4562)
(alias OP249)
(alias OP275)
(alias ADA4075-2)
(alias MCP6002-xP)
(alias MCP6002-xSN)
(alias MCP6002-xMS)
(alias LM7332)
(alias OPA2333xxD)
(alias OPA2333xxDGK)
(alias LMC6482)
(alias LT1492)
(alias LTC6081xMS8)
(alias LM6172)
(alias MCP6L92)
(alias NJM2043)
(alias NJM2114)
(alias NJM4556A)
(alias NJM4558)
(alias NJM4559)
(alias NJM4560)
(alias NJM4580)
(alias NJM5532)
(alias ADA4807-2ARM)
(alias OPA2691)
(alias LT6234)
(alias OPA2356xxD)
(alias OPA2356xxDGK)
(alias OPA1612AxD)
(alias MC33172)
(alias OPA1602)
(alias TLV2372)
(alias LT6237))
(description "Dual Operational Amplifiers, DIP-8/SOIC-8/TSSOP-8/VSSOP-8")
(docs http://www.ti.com/lit/ds/symlink/lm358.pdf)
(footprints
(fp SOIC*3.9x4.9mm*P1.27mm*)
(fp DIP*W7.62mm*)
(fp TO*99*)
(fp OnSemi*Micro8*)
(fp TSSOP*3x3mm*P0.65mm*)
(fp TSSOP*4.4x3mm*P0.65mm*)
(fp MSOP*3x3mm*P0.65mm*)
(fp SSOP*3.9x4.9mm*P0.635mm*)
(fp LFCSP*2x2mm*P0.5mm*)
(fp *SIP*)
(fp SOIC*5.3x6.2mm*P1.27mm*))
(fields
(field (name Reference) U)
(field (name Value) LM2904))
(pins
(pin (num 1) (name ~) (type output))
(pin (num 2) (name -) (type input))
(pin (num 3) (name +) (type input))
(pin (num 4) (name V-) (type power_in))
(pin (num 5) (name +) (type input))
(pin (num 6) (name -) (type input))
(pin (num 7) (name ~) (type output))
(pin (num 8) (name V+) (type power_in))))
(libpart (lib Connector) (part Conn_01x02_Male)
(description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)")
(docs ~)
(footprints
(fp Connector*:*_1x??_*))
(fields
(field (name Reference) J)
(field (name Value) Conn_01x02_Male))
(pins
(pin (num 1) (name Pin_1) (type passive))
(pin (num 2) (name Pin_2) (type passive))))
(libpart (lib Device) (part CP_Small)
(description "Polarized capacitor, small symbol")
(docs ~)
(footprints
(fp CP_*))
(fields
(field (name Reference) C)
(field (name Value) CP_Small))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib Device) (part C_Small)
(description "Unpolarized capacitor, small symbol")
(docs ~)
(footprints
(fp C_*))
(fields
(field (name Reference) C)
(field (name Value) C_Small))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib Device) (part Jumper_NO_Small)
(description "Jumper, normally open, small symbol")
(docs ~)
(footprints
(fp SolderJumper*Open*))
(fields
(field (name Reference) JP)
(field (name Value) Jumper_NO_Small))
(pins
(pin (num 1) (name 1) (type passive))
(pin (num 2) (name 2) (type passive))))
(libpart (lib Device) (part LED_Small_ALT)
(description "Light emitting diode, small symbol, filled shape")
(docs ~)
(footprints
(fp LED*)
(fp LED_SMD:*)
(fp LED_THT:*))
(fields
(field (name Reference) D)
(field (name Value) LED_Small_ALT))
(pins
(pin (num 1) (name K) (type passive))
(pin (num 2) (name A) (type passive))))
(libpart (lib Device) (part R_POT_Small)
(description Potentiometer)
(docs ~)
(footprints
(fp Potentiometer*))
(fields
(field (name Reference) RV)
(field (name Value) R_POT_Small))
(pins
(pin (num 1) (name 1) (type passive))
(pin (num 2) (name 2) (type passive))
(pin (num 3) (name 3) (type passive))))
(libpart (lib Device) (part R_Small)
(description "Resistor, small symbol")
(docs ~)
(footprints
(fp R_*))
(fields
(field (name Reference) R)
(field (name Value) R_Small))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib Jumper) (part Jumper_3_Bridged12)
(description "Jumper, 3-pole, pins 1+2 closed/bridged")
(docs ~)
(footprints
(fp SolderJumper*Bridged12*))
(fields
(field (name Reference) JP)
(field (name Value) Jumper_3_Bridged12))
(pins
(pin (num 1) (name A) (type passive))
(pin (num 2) (name C) (type input))
(pin (num 3) (name B) (type passive))))
(libpart (lib Mechanical) (part MountingHole)
(description "Mounting Hole without connection")
(docs ~)
(footprints
(fp MountingHole*))
(fields
(field (name Reference) H)
(field (name Value) MountingHole)))
(libpart (lib Regulator_Switching) (part TSR_1-2450)
(aliases
(alias TSR_1-2412)
(alias TSR_1-2415)
(alias TSR_1-2418)
(alias TSR_1-2425)
(alias TSR_1-2433)
(alias TSR_1-2465)
(alias TSR_1-2490)
(alias TSR_1-24120)
(alias TSR_1-24150))
(description "1A step-down regulator module, fixed 5V output voltage, 5-36V input voltage, -40°C to +85°C temperature range, TO-220 compatible LM78xx replacement")
(docs http://www.tracopower.com/products/tsr1.pdf)
(footprints
(fp Converter*DCDC*TRACO*TSR?1*))
(fields
(field (name Reference) U)
(field (name Value) TSR_1-2450)
(field (name Footprint) Converter_DCDC:Converter_DCDC_TRACO_TSR-1_THT))
(pins
(pin (num 1) (name Vin) (type power_in))
(pin (num 2) (name GND) (type power_in))
(pin (num 3) (name Vout) (type power_out))))
(libpart (lib Sensor_Optical) (part BPW34)
(aliases
(alias BP104))
(description "Silicon PIN Photodiode")
(docs http://www.vishay.com/docs/81521/bpw34.pdf)
(footprints
(fp Osram*DIL2*4.3x4.65mm*P5.08*))
(fields
(field (name Reference) D)
(field (name Value) BPW34)
(field (name Footprint) OptoDevice:Osram_DIL2_4.3x4.65mm_P5.08mm))
(pins
(pin (num 1) (name K) (type passive))
(pin (num 2) (name A) (type passive))))
(libpart (lib mtk_processor) (part ENC28J60)
(fields
(field (name Reference) U)
(field (name Value) ENC28J60))
(pins
(pin (num 1) (name GND) (type passive))
(pin (num 2) (name 3V3) (type power_in))
(pin (num 3) (name CS) (type input))
(pin (num 4) (name RESET) (type input))
(pin (num 5) (name SI) (type input))
(pin (num 6) (name SCK) (type input))
(pin (num 7) (name WOL) (type output))
(pin (num 8) (name SO) (type output))
(pin (num 9) (name CLKO) (type output))
(pin (num 10) (name INT) (type output))
(pin (num 11) (name GND) (type passive))
(pin (num 12) (name VCC) (type power_in))))
(libpart (lib mtk_processor) (part arduino_pro_mini)
(fields
(field (name Reference) U)
(field (name Value) arduino_pro_mini))
(pins
(pin (num 1) (name IO10) (type BiDi))
(pin (num 2) (name IO11) (type BiDi))
(pin (num 3) (name IO12) (type BiDi))
(pin (num 4) (name IO13) (type BiDi))
(pin (num 5) (name ADC0) (type BiDi))
(pin (num 6) (name ADC1) (type BiDi))
(pin (num 7) (name ADC2) (type BiDi))
(pin (num 8) (name ADC3) (type BiDi))
(pin (num 9) (name +5V) (type power_in))
(pin (num 10) (name RESET) (type input))
(pin (num 11) (name GND) (type power_in))
(pin (num 12) (name +9V) (type power_in))
(pin (num 13) (name TX) (type output))
(pin (num 14) (name RX) (type input))
(pin (num 15) (name RESET) (type input))
(pin (num 16) (name GND) (type power_in))
(pin (num 17) (name IO2) (type BiDi))
(pin (num 18) (name IO3) (type BiDi))
(pin (num 19) (name IO4) (type BiDi))
(pin (num 20) (name IO5) (type BiDi))
(pin (num 21) (name IO6) (type BiDi))
(pin (num 22) (name IO7) (type BiDi))
(pin (num 23) (name IO8) (type BiDi))
(pin (num 24) (name IO9) (type BiDi)))))
(libraries
(library (logical 74xx)
(uri /home/marcel/kicad_sources/kicad-symbols-master/74xx.lib))
(library (logical Amplifier_Operational)
(uri /home/marcel/kicad_sources/kicad-symbols-master/Amplifier_Operational.lib))
(library (logical Connector)
(uri /usr/share/kicad/library/Connector.lib))
(library (logical Device)
(uri /home/marcel/kicad_sources/kicad-symbols-master/Device.lib))
(library (logical Jumper)
(uri /home/marcel/kicad_sources/kicad-symbols-master/Jumper.lib))
(library (logical Mechanical)
(uri /usr/share/kicad/library/Mechanical.lib))
(library (logical Regulator_Switching)
(uri /home/marcel/kicad_sources/kicad-symbols-master/Regulator_Switching.lib))
(library (logical Sensor_Optical)
(uri /home/marcel/kicad_sources/kicad-symbols-master/Sensor_Optical.lib))
(library (logical mtk_processor)
(uri /home/marcel/Documenten/electronische_projecten/KiCad_libraries/mtk_processor.lib)))
(nets
(net (code 1) (name VCC)
(node (ref D1) (pin 1))
(node (ref RV1) (pin 1))
(node (ref U1) (pin 12))
(node (ref U5) (pin 14))
(node (ref RV1) (pin 2))
(node (ref C6) (pin 1))
(node (ref U3) (pin 9))
(node (ref U6) (pin 3))
(node (ref C7) (pin 1))
(node (ref C2) (pin 1))
(node (ref U2) (pin 8))
(node (ref C1) (pin 1)))
(net (code 2) (name "Net-(U2-Pad6)")
(node (ref U2) (pin 6))
(node (ref U2) (pin 7)))
(net (code 3) (name "Net-(JP1-Pad1)")
(node (ref U3) (pin 19))
(node (ref JP1) (pin 1)))
(net (code 4) (name "Net-(U5-Pad4)")
(node (ref U5) (pin 4)))
(net (code 5) (name "Net-(U5-Pad2)")
(node (ref U5) (pin 2)))
(net (code 6) (name "Net-(R4-Pad2)")
(node (ref R4) (pin 2))
(node (ref U3) (pin 24)))
(net (code 7) (name "Net-(U5-Pad6)")
(node (ref U5) (pin 6)))
(net (code 8) (name "Net-(U5-Pad8)")
(node (ref U5) (pin 8)))
(net (code 9) (name GND)
(node (ref R2) (pin 2))
(node (ref C1) (pin 2))
(node (ref C2) (pin 2))
(node (ref C5) (pin 2))
(node (ref C4) (pin 2))
(node (ref U6) (pin 2))
(node (ref U1) (pin 11))
(node (ref U2) (pin 5))
(node (ref U3) (pin 11))
(node (ref R1) (pin 2))
(node (ref U3) (pin 16))
(node (ref C6) (pin 2))
(node (ref J1) (pin 1))
(node (ref U5) (pin 7))
(node (ref U5) (pin 9))
(node (ref U5) (pin 5))
(node (ref U5) (pin 3))
(node (ref U5) (pin 1))
(node (ref JP1) (pin 2))
(node (ref D2) (pin 1))
(node (ref C7) (pin 2))
(node (ref U2) (pin 4))
(node (ref C3) (pin 2)))
(net (code 10) (name "Net-(JP2-Pad1)")
(node (ref U5) (pin 10))
(node (ref JP2) (pin 1)))
(net (code 11) (name "Net-(JP2-Pad2)")
(node (ref U3) (pin 17))
(node (ref JP2) (pin 2)))
(net (code 12) (name "Net-(JP2-Pad3)")
(node (ref U5) (pin 12))
(node (ref JP2) (pin 3))
(node (ref U5) (pin 11)))
(net (code 13) (name "Net-(D2-Pad2)")
(node (ref R4) (pin 1))
(node (ref D2) (pin 2)))
(net (code 14) (name "Net-(C4-Pad1)")
(node (ref U6) (pin 1))
(node (ref J1) (pin 2))
(node (ref C5) (pin 1))
(node (ref C4) (pin 1)))
(net (code 15) (name "Net-(U1-Pad1)")
(node (ref U1) (pin 1)))
(net (code 16) (name "Net-(U1-Pad8)")
(node (ref U1) (pin 8))
(node (ref U3) (pin 3)))
(net (code 17) (name "Net-(U1-Pad10)")
(node (ref U1) (pin 10)))
(net (code 18) (name "Net-(U1-Pad2)")
(node (ref U1) (pin 2)))
(net (code 19) (name "Net-(U1-Pad3)")
(node (ref U3) (pin 1))
(node (ref U1) (pin 3)))
(net (code 20) (name "Net-(U1-Pad4)")
(node (ref U1) (pin 4))
(node (ref U3) (pin 10)))
(net (code 21) (name "Net-(U1-Pad5)")
(node (ref U1) (pin 5))
(node (ref U3) (pin 2)))
(net (code 22) (name "Net-(U1-Pad6)")
(node (ref U3) (pin 4))
(node (ref U1) (pin 6)))
(net (code 23) (name "Net-(U1-Pad7)")
(node (ref U1) (pin 7)))
(net (code 24) (name "Net-(U1-Pad9)")
(node (ref U1) (pin 9)))
(net (code 25) (name "Net-(C3-Pad1)")
(node (ref D1) (pin 2))
(node (ref R1) (pin 1))
(node (ref C3) (pin 1))
(node (ref U2) (pin 2)))
(net (code 26) (name "Net-(U3-Pad12)")
(node (ref U3) (pin 12)))
(net (code 27) (name "Net-(U3-Pad13)")
(node (ref U3) (pin 13)))
(net (code 28) (name "Net-(U3-Pad14)")
(node (ref U3) (pin 14)))
(net (code 29) (name "Net-(U3-Pad15)")
(node (ref U3) (pin 15)))
(net (code 30) (name "Net-(U3-Pad18)")
(node (ref U3) (pin 18)))
(net (code 31) (name "Net-(U3-Pad20)")
(node (ref U3) (pin 20)))
(net (code 32) (name "Net-(U3-Pad21)")
(node (ref U3) (pin 21)))
(net (code 33) (name "Net-(U3-Pad22)")
(node (ref U3) (pin 22)))
(net (code 34) (name "Net-(U3-Pad23)")
(node (ref U3) (pin 23)))
(net (code 35) (name "Net-(U3-Pad5)")
(node (ref U3) (pin 5)))
(net (code 36) (name "Net-(U3-Pad6)")
(node (ref U3) (pin 6)))
(net (code 37) (name "Net-(U3-Pad7)")
(node (ref U3) (pin 7)))
(net (code 38) (name "Net-(U3-Pad8)")
(node (ref U3) (pin 8)))
(net (code 39) (name "Net-(R2-Pad1)")
(node (ref R3) (pin 2))
(node (ref RV1) (pin 3))
(node (ref U2) (pin 3))
(node (ref R2) (pin 1)))
(net (code 40) (name "Net-(R3-Pad1)")
(node (ref U2) (pin 1))
(node (ref U5) (pin 13))
(node (ref R3) (pin 1)))))

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

@ -0,0 +1,252 @@
update=ma 02 jan 2023 15:48:42 CET
version=1
last_client=kicad
[general]
version=1
RootSch=
BoardNm=
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]
[pcbnew]
version=1
PageLayoutDescrFile=
LastNetListRead=MQTT_energy_meter.net
CopperLayerCount=2
BoardThickness=1.6
AllowMicroVias=0
AllowBlindVias=0
RequireCourtyardDefinitions=0
ProhibitOverlappingCourtyards=1
MinTrackWidth=0.2
MinViaDiameter=0.4
MinViaDrill=0.3
MinMicroViaDiameter=0.2
MinMicroViaDrill=0.09999999999999999
MinHoleToHole=0.25
TrackWidth1=0.25
TrackWidth2=0.4
TrackWidth3=0.8
TrackWidth4=1.5
TrackWidth5=2
ViaDiameter1=0.8
ViaDrill1=0.4
dPairWidth1=0.2
dPairGap1=0.25
dPairViaGap1=0.25
SilkLineWidth=0.12
SilkTextSizeV=1
SilkTextSizeH=1
SilkTextSizeThickness=0.15
SilkTextItalic=0
SilkTextUpright=1
CopperLineWidth=0.2
CopperTextSizeV=1.5
CopperTextSizeH=1.5
CopperTextThickness=0.3
CopperTextItalic=0
CopperTextUpright=1
EdgeCutLineWidth=0.05
CourtyardLineWidth=0.05
OthersLineWidth=0.15
OthersTextSizeV=1
OthersTextSizeH=1
OthersTextSizeThickness=0.15
OthersTextItalic=0
OthersTextUpright=1
SolderMaskClearance=0
SolderMaskMinWidth=0
SolderPasteClearance=0
SolderPasteRatio=-0
[pcbnew/Layer.F.Cu]
Name=F.Cu
Type=0
Enabled=1
[pcbnew/Layer.In1.Cu]
Name=In1.Cu
Type=0
Enabled=0
[pcbnew/Layer.In2.Cu]
Name=In2.Cu
Type=0
Enabled=0
[pcbnew/Layer.In3.Cu]
Name=In3.Cu
Type=0
Enabled=0
[pcbnew/Layer.In4.Cu]
Name=In4.Cu
Type=0
Enabled=0
[pcbnew/Layer.In5.Cu]
Name=In5.Cu
Type=0
Enabled=0
[pcbnew/Layer.In6.Cu]
Name=In6.Cu
Type=0
Enabled=0
[pcbnew/Layer.In7.Cu]
Name=In7.Cu
Type=0
Enabled=0
[pcbnew/Layer.In8.Cu]
Name=In8.Cu
Type=0
Enabled=0
[pcbnew/Layer.In9.Cu]
Name=In9.Cu
Type=0
Enabled=0
[pcbnew/Layer.In10.Cu]
Name=In10.Cu
Type=0
Enabled=0
[pcbnew/Layer.In11.Cu]
Name=In11.Cu
Type=0
Enabled=0
[pcbnew/Layer.In12.Cu]
Name=In12.Cu
Type=0
Enabled=0
[pcbnew/Layer.In13.Cu]
Name=In13.Cu
Type=0
Enabled=0
[pcbnew/Layer.In14.Cu]
Name=In14.Cu
Type=0
Enabled=0
[pcbnew/Layer.In15.Cu]
Name=In15.Cu
Type=0
Enabled=0
[pcbnew/Layer.In16.Cu]
Name=In16.Cu
Type=0
Enabled=0
[pcbnew/Layer.In17.Cu]
Name=In17.Cu
Type=0
Enabled=0
[pcbnew/Layer.In18.Cu]
Name=In18.Cu
Type=0
Enabled=0
[pcbnew/Layer.In19.Cu]
Name=In19.Cu
Type=0
Enabled=0
[pcbnew/Layer.In20.Cu]
Name=In20.Cu
Type=0
Enabled=0
[pcbnew/Layer.In21.Cu]
Name=In21.Cu
Type=0
Enabled=0
[pcbnew/Layer.In22.Cu]
Name=In22.Cu
Type=0
Enabled=0
[pcbnew/Layer.In23.Cu]
Name=In23.Cu
Type=0
Enabled=0
[pcbnew/Layer.In24.Cu]
Name=In24.Cu
Type=0
Enabled=0
[pcbnew/Layer.In25.Cu]
Name=In25.Cu
Type=0
Enabled=0
[pcbnew/Layer.In26.Cu]
Name=In26.Cu
Type=0
Enabled=0
[pcbnew/Layer.In27.Cu]
Name=In27.Cu
Type=0
Enabled=0
[pcbnew/Layer.In28.Cu]
Name=In28.Cu
Type=0
Enabled=0
[pcbnew/Layer.In29.Cu]
Name=In29.Cu
Type=0
Enabled=0
[pcbnew/Layer.In30.Cu]
Name=In30.Cu
Type=0
Enabled=0
[pcbnew/Layer.B.Cu]
Name=B.Cu
Type=0
Enabled=1
[pcbnew/Layer.B.Adhes]
Enabled=1
[pcbnew/Layer.F.Adhes]
Enabled=1
[pcbnew/Layer.B.Paste]
Enabled=1
[pcbnew/Layer.F.Paste]
Enabled=1
[pcbnew/Layer.B.SilkS]
Enabled=1
[pcbnew/Layer.F.SilkS]
Enabled=1
[pcbnew/Layer.B.Mask]
Enabled=1
[pcbnew/Layer.F.Mask]
Enabled=1
[pcbnew/Layer.Dwgs.User]
Enabled=1
[pcbnew/Layer.Cmts.User]
Enabled=1
[pcbnew/Layer.Eco1.User]
Enabled=1
[pcbnew/Layer.Eco2.User]
Enabled=1
[pcbnew/Layer.Edge.Cuts]
Enabled=1
[pcbnew/Layer.Margin]
Enabled=1
[pcbnew/Layer.B.CrtYd]
Enabled=1
[pcbnew/Layer.F.CrtYd]
Enabled=1
[pcbnew/Layer.B.Fab]
Enabled=1
[pcbnew/Layer.F.Fab]
Enabled=1
[pcbnew/Layer.Rescue]
Enabled=0
[pcbnew/Netclasses]
[pcbnew/Netclasses/Default]
Name=Default
Clearance=0.2
TrackWidth=0.25
ViaDiameter=0.8
ViaDrill=0.4
uViaDiameter=0.3
uViaDrill=0.1
dPairWidth=0.2
dPairGap=0.25
dPairViaGap=0.25
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=Pcbnew
SpiceAjustPassiveValues=0
LabSize=50
ERC_TestSimilarLabels=1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 MiB

Loading…
Cancel
Save