BirdNET-Pi Bencheng

From Sensors in Schools
Jump to navigation Jump to search

Introduction

For help just search for mediawiki formatting

Configuration of Raspberry Pi

To include photo - just click on Upload file on the left Upload file / image Then copy file name and place here using following format...


  • Step 1: Download the Raspberry Pi Imager

Download link: https://www.raspberrypi.com/software/

  • Step 2: Insert the sim card into the adapter and plug it into the computer.
  • Step 3: Choose Raspberry Pi OS Lite(64-bit) as the Operating System.


  • Step 4: Choose storage space

(If nothing is available it’s because the sim wasn’t recognized. Unplug it and insert again.)

  • Step 5: Advanced Options

Click the gear icon at the right bottom of the interface.

  - Step 5.1 Set username and password
   
  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.
  
  - Step 5.2 Configure wireless LAN
   This is where you specify the WIFI that is going to be connected to Raspberry Pi. These specifications can be altered later.

(Note that you must choose the Wireless LAN country to be the country you are currently in.)


  - Step 5.3 Set locale settings
   Choose the right time zone and set the Keyboard layout as “us”.
  • Step 6: Once the above steps are finished, click “write” on the right of the interface.

The writing and verification process takes a few minutes.

  • Step 7:

Unplug the adapter, pull out the sim card and gently place it into the Raspberry Pi board;

Then connect the keyboard and monitor to the Raspberry Pi;

Turn on the monitor and then plug in the power cable.

When the starting process is over, you will be able to see the interface shown below:

Insert Picture Later

Now the Raspberry Pi computer is ready to use!

Extracting Data from MPPT

tar -xvf arduino-1.8.19-linuxarm.tar.xz
The first thing to do is using crontab
The password of Raspberry Pi has been changed to techschool.

In this section, we'll go through the procedure of reading data from MPPT.

What is MPPT

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.

Solar panels have what's known as a "maximum power point," 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.

Here's how MPPT works:

Measuring Inputs: MPPT systems constantly monitor the output voltage and current of the solar panel or array.

Calculating Power: By multiplying the output voltage and current, the system calculates the instantaneous power being produced by the panel.

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.

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.

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.

Connect MPPT to the battery and Raspberry Pi

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.


  • Find the port to read data from.

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:


As is shown in the above image, there's a USB portal "/dev/ttyUSB0" at the right bottom of the interface in the red frame. This is where we shall extract reading from the MPPT.

After this step is finished, we are all set to read in data from MPPT.

Extract and Process Data

In this section, we shall write a Python program to extract, process and save the readings from MPPT.

  • The data that needs to be extracted.

https://www.victronenergy.com/upload/documents/VE.Direct-Protocol-3.33.pdf

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:

1. Main voltage (V)

2. Panel voltage (VPV)

3. Panel power (PPV)

4. Load current (IL)

5. Load output state (LOAD)

6. Yield total (H19)

7. Yield today (H20)

8. Maximum power today(H21)

9. Yield yesterday (H22)

10. Maximum power yesterday (H23)

11. Error code (ERR)

12. State of operation (CS)

13. Firmware version (FW)

14. Product ID (PID)

15. Serial number (SER#)

16. Day sequence number (HSDS)

17. Tracker operation mode (MPPT)

  • Step 1: Read the state of the MPPT

Use the below code:

import datetime
from vedirect import VEDirect
port=

Secure Shell

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. Insert a picture

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.

Enabling SSH on the Raspberry Pi

  • Type the command sudo raspi-config in the terminal and the following interface will appear:

Insert a picture

  • Choose 3 Interface Options and press enter.

Insert a picture

  • Select SSH (Secure Shell) and then select Enable SSH.

Now the SSH has been enabled.

Connect the PC to Raspberry Pi

Use VE. Direct Bluetooth Smart Dongle to Configure and Monitor the Components

Basics about VE.Direct Bluetooth Smart Dongle

Some introductions are to be included. Insert a picture here.

Key Parameters

  • Battery voltage
  • Max charge current
  • Absorption voltage
  • Float voltage
  • Equalization voltage

Extract and Visualize Data from Database

DB Browser for SQLite

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.

Download link: https://sqlitebrowser.org/dl/