• Stars
    star
    114
  • Rank 307,121 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A python script using RTL-SDR and OpenCV to create fast 2D electromagnetic maps.

EMI mapping with RTL-SDR and OpenCV

Mapping near-field electromagnetic parasitic emissions is useful for the design, debug and pre-compliance testing of electronic devices. Unfortunately, there is no simple way to make EM scans with sufficient level of details/accuracy, speed and reasonable cost. Hence, I developed this solution to make high-resolution and fast 2D maps of RF EMI for PCBs and more.

You can find more information and details on my project page (including more examples): http://charleslabs.fr/en/project-Electromagnetic+interference+mapping

Prerequisites

Hardware requirements:

  • A USB camera (for camera_emi_mapper.py script only),
  • A 3D printer (for gcode_emi_mapper.py script only),
  • An RTL-SDR with a (DIY?) near-field probe.

Software dependencies for the python scripts:

  • OpenCV (sudo apt install python3-opencv && pip3 install opencv-contrib-python imutils setuptools)
  • Pyserial (pip3 instal pyserial)
  • pyrtlsdr (sudo apt install rtl-sdr && pip3 install pyrtlsdr)
  • numpy, scipy, matplotlib (pip3 install scipy numpy matplotlib)

These install commands were tested in Ubuntu 19.10.

Method #1: 3D printer EMI mapping

To make an EM map with the 3D printer method:

  1. Put the DUT on the printer's bed and the near-field probe attached to the carriage,
  2. Launch the script (optionnal arguments, refer to the help),
  3. Wait for the printer to scan the board, the result will be displayed as soon as it is done.

Call with python3 gcode_emi_mapper.py -h to view the help (arguments description).

Typical use: python3 gcode_emi_mapper.py -s /dev/ttyUSB0 -f 100 -z 120 -r 5 (start the script using a 100MHz center frequency, zone size of 120mm, resolution 5mm, where 3D printer is connected to the /dev/ttyUSB0 serial port).

Method #2: Camera EMI mapping

To make an EM map with the machine vision method:

  1. Launch the script (optionnal arguments, refer to the help),
  2. Properly position the device under test (DUT) in the camera image,
  3. Press "R" to set the position (the camera and DUT must not move after pressing "R"),
  4. Put the probe in the frame, press "S", select the probe with the mouse and press "ENTER" to start the scanning,
  5. Scan the DUT by moving the probe,
  6. Press "Q" to exit. If a scan was made, the result is displayed.

Call with python3 camera_emi_mapper.py -h to view the help (arguments description).

Typical use: python3 camera_emi_mapper.py -c 1 -f 100 (start the script using a 100MHz center frequency and camera id 1).

Sample result

This is a scan of an Arduino Uno board performed with this script and a DIY near-field loop probe:

Arduino Uno RF power map.

More Repositories

1

3d_lidar

This repository contains the code, 3D-printable files and electronics to make my 3D Lidar.
Processing
64
star
2

kicad-pinout-generator

This KiCad plugin generates pinouts from the PCB file to various formats.
Python
32
star
3

acoustic_beamforming

An experiment to do acoustic beamforming and beamsteering with Arduino.
Python
24
star
4

kicad-auto-silkscreen

This KiCad plugin automatically calculate the optimal silkscreen placement of reference designators.
Python
19
star
5

hairpin_filter

Hairpin filter generator and openEMS model.
HTML
18
star
6

microdroplet_electrowetting

ยตDroplet is a platform to experiment with electrowetting with an 8ร—8 array of electrodes.
HTML
18
star
7

reaction_wheel

3D-printable reaction wheel capable of active detumbling and attitude control.
C++
17
star
8

keyboard_audio_hack

Python proof-of-concept for breaking passwords with a microphone, using machine learning.
Python
17
star
9

rf_network_analyzer

A $50 DIY RF network analyzer with tracking generator and RTL-SDRs.
C++
15
star
10

OpenEMG

OpenEMG is an open-hardware, easy to make, EMG module to measure muscle activity.
HTML
13
star
11

tinwhistletabs

Tin whistle tabs: listen and play hundreds of traditional tunes!
Java
12
star
12

rtl_power_scripts

Python scripts to use and visualize the output of rtl_power.
Python
10
star
13

kicad_parts

KiCad symbols and footprints library for various parts and modules
10
star
14

biosignals

Board for the acquisition of bio-potentials (EMG, ECG, EEG, etc.).
HTML
8
star
15

impulse

Impulse is a cross-platform simulator for gimbaled thrust rockets that accurately simulates real-time physics.
Java
8
star
16

electrodb

ElectroDB is an offline and open source Android app that makes looking for pinouts and datasheets a child's play!
Java
7
star
17

rf_differential_probe

A passive differential RF probe for in-circuit measurement of 500 MHz to 6 GHz.
7
star
18

rocketry

Resources for Charleslabs.fr rocketry experiments with gimbaled thrust.
OpenSCAD
5
star
19

M62429_Arduino_Library

A simple Arduino library for the FM62429 or M62429P/FP serial data control dual electronics volume chip.
C++
4
star
20

interact_php

A simple PHP comment system. More at http://charleslabs.fr/en/project-Interact+PHP+-+comment+system
PHP
4
star
21

vhdl_cpu

A VHDL implementation of a simple custom CPU architecture for learning.
C
3
star
22

EM_mapper_scripts

OpenCV assisted RF field mapping tool for MRI coils assessment and EMI testing.
Python
3
star
23

DSP_machine_learning

Using machine learning for DSP (TensorFlow, Python).
Python
3
star
24

simply_appear

Lightweight native JS and CSS framework for web apparition animations.
JavaScript
2
star
25

SimplyPID

A simple PID controller implementation in Java.
Java
2
star
26

microscope_led_light_circuit

A dimming LED circuit designed for optical microscopes.
HTML
1
star