as3935
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
as3935 [2024/04/11 02:33] – river | as3935 [2024/07/25 22:33] (current) – [Calibration] river | ||
---|---|---|---|
Line 47: | Line 47: | ||
A badly designed, pulled, aged, uncompensated crystal oscillator might be 50ppm off, so much better than needed as a calibration standard for this application. Therefore can use a µC to calibrate it automatically. I don't see this done in the Sparkfun library even though it seems obvious. | A badly designed, pulled, aged, uncompensated crystal oscillator might be 50ppm off, so much better than needed as a calibration standard for this application. Therefore can use a µC to calibrate it automatically. I don't see this done in the Sparkfun library even though it seems obvious. | ||
- | The chip can the calibrate its clocks from the above value, so antenna should be trimmed first. | + | The chip can then calibrate its clocks from the above value, so antenna should be trimmed first. |
Clocks calibration must be repeated after power loss. | Clocks calibration must be repeated after power loss. | ||
Line 73: | Line 73: | ||
* Set any more detection levels you want. | * Set any more detection levels you want. | ||
* On interrupt, read register to see what happened. | * On interrupt, read register to see what happened. | ||
+ | |||
+ | ===== Experiments ===== | ||
+ | |||
+ | Using DFRobot board. | ||
+ | |||
+ | I wrote a program to test and tune it. Initially found: | ||
+ | |||
+ | < | ||
+ | [016412] [D] measure_frequency(): | ||
+ | [016412] [D] Trimcap: 0pF, Error: 30214 Hz, 6.0% | ||
+ | [017414] [D] measure_frequency(): | ||
+ | [017414] [D] Trimcap: 8pF, Error: 28371 Hz, 5.7% | ||
+ | [018416] [D] measure_frequency(): | ||
+ | [018416] [D] Trimcap: 16pF, Error: 26528 Hz, 5.3% | ||
+ | [019418] [D] measure_frequency(): | ||
+ | [019418] [D] Trimcap: 24pF, Error: 24710 Hz, 4.9% | ||
+ | [020420] [D] measure_frequency(): | ||
+ | [020420] [D] Trimcap: 32pF, Error: 22913 Hz, 4.6% | ||
+ | [021422] [D] measure_frequency(): | ||
+ | [021422] [D] Trimcap: 40pF, Error: 21117 Hz, 4.2% | ||
+ | [022424] [D] measure_frequency(): | ||
+ | [022424] [D] Trimcap: 48pF, Error: 19376 Hz, 3.9% | ||
+ | [023426] [D] measure_frequency(): | ||
+ | [023426] [D] Trimcap: 56pF, Error: 17628 Hz, 3.5% | ||
+ | [024428] [D] measure_frequency(): | ||
+ | [024428] [D] Trimcap: 64pF, Error: 15809 Hz, 3.2% | ||
+ | [025430] [D] measure_frequency(): | ||
+ | [025430] [D] Trimcap: 72pF, Error: 14108 Hz, 2.8% | ||
+ | [026432] [D] measure_frequency(): | ||
+ | [026432] [D] Trimcap: 80pF, Error: 12416 Hz, 2.5% | ||
+ | [027434] [D] measure_frequency(): | ||
+ | [027434] [D] Trimcap: 88pF, Error: 10748 Hz, 2.1% | ||
+ | [028436] [D] measure_frequency(): | ||
+ | [028436] [D] Trimcap: 96pF, Error: 9104 Hz, 1.8% | ||
+ | [029438] [D] measure_frequency(): | ||
+ | [029438] [D] Trimcap: 104pF, Error: 7474 Hz, 1.5% | ||
+ | [030440] [D] measure_frequency(): | ||
+ | [030440] [D] Trimcap: 112pF, Error: 5856 Hz, 1.2% | ||
+ | [031442] [D] measure_frequency(): | ||
+ | [031442] [D] Trimcap: 120pF, Error: 4244 Hz, 0.8% | ||
+ | [031444] [D] Lowest error: 0.848800%. Using 120pF.'' | ||
+ | </ | ||
+ | |||
+ | Added 2x 6.8pF NPO caps, soldered on top of and beside the existing caps. Then measured: | ||
+ | |||
+ | < | ||
+ | [020013] [D] measure_frequency(): | ||
+ | [020013] [D] Trimcap: 0pF, Error: 9631 Hz, 1.9% | ||
+ | [021015] [D] measure_frequency(): | ||
+ | [021015] [D] Trimcap: 8pF, Error: 8018 Hz, 1.6% | ||
+ | [022017] [D] measure_frequency(): | ||
+ | [022017] [D] Trimcap: 16pF, Error: 6393 Hz, 1.3% | ||
+ | [023019] [D] measure_frequency(): | ||
+ | [023019] [D] Trimcap: 24pF, Error: 4841 Hz, 1.0% | ||
+ | [024021] [D] measure_frequency(): | ||
+ | [024021] [D] Trimcap: 32pF, Error: 3254 Hz, 0.7% | ||
+ | [025023] [D] measure_frequency(): | ||
+ | [025023] [D] Trimcap: 40pF, Error: 1706 Hz, 0.3% | ||
+ | [026025] [D] measure_frequency(): | ||
+ | [026025] [D] Trimcap: 48pF, Error: 171 Hz, 0.0% | ||
+ | [027027] [D] measure_frequency(): | ||
+ | [027027] [D] Trimcap: 56pF, Error: -1353 Hz, -0.3% | ||
+ | [028029] [D] measure_frequency(): | ||
+ | [028029] [D] Trimcap: 64pF, Error: -2977 Hz, -0.6% | ||
+ | [029031] [D] measure_frequency(): | ||
+ | [029031] [D] Trimcap: 72pF, Error: -4468 Hz, -0.9% | ||
+ | [030033] [D] measure_frequency(): | ||
+ | [030033] [D] Trimcap: 80pF, Error: -5979 Hz, -1.2% | ||
+ | [031035] [D] measure_frequency(): | ||
+ | [031035] [D] Trimcap: 88pF, Error: -7436 Hz, -1.5% | ||
+ | [032037] [D] measure_frequency(): | ||
+ | [032037] [D] Trimcap: 96pF, Error: -8907 Hz, -1.8% | ||
+ | [033039] [D] measure_frequency(): | ||
+ | [033039] [D] Trimcap: 104pF, Error: -10383 Hz, -2.1% | ||
+ | [034042] [D] measure_frequency(): | ||
+ | [034042] [D] Trimcap: 112pF, Error: -11822 Hz, -2.4% | ||
+ | [035045] [D] measure_frequency(): | ||
+ | [035045] [D] Trimcap: 120pF, Error: -13223 Hz, -2.6% | ||
+ | [035047] [D] Lowest error: 0.034200%. Using 48pF. | ||
+ | </ | ||
+ | |||
+ | Cleaned off flux and got: | ||
+ | |||
+ | < | ||
+ | [021200] [D] measure_frequency(): | ||
+ | [021200] [D] Trimcap: 0pF, Error: 13863 Hz, 2.8% | ||
+ | [022202] [D] measure_frequency(): | ||
+ | [022202] [D] Trimcap: 8pF, Error: 12143 Hz, 2.4% | ||
+ | [023204] [D] measure_frequency(): | ||
+ | [023204] [D] Trimcap: 16pF, Error: 10467 Hz, 2.1% | ||
+ | [024206] [D] measure_frequency(): | ||
+ | [024206] [D] Trimcap: 24pF, Error: 8822 Hz, 1.8% | ||
+ | [025208] [D] measure_frequency(): | ||
+ | [025208] [D] Trimcap: 32pF, Error: 7174 Hz, 1.4% | ||
+ | [026210] [D] measure_frequency(): | ||
+ | [026210] [D] Trimcap: 40pF, Error: 5246 Hz, 1.0% | ||
+ | [027212] [D] measure_frequency(): | ||
+ | [027213] [D] Trimcap: 48pF, Error: 3685 Hz, 0.7% | ||
+ | [028214] [D] measure_frequency(): | ||
+ | [028214] [D] Trimcap: 56pF, Error: 2354 Hz, 0.5% | ||
+ | [029216] [D] measure_frequency(): | ||
+ | [029216] [D] Trimcap: 64pF, Error: 721 Hz, 0.1% | ||
+ | [030218] [D] measure_frequency(): | ||
+ | [030218] [D] Trimcap: 72pF, Error: -1029 Hz, -0.2% | ||
+ | [031221] [D] measure_frequency(): | ||
+ | [031221] [D] Trimcap: 80pF, Error: -2448 Hz, -0.5% | ||
+ | [032224] [D] measure_frequency(): | ||
+ | [032224] [D] Trimcap: 88pF, Error: -4157 Hz, -0.8% | ||
+ | [033227] [D] measure_frequency(): | ||
+ | [033227] [D] Trimcap: 96pF, Error: -5645 Hz, -1.1% | ||
+ | [034230] [D] measure_frequency(): | ||
+ | [034230] [D] Trimcap: 104pF, Error: -6932 Hz, -1.4% | ||
+ | [035233] [D] measure_frequency(): | ||
+ | [035233] [D] Trimcap: 112pF, Error: -8648 Hz, -1.7% | ||
+ | [036236] [D] measure_frequency(): | ||
+ | [036237] [D] Trimcap: 120pF, Error: -10133 Hz, -2.0% | ||
+ | [036239] [D] Lowest error: 0.144200%. Using 64pF. | ||
+ | </ | ||
+ | |||
+ | I don't know why added the caps seemed to add way more capacitance then expected. It looks like I added more like 80pf rather than the 13.6pF expected. | ||
+ | |||
+ | The better tuning increased the rate of QRM detections from fairly frequent to constant. Running in my lab with otherwise default settings. | ||
+ | |||
+ | Over the next hours I noticed the capacitance drifted back down again, needing more from the trimcaps. Maybe board drying out or cooling down? The next day it was using 96pF or 88pF trimcaps. | ||
+ | |||
+ | Next day, added 51pF. Now it gets: Trimcap: 0pF, Error: -134 Hz, -0.0% | ||
+ | |||
+ | Also added 22uF ceramic to power socket pins, and 1nF from IRQ to ground. Removed electrolytic. Also modified µC board - added bigger 3.3V regulator with ceramic caps and 470uF input cap. | ||
+ | |||
+ | Get occasional QRM reports but nothing like without any caps that started with. | ||
+ | |||
+ | ===== Noise ===== | ||
+ | |||
+ | It's very sensitive to interference / noise. It was constantly reporting disturbers. | ||
+ | |||
+ | I tried adding more caps to the power supply and put a ferrite round the leads. The biggest difference seen so far came from soldering a 47uF electrolytic to the back of the connector on the sensor board. This seems to have stopped the disturber reports. I also have a ferrite on the leads but this makes less / no difference I think. | ||
+ | |||
+ | ==== Probe disturbance ==== | ||
+ | |||
+ | Touching any of the pins on the sensor board causes spurious reports. That is, one multimeter lead touched to any pin, e.g. ground, with the other lead connected to nothing, or the other end of the lead disconnected, | ||
+ | |||
+ | This problem was resolved with the cap mentioned above. | ||
+ | |||
+ | ===== Errata? ===== | ||
+ | |||
+ | Interrupt pin does not go high on detection after initial configuration / cap trimming, until a read is made to the interrupt register. After that it works normally. | ||
+ | |||
+ | (Not extensively tested, maybe reading other registers works too.) | ||
+ | |||
+ | I read that some boards have wrong tuning caps. I couldn' | ||
+ | |||
+ | ===== Links ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |
as3935.1712802789.txt.gz · Last modified: 2024/04/11 02:33 by river