Skip to content

Commit

Permalink
Merge pull request #1 from moedn/main
Browse files Browse the repository at this point in the history
repository setup for first release
  • Loading branch information
umbertozanovello authored Dec 18, 2023
2 parents d50fb8f + b545698 commit 56d595c
Show file tree
Hide file tree
Showing 9 changed files with 712 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.FCBak
*.stl
*.zip
Binary file removed CAD-Model/Frame.stl
Binary file not shown.
Binary file removed CAD-Model/Spacer_A0.stl
Binary file not shown.
Binary file removed CAD-Model/Spacer_A1.stl
Binary file not shown.
Binary file removed CAD-Model/Spacer_B0.stl
Binary file not shown.
File renamed without changes.
Binary file added LICENSES/DISCLAIMER.pdf
Binary file not shown.
674 changes: 674 additions & 0 deletions LICENSES/GPL-3.0-or-later

Large diffs are not rendered by default.

58 changes: 36 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,53 @@
# Magnet Test Station

A test station for assessing the polarization of small permanent magnets and their correct magnetization

## Required Material
- Arduino board
- A1324LUA-T Hall sensor
- 3D Printer for printing the frame
- Python 3 with the following libraries installed:
- PyQt6
- numpy
- pyserial
## Required Material

- 1 Arduino UNO
- alternatively any Arduino board provided with a USB interface, one Vcc and GND pin and one analog input pin
- 1 USB cable (to connect the Arduino board to the computer)
- 3 jumper cables (to connect the Hall sensor to the Arduino board)
- 1 A1324LUA-T Hall sensor
- 1 computer (with Windows or Linux)
- frame and spacer parts as provided in this repository (see [CAD models](./CAD-Model/) or the respective [release]() for STL exports); manufacturing them requires access to a 3D printer

**Software dependencies:**

Python 3 with the following libraries installed:

- PyQt6
- numpy
- pyserial

## Description
- The CAD models of the frame and of different spacers are collected in the *CAD-Model* folder. The following spacers are available:
- **Spacer_A0**: Optimized for N52 12 x 12 x 12 mm<sup>3</sup> cubic permanent magnets
- **Spacer_A1**: Optimized for N52 12 x 12 x 12 mm<sup>3</sup> cubic permanent magnets with a guide to the magnet at the centre
- **Spacer_B0**: Optimized for N52 50 x 12 x 12 mm<sup>3</sup> permanent magnets with a magnetization alligned along one of the short sides
- The Python scripts used to interface with the Arduino board are collected inside the *PythonScript* folder.
- The code to be uploaded into the Arduino board can be found in the *ArduinoScript* folder

This repository contains:

- [CAD models](./CAD-Model/) of the frame and of different spacers
- The following spacers are available:
- **Spacer_A0**: Optimized for N52 12 x 12 x 12 mm<sup>3</sup> cubic permanent magnets
- **Spacer_A1**: Optimized for N52 12 x 12 x 12 mm<sup>3</sup> cubic permanent magnets with a guide to the magnet at the centre
- **Spacer_B0**: Optimized for N52 50 x 12 x 12 mm<sup>3</sup> permanent magnets with a magnetization alligned along one of the short sides
- [Python Scripts](./PythonScript/) to interface with the Arduino board
- [ArduinoScript](./ArduinoScript/), the code to be uploaded to the Arduino board

## Usage

1. Connect the Arduino board to a USB port

2. Prepare all the necessary connections. The following picture shows the connection of a single Hall sensor to the A0 analog pin of Arduino. Other Hall sensors can be connected to the other analog pins. At the present stage, the User Interface is designed to manage a maximum number of Hall sensors equal to four.

2. Prepare all the necessary connections. The following picture shows the connection of a single Hall sensor to the A0 analog pin of Arduino. Other Hall sensors can be connected to the other analog pins. At the present stage, the User Interface is designed to manage a maximum number of Hall sensors equal to four.\
![](./docs/images/singleStation-ArduinoConnections.png)

3. Add the analog pin names to which the Hall sensors are connected into the short int array *pins* inside the Arduino sketch code "ArduinoScript/magnetTestStation.ino"
3. Add the analog pin names to which the Hall sensors are connected into the short int array *pins* inside the Arduino sketch code `ArduinoScript/magnetTestStation.ino`
```cpp
short pins[] = {A0};
```
Upload the Arduino sketch into the Arduino board.
4. Run the Python script `mainInterface.py` in order to open the Main User Interface. Select the number of Hall sensor that have to be read, the sensors sensitivity, the Arduino board serial port and the log file name. Press the *Connect* button in order to establish a connection with the Arduino board. When ready, press the *Start Measurements* button to start the measuring process. During the measurement process, it is possible to store the measured data into the log file by pressing the *Store* button. Finally it is possible to set a zero by pressing the *Zero* button.\
![](./docs/images/ScreenshotUserInterface.png)\
![](./docs/images/ScreenshotLogFile.png)
4. Run the Python script *mainInterface.py* in order to open the Main User Interface. Select the number of Hall sensor that have to be read, the sensors sensitivity, the Arduino board serial port and the log file name. Press the *Connect* button in order to establish a connection with the Arduino board. When ready, press the *Start Measurements* button to start the measuring process. During the measurement process, it is possible to store the measured data into the log file by pressing the *Store* button. Finally it is possible to set a zero by pressing the *Zero* button.
## License and Liability
![](./docs/images/ScreenshotUserInterface.png)
This is an open source hardware project licensed under the CERN Open Hardware Licence Version 2 - Weakly Reciprocal. For more information please check [CERN-OHL-W-2.0](LICENSES/CERN-OHL-W-2.0) and [DISCLAIMER](LICENSES/DISCLAIMER.pdf) in the [LICENSES](LICENSES/) folder.
![](./docs/images/ScreenshotLogFile.png)
The software source code in this repository is licensed under the GNU General Public License Version 3. For more information please check [GPL-3.0-or-later](LICENSES/GPL-3.0-or-later) in the same folder.

0 comments on commit 56d595c

Please sign in to comment.