Loading 3D model… large boards can take a moment.
Instrument prototyping to monitor electromagnetic noise induced by power lines
This is a data aquisistion system intended to record the magnetic field induced by overhead or burried electric transmission lines. Basically an indirect current monitor or ampmeter.
There are still several issues to work out. The write to SD card protocol causes unwanted delays at random times during data sampling. The communication protocol using Xbee is not complete but I intend to use the radio to communicate with other aquisition systems in am manner that they share with eachother the times they intend to record data and syncronize. Command sequence with the ADS could likely be improved to both increase speed and accuracy. The low pass filter designed is for practice and demonstration only. In later versions i intend to use pre-build filter chips for anti-aliasing.
The circuit can be built by following the circuit diagrams found in this repository. The pi pico needs to be flashed using the bootsell button on the pico and the flahs file found in this repo prior to uploading any code. Flahs file can of course be found online, it is the standard flash file for micropython pico.
Debugging the sensor and analog digital conversion is easiest when using a live reading. The notebook (read_sensor_live.ipynb) can be used as a serial monitor. You have to set the com port, and the components. This will read data if the pico has all of the following files:
To test the GPS the pico should have the following files uploaded:
To test the sd card operations follow similar procedure as testing the GPS but with the file:
the driver file for the sdcard breakout board via spi was found on a forum and is accessible via this link https://github.com/micropython/micropython/files/13183364/sdcard.py.zip, and i was unable to recover the name of the author who created thisversion of the driver. Note this one works far better than the one on the official micropython-lib main branch
The sampling rate can be set in the operate/main.py file. Select desired sampling rate from the list found in operate/helpers.py. Those are the only options the ADS recognizes. This is a target rate, due to the fileio speed in the sd card and limited memory on the pico, the desired sampling rate will likely not be achieved if over 1000Hz. The size of the files can also be set. this is the number of samplies recorded continously before closing the file. The file naming convention can also be modified in main.py The pico must have the following files uploaded:
To ensure proper operation the device can be connected to a serial monitor. Inspect the text during initialization to ensure all parts are operating. Proper operation when not using gps for time syncronization should look like this:
Initializing ADS1256 Data rate set to 15000 SPS (DRATE value: 0xe0) Current Data Rate Register Value: 0xe0 DRDY = 0 not using gps Initializing SD board SD card mounted. measuring 1 component 30000 samples New file created: /sd/30_nogps_x_1.bin measuring 1 component 30000 samples New file created: /sd/16_nogps_x_2.bin Program terminated by stop. SD card unmounted successfully. end
There are 2 switches and 2 buttons in the design.
Files are saved in binary format with some basic metadata saved in plain text at the beginning of each file. The binary format for one samplie is:
Basic file read and plotting can be done with the notebook (read_sensor_files.ipynb). Because the 2 component measurment is still onot optimized and likely requires an additional ADS for high rate sampling, the notebook currently only reads 3SI formated files which are the sinlge component files. Small modification can be made to read the 2 component files, however this is a work in progress.
No comments yet. Be the first to ask about this board.