MetOne Windvane: Testing the MLX90316 angle sensor – Part Deux

OK, somehow the ground connection to one of the 100nF capacitors came loose on my test jig that was the thing giving me fits.  It apparently wasn’t the header pin connections on the cable, but I still need to see if the MLX90316 works reliably using an 8-12′ cable between it and the Wemos D1Mini. 

I found this out by using a LOT shorter wires to the test jig since it DID work fine with the sensor on the breadboard.  The only other difference was using 100nF bypass capacitors (specified on the Melexis PDF) instead of 10nF I had mistakenly used earlier. 

 

This, then is the output from my WindSubsystemTest code using the PlatformIO VSCode extension:

 

Starting MetOne 034B Wind Subsystem Test.

pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0

No SPI signal or MLX angle sensor not found…


pulseCount: 1      revCount: 0 rps: 0    rpm: 0     MPH: 0
Heading: 65 Card: NNE
pulseCount: 4     revCount: 2 rps: 0    rpm: 0      MPH: 0
Heading: 49 Card: NNE
pulseCount: 75   revCount: 37 rps: 7   rpm: 420   MPH: 26
Heading: 39 Card: NNE
pulseCount: 22  revCount: 11 rps: 2   rpm: 120   MPH: 8
Heading: 49 Card: NNE
pulseCount: 64  revCount: 32 rps: 6   rpm: 360   MPH: 22
Heading: 57 Card: NNE
pulseCount: 52  revCount: 26 rps: 5   rpm: 300   MPH: 18
Heading: 57 Card: NNE
pulseCount: 26  revCount: 13 rps: 2   rpm: 120   MPH: 8
Heading: 68 Card: NNE

I connected the 034B sensor board to the test breadboard with the D1Mini via the 12′ ethernet cable and it does work a LOT better; I’m getting spurious “magnetic field too weak” and SPI issues, and that might be the cable.  I don’t really need 12′ distance to the D1Mini anyway.  (I don’t think.)   Next to do: fix the cardinal direction, since it always shows “NNE” and make sure the wind speed is accurate and I’m not getting a bunch of reed switch contact bounces.

Starting MetOne 034B Wind Subsystem Test.
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 MPH: 0

No SPI signal or MLX angle sensor not found…  (This one is pretty normal)
pulseCount: 1 revCount: 0 rps: 0 rpm: 0 MPH: 0
Heading: 331 Card: NNE
pulseCount: 18 revCount: 9 rps: 1 rpm: 60 MPH: 4
Heading: 311 Card: NNE
pulseCount: 25 revCount: 12 rps: 2 rpm: 120 MPH: 8
Heading: 311 Card: NNE
pulseCount: 18 revCount: 9 rps: 1 rpm: 60 MPH: 4
Magnetic field too weak
pulseCount: 18 revCount: 9 rps: 1 rpm: 60 MPH: 4
Magnetic field too weak
pulseCount: 18 revCount: 9 rps: 1 rpm: 60 MPH: 4
Heading: 218 Card: NNE

No SPI signal or MLX angle sensor not found…  (not normal)

pulseCount: 0 revCount: 0 rps: 0 rpm: 0 MPH: 0

No SPI signal or MLX angle sensor not found…
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 MPH: 0

No SPI signal or MLX angle sensor not found…
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 MPH: 0

No SPI signal or MLX angle sensor not found…

Leave a Reply

Your email address will not be published. Required fields are marked *