hmathieu31 / JammerBox-System

PIR Project
GNU General Public License v3.0
1 stars 0 forks source link

Contributors Issues MIT License Checks Workflow


Banner

JammerBox Project

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Functionalities
  5. Contact

About The Project


Banner



The JammerBox System consist of a combinaison of a Raspberry Pi 3 and a STM32F303 nucleo board. The system takes as input the Crankshaft and Camshaft signals from the engine's sensors. It provides the user with the possibility to inject various faults into the signals before outputting them. It outputs the signals jammed by the user-choosen faults.

The system should offer the user the possibility to record the input (unjammed) signals as CSV files stored on a USB drive to be later replayed. The system should also be able to generate signals from previously recorded files.

(back to top)

STM32 Hardware programming

STM32F303 Nucleo Board description

The STM32F030F4 is a 32-bit ARM Cortex-M3 microcontroller with a 32-bit data bus, a 32-bit program counter, and a 32-bit stack pointer. It is a low-cost, low-power, and low-voltage MCU.

It performs the following functions in the JammerBox System:

Built with

The project was successfully built and loaded from a Windows 10 and a Windows 11 PC.

(back to top)

Web interface

Built With

(back to top)

Getting Started

Installation

To clone then install the project, you can use the following commands:

  1. Clone the repo
    git clone git@github.com:hmathieu-insat/PIR.git
  2. Get to the repo
    cd /PIR
  3. Configure the project
    chmod u+x Congigure.sh
    ./Configure.sh
  4. A prompt will ask you if you wish to install Powershell (used for some automated tests).


The web server can finally ran properly in the device with the command:

chmod u+x Run.sh
./Run.sh

(back to top)

Usage

Being connected to the same network as the RaspberryPi, type in this link http://{IP adress of RaspberryPi}:3000/.

You will land on the starting page of the web site, and from there, you can use all of the functionnalities displayed.

(back to top)


Functionalities

Inject fault

Allows to inject one of the following faults into the Jammer Box for testing if it detects the fault and reacts accordingly to it.

If a parameter is necessary, another small window will open allowing the introduction of this value and then the start of the jamming. When a parameter is not valid, a pop up window will show informing the user of this. If no parameters are needed, the jamming will start immediately after pressing the corresponding fault button. For either case, when the jamming starts, another pop up window will show up informing the user of the success of the order.

Faults Injection Logs

Allows to inspect the faults historic logs. Each time a new fault is injected, this page will update and show its characteristics as well as if it was correctly executed. This is done by reading a JSON file that the API updates every time a new fault is injected. In addition, there is a delete button that cleans the faults log when pressed.

Each fault has a replay button, replaying the jammering with the same characteristics as before.

Configuration

When the “Upload config” button is pressed, a window will open for searching in the user computer a JSON file with the Jammer Box configuration. For example:

{
  "NumOfTeeth": 60,
  "NumOfGap": 1,
  "NumOfTeethInGap": 2,
  "Tdc0": 87.75,
  "FirstErSegAngle": 42,
  "NumOfCylinder": 4,
  "CrkSensorType": "c",
  "Cam0NumOfEdges": 2,
  "Cam0Active_edge": "b",
  "Cam0SensorType": "c",
  "Cam0FilterInMicroSec": 30,
  "Cam0EdgePos": 0.333
}

Once this file is uploaded, the user can choose to configure the CAM or the CRK separately. With the reset button, either one of these configurations can be erased.

Start recording

When pressed, it starts recording and saving in file the signals from the Jammer Box for further analysis.

(back to top)

Contact

Repository Link: https://github.com/hmathieu-insat/PIR

(back to top)