
Logger pcb kicad
mrheltic/Logger
Just a data acquisition system built using an ESP32 microcontroller board, using ADS1115 to acquire datas and save them on SD, plot them with Python or compute the mean on the OLED Display

This the Mark II of my Raingauge project
Rainguage is an open-source printed circuit board by fguiet, from the fguiet/raingauge-v2 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 33.1 × 61.4 mm with 27 parts on 31 nets, routed with 92 tracks and 4 vias.
It is built around the ATTINY85-20PU and HT7333-A. Its parts include 6 resistors, 6 connectors, 4 capacitors, 2 ICs and 2 diodes. It belongs with the AVR (ATmega, ATtiny) boards of this library.


This project is available on Thingiverse : https://www.thingiverse.com/thing:6480016


Funnel diameter = 15cm = 150 mm = 0.15m Volume of each bucket (around) = 3ml = 0.0030l
Funnel area = pi*R² = 3.14 * 0.075² = 0,017669025 m2
X= 1/Aire * V = (1/0,017669025) * 0.0030 = 0.17 L par m2 (ou mm)
1mm = Une litre d'eau tombé sur une mètre carré
Résolution de mon pluvio = 0.17 L/m2 (c'est dans la norme)
Here is the ATtiny 85 pinout

Using Arduino IDE v2, use this tutorial : https://www.instructables.com/How-to-Program-an-Attiny85-From-an-Arduino-Uno/
A quick overview of the Arduino and ATtiny 85 connexion.

To program (Arduino <=> ATtiny 85):
VCC (3.3v ou 5V) <=> VCC (ATtiny pin8) Arduino GND <=> GND (ATtiny pin4) Arduino Pin 10 <=> ATtiny Pin1 Arduino Pin 11 <=> ATtiny Pin5 Arduino Pin 12 <=> ATTiny Pin6 Arduino Pin 13 <=> ATTiny Pin7
See https://forum.arduino.cc/t/attiny84-sleep-issues/199824/8 See http://www.gammon.com.au/power See https://www.marcelpost.com/wiki/index.php/ATtiny84_ADC
Extract from ATtiny datasheet p49.
²> 9.2 External Interrupts
Note that recognition of falling or rising edge interrupts on INT0 requires the presence of an I/O clock, as described in “Clock Sources” on page 25.
Careful use 3.3v on your serial adapter.
Connect this way:
USB To Serial Adapter <-> ATTiny GND <-> GND RX <-> Pin 7 (PB2)
Then, power the circuit by an external alimentation at 3.3v (no need to power the USB Serial Adapter to VCC pin)

Using the PPK II (Nordic Power Profiler Kit II), the device consume about 13uA when sleeping and 60mA when sending data.


VOUT of the PPK II should be connected to VIN of the device and GND to GND.
See Get your Power Profiler Kit II up and running
I am using old XBee S1.
At the begining of the project I was using the transparent mode (AT).
But I changed to API Mode as it offers more options (like the RSSI)
Update the XBee firmware with last version using XCTU v6.5.13

Click on Default (To reset XBee to factory default), then Write Click on Update to upload the last firmware available for this XBee S1 unit
In my case as of 2023/12 :

To make the Xbee talks to each other just config them with the same Channel and PAN (Personnal Area Network ID). Messages will be broadcasted.

You can use XCTU to test that a mesage is correcly sent.
In my case I have got an Raspberry Pi with NodeRed installed and an XBeee connected to the Raspberry Pi.
Just use the XCTU Console and send a test packet, here : "Rainguage projet rocks!" in a JSON format

Here a part of the NodeRed flow I am using.

Careful, you must configure the NodeRed serial flow to split a message as soon as the '}' character is reveiced (end of JSON message)

If everything is going well then you should received the message on the NodeRed debug console


To config the Xee to use the sleep mode, just change the sleep mode setting

Sleep mode will be control by pin 9, see https://www.digi.com/resources/documentation/Digidocs/90001456-13/reference/r_wk_sleep_mode.htm
PIN 9 HIGH : Xbee sleeps PIN 9 DOWN : Xbee awake
Don't forget to set Xbee serial speed communication to 38400 bauds as the ATtinySerialOut library use this speed.
I was using Transparent Mode before (AT) but there is another mode called API Mode that offers more options and controls
See API Mode 2 frame StructureC
Supported frames are listed here : https://www.digi.com/resources/documentation/Digidocs/90001942-13/reference/r_supported_frames_zigbee.htm?tocpath=API%20mode%7C_____3
I am using the 64-bit Transmit Request - 0x00 frame. I know that I should use the 0x10 frame tpye but I am using old XBee S1 and they only support 802.15.4 protocol stack.
See 64-bit Transmit Request - 0x00
In API Mode 2, some characters need to be escaped:
See : https://stackoverflow.com/questions/55861574/difference-between-api-1-and-api-2-mode-of-xbee
In API 2 mode, the length field does not include any escape character in the frame and the checksum is calculated with non-escaped data.
All bytes except for the start delimiter must be escaped if needed.
Here is what I changed in the XBee configuration with XCTU
CH - Channel = C ID - PAN ID = 666 SM - Sleep mode = Pin Hibernate [1] BD - Interface Data Rate = 38400 [5] AP - API Enable = API Enabled w/PPP [2]
CH - Channel = C ID - PAN ID = 666 CE - Coordinator Enable = Coordinator [1] BD - Interface Data Rate = 38400 [5] AP - API Enable = API Enabled w/PPP [2] RR - XBee Retries = 3 (because the RSSI was not good I tried this setting)
To communicate with the XBee (send data), this project used the following library : ATtinySerialOut, version 2.2.0 (2023/12)
GitHub : https://github.com/ArminJo/ATtinySerialOut/

This project is using this library https://github.com/ortegafernando/Low-Power to allow the ATTiny 85 power management
Note
To use an external library for a Arduino IDE Project, just copy the library source in the librairies folder of Arduino IDE

Some notes
On ne peut pas utiliser le mirroring sur la pièce que l'on veut "mirrorer" n'a pas de lien avec un objet du body en cours (pas de corps multiples dans un body)
Utilisation de ShapeBinder pour pouvoir avoir des points de repères d'un autre body (voir vidéo : https://www.youtube.com/watch?v=KYD9Ojugi8Q)

Les trous pour placer les inserts font 4.2mm sur Freecad. les inserts à utiliser sont des M3*4 (4 mm de haut pour type vis M3)
Quick reminder about pullup/pulldown : https://arduino.developpez.com/cahiers-pratiques/resistance-pullup-pulldown/


Ce tuto : https://www.youtube.com/watch?v=RpVIrzEUsIM ou https://www.youtube.com/watch?v=dAck3bxzehA ou https://www.youtube.com/watch?v=nYybg5KdaT8
Note :
Suppression du snap sur le PCB Editor afin de placer les composants à un endroits précis : utiliser la touche CTRL
Grandes étapes
Fichier, Ajustage page

Shortcut
M : Move R : Rotate Tab : Pour bouger le composant avec les fils accrochés
Pour vérifier que le circuit est ok on peut cliquer sur le bouton :

Note
Normalement avec Kicad 7, les éléments sont numérotés automatiquement. Sinon, cliquer sur le bouton:


Inutile dans Kicad 7 ?
Inutile dans Kicad 7 ?
On passe sur cet écran en cliquant sur :

Récupération des contraintes JLCPCB : https://github.com/sethhillbrand/kicad_templates/tree/master/JLCPCB_1-2Layer prendre le fichier JLCPCB.pro


Fichier, Ajustage page pour personnaliser le cartouche comme pour l'éditeur de schéma électronique
Pour gérer la largeur des pistes en fonction du type de piste (VCC) : Fichiers, Options CI, Classe d'Equipots, j'utilise 0.4mm pour les pistes classiques et 0.8mm en VCC

Penser à modifier la valeur par défault de la largeur des pistes à 0.4mm
Short Cut
v: change layer (front / bottom)
Notes
Layers intéressantes
F. Silks pour écrire sur le front Silk Screen B. Silks pour écrire sur le bottom Silk Screen Dwgs.User pour faire des dessins F. Courtyard : place que prend le composant front B. Courtyard : place que prend le composant bottom (on peut afficher ou pas)
Quand il y a beaucoup d'éléments sur le PCB, on peut utiliser le filtre de sélection afin de limiter la sélection à l'objet que l'on désire (exemple j'avais besoin de bouger les références des composants sur la layer silkscreen)


