Changes

Jump to navigation Jump to search
no edit summary
The electrical control unit is a wireless communication system that monitors the battery voltage and broadcasts other information.Please refer to the [GitHub Repository "WoodlandHarvestControlSystem"](https://github.com/LSanten/WoodlandHarvestControlSystem) for the code for all Arduinos. The over-the-air communication works on the LoRa system at 915 Mhz.</br>
Please refer to If you feel lost regarding working with any sensors or boards used in the [GitHub Repository "WoodlandHarvestControlSystem"](https://github.com/LSanten/WoodlandHarvestControlSystem) for system, check Useful Guides section at the code for all Arduinosbottom of this page.</br>
__Feel free to change the code on the Arduinos and platforms. Visitors and students can get editing access to the repository from Leon Santen or Odalys Benitez.__
# Wireless communication codesLoRa Network
The wireless On the Arduinos that are integrated into the system uses , we use the [[Dragino LoRa research|LoRa protocolshield]] to communicate at 915 Mhz(https://wiki.dragino.com/index.php?title=Lora_Shield). For detailed information In the image below, you can see how the pins on what the Dragino LoRa shield are assigned. This is and how it works, please refer to useful as not all pins on the shield are useable. This is especially important on Arduino Unos that don't have as many pins as the Arduino Megas.</br>[[LoRa researchFile:Lora board.JPG|500px]] page</br>_The Dragino LoRa shield. Blue-boxed pins are not used by the shield and are free to be used._
The diagram for states and communication codes is on [Whimsical](https://whimsical.com/rf-states-and-communication-codes-TEZgio2TPLtG5tm47541Hq). The prior link redirects you to the diagram. ## Nodes
The following nodes are curently in use: ### master-arduino The master Arduino measures the battery voltage with the [Adafruit INA260](https://www.adafruit.com/product/4226?gclid=Cj0KCQiA4feBBhC9ARIsABp_nbUfI0ajLIOyZSA2bku_JZfo73gYy_W1wFGoZthBykCbWl1sPe3xmiYaAnboEALw_wcB) and broadcasts information wirelessly to the other Arduinos. The wireless system uses the [[LoRa research|LoRa protocol]] to communicate at 915 Mhz. For detailed information on what LoRa is and how it works, please refer to the [[LoRa research]] page. The diagram for states and communication codes is on [Whimsical](https://whimsical.com/rf-states-and-communication-codes-TEZgio2TPLtG5tm47541Hq). The prior link redirects you to the diagram. Purpose:</br>- Sense and broadcast battery voltage Data transmission:</br>- _float_ of battery voltage  ### client_arduino_responsive-light[[File:GlowingBucket.jpeg|250px]]</br>_The glowing crystal indicates the batterie's charge status._</br> Purpose:</br>- Receive battery voltage and change colors to indicate battery status Data transmission:</br>- NA #### Color legend - >= 27 V | Violet- between 25 and 27 V | __Green__- between 24.3 and 25 V | __Orange__- < 24.3 V | __Red__  # Repository Sectionssections - coding comments _In this section, code-specific comments and tips can be written down for future collaboration if comments in the code don't feel appropriate._
## master-arduino
The ## client_arduino_responsive-lightThis unit receives the battery voltage from the master Arduino measures in the battery voltage with a voltage divider circuitmudroom. For precise Based on the voltage measurements, it is recommended to use `(analogRead(pin) + 0.5) * 5.0 / 1024.0` [^preciseVoltage]the LED crystal shines in different colors.
## backporch-arduinoanemometer
## We are using a Vortex wind sensor. One revolution per second equals 2.5 mph. Since our anemometerhas a relay (a mechanical switch), it creates a _switch bounce_. Therefore, we need a debounce circuit.</br>[[File:WindSpeed Porch Oct14.jpg|500px]] _A bug with the current code seems to be related to saving the dateTime string. The dateTime string is saved incorrectly when there should be a trailing 0 in front of the minute reading. I believe that the current code does not include an additional 0 to save minute readings below 10._
[[File:Porch-anemometer.jpg|border|thumb|Anemometer data logger prototype on porch]]We are using a Vortex wind sensor. One revolution per second equals 2.5 mph. Since our anemometer has a relay (a mechanical switch), it creates a _switch bounce_. Therefore, we need a debounce circuit.[[File:WindSpeed Porch Oct14.jpg|border|thumb]]# Opportunities to improve the system
_A bug with the current code seems to be related - We are currently supplying power to saving the dateTime stringArduinos via USB. The dateTime string is saved incorrectly when there should be a trailing 0 in front of If we use efficient Buck converters from the minute reading. I believe that batteries to the current code does not include an additional 0 to Arduinos, we might save minute readings below 10some electricity. - install a gateway for a LoRa WAN network
# Helpful tools and guides
# Opportunities to improve the system# Tools
- We are currently supplying power to the Arduinos via USBThe [falstad online circuit simulator](https://www.falstad.com/circuit/circuitjs. If we used DC converters from the batteries html) is great to the Arduinosquickly test a circuit, we might save some electricitycheck its output voltage or behavior.
# Useful # Guidesand tips
__Real Time Clock Setup for SD3231__
https://www.digikey.com/en/maker/blogs/introduction-to-lora-technology
#__Voltage measuring with voltage divider circuit__ For precise voltage measurements, it is recommended to use `(analogRead(pin) + 0.5) * 5.0 / 1024.0` [^preciseVoltage].  ## References
[^preciseVoltage]: http://www.skillbank.co.uk/arduino/measure.htm#:~:text=Precise%20voltage%20measurement%20with%20the,number%20between%200%20and%201023.
356

edits

Navigation menu