Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5530b94ff4 |
@@ -1 +1,26 @@
|
|||||||
.vscode
|
# Éditeur et fichiers générés
|
||||||
|
.vscode/
|
||||||
|
*.html
|
||||||
|
*.lst
|
||||||
|
|
||||||
|
# KiCad : sauvegardes automatiques, caches, verrous, réglages locaux
|
||||||
|
*-backups/
|
||||||
|
fp-info-cache
|
||||||
|
*.lck
|
||||||
|
_autosave-*
|
||||||
|
*.kicad_prl
|
||||||
|
# Gerber décompressés (les .zip sont versionnés)
|
||||||
|
pcb/*/*.gerber/
|
||||||
|
|
||||||
|
# FreeCAD : copies de sauvegarde
|
||||||
|
*.FCStd1
|
||||||
|
|
||||||
|
# Les Gerber zippés sont à versionner (le .gitignore global ignore *.zip)
|
||||||
|
!pcb/*/*.gerber.zip
|
||||||
|
|
||||||
|
# Gerber nommés « .gerger » dans ce projet
|
||||||
|
pcb/*/*.gerger/
|
||||||
|
!pcb/*/*.gerger.zip
|
||||||
|
|
||||||
|
# Documentation téléchargée sur le web (droits des auteurs)
|
||||||
|
docs/references/
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# atmega328p--registre-air-chaud--e01c-ml01s--tmc2208--ds18b20
|
||||||
|
|
||||||
|
Registre d'insufflation d'air chaud piloté à distance par Home Assistant avec MySensors : un volet imprimé en 3D, ouvert et fermé par un moteur pas à pas 28BYJ-48, sur une carte custom alimentée en 230 V. La carte lit aussi la température de l'air avec une sonde DS18B20, et sert de répéteur MySensors.
|
||||||
|
|
||||||
|
⚠️ La carte est alimentée en 230 V (bornier J1, fusible, varistance) : à manipuler hors tension.
|
||||||
|
|
||||||
|
| Dossier | Contenu |
|
||||||
|
|---|---|
|
||||||
|
| [`pcb/`](pcb/) | Cartes KiCad (version TMC2208 actuelle, version ULN2003 précédente) et leurs Gerber |
|
||||||
|
| [`firmware/`](firmware/) | Croquis Arduino `firmware.ino` (version TMC2208) |
|
||||||
|
| [`boitier/`](boitier/) | Registre et boîtier de la carte : FreeCAD, STL, 3MF, modèles des pièces achetées |
|
||||||
|
| [`docs/`](docs/) | Images ; documentation de référence (hors git) |
|
||||||
|
|
||||||
|
Liens : <https://www.mysensors.org/>, <https://www.makerguides.com/28byj-48-stepper-motor-arduino-tutorial/>, <https://www.home-assistant.io/integrations/mysensors/>
|
||||||
|
|
||||||
|
## Carte actuelle (`pcb/tmc2208/`)
|
||||||
|
|
||||||
|
- ATmega328P-AU (U2), module radio E01C-ML01S (U3, puce nRF24L01+).
|
||||||
|
- Driver de moteur pas à pas TMC2208 SilentStepStick (U4) ; connecteur moteur J4 (1A, 1B, 2A, 2B).
|
||||||
|
- Alimentation : bornier 230 V (J1), fusible 1 A temporisé (F1), varistance 7D431K (RV1), convertisseur HLK-PM12 230 V → 12 V (PS1), régulateur HT7133 → 3,3 V (U1) ; connecteur 12 V J7.
|
||||||
|
- Sonde DS18B20 (J5, résistance de tirage 4,7 kΩ), fin de course de mise à zéro (J6), trois LED d'état (réception, émission, erreur), bouton de reset, pastilles de programmation ISP et série.
|
||||||
|
- Carte de 84,1 × 34,5 mm. Gerber : v0.2 (19.02.2024), `registreairchaud-tmc2208-0.2.gerger.zip`. Nomenclature : [`…-bom.csv`](pcb/tmc2208/atmega328p--registre-air-chaud--e01c-ml01s--tmc2208--ds18b20-bom.csv) (et `.xml`), du 07.03.2024.
|
||||||
|
- Les rapports DRC de KiCad signalent 72 violations ; elles existaient avant le rangement du 29.11.2026.
|
||||||
|
- ⚠️ **Travail non enregistré** : KiCad avait laissé une sauvegarde automatique de la carte plus récente que le fichier enregistré (11.03.2024, 00 h 55 contre 00 h 44). Elle est gardée sur le disque sous `_autosave-atmega328p--registre-air-chaud--e01c-ml01s--tmc2208--ds18b20.kicad_pcb` (hors git) : à l'ouverture de la carte, KiCad propose de la récupérer.
|
||||||
|
|
||||||
|
### En images
|
||||||
|
|
||||||
|
Images générées le 29.11.2026 avec `kicad-cli` (KiCad 10) ; elles sont dans [`docs/images/`](docs/images/).
|
||||||
|
|
||||||
|
**Schéma du circuit**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Circuit imprimé, face de dessus** (cuivre, sérigraphie, contour)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Circuit imprimé, face de dessous** (cuivre, sérigraphie, contour ; vue en miroir, comme carte retournée)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Versions vectorielles à l'échelle réelle : [`pcb-dessus.svg`](docs/images/pcb-dessus.svg), [`pcb-dessous.svg`](docs/images/pcb-dessous.svg).
|
||||||
|
|
||||||
|
**Rendu 3D de la carte**, dessus et dessous
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Carte précédente (`pcb/uln2003/`)
|
||||||
|
|
||||||
|
Première version (décembre 2023) : même carte, mais le moteur était commandé par un ULN2003A (U4) au lieu du TMC2208. Gerber : v0.1 (10.12.2023), `registreairchaud-0.1.gerger.zip`. Les rapports DRC signalent 67 violations, déjà présentes. Son firmware est le tag git `uln2003`.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Firmware (`firmware/firmware.ino`)
|
||||||
|
|
||||||
|
- MySensors, radio `MY_RADIO_RF24`, canal 14, puissance `RF24_PA_MAX` ; répéteur (`MY_REPEATER_FEATURE`), alimenté en continu.
|
||||||
|
- Moteur commandé par le TMC2208 en mode pas / direction (bibliothèque AccelStepper : vitesse max 3000, accélération 200).
|
||||||
|
- Mise à zéro au démarrage sur le fin de course (A3) ; Home Assistant règle ensuite l'ouverture par un variateur (child 0, `S_DIMMER`, « rotation ») ; l'état de la mise à zéro est remonté (child 2, `S_BINARY`, « homed »).
|
||||||
|
- Température DS18B20 sur D7, envoyée toutes les minutes (child 1, `S_TEMP`).
|
||||||
|
- LED : réception sur A0, émission sur A1, erreur sur A2. `MY_DEBUG` est activé.
|
||||||
|
- Le croquis s'annonce comme `Registre Air Chaud` version `0.3`.
|
||||||
|
|
||||||
|
Compilation : carte MiniCore, ATmega328P, 8 MHz interne, bootloader série (`uart0`), BOD 2,7 V :
|
||||||
|
|
||||||
|
```
|
||||||
|
MiniCore:avr:328:bootloader=uart0,eeprom=keep,variant=modelP,BOD=2v7,LTO=Os_flto,clock=8MHz_internal
|
||||||
|
```
|
||||||
|
|
||||||
|
Bibliothèques nécessaires : MySensors, AccelStepper, OneWire, DallasTemperature. La configuration VS Code (`.vscode/arduino.json`, croquis `firmware/firmware.ino`) n'est pas versionnée.
|
||||||
|
|
||||||
|
Version ULN2003 : `git checkout uln2003 -- firmware/firmware.ino` (dernière version, 15.01.2024).
|
||||||
|
|
||||||
|
## Mécanique et boîtier (`boitier/`)
|
||||||
|
|
||||||
|
Fichiers FreeCAD du registre, par version : `registre_air_chaud.FCStd`, `registre_air_chaud_0.2.FCStd` à `_0.5.FCStd`, puis `registre_air_chaud_160_0.6.FCStd` (version « 160 », la plus récente) ; `boardbox.FCStd` pour le boîtier de la carte. Tous s'ouvrent et se recalculent sans erreur dans FreeCAD 1.1.
|
||||||
|
|
||||||
|
Pièces à imprimer (STL) :
|
||||||
|
|
||||||
|
| Pièce | Dimensions (mm) |
|
||||||
|
|---|---|
|
||||||
|
| `cylindre.stl` | 194 × 194 × 145 |
|
||||||
|
| `cap.stl` | 191 × 191 × 33 |
|
||||||
|
| `clamp.stl` | 180 × 180 × 16,5 |
|
||||||
|
| `support bearing.stl` | 150 × 150 × 14 |
|
||||||
|
| `support stepper.stl` | 150 × 150 × 21 |
|
||||||
|
| `support T8 nut.stl` | 52 × 52 × 14 |
|
||||||
|
| `cover.stl` | 66 × 66 × 103 |
|
||||||
|
| `dovetails.stl` | 9 × 7 × 170 |
|
||||||
|
| `boardbox_base.stl`, `boardbox_top.stl` | 88 × 38,5 × 19 et 12,5 |
|
||||||
|
|
||||||
|
Fichiers 3MF prêts à trancher (Creality Ender-3 S1 Pro et Cura). Modèles de pièces achetées : moteur 28BYJ-48 (`.step`, `.f3d`), écrou de vis T8 (`.step`), microrupteur 20 mm (`20mm-microswitch-1.snapshot.2/`).
|
||||||
|
|
||||||
|
**Rendus 3D** (rendu `f3d` des STL) : en haut cylindre, support de roulement, support de moteur, support d'écrou T8 ; en bas chapeau, collier, capot, queues d'aronde.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Boîtier de la carte, fond et couvercle :
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Documentation de référence (`docs/references/`, hors git)
|
||||||
|
|
||||||
|
Deux PDF téléchargés : « How to Use Stepper Motors on the Arduino » (Circuit Basics) et la fiche du module ULN2003. Ils restent sur le disque mais ne sont pas versionnés.
|
||||||
|
|
||||||
|
## Historique
|
||||||
|
|
||||||
|
- Dépôt Gitea `mysensors_registre_airchaud`, commencé le 05.12.2023 pour le firmware ULN2003 ; la mécanique avait son propre dépôt, `3d_registre_airchaud`.
|
||||||
|
- Le 29.11.2026 :
|
||||||
|
- la dernière version ULN2003 du firmware (15.01.2024), jamais commitée, a été enregistrée puis marquée par le tag `uln2003` ;
|
||||||
|
- les modifications non commitées de la mécanique (boîtier de la carte, version 160 0.6, pièces) ont été commitées et poussées dans `3d_registre_airchaud`, puis les fichiers ont rejoint `boitier/` ici (empreintes identiques) ; l'historique de la mécanique reste dans ce dépôt-là ;
|
||||||
|
- la version TMC2208 du firmware (copie de dossier `registre_airchaud_code_tmc2208`, 11.03.2024) est devenue `firmware/firmware.ino` (compilée identique) ;
|
||||||
|
- les cartes KiCad ont rejoint `pcb/` sous le nom de l'appareil (netlists et DRC identiques), titres des schémas mis à jour ;
|
||||||
|
- le README des débuts a été repris ici.
|
||||||
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 325 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 386 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
@@ -0,0 +1,301 @@
|
|||||||
|
#define MY_DEBUG
|
||||||
|
// Enable and select radio type attached
|
||||||
|
#define MY_RADIO_RF24
|
||||||
|
// #define MY_RF24_PA_LEVEL RF24_PA_MIN
|
||||||
|
// #define MY_RF24_PA_LEVEL RF24_PA_LOW
|
||||||
|
// #define MY_RF24_PA_LEVEL RF24_PA_HIGH
|
||||||
|
#define MY_RF24_PA_LEVEL RF24_PA_MAX
|
||||||
|
|
||||||
|
#define MY_RF24_CHANNEL 14
|
||||||
|
|
||||||
|
#define MY_REPEATER_FEATURE
|
||||||
|
|
||||||
|
#define MY_DEFAULT_RX_LED_PIN A0
|
||||||
|
#define MY_DEFAULT_TX_LED_PIN A1
|
||||||
|
#define MY_DEFAULT_ERR_LED_PIN A2
|
||||||
|
|
||||||
|
#include <SPI.h>
|
||||||
|
#include <MySensors.h>
|
||||||
|
|
||||||
|
// https://lastminuteengineers.com/multiple-ds18b20-arduino-tutorial/
|
||||||
|
#include <OneWire.h>
|
||||||
|
#include <DallasTemperature.h>
|
||||||
|
|
||||||
|
// Data wire is plugged into port 11 on the Arduino
|
||||||
|
#define ONE_WIRE_BUS 7
|
||||||
|
// Setup a oneWire instance to communicate with any OneWire devices
|
||||||
|
OneWire oneWire(ONE_WIRE_BUS);
|
||||||
|
|
||||||
|
// Pass our oneWire reference to Dallas Temperature.
|
||||||
|
DallasTemperature sensors(&oneWire);
|
||||||
|
|
||||||
|
#define ROTATION_CHILD_ID 0
|
||||||
|
#define HOMED_CHILD_ID 2
|
||||||
|
#define CHILD_ID_TEMP 1
|
||||||
|
|
||||||
|
MyMessage dimmerMsg(ROTATION_CHILD_ID, V_DIMMER);
|
||||||
|
MyMessage lightMsg(ROTATION_CHILD_ID, V_LIGHT); // we need init light message to make the dimmer appear in HA
|
||||||
|
MyMessage homedMsg(HOMED_CHILD_ID, V_STATUS);
|
||||||
|
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
|
||||||
|
|
||||||
|
// https://lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial/
|
||||||
|
#include "AccelStepper.h"
|
||||||
|
|
||||||
|
|
||||||
|
// ULN2003 Wiring:
|
||||||
|
// const int In1 = 3;
|
||||||
|
// const int In2 = 4;
|
||||||
|
// const int In3 = 5;
|
||||||
|
// const int In4 = 6;
|
||||||
|
|
||||||
|
// Create stepper object called 'myStepper', note the pin order:
|
||||||
|
// AccelStepper myStepper(4, In1, In3, In2, In4);
|
||||||
|
|
||||||
|
// TMC2208 Wiring
|
||||||
|
const int DIR = 3;
|
||||||
|
const int STEP = 4;
|
||||||
|
const int EN = 5;
|
||||||
|
AccelStepper myStepper(1, STEP, DIR);
|
||||||
|
|
||||||
|
|
||||||
|
int prevDimValue=false;
|
||||||
|
bool light_state = 0;
|
||||||
|
bool is_moving = false;
|
||||||
|
char convBuffer[10];
|
||||||
|
|
||||||
|
// 2038 is for one revolution on bipolar mode
|
||||||
|
// const int revo_steps = 2038;
|
||||||
|
// const int debattement = revo_steps * 1.2;
|
||||||
|
|
||||||
|
const int revo_steps = 16304;
|
||||||
|
const int debattement = revo_steps * 1.2;
|
||||||
|
|
||||||
|
|
||||||
|
bool homed=false;
|
||||||
|
// atmega328p pin 26 -> pc3 -> arduino A3;
|
||||||
|
const int homing_pin = A3;
|
||||||
|
int stopCourseBtnState = 0;
|
||||||
|
|
||||||
|
unsigned long previousMillis = 0;
|
||||||
|
const long tempInterval = 60000;
|
||||||
|
float DTemp;
|
||||||
|
float old_DTemp;
|
||||||
|
|
||||||
|
|
||||||
|
void presentation()
|
||||||
|
{
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - - - - presentation - - - - -");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sendSketchInfo("Registre Air Chaud", "0.3");
|
||||||
|
|
||||||
|
present(ROTATION_CHILD_ID, S_DIMMER, "rotation");
|
||||||
|
present(HOMED_CHILD_ID, S_BINARY, "homed");
|
||||||
|
present(CHILD_ID_TEMP, S_TEMP, "Temperature");
|
||||||
|
}
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - - - - setup - - - - -");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
myStepper.setMaxSpeed(3000.0);
|
||||||
|
myStepper.setAcceleration(200.0);
|
||||||
|
// myStepper.setSpeed(200);
|
||||||
|
|
||||||
|
pinMode(EN, OUTPUT);
|
||||||
|
digitalWrite(homing_pin, LOW);
|
||||||
|
|
||||||
|
// make a homing of stepper motor
|
||||||
|
pinMode(homing_pin, INPUT);
|
||||||
|
digitalWrite(homing_pin, HIGH);
|
||||||
|
|
||||||
|
// send to controller all closed as we will homming
|
||||||
|
send(dimmerMsg.set(0));
|
||||||
|
send(homedMsg.set(homed));
|
||||||
|
send(lightMsg.set(0));
|
||||||
|
|
||||||
|
sensors.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
// Serial.println("- - - - - loop - - - - -");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// TEMPERATURE
|
||||||
|
unsigned long currentMillis = millis();
|
||||||
|
// do measurement every one minute
|
||||||
|
if (currentMillis - previousMillis >= tempInterval)
|
||||||
|
{
|
||||||
|
previousMillis = currentMillis;
|
||||||
|
sensors.requestTemperatures();
|
||||||
|
old_DTemp = DTemp;
|
||||||
|
DTemp = sensors.getTempCByIndex(0);
|
||||||
|
if (DTemp != old_DTemp && DTemp != -127)
|
||||||
|
{
|
||||||
|
send(msgTemp.set(DTemp, 1));
|
||||||
|
old_DTemp = DTemp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// STEPPER MOTOR
|
||||||
|
// HOMING
|
||||||
|
if (!homed)
|
||||||
|
{
|
||||||
|
// enable the driver
|
||||||
|
digitalWrite(EN, 0);
|
||||||
|
// rotate the stepper
|
||||||
|
myStepper.setSpeed(-200);
|
||||||
|
myStepper.runSpeed();
|
||||||
|
|
||||||
|
stopCourseBtnState = digitalRead(homing_pin);
|
||||||
|
if (stopCourseBtnState == HIGH){
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("stopCourseBtnState is HIGH");
|
||||||
|
#endif
|
||||||
|
prevDimValue = 0;
|
||||||
|
// stepper
|
||||||
|
myStepper.stop();
|
||||||
|
myStepper.setCurrentPosition(0);
|
||||||
|
homed=true;
|
||||||
|
// HA
|
||||||
|
send(dimmerMsg.set(prevDimValue)); // 0 @ start
|
||||||
|
send(lightMsg.set(light_state)); // 0 @ start
|
||||||
|
send(homedMsg.set(homed));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// release the stepper motor to free power consumption
|
||||||
|
if(!myStepper.run() && digitalRead(EN) == 0){
|
||||||
|
// digitalWrite(In1, 0);
|
||||||
|
// digitalWrite(In2, 0);
|
||||||
|
// digitalWrite(In3, 0);
|
||||||
|
// digitalWrite(In4, 0);
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("disabling stepper motor");
|
||||||
|
#endif
|
||||||
|
digitalWrite(EN, 1);
|
||||||
|
is_moving = false;
|
||||||
|
send(dimmerMsg.set(prevDimValue));
|
||||||
|
send(homedMsg.set(homed));
|
||||||
|
send(lightMsg.set(light_state));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// info https://www.home-assistant.io/integrations/mysensors/#light-example-sketch-for-mysensors-2x
|
||||||
|
|
||||||
|
// Handle incoming messages
|
||||||
|
void receive(const MyMessage &message) {
|
||||||
|
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - - - - receive - - - - -");
|
||||||
|
#endif
|
||||||
|
// HOMED ?
|
||||||
|
if (!homed)
|
||||||
|
{
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("not homed yet, sending back 0% & off");
|
||||||
|
#endif
|
||||||
|
send(dimmerMsg.set(0));
|
||||||
|
send(homedMsg.set(false));
|
||||||
|
send(lightMsg.set(0));
|
||||||
|
return;
|
||||||
|
} else if (is_moving){
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("is moving, reject command and send back current position");
|
||||||
|
#endif
|
||||||
|
send(dimmerMsg.set(prevDimValue));
|
||||||
|
send(homedMsg.set(homed));
|
||||||
|
send(lightMsg.set(light_state));
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
// LIGHT
|
||||||
|
if (message.type == V_LIGHT) {
|
||||||
|
int lstate = message.getInt();
|
||||||
|
switch (message.sensor)
|
||||||
|
{
|
||||||
|
case HOMED_CHILD_ID:
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.print("HOMED_CHILD_ID : ");
|
||||||
|
Serial.println(lstate);
|
||||||
|
#endif
|
||||||
|
if (lstate == 0)
|
||||||
|
{
|
||||||
|
homed = false;
|
||||||
|
}else{
|
||||||
|
send(homedMsg.set(homed));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ROTATION_CHILD_ID:
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("ROTATION_CHILD_ID");
|
||||||
|
#endif
|
||||||
|
if (lstate == 0)
|
||||||
|
{
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - - - - V_LIGHT OFF - - - - -");
|
||||||
|
#endif
|
||||||
|
// when recieve off close the hatch
|
||||||
|
applyNewDimmValue(0);
|
||||||
|
light_state = false;
|
||||||
|
send(dimmerMsg.set(0));
|
||||||
|
}
|
||||||
|
else if (lstate == 1)
|
||||||
|
{
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - - - - V_LIGHT ON - - - - -");
|
||||||
|
Serial.println("homed, sending back 100% & on, opening full");
|
||||||
|
#endif
|
||||||
|
applyNewDimmValue(100);
|
||||||
|
light_state = true;
|
||||||
|
send(dimmerMsg.set(100));
|
||||||
|
send(lightMsg.set(1));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DIMMER
|
||||||
|
} else if (message.type == V_DIMMER) {
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - - - - receive V_DIMMER - - - - -");
|
||||||
|
#endif
|
||||||
|
int newDimValue = atoi(message.getString(convBuffer));
|
||||||
|
applyNewDimmValue(newDimValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void applyNewDimmValue(int dimm){
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.println("- - applyNewDimmValue - - ");
|
||||||
|
Serial.print("prevDimValue: ");
|
||||||
|
Serial.println(prevDimValue);
|
||||||
|
Serial.print("newDimValue: ");
|
||||||
|
Serial.println(dimm);
|
||||||
|
#endif
|
||||||
|
if(prevDimValue != dimm) {
|
||||||
|
int pos = (debattement / 100) * dimm; // turn counter clock wise to go down
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.print("pos: ");
|
||||||
|
Serial.println(pos);
|
||||||
|
#endif
|
||||||
|
prevDimValue = dimm;
|
||||||
|
moveStepperTo(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void moveStepperTo(int pos) {
|
||||||
|
#ifdef MY_DEBUG
|
||||||
|
Serial.print("- - moveStepperTo - - ");
|
||||||
|
Serial.println(pos);
|
||||||
|
#endif
|
||||||
|
// enable tmc2208 driver
|
||||||
|
digitalWrite(EN, 0);
|
||||||
|
// flag as moving
|
||||||
|
is_moving = true;
|
||||||
|
// move the stepper to new pos
|
||||||
|
myStepper.setSpeed(1000);
|
||||||
|
myStepper.moveTo(pos);
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
"Source:","/home/bach/Electronic/mysensors/registre_air_chaud/electronic/registre air chaud tmc2208/registre air chaud tmc2208.kicad_sch"
|
||||||
|
"Date:","Thu 07 Mar 2024 09:03:14 PM CET"
|
||||||
|
"Tool:","Eeschema 7.0.10"
|
||||||
|
"Generator:","/usr/share/kicad/plugins/bom_csv_grouped_by_value.py"
|
||||||
|
"Component Count:","33"
|
||||||
|
|
||||||
|
"Collated Components:"
|
||||||
|
|
||||||
|
"Item","Qty","Reference(s)","Value","LibPart","Footprint","Datasheet","DNP","Availability","Check_prices","Description","MANUFACTURER","MF","MP","Package","Price","Purchase-URL","SnapEDA_Link"
|
||||||
|
"1","5","C1, C4, C5, C6, C8","0.1µF","Device:C","Capacitor_SMD:C_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"2","2","C2, C3","10µf","Device:C","Capacitor_SMD:C_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"3","1","C7","1µF","Device:C","Capacitor_SMD:C_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"4","1","D1","GREEN","Device:LED","LED_SMD:LED_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"5","1","D2","YELLOW","Device:LED","LED_SMD:LED_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"6","1","D3","RED","Device:LED","LED_SMD:LED_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"7","1","F1","1A slow blow","Device:Fuse","Fuse:Fuse_Littelfuse_395Series","https://fr.aliexpress.com/item/32913238799.html?spm=a2g0o.order_list.order_list_main.398.18755e5b0lPY3v&gatewayAdapt=glo2fra","","","","","","","","","","",""
|
||||||
|
"8","1","J1","220VAC","Connector:Conn_01x02_Female","My_footprint:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P10mm_Horizontal","~","","","","","","","","","","",""
|
||||||
|
"9","1","J2","serial pads","Connector:Conn_01x04_Socket","My_footprint:pad-probe_1x04_P1.27mm_Vertical","~","","","","","","","","","","",""
|
||||||
|
"10","1","J3","ICSP like pads","Connector:Conn_01x06_Female","My_footprint:pad-probe_2x03_P1.27mm_Vertical","https://wolles-elektronikkiste.de/en/using-the-atmega328p-standalone#Anker3","","","","","","","","","","",""
|
||||||
|
"11","1","J4","conn. 28BYJ-48","Connector:Conn_01x04_Socket","Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical","~","","","","","","","","","","",""
|
||||||
|
"12","1","J5","Dallas DS18b20","Connector:Conn_01x03_Socket","Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical","~","","","","","","","","","","",""
|
||||||
|
"13","1","J6","Conn_01x02_Socket","Connector:Conn_01x02_Socket","Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical","~","","","","","","","","","","",""
|
||||||
|
"14","1","J7","Conn_01x02_Socket","Connector:Conn_01x02_Socket","Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical","~","","","","","","","","","","",""
|
||||||
|
"15","1","L1","560nH","Device:L","Inductor_SMD:L_0805_2012Metric","https://www.aliexpress.com/item/32855637642.html?spm=a2g0o.productlist.main.27.6e0e785dtx9w9v&algo_pvid=6ee4ce47-4a25-4c3a-8153-ec8c7825e350&algo_exp_id=6ee4ce47-4a25-4c3a-8153-ec8c7825e350-13&pdp_ext_f=%7B%22sku_id%22%3A%2265320705940%22%7D&pdp_npi=3%40dis%21EUR%211.55%211.55%21%21%21%21%21%402102110316762473567716789d06d5%2165320705940%21sea%21FR%21194317601&curPageLogUid=jty9kxOPCj0Z","","","","","","","","","","",""
|
||||||
|
"16","1","PS1","HLK-PM12","Converter_ACDC:HLK-PM01","HLK-PM01:CONV_HLK-PM01","http://www.hlktech.net/product_detail.php?ProId=54","","","","","","","","","","",""
|
||||||
|
"17","2","R1, R6","10K","Device:R","Resistor_SMD:R_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"18","1","R2","4.7k","Device:R","Resistor_SMD:R_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"19","3","R3, R4, R5","1K","Device:R","Resistor_SMD:R_0805_2012Metric","~","","","","","","","","","","",""
|
||||||
|
"20","1","RV1","7D431K 430V","Device:Varistor","Varistor:RV_Disc_D7mm_W3.8mm_P5mm","~","","","","","","","","","","",""
|
||||||
|
"21","1","SW1","SW_Push","Switch:SW_Push","Button_Switch_SMD:SW_Push_SPST_NO_Alps_SKRK","https://fr.aliexpress.com/item/32698846968.html?spm=a2g0o.order_list.order_list_main.72.40435e5bvY0uBg&gatewayAdapt=glo2fra","","","","","","","","","","",""
|
||||||
|
"22","1","U1","HT7133-SOT89","Regulator_Linear:HT75xx-1-SOT89","Package_TO_SOT_SMD:SOT-89-3","https://www.holtek.com/documents/10179/116711/HT75xx-1v250.pdf","","","","","","","","","","",""
|
||||||
|
"23","1","U2","ATmega328P-A","MCU_Microchip_ATmega:ATmega328P-A","Package_QFP:TQFP-32_7x7mm_P0.8mm","http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega328_P%20AVR%20MCU%20with%20picoPower%20Technology%20Data%20Sheet%2040001984A.pdf","","","","","","","","","","",""
|
||||||
|
"24","1","U3","E01C-ML01S","my_rf_modules:E01C-ML01S","My_footprint:E01C-ML01S","https://www.ebyte.com/en/product-view-news.html?id=1027","","","","","","","","","","",""
|
||||||
|
"25","1","U4","TMC2208_SILENTSTEPSTICK","TMC2208_SILENTSTEPSTICK:TMC2208_SILENTSTEPSTICK","TMC2208_SILENTSTEPSTICK:MODULE_TMC2208_SILENTSTEPSTICK","","","In Stock","https://www.snapeda.com/parts/TMC2208%20SILENTSTEPSTICK/Trinamic+Motion+Control+GmbH/view-part/?ref=eda","TMC2208 Motor Controller/Driver, Stepper Power Management Evaluation Board","Trinamic Motion","Trinamic Motion","TMC2208 SILENTSTEPSTICK","None","None","https://www.snapeda.com/api/url_track_click_mouser/?unipart_id=2125784&manufacturer=Trinamic Motion&part_name=TMC2208 SILENTSTEPSTICK&search_term=None","https://www.snapeda.com/parts/TMC2208%20SILENTSTEPSTICK/Trinamic+Motion+Control+GmbH/view-part/?ref=snap"
|
||||||
|
@@ -0,0 +1,641 @@
|
|||||||
|
{
|
||||||
|
"board": {
|
||||||
|
"3dviewports": [],
|
||||||
|
"design_settings": {
|
||||||
|
"defaults": {
|
||||||
|
"board_outline_line_width": 0.09999999999999999,
|
||||||
|
"copper_line_width": 0.19999999999999998,
|
||||||
|
"copper_text_italic": false,
|
||||||
|
"copper_text_size_h": 1.5,
|
||||||
|
"copper_text_size_v": 1.5,
|
||||||
|
"copper_text_thickness": 0.3,
|
||||||
|
"copper_text_upright": false,
|
||||||
|
"courtyard_line_width": 0.049999999999999996,
|
||||||
|
"dimension_precision": 4,
|
||||||
|
"dimension_units": 3,
|
||||||
|
"dimensions": {
|
||||||
|
"arrow_length": 1270000,
|
||||||
|
"extension_offset": 500000,
|
||||||
|
"keep_text_aligned": true,
|
||||||
|
"suppress_zeroes": false,
|
||||||
|
"text_position": 0,
|
||||||
|
"units_format": 1
|
||||||
|
},
|
||||||
|
"fab_line_width": 0.09999999999999999,
|
||||||
|
"fab_text_italic": false,
|
||||||
|
"fab_text_size_h": 1.0,
|
||||||
|
"fab_text_size_v": 1.0,
|
||||||
|
"fab_text_thickness": 0.15,
|
||||||
|
"fab_text_upright": false,
|
||||||
|
"other_line_width": 0.15,
|
||||||
|
"other_text_italic": false,
|
||||||
|
"other_text_size_h": 1.0,
|
||||||
|
"other_text_size_v": 1.0,
|
||||||
|
"other_text_thickness": 0.15,
|
||||||
|
"other_text_upright": false,
|
||||||
|
"pads": {
|
||||||
|
"drill": 1.0,
|
||||||
|
"height": 1.7,
|
||||||
|
"width": 1.7
|
||||||
|
},
|
||||||
|
"silk_line_width": 0.15,
|
||||||
|
"silk_text_italic": false,
|
||||||
|
"silk_text_size_h": 1.0,
|
||||||
|
"silk_text_size_v": 1.0,
|
||||||
|
"silk_text_thickness": 0.15,
|
||||||
|
"silk_text_upright": false,
|
||||||
|
"zones": {
|
||||||
|
"min_clearance": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"diff_pair_dimensions": [
|
||||||
|
{
|
||||||
|
"gap": 0.0,
|
||||||
|
"via_gap": 0.0,
|
||||||
|
"width": 0.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"drc_exclusions": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 2
|
||||||
|
},
|
||||||
|
"rule_severities": {
|
||||||
|
"annular_width": "error",
|
||||||
|
"clearance": "error",
|
||||||
|
"connection_width": "warning",
|
||||||
|
"copper_edge_clearance": "error",
|
||||||
|
"copper_sliver": "warning",
|
||||||
|
"courtyards_overlap": "error",
|
||||||
|
"diff_pair_gap_out_of_range": "error",
|
||||||
|
"diff_pair_uncoupled_length_too_long": "error",
|
||||||
|
"drill_out_of_range": "error",
|
||||||
|
"duplicate_footprints": "warning",
|
||||||
|
"extra_footprint": "warning",
|
||||||
|
"footprint": "error",
|
||||||
|
"footprint_type_mismatch": "ignore",
|
||||||
|
"hole_clearance": "error",
|
||||||
|
"hole_near_hole": "error",
|
||||||
|
"invalid_outline": "error",
|
||||||
|
"isolated_copper": "warning",
|
||||||
|
"item_on_disabled_layer": "error",
|
||||||
|
"items_not_allowed": "error",
|
||||||
|
"length_out_of_range": "error",
|
||||||
|
"lib_footprint_issues": "warning",
|
||||||
|
"lib_footprint_mismatch": "warning",
|
||||||
|
"malformed_courtyard": "error",
|
||||||
|
"microvia_drill_out_of_range": "error",
|
||||||
|
"missing_courtyard": "ignore",
|
||||||
|
"missing_footprint": "warning",
|
||||||
|
"net_conflict": "warning",
|
||||||
|
"npth_inside_courtyard": "ignore",
|
||||||
|
"padstack": "warning",
|
||||||
|
"pth_inside_courtyard": "ignore",
|
||||||
|
"shorting_items": "error",
|
||||||
|
"silk_edge_clearance": "warning",
|
||||||
|
"silk_over_copper": "warning",
|
||||||
|
"silk_overlap": "warning",
|
||||||
|
"skew_out_of_range": "error",
|
||||||
|
"solder_mask_bridge": "error",
|
||||||
|
"starved_thermal": "error",
|
||||||
|
"text_height": "warning",
|
||||||
|
"text_thickness": "warning",
|
||||||
|
"through_hole_pad_without_hole": "error",
|
||||||
|
"too_many_vias": "error",
|
||||||
|
"track_dangling": "warning",
|
||||||
|
"track_width": "error",
|
||||||
|
"tracks_crossing": "error",
|
||||||
|
"unconnected_items": "error",
|
||||||
|
"unresolved_variable": "error",
|
||||||
|
"via_dangling": "warning",
|
||||||
|
"zones_intersect": "error"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"max_error": 0.005,
|
||||||
|
"min_clearance": 0.0,
|
||||||
|
"min_connection": 0.0,
|
||||||
|
"min_copper_edge_clearance": 0.0,
|
||||||
|
"min_hole_clearance": 0.25,
|
||||||
|
"min_hole_to_hole": 0.25,
|
||||||
|
"min_microvia_diameter": 0.19999999999999998,
|
||||||
|
"min_microvia_drill": 0.09999999999999999,
|
||||||
|
"min_resolved_spokes": 2,
|
||||||
|
"min_silk_clearance": 0.0,
|
||||||
|
"min_text_height": 0.7999999999999999,
|
||||||
|
"min_text_thickness": 0.08,
|
||||||
|
"min_through_hole_diameter": 0.3,
|
||||||
|
"min_track_width": 0.0,
|
||||||
|
"min_via_annular_width": 0.09999999999999999,
|
||||||
|
"min_via_diameter": 0.5,
|
||||||
|
"solder_mask_clearance": 0.0,
|
||||||
|
"solder_mask_min_width": 0.0,
|
||||||
|
"solder_mask_to_copper_clearance": 0.0,
|
||||||
|
"use_height_for_length_calcs": true
|
||||||
|
},
|
||||||
|
"teardrop_options": [
|
||||||
|
{
|
||||||
|
"td_allow_use_two_tracks": true,
|
||||||
|
"td_curve_segcount": 5,
|
||||||
|
"td_on_pad_in_zone": false,
|
||||||
|
"td_onpadsmd": true,
|
||||||
|
"td_onroundshapesonly": false,
|
||||||
|
"td_ontrackend": false,
|
||||||
|
"td_onviapad": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"teardrop_parameters": [
|
||||||
|
{
|
||||||
|
"td_curve_segcount": 0,
|
||||||
|
"td_height_ratio": 1.0,
|
||||||
|
"td_length_ratio": 0.5,
|
||||||
|
"td_maxheight": 2.0,
|
||||||
|
"td_maxlen": 1.0,
|
||||||
|
"td_target_name": "td_round_shape",
|
||||||
|
"td_width_to_size_filter_ratio": 0.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"td_curve_segcount": 0,
|
||||||
|
"td_height_ratio": 1.0,
|
||||||
|
"td_length_ratio": 0.5,
|
||||||
|
"td_maxheight": 2.0,
|
||||||
|
"td_maxlen": 1.0,
|
||||||
|
"td_target_name": "td_rect_shape",
|
||||||
|
"td_width_to_size_filter_ratio": 0.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"td_curve_segcount": 0,
|
||||||
|
"td_height_ratio": 1.0,
|
||||||
|
"td_length_ratio": 0.5,
|
||||||
|
"td_maxheight": 2.0,
|
||||||
|
"td_maxlen": 1.0,
|
||||||
|
"td_target_name": "td_track_end",
|
||||||
|
"td_width_to_size_filter_ratio": 0.9
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"track_widths": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0
|
||||||
|
],
|
||||||
|
"via_dimensions": [
|
||||||
|
{
|
||||||
|
"diameter": 0.0,
|
||||||
|
"drill": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diameter": 0.8,
|
||||||
|
"drill": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diameter": 1.0,
|
||||||
|
"drill": 0.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"zones_allow_external_fillets": false
|
||||||
|
},
|
||||||
|
"ipc2581": {
|
||||||
|
"dist": "",
|
||||||
|
"distpn": "",
|
||||||
|
"internal_id": "",
|
||||||
|
"mfg": "",
|
||||||
|
"mpn": ""
|
||||||
|
},
|
||||||
|
"layer_presets": [],
|
||||||
|
"viewports": []
|
||||||
|
},
|
||||||
|
"boards": [],
|
||||||
|
"cvpcb": {
|
||||||
|
"equivalence_files": []
|
||||||
|
},
|
||||||
|
"erc": {
|
||||||
|
"erc_exclusions": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 0
|
||||||
|
},
|
||||||
|
"pin_map": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"rule_severities": {
|
||||||
|
"bus_definition_conflict": "error",
|
||||||
|
"bus_entry_needed": "error",
|
||||||
|
"bus_to_bus_conflict": "error",
|
||||||
|
"bus_to_net_conflict": "error",
|
||||||
|
"conflicting_netclasses": "error",
|
||||||
|
"different_unit_footprint": "error",
|
||||||
|
"different_unit_net": "error",
|
||||||
|
"duplicate_reference": "error",
|
||||||
|
"duplicate_sheet_names": "error",
|
||||||
|
"endpoint_off_grid": "warning",
|
||||||
|
"extra_units": "error",
|
||||||
|
"global_label_dangling": "warning",
|
||||||
|
"hier_label_mismatch": "error",
|
||||||
|
"label_dangling": "error",
|
||||||
|
"lib_symbol_issues": "warning",
|
||||||
|
"missing_bidi_pin": "warning",
|
||||||
|
"missing_input_pin": "warning",
|
||||||
|
"missing_power_pin": "error",
|
||||||
|
"missing_unit": "warning",
|
||||||
|
"multiple_net_names": "warning",
|
||||||
|
"net_not_bus_member": "warning",
|
||||||
|
"no_connect_connected": "warning",
|
||||||
|
"no_connect_dangling": "warning",
|
||||||
|
"pin_not_connected": "error",
|
||||||
|
"pin_not_driven": "error",
|
||||||
|
"pin_to_pin": "warning",
|
||||||
|
"power_pin_not_driven": "error",
|
||||||
|
"similar_labels": "warning",
|
||||||
|
"simulation_model_issue": "ignore",
|
||||||
|
"unannotated": "error",
|
||||||
|
"unit_value_mismatch": "error",
|
||||||
|
"unresolved_variable": "error",
|
||||||
|
"wire_dangling": "error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"libraries": {
|
||||||
|
"pinned_footprint_libs": [],
|
||||||
|
"pinned_symbol_libs": []
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"filename": "atmega328p--registre-air-chaud--e01c-ml01s--tmc2208--ds18b20.kicad_pro",
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
"net_settings": {
|
||||||
|
"classes": [
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "Default",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.25,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "+12V",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 1.0,
|
||||||
|
"via_diameter": 1.0,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "+3.3V",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.55,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "GND",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.25,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"net_colors": null,
|
||||||
|
"netclass_assignments": {
|
||||||
|
"Net-(J1-Pin_1)": "AV",
|
||||||
|
"Net-(J1-Pin_2)": "AC"
|
||||||
|
},
|
||||||
|
"netclass_patterns": [
|
||||||
|
{
|
||||||
|
"netclass": "+3.3V",
|
||||||
|
"pattern": "+3.3V"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"netclass": "+12V",
|
||||||
|
"pattern": "+12V"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"netclass": "+3.3V",
|
||||||
|
"pattern": "GND"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pcbnew": {
|
||||||
|
"last_paths": {
|
||||||
|
"gencad": "",
|
||||||
|
"idf": "",
|
||||||
|
"netlist": "",
|
||||||
|
"plot": "",
|
||||||
|
"pos_files": "",
|
||||||
|
"specctra_dsn": "",
|
||||||
|
"step": "",
|
||||||
|
"svg": "",
|
||||||
|
"vrml": ""
|
||||||
|
},
|
||||||
|
"page_layout_descr_file": ""
|
||||||
|
},
|
||||||
|
"schematic": {
|
||||||
|
"annotate_start_num": 0,
|
||||||
|
"bom_fmt_presets": [],
|
||||||
|
"bom_fmt_settings": {
|
||||||
|
"field_delimiter": ",",
|
||||||
|
"keep_line_breaks": false,
|
||||||
|
"keep_tabs": false,
|
||||||
|
"name": "CSV",
|
||||||
|
"ref_delimiter": ",",
|
||||||
|
"ref_range_delimiter": "",
|
||||||
|
"string_delimiter": "\""
|
||||||
|
},
|
||||||
|
"bom_presets": [],
|
||||||
|
"bom_settings": {
|
||||||
|
"exclude_dnp": false,
|
||||||
|
"fields_ordered": [
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Reference",
|
||||||
|
"name": "Reference",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": true,
|
||||||
|
"label": "Value",
|
||||||
|
"name": "Value",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Datasheet",
|
||||||
|
"name": "Datasheet",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Footprint",
|
||||||
|
"name": "Footprint",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Qty",
|
||||||
|
"name": "${QUANTITY}",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": true,
|
||||||
|
"label": "DNP",
|
||||||
|
"name": "${DNP}",
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filter_string": "",
|
||||||
|
"group_symbols": true,
|
||||||
|
"name": "Grouped By Value",
|
||||||
|
"sort_asc": true,
|
||||||
|
"sort_field": "Reference"
|
||||||
|
},
|
||||||
|
"connection_grid_size": 50.0,
|
||||||
|
"drawing": {
|
||||||
|
"dashed_lines_dash_length_ratio": 12.0,
|
||||||
|
"dashed_lines_gap_length_ratio": 3.0,
|
||||||
|
"default_line_thickness": 6.0,
|
||||||
|
"default_text_size": 50.0,
|
||||||
|
"field_names": [],
|
||||||
|
"intersheets_ref_own_page": false,
|
||||||
|
"intersheets_ref_prefix": "",
|
||||||
|
"intersheets_ref_short": false,
|
||||||
|
"intersheets_ref_show": false,
|
||||||
|
"intersheets_ref_suffix": "",
|
||||||
|
"junction_size_choice": 3,
|
||||||
|
"label_size_ratio": 0.375,
|
||||||
|
"operating_point_overlay_i_precision": 3,
|
||||||
|
"operating_point_overlay_i_range": "~A",
|
||||||
|
"operating_point_overlay_v_precision": 3,
|
||||||
|
"operating_point_overlay_v_range": "~V",
|
||||||
|
"overbar_offset_ratio": 1.23,
|
||||||
|
"pin_symbol_size": 25.0,
|
||||||
|
"text_offset_ratio": 0.15
|
||||||
|
},
|
||||||
|
"legacy_lib_dir": "",
|
||||||
|
"legacy_lib_list": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
"net_format_name": "",
|
||||||
|
"page_layout_descr_file": "",
|
||||||
|
"plot_directory": "",
|
||||||
|
"spice_current_sheet_as_root": false,
|
||||||
|
"spice_external_command": "spice \"%I\"",
|
||||||
|
"spice_model_current_sheet_as_root": true,
|
||||||
|
"spice_save_all_currents": false,
|
||||||
|
"spice_save_all_dissipations": false,
|
||||||
|
"spice_save_all_voltages": false,
|
||||||
|
"subpart_first_id": 65,
|
||||||
|
"subpart_id_separator": 0
|
||||||
|
},
|
||||||
|
"sheets": [
|
||||||
|
[
|
||||||
|
"638b7546-8960-4f46-9262-47cbcf0a5cc3",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text_variables": {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,673 @@
|
|||||||
|
{
|
||||||
|
"board": {
|
||||||
|
"3dviewports": [],
|
||||||
|
"design_settings": {
|
||||||
|
"defaults": {
|
||||||
|
"apply_defaults_to_fp_fields": false,
|
||||||
|
"apply_defaults_to_fp_shapes": false,
|
||||||
|
"apply_defaults_to_fp_text": false,
|
||||||
|
"board_outline_line_width": 0.1,
|
||||||
|
"copper_line_width": 0.2,
|
||||||
|
"copper_text_italic": false,
|
||||||
|
"copper_text_size_h": 1.5,
|
||||||
|
"copper_text_size_v": 1.5,
|
||||||
|
"copper_text_thickness": 0.3,
|
||||||
|
"copper_text_upright": false,
|
||||||
|
"courtyard_line_width": 0.05,
|
||||||
|
"dimension_precision": 4,
|
||||||
|
"dimension_units": 3,
|
||||||
|
"dimensions": {
|
||||||
|
"arrow_length": 1270000,
|
||||||
|
"extension_offset": 500000,
|
||||||
|
"keep_text_aligned": true,
|
||||||
|
"suppress_zeroes": false,
|
||||||
|
"text_position": 0,
|
||||||
|
"units_format": 1
|
||||||
|
},
|
||||||
|
"fab_line_width": 0.1,
|
||||||
|
"fab_text_italic": false,
|
||||||
|
"fab_text_size_h": 1.0,
|
||||||
|
"fab_text_size_v": 1.0,
|
||||||
|
"fab_text_thickness": 0.15,
|
||||||
|
"fab_text_upright": false,
|
||||||
|
"other_line_width": 0.15,
|
||||||
|
"other_text_italic": false,
|
||||||
|
"other_text_size_h": 1.0,
|
||||||
|
"other_text_size_v": 1.0,
|
||||||
|
"other_text_thickness": 0.15,
|
||||||
|
"other_text_upright": false,
|
||||||
|
"pads": {
|
||||||
|
"drill": 1.0,
|
||||||
|
"height": 1.7,
|
||||||
|
"width": 1.7
|
||||||
|
},
|
||||||
|
"silk_line_width": 0.15,
|
||||||
|
"silk_text_italic": false,
|
||||||
|
"silk_text_size_h": 1.0,
|
||||||
|
"silk_text_size_v": 1.0,
|
||||||
|
"silk_text_thickness": 0.15,
|
||||||
|
"silk_text_upright": false,
|
||||||
|
"zones": {
|
||||||
|
"min_clearance": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"diff_pair_dimensions": [
|
||||||
|
{
|
||||||
|
"gap": 0.0,
|
||||||
|
"via_gap": 0.0,
|
||||||
|
"width": 0.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"drc_exclusions": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 2
|
||||||
|
},
|
||||||
|
"rule_severities": {
|
||||||
|
"annular_width": "error",
|
||||||
|
"clearance": "error",
|
||||||
|
"connection_width": "warning",
|
||||||
|
"copper_edge_clearance": "error",
|
||||||
|
"copper_sliver": "warning",
|
||||||
|
"courtyards_overlap": "error",
|
||||||
|
"diff_pair_gap_out_of_range": "error",
|
||||||
|
"diff_pair_uncoupled_length_too_long": "error",
|
||||||
|
"drill_out_of_range": "error",
|
||||||
|
"duplicate_footprints": "warning",
|
||||||
|
"extra_footprint": "warning",
|
||||||
|
"footprint": "error",
|
||||||
|
"footprint_symbol_mismatch": "warning",
|
||||||
|
"footprint_type_mismatch": "ignore",
|
||||||
|
"hole_clearance": "error",
|
||||||
|
"hole_near_hole": "error",
|
||||||
|
"holes_co_located": "warning",
|
||||||
|
"invalid_outline": "error",
|
||||||
|
"isolated_copper": "warning",
|
||||||
|
"item_on_disabled_layer": "error",
|
||||||
|
"items_not_allowed": "error",
|
||||||
|
"length_out_of_range": "error",
|
||||||
|
"lib_footprint_issues": "warning",
|
||||||
|
"lib_footprint_mismatch": "warning",
|
||||||
|
"malformed_courtyard": "error",
|
||||||
|
"microvia_drill_out_of_range": "error",
|
||||||
|
"missing_courtyard": "ignore",
|
||||||
|
"missing_footprint": "warning",
|
||||||
|
"net_conflict": "warning",
|
||||||
|
"npth_inside_courtyard": "ignore",
|
||||||
|
"padstack": "warning",
|
||||||
|
"pth_inside_courtyard": "ignore",
|
||||||
|
"shorting_items": "error",
|
||||||
|
"silk_edge_clearance": "warning",
|
||||||
|
"silk_over_copper": "warning",
|
||||||
|
"silk_overlap": "warning",
|
||||||
|
"skew_out_of_range": "error",
|
||||||
|
"solder_mask_bridge": "error",
|
||||||
|
"starved_thermal": "error",
|
||||||
|
"text_height": "warning",
|
||||||
|
"text_thickness": "warning",
|
||||||
|
"through_hole_pad_without_hole": "error",
|
||||||
|
"too_many_vias": "error",
|
||||||
|
"track_dangling": "warning",
|
||||||
|
"track_width": "error",
|
||||||
|
"tracks_crossing": "error",
|
||||||
|
"unconnected_items": "error",
|
||||||
|
"unresolved_variable": "error",
|
||||||
|
"via_dangling": "warning",
|
||||||
|
"zones_intersect": "error"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"max_error": 0.005,
|
||||||
|
"min_clearance": 0.0,
|
||||||
|
"min_connection": 0.0,
|
||||||
|
"min_copper_edge_clearance": 0.0,
|
||||||
|
"min_hole_clearance": 0.25,
|
||||||
|
"min_hole_to_hole": 0.25,
|
||||||
|
"min_microvia_diameter": 0.2,
|
||||||
|
"min_microvia_drill": 0.1,
|
||||||
|
"min_resolved_spokes": 2,
|
||||||
|
"min_silk_clearance": 0.0,
|
||||||
|
"min_text_height": 0.8,
|
||||||
|
"min_text_thickness": 0.08,
|
||||||
|
"min_through_hole_diameter": 0.3,
|
||||||
|
"min_track_width": 0.0,
|
||||||
|
"min_via_annular_width": 0.1,
|
||||||
|
"min_via_diameter": 0.5,
|
||||||
|
"solder_mask_clearance": 0.0,
|
||||||
|
"solder_mask_min_width": 0.0,
|
||||||
|
"solder_mask_to_copper_clearance": 0.0,
|
||||||
|
"use_height_for_length_calcs": true
|
||||||
|
},
|
||||||
|
"teardrop_options": [
|
||||||
|
{
|
||||||
|
"td_onpadsmd": true,
|
||||||
|
"td_onroundshapesonly": false,
|
||||||
|
"td_ontrackend": false,
|
||||||
|
"td_onviapad": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"teardrop_parameters": [
|
||||||
|
{
|
||||||
|
"td_allow_use_two_tracks": true,
|
||||||
|
"td_curve_segcount": 0,
|
||||||
|
"td_height_ratio": 1.0,
|
||||||
|
"td_length_ratio": 0.5,
|
||||||
|
"td_maxheight": 2.0,
|
||||||
|
"td_maxlen": 1.0,
|
||||||
|
"td_on_pad_in_zone": false,
|
||||||
|
"td_target_name": "td_round_shape",
|
||||||
|
"td_width_to_size_filter_ratio": 0.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"td_allow_use_two_tracks": true,
|
||||||
|
"td_curve_segcount": 0,
|
||||||
|
"td_height_ratio": 1.0,
|
||||||
|
"td_length_ratio": 0.5,
|
||||||
|
"td_maxheight": 2.0,
|
||||||
|
"td_maxlen": 1.0,
|
||||||
|
"td_on_pad_in_zone": false,
|
||||||
|
"td_target_name": "td_rect_shape",
|
||||||
|
"td_width_to_size_filter_ratio": 0.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"td_allow_use_two_tracks": true,
|
||||||
|
"td_curve_segcount": 0,
|
||||||
|
"td_height_ratio": 1.0,
|
||||||
|
"td_length_ratio": 0.5,
|
||||||
|
"td_maxheight": 2.0,
|
||||||
|
"td_maxlen": 1.0,
|
||||||
|
"td_on_pad_in_zone": false,
|
||||||
|
"td_target_name": "td_track_end",
|
||||||
|
"td_width_to_size_filter_ratio": 0.9
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"track_widths": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0
|
||||||
|
],
|
||||||
|
"tuning_pattern_settings": {
|
||||||
|
"diff_pair_defaults": {
|
||||||
|
"corner_radius_percentage": 80,
|
||||||
|
"corner_style": 1,
|
||||||
|
"max_amplitude": 1.0,
|
||||||
|
"min_amplitude": 0.2,
|
||||||
|
"single_sided": false,
|
||||||
|
"spacing": 1.0
|
||||||
|
},
|
||||||
|
"diff_pair_skew_defaults": {
|
||||||
|
"corner_radius_percentage": 80,
|
||||||
|
"corner_style": 1,
|
||||||
|
"max_amplitude": 1.0,
|
||||||
|
"min_amplitude": 0.2,
|
||||||
|
"single_sided": false,
|
||||||
|
"spacing": 0.6
|
||||||
|
},
|
||||||
|
"single_track_defaults": {
|
||||||
|
"corner_radius_percentage": 80,
|
||||||
|
"corner_style": 1,
|
||||||
|
"max_amplitude": 1.0,
|
||||||
|
"min_amplitude": 0.2,
|
||||||
|
"single_sided": false,
|
||||||
|
"spacing": 0.6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"via_dimensions": [
|
||||||
|
{
|
||||||
|
"diameter": 0.0,
|
||||||
|
"drill": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diameter": 0.8,
|
||||||
|
"drill": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diameter": 1.0,
|
||||||
|
"drill": 0.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"zones_allow_external_fillets": false
|
||||||
|
},
|
||||||
|
"ipc2581": {
|
||||||
|
"dist": "",
|
||||||
|
"distpn": "",
|
||||||
|
"internal_id": "",
|
||||||
|
"mfg": "",
|
||||||
|
"mpn": ""
|
||||||
|
},
|
||||||
|
"layer_presets": [],
|
||||||
|
"viewports": []
|
||||||
|
},
|
||||||
|
"boards": [],
|
||||||
|
"cvpcb": {
|
||||||
|
"equivalence_files": []
|
||||||
|
},
|
||||||
|
"erc": {
|
||||||
|
"erc_exclusions": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 0
|
||||||
|
},
|
||||||
|
"pin_map": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"rule_severities": {
|
||||||
|
"bus_definition_conflict": "error",
|
||||||
|
"bus_entry_needed": "error",
|
||||||
|
"bus_to_bus_conflict": "error",
|
||||||
|
"bus_to_net_conflict": "error",
|
||||||
|
"conflicting_netclasses": "error",
|
||||||
|
"different_unit_footprint": "error",
|
||||||
|
"different_unit_net": "error",
|
||||||
|
"duplicate_reference": "error",
|
||||||
|
"duplicate_sheet_names": "error",
|
||||||
|
"endpoint_off_grid": "warning",
|
||||||
|
"extra_units": "error",
|
||||||
|
"global_label_dangling": "warning",
|
||||||
|
"hier_label_mismatch": "error",
|
||||||
|
"label_dangling": "error",
|
||||||
|
"lib_symbol_issues": "warning",
|
||||||
|
"missing_bidi_pin": "warning",
|
||||||
|
"missing_input_pin": "warning",
|
||||||
|
"missing_power_pin": "error",
|
||||||
|
"missing_unit": "warning",
|
||||||
|
"multiple_net_names": "warning",
|
||||||
|
"net_not_bus_member": "warning",
|
||||||
|
"no_connect_connected": "warning",
|
||||||
|
"no_connect_dangling": "warning",
|
||||||
|
"pin_not_connected": "error",
|
||||||
|
"pin_not_driven": "error",
|
||||||
|
"pin_to_pin": "warning",
|
||||||
|
"power_pin_not_driven": "error",
|
||||||
|
"similar_labels": "warning",
|
||||||
|
"simulation_model_issue": "ignore",
|
||||||
|
"unannotated": "error",
|
||||||
|
"unit_value_mismatch": "error",
|
||||||
|
"unresolved_variable": "error",
|
||||||
|
"wire_dangling": "error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"libraries": {
|
||||||
|
"pinned_footprint_libs": [],
|
||||||
|
"pinned_symbol_libs": []
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"filename": "atmega328p--registre-air-chaud--e01c-ml01s--uln2003--ds18b20.kicad_pro",
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
"net_settings": {
|
||||||
|
"classes": [
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "Default",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.25,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "+12V",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 1.0,
|
||||||
|
"via_diameter": 1.0,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "+3.3V",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.55,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "GND",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.25,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"net_colors": null,
|
||||||
|
"netclass_assignments": null,
|
||||||
|
"netclass_patterns": [
|
||||||
|
{
|
||||||
|
"netclass": "+3.3V",
|
||||||
|
"pattern": "+3.3V"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"netclass": "+12V",
|
||||||
|
"pattern": "+12V"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"netclass": "+3.3V",
|
||||||
|
"pattern": "GND"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pcbnew": {
|
||||||
|
"last_paths": {
|
||||||
|
"gencad": "",
|
||||||
|
"idf": "",
|
||||||
|
"netlist": "",
|
||||||
|
"plot": "",
|
||||||
|
"pos_files": "",
|
||||||
|
"specctra_dsn": "",
|
||||||
|
"step": "",
|
||||||
|
"svg": "",
|
||||||
|
"vrml": ""
|
||||||
|
},
|
||||||
|
"page_layout_descr_file": ""
|
||||||
|
},
|
||||||
|
"schematic": {
|
||||||
|
"annotate_start_num": 0,
|
||||||
|
"bom_export_filename": "",
|
||||||
|
"bom_fmt_presets": [],
|
||||||
|
"bom_fmt_settings": {
|
||||||
|
"field_delimiter": ",",
|
||||||
|
"keep_line_breaks": false,
|
||||||
|
"keep_tabs": false,
|
||||||
|
"name": "CSV",
|
||||||
|
"ref_delimiter": ",",
|
||||||
|
"ref_range_delimiter": "",
|
||||||
|
"string_delimiter": "\""
|
||||||
|
},
|
||||||
|
"bom_presets": [],
|
||||||
|
"bom_settings": {
|
||||||
|
"exclude_dnp": false,
|
||||||
|
"fields_ordered": [
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Reference",
|
||||||
|
"name": "Reference",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": true,
|
||||||
|
"label": "Value",
|
||||||
|
"name": "Value",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Datasheet",
|
||||||
|
"name": "Datasheet",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Footprint",
|
||||||
|
"name": "Footprint",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": false,
|
||||||
|
"label": "Qty",
|
||||||
|
"name": "${QUANTITY}",
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group_by": true,
|
||||||
|
"label": "DNP",
|
||||||
|
"name": "${DNP}",
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filter_string": "",
|
||||||
|
"group_symbols": true,
|
||||||
|
"name": "Grouped By Value",
|
||||||
|
"sort_asc": true,
|
||||||
|
"sort_field": "Reference"
|
||||||
|
},
|
||||||
|
"connection_grid_size": 50.0,
|
||||||
|
"drawing": {
|
||||||
|
"dashed_lines_dash_length_ratio": 12.0,
|
||||||
|
"dashed_lines_gap_length_ratio": 3.0,
|
||||||
|
"default_line_thickness": 6.0,
|
||||||
|
"default_text_size": 50.0,
|
||||||
|
"field_names": [],
|
||||||
|
"intersheets_ref_own_page": false,
|
||||||
|
"intersheets_ref_prefix": "",
|
||||||
|
"intersheets_ref_short": false,
|
||||||
|
"intersheets_ref_show": false,
|
||||||
|
"intersheets_ref_suffix": "",
|
||||||
|
"junction_size_choice": 3,
|
||||||
|
"label_size_ratio": 0.375,
|
||||||
|
"operating_point_overlay_i_precision": 3,
|
||||||
|
"operating_point_overlay_i_range": "~A",
|
||||||
|
"operating_point_overlay_v_precision": 3,
|
||||||
|
"operating_point_overlay_v_range": "~V",
|
||||||
|
"overbar_offset_ratio": 1.23,
|
||||||
|
"pin_symbol_size": 25.0,
|
||||||
|
"text_offset_ratio": 0.15
|
||||||
|
},
|
||||||
|
"legacy_lib_dir": "",
|
||||||
|
"legacy_lib_list": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
"net_format_name": "",
|
||||||
|
"page_layout_descr_file": "",
|
||||||
|
"plot_directory": "",
|
||||||
|
"spice_current_sheet_as_root": false,
|
||||||
|
"spice_external_command": "spice \"%I\"",
|
||||||
|
"spice_model_current_sheet_as_root": true,
|
||||||
|
"spice_save_all_currents": false,
|
||||||
|
"spice_save_all_dissipations": false,
|
||||||
|
"spice_save_all_voltages": false,
|
||||||
|
"subpart_first_id": 65,
|
||||||
|
"subpart_id_separator": 0
|
||||||
|
},
|
||||||
|
"sheets": [
|
||||||
|
[
|
||||||
|
"638b7546-8960-4f46-9262-47cbcf0a5cc3",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text_variables": {}
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Registre air chaud
|
|
||||||
|
|
||||||
registre d'insuflation d'air chaud pilotabe a distance (Home assistant) avec mysensors
|
|
||||||
|
|
||||||
https://www.mysensors.org/
|
|
||||||
|
|
||||||
https://www.makerguides.com/28byj-48-stepper-motor-arduino-tutorial/
|
|
||||||
|
|
||||||
https://www.home-assistant.io/integrations/mysensors/
|
|
||||||
@@ -1,205 +0,0 @@
|
|||||||
#define MY_DEBUG
|
|
||||||
// Enable and select radio type attached
|
|
||||||
#define MY_RADIO_RF24
|
|
||||||
// #define MY_RF24_PA_LEVEL RF24_PA_MIN
|
|
||||||
// #define MY_RF24_PA_LEVEL RF24_PA_LOW
|
|
||||||
// #define MY_RF24_PA_LEVEL RF24_PA_HIGH
|
|
||||||
#define MY_RF24_PA_LEVEL RF24_PA_MAX
|
|
||||||
|
|
||||||
#define MY_RF24_CHANNEL 14
|
|
||||||
|
|
||||||
#define MY_REPEATER_FEATURE
|
|
||||||
|
|
||||||
#define MY_DEFAULT_RX_LED_PIN A0
|
|
||||||
#define MY_DEFAULT_TX_LED_PIN A1
|
|
||||||
#define MY_DEFAULT_ERR_LED_PIN A2
|
|
||||||
|
|
||||||
#include <SPI.h>
|
|
||||||
#include <MySensors.h>
|
|
||||||
|
|
||||||
// https://lastminuteengineers.com/multiple-ds18b20-arduino-tutorial/
|
|
||||||
#include <OneWire.h>
|
|
||||||
#include <DallasTemperature.h>
|
|
||||||
|
|
||||||
// Data wire is plugged into port 11 on the Arduino
|
|
||||||
#define ONE_WIRE_BUS 7
|
|
||||||
// Setup a oneWire instance to communicate with any OneWire devices
|
|
||||||
OneWire oneWire(ONE_WIRE_BUS);
|
|
||||||
|
|
||||||
// Pass our oneWire reference to Dallas Temperature.
|
|
||||||
DallasTemperature sensors(&oneWire);
|
|
||||||
|
|
||||||
#define ROTATION_CHILD_ID 0
|
|
||||||
#define CHILD_ID_TEMP 1
|
|
||||||
|
|
||||||
MyMessage dimmerMsg(ROTATION_CHILD_ID, V_DIMMER);
|
|
||||||
MyMessage lightMsg(ROTATION_CHILD_ID, V_LIGHT); // we need init light message to make the dimmer appear in HA
|
|
||||||
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
|
|
||||||
|
|
||||||
// https://lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial/
|
|
||||||
#include "AccelStepper.h"
|
|
||||||
|
|
||||||
|
|
||||||
// ULN2003 Wiring:
|
|
||||||
const int In1 = 3;
|
|
||||||
const int In2 = 4;
|
|
||||||
const int In3 = 5;
|
|
||||||
const int In4 = 6;
|
|
||||||
|
|
||||||
// Create stepper object called 'myStepper', note the pin order:
|
|
||||||
AccelStepper myStepper(4, In1, In3, In2, In4);
|
|
||||||
|
|
||||||
int prevDimValue=0;
|
|
||||||
int newDimValue=0;
|
|
||||||
char convBuffer[10];
|
|
||||||
const int debattement = 2038 * 1.2;
|
|
||||||
|
|
||||||
bool homed=false;
|
|
||||||
// atmega328p pin 26 -> pc3 -> arduino A3;
|
|
||||||
const int homing_pin = A3;
|
|
||||||
int stopCourseBtnState = 0;
|
|
||||||
|
|
||||||
unsigned long previousMillis = 0;
|
|
||||||
const long tempInterval = 60000;
|
|
||||||
float DTemp;
|
|
||||||
float old_DTemp;
|
|
||||||
|
|
||||||
|
|
||||||
void presentation()
|
|
||||||
{
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
Serial.println("- - - - - presentation - - - - -");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sendSketchInfo("Registre Air Chaud", "0.3");
|
|
||||||
|
|
||||||
present(ROTATION_CHILD_ID, S_DIMMER, "rotation");
|
|
||||||
present(CHILD_ID_TEMP, S_TEMP, "Temperature");
|
|
||||||
}
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
Serial.println("- - - - - setup - - - - -");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
myStepper.setMaxSpeed(1000.0);
|
|
||||||
myStepper.setAcceleration(50.0);
|
|
||||||
myStepper.setSpeed(200);
|
|
||||||
// myStepper.moveTo(2038);
|
|
||||||
|
|
||||||
// make a homing of stepper motor
|
|
||||||
pinMode(homing_pin, INPUT);
|
|
||||||
digitalWrite(homing_pin, HIGH);
|
|
||||||
|
|
||||||
// send(dimmerMsg.set(prevDimValue));
|
|
||||||
// send(lightMsg.set(1));
|
|
||||||
|
|
||||||
sensors.begin();
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
// Serial.println("- - - - - loop - - - - -");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned long currentMillis = millis();
|
|
||||||
// do measurement every one minute
|
|
||||||
if (currentMillis - previousMillis >= tempInterval)
|
|
||||||
{
|
|
||||||
previousMillis = currentMillis;
|
|
||||||
sensors.requestTemperatures();
|
|
||||||
old_DTemp = DTemp;
|
|
||||||
DTemp = sensors.getTempCByIndex(0);
|
|
||||||
if (DTemp != old_DTemp && DTemp != -127)
|
|
||||||
{
|
|
||||||
send(msgTemp.set(DTemp, 1));
|
|
||||||
old_DTemp = DTemp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// myStepper.moveTo(myStepper.currentPosition() + 2048);
|
|
||||||
|
|
||||||
// delay(5000);
|
|
||||||
|
|
||||||
// Change direction once the motor reaches target position
|
|
||||||
// if (myStepper.distanceToGo() == 0)
|
|
||||||
// myStepper.moveTo(-myStepper.currentPosition());
|
|
||||||
|
|
||||||
|
|
||||||
// stopCourseBtnState = digitalRead(homing_pin);
|
|
||||||
// if (stopCourseBtnState == HIGH){
|
|
||||||
// Serial.print('stopCourseBtnState HIGH');
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!homed)
|
|
||||||
{
|
|
||||||
myStepper.setSpeed(200);
|
|
||||||
if (myStepper.distanceToGo() == 0) {
|
|
||||||
myStepper.moveTo(myStepper.currentPosition() + 2038); // turn clockwise to go up
|
|
||||||
}
|
|
||||||
stopCourseBtnState = digitalRead(homing_pin);
|
|
||||||
if (stopCourseBtnState == HIGH){
|
|
||||||
Serial.print("stopCourseBtnState is HIGH");
|
|
||||||
// stepper
|
|
||||||
myStepper.stop();
|
|
||||||
myStepper.setCurrentPosition(0);
|
|
||||||
// HA
|
|
||||||
send(dimmerMsg.set(prevDimValue));
|
|
||||||
send(lightMsg.set(1));
|
|
||||||
|
|
||||||
homed=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Move the motor one step
|
|
||||||
if(!myStepper.run()){
|
|
||||||
// release the stepper motor to free power consumption
|
|
||||||
digitalWrite(In1, 0);
|
|
||||||
digitalWrite(In2, 0);
|
|
||||||
digitalWrite(In3, 0);
|
|
||||||
digitalWrite(In4, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle incoming messages
|
|
||||||
void receive(const MyMessage &message) {
|
|
||||||
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
Serial.println("- - - - - receive - - - - -");
|
|
||||||
Serial.print("Last reading for sensor: ");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (message.type == V_LIGHT) {
|
|
||||||
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
Serial.println("- - - - - receive V_LIGHT - - - - -");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else if (message.type == V_DIMMER) {
|
|
||||||
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
Serial.println("- - - - - receive V_DIMMER - - - - -");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
newDimValue = atoi(message.getString(convBuffer));
|
|
||||||
|
|
||||||
#ifdef MY_DEBUG
|
|
||||||
// Serial.print("prevDimValue: ");
|
|
||||||
// Serial.println(prevDimValue);
|
|
||||||
Serial.print("newDimValue: ");
|
|
||||||
Serial.println(newDimValue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (homed)
|
|
||||||
{
|
|
||||||
int pos = (debattement / 100) * newDimValue * -1; // turn counter clock wise to go down
|
|
||||||
if (myStepper.distanceToGo() != 0) {
|
|
||||||
myStepper.stop();
|
|
||||||
}
|
|
||||||
myStepper.setSpeed(400);
|
|
||||||
myStepper.moveTo(pos); // move the stepper
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||