On trace autour des composants pour couper le PCB à la taille désirée
Pour la largeur, bien penser à sélectionner utiliser largeur de netclasse. Attention, dans netclasse il faut avoir penser à modifier la valeur par défaut pour la largeur des pistes à 0.4mm et mettre 0.8mm pour les pistes de puissance (PWR)

Voici ce qu'il faut respecter lors que l'on trace des routages pour éviter les pbs d'électromagnétisme.

Quand on a des tracks qui se croisent sur la couche du dessus et dessous il faut qu'elles soient perpendiculaires:

Couche F. Cu (Front en rouge couche du dessus) Couche B. Cu (Front en vert couche du dessous)
Ne pas relier les GND, ca sera automatique avec le plan de masse
Notes
Short cut
D : Pour modifer les tracks sans tous casser I : Au dessus d'une track permet de sélectionner toute la track
Utiliser l'outil :

Serigrafie avec couche Drawing User pour mettre les indications + - et autres ou layer F. Silks et B. Silks
Générer les fichiers Gerber, Fichier Tracer (ne pas oublier de générer le fichier de percage)
Mettre un texte JLCJLCJLCJLC sous un composant (layersilk screen)
D'abord générer le fichier de percage (generate drill file) et ensuite plot avec les options par défaut.
snapeda pour récupérer des composants kicad : https://www.snapeda.com/
Madman's Github : https://github.com/PricelessToolkit/MailBoxGuard
ATTiny and LoRa : https://github.com/novag/LoRa-ATtiny-Node
MrDIY : https://gitlab.com/MrDIYca/ultra-low-power-trigger-sensors-version-3
MakerMeik : ESP8266 as Window Sensor with years of battery life
ESP32-C3 based Smart Door/Window sensor | DEEP SLEEP 30nA? | Long battery life 5/10 years
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | MountingHole_Pad | MountingHole:MountingHole_2.2mm_M2_Pad | H1, H2, H3, H4 |
| 2 | 10kOhm | Resistor_SMD:R_0805_2012Metric | R5, R6 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric | C3, C5 |
| 2 | 4.7uF | Capacitor_SMD:C_0805_2012Metric | C1, C2 |
| 2 | LED | LED_SMD:LED_0805_2012Metric | D1, D2 |
| 1 | 100Ohm | Resistor_SMD:R_0805_2012Metric | R3 |
| 1 | 2N7002 | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | 2k Ohm | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | 3.3kOhm | Resistor_SMD:R_0805_2012Metric | R4 |
| 1 | 470 Ohm | Resistor_SMD:R_0805_2012Metric | R2 |
| 1 | ATtiny85-20P | Package_DIP:DIP-8_W7.62mm | U2 |
| 1 | Con. LiPO battery | Connector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_Vertical | J3 |
| 1 | Con. USB (+5v) | Connector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_Vertical | J2 |
| 1 | HT7333-A | Package_TO_SOT_SMD:SOT-89-3 | L2 |
| 1 | Hall sensor Connector 1 | Connector_JST:JST_EH_B3B-EH-A_1x03_P2.50mm_Vertical | J1 |
| 1 | Hall sensor Connector 2 | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J5 |
| 1 | Hall sensor Connector 3 | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J4 |
| 1 | Hall sensor Connector 4 | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J6 |
| 1 | MCP73831-2-OT | Package_TO_SOT_SMD:SOT-23-5 | U1 |
| 1 | XBEE | RF:XBEE | JP1 |

mrheltic/Logger
Just a data acquisition system built using an ESP32 microcontroller board, using ADS1115 to acquire datas and save them on SD, plot them with Python or compute the mean on the OLED Display

vooon/smart-roller-gate-controller
ESP32 based roller gate controller with ZigBee remotes

BananaGithubserfer/velopath
Разработка устройств велосипедной навигации velopath

hpbock/esp12-environment-sensor
Environment sensor that is powered by a 18650 battery using a dht22 to sense temperature and humidity. Connectivity is provided wireless using an esp12 sleeping deeply most of the time.




bwack/C64-Switchless-Multi-Kernal-27C256-adapter
Kernal switcher for the C64/C64C/C128
It measures 33.1 × 61.4 mm and has 2 copper layers, 1.6 mm thick.
27 parts, built around the ATTINY85-20PU and HT7333-A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the fguiet/raingauge-v2 repository on GitHub, at the commit this page was made from: the board is kicad/rainguage-v2/rainguage.kicad_pcb and its schematic kicad/rainguage-v2/rainguage.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).