mirror of
https://github.com/MOSH-Insa-Toulouse/5ISS-2024-2025-MARIN--MULLER-BOUJON.git
synced 2025-06-08 14:00:49 +02:00
Renamed app inventor source file. Created banners. Updated readme.
This commit is contained in:
parent
4262914578
commit
f425c0beb0
9 changed files with 82 additions and 75 deletions
89
README.md
89
README.md
|
@ -1,88 +1,31 @@
|
|||
# UF Smart Devices
|
||||
|
||||
Response from "sys get ver" command :
|
||||
RN2483 1.0.5 Oct 31 2018 15:06:52
|
||||
## Embedded
|
||||
|
||||
DO NOT FORGET TO RESET THE RN2483 BY PULLING THE RST PIN !
|
||||

|
||||
|
||||
# UF Smart Devices : Partie Analogique
|
||||
[Full Software design here](hardware)
|
||||
|
||||
Impédence du capteur de gaz : plusieurs gigaohms -> il faut donc amplifier le signal.
|
||||
We made a breadboard using various components like a *LoRa UART* [RN2483A](https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/RN2483-Low-Power-Long-Range-LoRa-Technology-Transceiver-Module-DS50002346F.pdf), an [SSD1306](https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf) I2C Screen and a [Gaz Sensor MQ5](https://wiki.seeedstudio.com/Grove-Gas_Sensor-MQ5/) from Seeed Studio. The goal would be to communicate using the LoRa chip to [ChirpStack](https://www.chirpstack.io/) by sending the sensor data directly to the gateway. We decided to use an ESP32 for this project, because it has a wide variety of pins that can be dynamic allocated on each gpio. Plus, espidf is a framework we are familiar with.
|
||||
|
||||
En amplifiant on amplifie aussie le bruit ! Il faut donc filtrer :
|
||||
1. Filtrer le bruit hf de mesure
|
||||
2. Fitlrer le bruit 50Hz
|
||||
3. Filtrer l'échantillonnage de l'ADC
|
||||
## Hardware
|
||||
|
||||
Ampli normal avec gros offset :
|
||||

|
||||
|
||||

|
||||
[Full LTSpice simulation and EasyEDA design here](hardware)
|
||||
|
||||
The goal in this part would be to create a fully working PCB with everything we designed so far. Our own gaz sensor will be used. The first step would be to emulate on **LTSpice** the behavior of such a sensor. With this we can then design a board with the correct schematic on **EasyEDA**.
|
||||
|
||||
Ampli LT1050 très faible offset :
|
||||
## Node Red
|
||||
|
||||

|
||||
|
||||
|
||||
Schéma ampli + filtres (en bleu) :
|
||||
|
||||

|
||||
|
||||
|
||||
Fréquence de coupure du premier filtre : 16Hz
|
||||
|
||||

|
||||
|
||||
Fréquence de coupure du deuxième filtre : 1.5Hz
|
||||
|
||||

|
||||
|
||||
|
||||
Fréquenc de coupure du troisième filtre : 1.6kHz
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
Atténuation à :
|
||||
- 50Hz : 40db
|
||||
- Fréquence de Shannon Nyquist (2fmax adc 15kHz) : 108dB
|
||||
|
||||
## Simulation avec modèle du capteur de gaz
|
||||
|
||||
V = RI <=> I = 1/R V <=> I = V * G (Conductance en Siemens)
|
||||
|
||||
Modèle du capteur de gaz : I=V(cp,cn)*(10n+(v(gc,gn)*10n))
|
||||
|
||||
t=0: V(cp,cn)=0 I=V(cp,cn)*(10nS)
|
||||
|
||||
Si t>>1: V(gc,gn)=1 I=V(cp,cn)*(10nS+10mS)
|
||||
|
||||
tau=R0*C0
|
||||
|
||||
|
||||
Buit 50Hz atténué :
|
||||
|
||||

|
||||
|
||||
|
||||
Bruit 50Hz non atténué :
|
||||
|
||||

|
||||
|
||||
|
||||
## Calcul de la résistance totale du schéma :
|
||||
|
||||
On est a basse fréquence donc les capacités sont analogues à des circuits ouverts, on a alors une succéssion de ponts diviseurs :
|
||||
|
||||
|
||||
Rsortie = (1+R3/R)*R1*Vcc/Vadc - R1 - R5
|
||||
|
||||
|
||||
|
||||
|
||||
On peut brancher un potentiomètre numérique pour faire varier l'amplification et éviter de saturer dynamiquement.
|
||||

|
||||
|
||||
[Full Node-Red setup here](node-red)
|
||||
|
||||
We would need to create a node-red flow to actually gather the data and show it on a dashboard. To do this we would have to connect using a MQTT Broker, Chirpstack has the ability to resend, via a given topic the data gathered by the device.
|
||||
|
||||
## App Inventor
|
||||
|
||||

|
||||
|
||||
Using the [AppInventor](https://ai2.appinventor.mit.edu/) we have designed a mobile application that can directly communicate with a bluetooth receiver and power on a LED. You can see the application from the files as well as the source file for the embedded part.
|
BIN
appinventor/WalterESP32.aia
Normal file
BIN
appinventor/WalterESP32.aia
Normal file
Binary file not shown.
4
embedded/README.md
Normal file
4
embedded/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
Response from "sys get ver" command :
|
||||
RN2483 1.0.5 Oct 31 2018 15:06:52
|
||||
|
||||
DO NOT FORGET TO RESET THE RN2483 BY PULLING THE RST PIN !
|
|
@ -1,5 +1,64 @@
|
|||
# Hardware
|
||||
## LTSpice simulation
|
||||
|
||||
## LTSpice Simulation
|
||||
|
||||
Impédence du capteur de gaz : plusieurs gigaohms -> il faut donc amplifier le signal.
|
||||
|
||||
En amplifiant on amplifie aussie le bruit ! Il faut donc filtrer :
|
||||
1. Filtrer le bruit hf de mesure
|
||||
2. Fitlrer le bruit 50Hz
|
||||
3. Filtrer l'échantillonnage de l'ADC
|
||||
|
||||

|
||||
*Ampli normal avec gros offset*
|
||||
|
||||

|
||||
*Ampli LT1050 très faible offset*
|
||||
|
||||

|
||||
*Schéma ampli + filtres (en bleu)*
|
||||
|
||||

|
||||
*Fréquence de coupure du premier filtre : 16Hz*
|
||||
|
||||

|
||||
*Fréquence de coupure du deuxième filtre : 1.5Hz*
|
||||
|
||||

|
||||
*Fréquenc de coupure du troisième filtre : 1.6kHz*
|
||||
|
||||
|
||||
Atténuation à :
|
||||
- 50Hz : 40db
|
||||
- Fréquence de Shannon Nyquist (2fmax adc 15kHz) : 108dB
|
||||
|
||||
### Simulation avec modèle du capteur de gaz
|
||||
|
||||
V = RI <=> I = 1/R V <=> I = V * G (Conductance en Siemens)
|
||||
|
||||
Modèle du capteur de gaz : I=V(cp,cn)*(10n+(v(gc,gn)*10n))
|
||||
|
||||
t=0: V(cp,cn)=0 I=V(cp,cn)*(10nS)
|
||||
|
||||
Si t>>1: V(gc,gn)=1 I=V(cp,cn)*(10nS+10mS)
|
||||
|
||||
tau=R0*C0
|
||||
|
||||

|
||||
*Buit 50Hz atténué*
|
||||
|
||||

|
||||
*Bruit 50Hz non atténué*
|
||||
|
||||
### Calcul de la résistance totale du schéma :
|
||||
|
||||
On est a basse fréquence donc les capacités sont analogues à des circuits ouverts, on a alors une succéssion de ponts diviseurs :
|
||||
|
||||
Rsortie = (1+R3/R)*R1*Vcc/Vadc - R1 - R5
|
||||
|
||||
On peut brancher un potentiomètre numérique pour faire varier l'amplification et éviter de saturer dynamiquement.
|
||||
|
||||
### Calculating $R_{cal1}$ to the best settings possible
|
||||
|
||||
By modifying the $R_{cal1}$ resistor we can see that the maximum output voltage can go up to $5V$. The goal would be to modify this resistor value to have a maximum output of around $3.3V$:
|
||||
#### Calculate $a$
|
||||
|
@ -18,4 +77,5 @@ $$-3.17\times{10^3\times{3.3V}}+16.7\times{10^3}=6.2k\Omega$$
|
|||
|
||||

|
||||
> Has we can see with the LTSpice simulation, we have the correct maximum voltage, it does not go further than $3.29V$ which is exactly what we wanted.
|
||||
## Electronic CAD
|
||||
|
||||
## Electronic CAD with EasyEDA
|
||||
|
|
BIN
img/appinventor-banner.jpg
Normal file
BIN
img/appinventor-banner.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 221 KiB |
BIN
img/hardware-banner.jpg
Normal file
BIN
img/hardware-banner.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 336 KiB |
BIN
img/nodered-banner.jpg
Normal file
BIN
img/nodered-banner.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 175 KiB |
BIN
img/software-banner.jpg
Normal file
BIN
img/software-banner.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 293 KiB |
Loading…
Add table
Reference in a new issue