<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.waterwaysinwhittlesea.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bencheng</id>
	<title>Sensors in Schools - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.waterwaysinwhittlesea.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bencheng"/>
	<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php/Special:Contributions/Bencheng"/>
	<updated>2026-07-03T17:58:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8727</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8727"/>
		<updated>2023-09-13T00:36:11Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
File:Guide_2.jpg&lt;br /&gt;
File:Guide_3.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
[[File:Guide_4.jpg |center| 500px]]&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 500px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 500px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8726</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8726"/>
		<updated>2023-09-13T00:35:32Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
File:Guide_2.jpg&lt;br /&gt;
File:Guide_3.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
[[File:Guide_4.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_4.jpg&amp;diff=8725</id>
		<title>File:Guide 4.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_4.jpg&amp;diff=8725"/>
		<updated>2023-09-13T00:35:25Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8724</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8724"/>
		<updated>2023-09-13T00:31:24Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
File:Guide_2.jpg&lt;br /&gt;
File:Guide_3.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8723</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8723"/>
		<updated>2023-09-13T00:29:50Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;&amp;gt;&lt;br /&gt;
File:Guide_2.jpg| 300px&lt;br /&gt;
File:Guide_3.jpg| 300px&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8722</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8722"/>
		<updated>2023-09-13T00:28:28Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot;&amp;gt;&lt;br /&gt;
File:Guide_2.jpg| 200px&lt;br /&gt;
File:Guide_3.jpg| 200px&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8721</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8721"/>
		<updated>2023-09-13T00:27:44Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
[[File:Guide_2.jpg |center| 300px]]&lt;br /&gt;
[[File:Guide_3.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot;&amp;gt;&lt;br /&gt;
File:Guide_2.jpg&lt;br /&gt;
File:Guide_3.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8720</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8720"/>
		<updated>2023-09-13T00:20:43Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
[[File:Guide_1.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
[[File:Guide_2.jpg |center| 300px]]&lt;br /&gt;
[[File:Guide_3.jpg |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
Congratulations! The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_3.jpg&amp;diff=8719</id>
		<title>File:Guide 3.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_3.jpg&amp;diff=8719"/>
		<updated>2023-09-13T00:20:30Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_2.jpg&amp;diff=8718</id>
		<title>File:Guide 2.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_2.jpg&amp;diff=8718"/>
		<updated>2023-09-13T00:20:03Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_1.jpg&amp;diff=8717</id>
		<title>File:Guide 1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Guide_1.jpg&amp;diff=8717"/>
		<updated>2023-09-13T00:19:43Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8716</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8716"/>
		<updated>2023-09-13T00:05:39Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
'''Insert a Picture Here'''&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
'''Insert two pictures here'''&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
[[File:Login_0.png |center| 300px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Login_1.png |center| 300px]]&lt;br /&gt;
The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Login_1.png&amp;diff=8715</id>
		<title>File:Login 1.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Login_1.png&amp;diff=8715"/>
		<updated>2023-09-13T00:04:48Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Login_0.png&amp;diff=8714</id>
		<title>File:Login 0.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Login_0.png&amp;diff=8714"/>
		<updated>2023-09-13T00:04:21Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8713</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8713"/>
		<updated>2023-09-12T23:52:31Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Configure the UR41 Router from Milesight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR41, which lacks a Wi-Fi Antenna, the '''Wireless Access''' approach isn't viable. &lt;br /&gt;
'''Insert a Picture Here'''&lt;br /&gt;
&lt;br /&gt;
Here we used Raspberry Pi to configure the router via the '''Wired Access''' approach:&lt;br /&gt;
&lt;br /&gt;
Step 1: Find an Ethernet cable and connect the router to the Raspberry Pi.&lt;br /&gt;
'''Insert two pictures here'''&lt;br /&gt;
&lt;br /&gt;
Step 2: Open up Raspberry Pi and set the IP Address, Username and Password using the default setting. (You can find them in the '''Quick Start Guide'''.)&lt;br /&gt;
'''Insert a picture here'''&lt;br /&gt;
&lt;br /&gt;
Step 3: Open a browser type the default IP address in the Address bar and press enter. The following interface should show up.&lt;br /&gt;
'''Insert a picture''&lt;br /&gt;
&lt;br /&gt;
Step 4: Enter the username and password then press enter. You'll see the following interface.&lt;br /&gt;
&lt;br /&gt;
'''Insert a picture'''&lt;br /&gt;
The configuration is completed.&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8712</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8712"/>
		<updated>2023-09-12T23:13:05Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Configure the UR41 Router from Milesight =&lt;br /&gt;
When you receive a new router, you need to configure it. &lt;br /&gt;
&lt;br /&gt;
There are two ways of doing that: '''Wired Access''' and '''Wireless Access'''.&lt;br /&gt;
&lt;br /&gt;
As the model we use in this project is UR&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8707</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8707"/>
		<updated>2023-09-03T12:31:33Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Using Crontab to Schedule Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''INSERT A FEW PICTURES HERE'''&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8706</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8706"/>
		<updated>2023-09-03T12:30:50Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Additional Tips and Tricks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Using Only Keyboard to Switch Tab==&lt;br /&gt;
To move to tab selection, press '''Ctrl + Tab'''. &lt;br /&gt;
&lt;br /&gt;
== Taking a Delayed Screenshot Using Scrot==&lt;br /&gt;
'''Insert a Picture here'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8705</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8705"/>
		<updated>2023-09-03T12:21:36Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Using Crontab to Schedule Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
Once the BirdNET-Pi system is deployed in the field, we expect it to upload data on a regular basis. To achieve this goal, we need to utilize Crontab to schedule the uploading. Crontab is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks or commands to run automatically at specific intervals or times. These scheduled tasks are often referred to as &amp;quot;cron jobs.&amp;quot;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8704</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8704"/>
		<updated>2023-09-03T11:53:23Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Additional Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Additional Tips and Tricks =&lt;br /&gt;
&lt;br /&gt;
== Using Crontab to Schedule Events ==&lt;br /&gt;
When we set the system in the field, it's&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8703</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8703"/>
		<updated>2023-09-03T09:50:34Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
= Additional Tips =&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_9.png&amp;diff=8702</id>
		<title>File:Scrot 9.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_9.png&amp;diff=8702"/>
		<updated>2023-09-03T09:49:24Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_8.png&amp;diff=8701</id>
		<title>File:Scrot 8.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_8.png&amp;diff=8701"/>
		<updated>2023-09-03T09:46:05Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_7.png&amp;diff=8700</id>
		<title>File:Scrot 7.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_7.png&amp;diff=8700"/>
		<updated>2023-09-03T09:45:46Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_10.png&amp;diff=8699</id>
		<title>File:Scrot 10.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_10.png&amp;diff=8699"/>
		<updated>2023-09-03T09:41:45Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8698</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8698"/>
		<updated>2023-09-03T09:38:03Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash&amp;lt;/code&amp;gt;. This will give your drive a performance score, and if you fill in the prompts at the end, it will be published publicly on pibenchmarks.com.&lt;br /&gt;
[[File:Scrot_10.png |center| 600px]]&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8662</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8662"/>
		<updated>2023-08-31T07:19:02Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 18: If you get a similar output, then TRIM is working on the drive. However, when you reboot the Pi, it will revert back. To set the TRIM setting permanently, there are a few more steps we need to do.&lt;br /&gt;
&lt;br /&gt;
Step 19: Run the command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; in the terminal. This will list all attached USB devices. Find the one associated with the SSD.(For me it's the first one in the red box.)&lt;br /&gt;
[[File:Scrot_7.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 20: Take note of the two codes separated by a colon (:) after &amp;quot;ID&amp;quot;, they will be important to later steps.&lt;br /&gt;
[[File:Scrot_8.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 21: Run the following command &amp;lt;code&amp;gt;mousepad /etc/udev/rules.d/10-trim.rules&amp;lt;/code&amp;gt; in the terminal. A text editor shown below should pop up.&lt;br /&gt;
[[File:Scrot_9.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 22: Copy and paste this line into the empty text file: '''ACTION==&amp;quot;add|change&amp;quot;, ATTRS{idVendor}==&amp;quot;174c&amp;quot;, ATTRS{idProduct}==&amp;quot;1153&amp;quot;, SUBSYSTEM==&amp;quot;scsi_disk&amp;quot;, ATTR{provisioning_mode}=&amp;quot;unmap&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Step 23: Replace &amp;quot;idVendor&amp;quot; and &amp;quot;idProduct&amp;quot; in the above line with the two codes we took note of in '''Step 20''' respectively. They should both have a length of 4. Close the mousepad and save the file.&lt;br /&gt;
&lt;br /&gt;
Step 24: This code will enable TRIM by changing the provisioning mode to &amp;quot;unmap&amp;quot;, just like we did manually earlier. Now we just need to schedule the TRIM process to be run periodically. Type &amp;lt;code&amp;gt;sudo systemctl enable fstrim.timer&amp;lt;/code&amp;gt; into the terminal. This will enable a weekly timer, which is the preferred way to TRIM SSDs on Linux distributions (as opposed to continuous TRIM).&lt;br /&gt;
&lt;br /&gt;
Step 25: At the end, we can type the command &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8661</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8661"/>
		<updated>2023-08-31T04:19:19Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 14: At the end of the result, there should be &amp;quot;provisioning_mode&amp;quot;. It's likely to be set to &amp;quot;full&amp;quot;, but we need it set to &amp;quot;unmap&amp;quot;. If yours shows &amp;quot;unmap&amp;quot; already, you can skip this next step.&lt;br /&gt;
&lt;br /&gt;
Step 15: Run the following command: &amp;lt;code&amp;gt;echo unmap &amp;gt; /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-1/2-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 16: After running the above command, run the &amp;quot;find&amp;quot; command in step 13 again. You should see the &amp;quot;provisioning_mode&amp;quot; has been changed to &amp;quot;unmap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Step 17: Run the command &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt; again and you should see the below message:&lt;br /&gt;
&lt;br /&gt;
[[File:Scrot_6.png |center| 600px]]&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_6.png&amp;diff=8660</id>
		<title>File:Scrot 6.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_6.png&amp;diff=8660"/>
		<updated>2023-08-31T04:19:05Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8659</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8659"/>
		<updated>2023-08-31T03:51:29Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;br /&gt;
&lt;br /&gt;
Step 12: Enable TRIM support: run the command &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;. Until you close this terminal,  everything from now on will be run as &amp;quot;super user&amp;quot; (admin). The command prompt should have also changed to show &amp;quot;root@raspberrypi&amp;quot;.&lt;br /&gt;
[[File:Scrot_5.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 13: Copy and paste the following command to the terminal and run it:&lt;br /&gt;
&amp;lt;code&amp;gt;find /sys/ -name provisioning_mode -exec grep -H . {} + | sort&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_5.png&amp;diff=8658</id>
		<title>File:Scrot 5.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_5.png&amp;diff=8658"/>
		<updated>2023-08-31T03:49:43Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8657</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8657"/>
		<updated>2023-08-31T03:31:30Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 10: Run the command &amp;lt;code&amp;gt;lsblk -D&amp;lt;/code&amp;gt;. Have a look for the 'sda' drive, and the two columns 'DISC-GRAN' and 'DISC-MAX'. If both of these are NOT zero, then your drive is capable of TRIM.&lt;br /&gt;
&lt;br /&gt;
Step 11: If both the column &amp;quot;DISC-GRAN&amp;quot; and &amp;quot;DISC-MAX&amp;quot; under the 'sda' drive is zero as shown below:&lt;br /&gt;
[[File:Scrot_4.png |center| 600px]]&lt;br /&gt;
One possible cause is you didn't remove the microSD card from the Raspberry Pi as mentioned in Step 5. Shut down Raspberry Pi, remove the microSD card and reboot.&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_4.png&amp;diff=8656</id>
		<title>File:Scrot 4.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_4.png&amp;diff=8656"/>
		<updated>2023-08-31T03:29:11Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8655</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8655"/>
		<updated>2023-08-31T03:09:40Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;br /&gt;
[[File:Scrot_3.png |center| 600px]]&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_3.png&amp;diff=8654</id>
		<title>File:Scrot 3.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_3.png&amp;diff=8654"/>
		<updated>2023-08-31T03:08:52Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8653</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8653"/>
		<updated>2023-08-31T03:05:41Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 9: Check TRIM: Run the code &amp;lt;code&amp;gt;sudo fstrim -v /&amp;lt;/code&amp;gt;. If you see the below message in the red box, then the TRIM isn't enabled for the drive and you need to enable it.&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8652</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8652"/>
		<updated>2023-08-31T02:24:51Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Run &amp;lt;code&amp;gt;sudo apt update /&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;sudo apt upgrade /&amp;lt;/code&amp;gt; in the terminal. This will do a full update of do a full update of all software.&lt;br /&gt;
&lt;br /&gt;
Step 8: Open up a new terminal and run &amp;lt;code&amp;gt;lsusb -t /&amp;lt;/code&amp;gt;.&lt;br /&gt;
You should see '''Driver=uas''' among the results.&lt;br /&gt;
[[File:Scrot_2.png |center| 600px]]&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_2.png&amp;diff=8651</id>
		<title>File:Scrot 2.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Scrot_2.png&amp;diff=8651"/>
		<updated>2023-08-31T02:24:09Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8650</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8650"/>
		<updated>2023-08-31T01:15:10Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Always remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forgot to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;br /&gt;
&lt;br /&gt;
Step 6: Connect your Raspberry Pi to the Internet and open a terminal.&lt;br /&gt;
&lt;br /&gt;
Step 7: Type&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8649</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8649"/>
		<updated>2023-08-31T01:12:16Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 5: Unplug the SSD drive, set up the Raspberry Pi 4, and plug in the SSD to one of the blue USB3 ports.&lt;br /&gt;
'''Important: Remember to remove the microSD card from the Raspberry Pi. The Pi needs to boot from the SSD inserted in the USB 3.0 port''' &lt;br /&gt;
If you forget to do so, the new Kingston SSD won't take effect and you are left with the microSD card.&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8648</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8648"/>
		<updated>2023-08-31T00:49:25Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;br /&gt;
&lt;br /&gt;
Step 3: Select &amp;quot;Raspberry Pi OS (Other)&amp;quot;. Then choose &amp;quot;Raspberry Pi OS (64-bit)&amp;quot;.&lt;br /&gt;
[[File:Raspberry_1.png |center| 600px]]&lt;br /&gt;
[[File:Raspberry_2.png |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
Step 4: Click '''Write''' and wait for it to download, flash and verify.&lt;br /&gt;
If everything clicks, you will see the interface shown below:&lt;br /&gt;
[[File:Raspberry_3.png |center| 600px]]&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Raspberry_3.png&amp;diff=8647</id>
		<title>File:Raspberry 3.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Raspberry_3.png&amp;diff=8647"/>
		<updated>2023-08-31T00:46:35Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Raspberry_2.png&amp;diff=8646</id>
		<title>File:Raspberry 2.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Raspberry_2.png&amp;diff=8646"/>
		<updated>2023-08-31T00:46:18Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Raspberry_1.png&amp;diff=8645</id>
		<title>File:Raspberry 1.png</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Raspberry_1.png&amp;diff=8645"/>
		<updated>2023-08-31T00:46:04Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8644</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8644"/>
		<updated>2023-08-30T23:53:59Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;br /&gt;
&lt;br /&gt;
* Configuring the SSD&lt;br /&gt;
Step 1: Download the '''Raspberry Pi imager software''': https://downloads.raspberrypi.org/imager/imager_latest.exe&lt;br /&gt;
&lt;br /&gt;
Step 2: Connect the SSD enclosure to your PC, then run the imager software.&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8643</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8643"/>
		<updated>2023-08-30T23:38:49Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8642</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8642"/>
		<updated>2023-08-30T23:38:31Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
The product specifications can be found in the link below:&lt;br /&gt;
https://www.scorptec.com.au/product/hard-drives-&amp;amp;-ssds/solid-state-drives-(ssd)/71426-sa400s37-480g?gclid=Cj0KCQjw0bunBhD9ARIsAAZl0E3uxry4rd_yIg2gIJG1NaU3FaXsMTMprgEl4MVEWMaWSeJv-Mz61i0aAiQxEALw_wcB&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8641</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8641"/>
		<updated>2023-08-30T23:36:18Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an ''' SSD(Solid-State Drive)''' to the Raspberry Pi. It is a type of data storage device used in computers and other electronic devices. In this project, we chose the '''SA400S37/480G''' model.&lt;br /&gt;
&lt;br /&gt;
[[File:Kingston_SSD.jpg |center| 600px]]&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=File:Kingston_SSD.jpg&amp;diff=8640</id>
		<title>File:Kingston SSD.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=File:Kingston_SSD.jpg&amp;diff=8640"/>
		<updated>2023-08-30T23:34:58Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
	<entry>
		<id>http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8639</id>
		<title>BirdNET-Pi Bencheng</title>
		<link rel="alternate" type="text/html" href="http://www.waterwaysinwhittlesea.org/index.php?title=BirdNET-Pi_Bencheng&amp;diff=8639"/>
		<updated>2023-08-30T06:44:36Z</updated>

		<summary type="html">&lt;p&gt;Bencheng: /* Adding an SSD to improve performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
For help just search for '''mediawiki formatting'''&lt;br /&gt;
&lt;br /&gt;
== Configuration of Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
To include photo - just click on '''Upload file''' on the left&lt;br /&gt;
Upload file / image&lt;br /&gt;
Then copy file name and place here using following format...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 1: Download the Raspberry Pi Imager&lt;br /&gt;
Download link:  https://www.raspberrypi.com/software/&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.png |center| 450px]]&lt;br /&gt;
* Step 2: Insert the '''sim card''' into the '''adapter''' and plug it into the computer. &lt;br /&gt;
[[File:Step_2.1.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.2.jpg |center| 250px]]&lt;br /&gt;
[[File:Step_2.3.jpg |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
* Step 3: Choose '''Raspberry Pi OS Lite(64-bit)''' as the Operating System.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Step 4: Choose storage space &lt;br /&gt;
&lt;br /&gt;
(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_4.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
* Step 5: Advanced Options &lt;br /&gt;
&lt;br /&gt;
Click the gear icon at the right bottom of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_5.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
   - Step 5.1 Set username and password&lt;br /&gt;
    &lt;br /&gt;
   Here we set the username and password of the Raspberry Pi. They will be used in later steps so remember to take notes of them lest you forget.&lt;br /&gt;
   &lt;br /&gt;
   - Step 5.2 Configure wireless LAN&lt;br /&gt;
&lt;br /&gt;
   [[File:Rasp_Step_5.2.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.&lt;br /&gt;
		(Note that you must choose the '''Wireless LAN country''' to be the country you are currently in.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   - Step 5.3 Set locale settings&lt;br /&gt;
&lt;br /&gt;
    [[File:Rasp_Step_5.3.png |center| 450px]]&lt;br /&gt;
&lt;br /&gt;
    Choose the right time zone and set the Keyboard layout as “us”.&lt;br /&gt;
&lt;br /&gt;
* Step 6: Once the above steps are finished, click “write” on the right of the interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Rasp_Step_6.1.png |center| 250px]]&lt;br /&gt;
[[File:Rasp_Step_6.2.png |center| 250px]]&lt;br /&gt;
&lt;br /&gt;
The writing and verification process takes a few minutes.&lt;br /&gt;
&lt;br /&gt;
* Step 7: &lt;br /&gt;
Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
Then connect the keyboard and monitor to the Raspberry Pi;&lt;br /&gt;
&lt;br /&gt;
Turn on the monitor and then plug in the power cable.&lt;br /&gt;
&lt;br /&gt;
When the starting process is over, you will be able to see the interface shown below:&lt;br /&gt;
&lt;br /&gt;
'''Insert Picture Later'''&lt;br /&gt;
&lt;br /&gt;
Now the Raspberry Pi computer is ready to use!&lt;br /&gt;
&lt;br /&gt;
= Extracting Data from MPPT =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf arduino-1.8.19-linuxarm.tar.xz&lt;br /&gt;
The first thing to do is using crontab&lt;br /&gt;
The password of Raspberry Pi has been changed to techschool.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, we'll go through the procedure of reading data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== What is MPPT ==&lt;br /&gt;
[[File:MPPT.jpg |center| 500px]]&lt;br /&gt;
MPPT stands for Maximum Power Point Tracking, which is a technique used in photovoltaic (solar) systems to optimize the power output from solar panels or arrays. MPPT is particularly important in situations where the amount of available solar energy varies, such as when clouds pass over the panels or when the angle of sunlight changes throughout the day.&lt;br /&gt;
&lt;br /&gt;
Solar panels have what's known as a &amp;quot;maximum power point,&amp;quot; which is the voltage and current combination that results in the highest power output from the panel. However, this point can shift based on factors like temperature, shading, and the angle of the sunlight. MPPT algorithms and controllers continuously adjust the electrical load on the solar panel to keep it operating at or near this maximum power point, thus maximizing the energy harvest from the available sunlight.&lt;br /&gt;
&lt;br /&gt;
Here's how MPPT works:&lt;br /&gt;
&lt;br /&gt;
Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.&lt;br /&gt;
&lt;br /&gt;
Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.&lt;br /&gt;
&lt;br /&gt;
Adjusting Load: The MPPT algorithm compares the calculated power to previous readings and adjusts the electrical load on the panel. It does this by varying the voltage at which the solar panel operates, typically by adjusting a DC-DC converter. This process is done in a way that tries to keep the panel's output at or close to its maximum power point.&lt;br /&gt;
&lt;br /&gt;
Optimizing Harvest: By dynamically adjusting the load, the MPPT system allows the solar panel to operate at its optimal voltage and current levels, even as external conditions change. This maximizes the power output of the panel and, consequently, the amount of energy harvested from the sunlight.&lt;br /&gt;
&lt;br /&gt;
MPPT technology is widely used in solar power systems, from small off-grid setups to large-scale solar farms. It increases the efficiency of energy conversion and ensures that as much energy as possible is extracted from the available sunlight, leading to greater overall system efficiency and improved energy production.&lt;br /&gt;
&lt;br /&gt;
== Connect MPPT to the battery and Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Battery12V-8AH.jpg |center| 300px]]&lt;br /&gt;
At the bottom left of the MPPT, you will be able to see two wires under the label '''BATT'''. You should carefully connect the red wire and black wire to the positive and negative of the battery respectively. Then, use ''' VE. Direct to USB interface''' to connect the MPPT to the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Find the port to read data from.&lt;br /&gt;
Since we have connected the MPPT to Raspberry Pi through a USB portal, we can use the following command to find the address of the USB portal:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As is shown in the above image, there's a USB portal &amp;quot;/dev/ttyUSB0&amp;quot; at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.&lt;br /&gt;
&lt;br /&gt;
After this step is finished, we are all set to read in data from MPPT.&lt;br /&gt;
&lt;br /&gt;
== Extract and Process Data ==&lt;br /&gt;
&lt;br /&gt;
In this section, we shall write a Python program to extract, process and save the readings from MPPT. &lt;br /&gt;
&lt;br /&gt;
* The data that needs to be extracted.&lt;br /&gt;
&lt;br /&gt;
https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf&lt;br /&gt;
&lt;br /&gt;
We can view all the units used by the serial interface from the VEDirect Protocol. However, in this project, we are only interested in the below quantities/states:&lt;br /&gt;
&lt;br /&gt;
1. Main voltage (V)            &lt;br /&gt;
&lt;br /&gt;
2. Panel voltage (VPV)   &lt;br /&gt;
&lt;br /&gt;
3. Panel power (PPV)   &lt;br /&gt;
&lt;br /&gt;
4. Load current (IL)&lt;br /&gt;
&lt;br /&gt;
5. Load output state (LOAD)    &lt;br /&gt;
&lt;br /&gt;
6. Yield total (H19)            &lt;br /&gt;
     &lt;br /&gt;
7. Yield today (H20)    &lt;br /&gt;
 &lt;br /&gt;
8. Maximum power today(H21)&lt;br /&gt;
&lt;br /&gt;
9. Yield yesterday (H22)     &lt;br /&gt;
     &lt;br /&gt;
10. Maximum power yesterday (H23)    &lt;br /&gt;
    &lt;br /&gt;
11. Error code (ERR)    &lt;br /&gt;
    &lt;br /&gt;
12. State of operation (CS)&lt;br /&gt;
&lt;br /&gt;
13. Firmware version (FW)     &lt;br /&gt;
     &lt;br /&gt;
14. Product ID (PID)              &lt;br /&gt;
      &lt;br /&gt;
15. Serial number (SER#)&lt;br /&gt;
     &lt;br /&gt;
16. Day sequence number (HSDS)&lt;br /&gt;
&lt;br /&gt;
17. Tracker operation mode (MPPT)&lt;br /&gt;
&lt;br /&gt;
* Step 1: Read the state of the MPPT&lt;br /&gt;
&lt;br /&gt;
Use the below code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import datetime&lt;br /&gt;
from vedirect import VEDirect&lt;br /&gt;
port=&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Secure Shell  =&lt;br /&gt;
A Raspberry Pi is a small, affordable, single-board computer. We can configure and interact with it if we connect it to a keyboard and monitor.&lt;br /&gt;
'''Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
However, it's usually more convenient to access the Raspberry Pi from a remote PC. To this end, we need to use a secure shell(SSH) to connect the Raspberry Pi and the remote PC.&lt;br /&gt;
&lt;br /&gt;
== Enabling SSH on the Raspberry Pi ==&lt;br /&gt;
* Type the command '''sudo raspi-config ''' in the terminal and the following interface will appear:&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
&lt;br /&gt;
* Choose ''' 3 Interface Options ''' and press enter.&lt;br /&gt;
''' Insert a picture '''&lt;br /&gt;
* Select SSH (Secure Shell) and then select Enable SSH.&lt;br /&gt;
&lt;br /&gt;
Now the SSH has been enabled.&lt;br /&gt;
&lt;br /&gt;
== Connect the PC to Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
= Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components =&lt;br /&gt;
== Basics about VE.Direct Bluetooth Smart Dongle==&lt;br /&gt;
Some introductions are to be included.&lt;br /&gt;
''' Insert a picture here. '''&lt;br /&gt;
&lt;br /&gt;
== Key Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Battery voltage&lt;br /&gt;
&lt;br /&gt;
* Max charge current&lt;br /&gt;
&lt;br /&gt;
* Absorption voltage&lt;br /&gt;
&lt;br /&gt;
* Float voltage&lt;br /&gt;
&lt;br /&gt;
* Equalization voltage&lt;br /&gt;
&lt;br /&gt;
= Extract and Visualize Data from Database =&lt;br /&gt;
== DB Browser for SQLite ==&lt;br /&gt;
&lt;br /&gt;
DB Browser for SQLite is an open-source graphical user interface (GUI) tool that allows users to manage and interact with SQLite databases. This software provides a user-friendly interface for performing tasks such as creating, editing, and deleting tables, indexes, views, and triggers within SQLite databases. It enables users to run SQL queries against their databases, view and modify data, and perform various database management operations without needing to use the command-line interface.&lt;br /&gt;
&lt;br /&gt;
Step 1: Download DB Browser for SQLite&lt;br /&gt;
Download link:&lt;br /&gt;
https://sqlitebrowser.org/dl/&lt;br /&gt;
&lt;br /&gt;
Step 2: Familiarize with the interface of the DB Browser for SQLite&lt;br /&gt;
* Open the '''bird.db''' file in the database, and then the below interface will be shown.&lt;br /&gt;
[[File:Interface_1.PNG |center| 600px]]&lt;br /&gt;
* As is shown above, the database contains two parts: '''Tables''' and '''Indices'''. &lt;br /&gt;
&lt;br /&gt;
* Click on the '''Browse Data''' highlighted in the red box and the following interface will show.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:DB_Browser_Interface.PNG |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Demonstrated above are the contents of the table &amp;quot;detections&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Each row is a record of one bird detection while each column contains distinct information of the records such as Date, Time, name of the Species, etc.&lt;br /&gt;
&lt;br /&gt;
== Structured Query Language ==&lt;br /&gt;
&lt;br /&gt;
Step 3: Learning the basics of SQL&lt;br /&gt;
SQL, which stands for Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.&lt;br /&gt;
Here is a link for a brief tutorial for SQL language: https://www.w3schools.com/sql/default.asp&lt;br /&gt;
&lt;br /&gt;
Step 4: Understand some relevant Python libraries&lt;br /&gt;
&lt;br /&gt;
* '''sqlite3''' is a &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an SSD to improve performance =&lt;br /&gt;
&lt;br /&gt;
* USB 3.0&lt;br /&gt;
USB 3.0 ports, also known as SuperSpeed USB ports, are considered unique due to their significantly improved data transfer speeds and enhanced capabilities compared to previous USB standards. One of the most salient features is its faster data transfer speed.&lt;br /&gt;
&lt;br /&gt;
'''Tip''': You can quickly identify a USB 3.0 port by remembering this:&lt;br /&gt;
''' The USB 3.0 port is blue.'''&lt;br /&gt;
&lt;br /&gt;
[[File:USB_3.jpg |center| 600px]]&lt;br /&gt;
&lt;br /&gt;
* Kington A400S Series&lt;br /&gt;
Due to the large volume of data involved, we need to attach an '''SSD(Soild-)'''&lt;/div&gt;</summary>
		<author><name>Bencheng</name></author>
	</entry>
</feed>