Mr. Mao Weijun:
Thank you very much. We are looking for sample schematics and recommended PCB layout for the sensors. The current documentation does not have any hardware recommendations. Please help us out.
Respectfully,
Valentine
Mr. Mao Weijun:
Thank you very much. We are looking for sample schematics and recommended PCB layout for the sensors. The current documentation does not have any hardware recommendations. Please help us out.
Respectfully,
Valentine
No. The ABZ output of MT6801 is push and pull, no pull-up resistor is needed. But altually I will not encourage you to use MT6801 as it is the ifrst generation and we have decided to phase out. Mt6701 will be a good replacement for it.
Is anyone using the Sc60228 sensor?
Mcu Stm32G431 - Arduino 1.8.9 -Dev Branch (downloaded today)
Magnet checked working with tle5012.
Sensor angle is 6.28 for 180°. changing CPR did not work, because the angle value always jumps to zero after 3.14.
to test I have uncommented this in sc60228.cpp
Serial.print(result.angle, DEC); // was HEX
resulting in 4096 for every 180°
can anyone confirm this?
Btw the link to the english datasheet doesnt work anymore. maybe someone saved it?
hm, it was fine when I tried it, and Runger reported it appeared to work ok. So if you graph it with serial monitor, what does it look like?
Hi @2hry! Yes, it is working fine for me.
Please try changing the SPI mode. Please try with SPI Mode 0, and see if this helps. You can also try lowering the SPI speed.
SPISettings mySC60228SPISettings(1000000, SC60228_BITORDER, SPI_MODE0);
MagneticSensorSC60228 sensor = MagneticSensorSC60228(PIN_SPI_SS, mySC60228SPISettings);
@runger
thanks.
I Ieft the speed at 8000000, and changing to SPI_MODE0 results in angle 6.28 for 360°.
Its working now
@Anthony_Douglas on the serial monitor it looked normal, just the angle was counting double as it should be (12.56 for 360°, but should be 6.28)
Hey, thanks for testing it! I have committed the SPI_MODE0 change to the dev branch, it will be in the next release.
I can’t explain why the wrong mode was in the code, it’s a mystery. I must have accidentally committed a state I was testing or something.
IF anyone has the datasheet in english can they put it here with anonfiles.com or something? If we are to continue using it someone will be needing that.
edit: I found a copy on my hard drive https://anonfiles.com/04Cdzew3zc/SC60228DC_zh_CN_en_pdf
I think that was a translation I made, so probably not nearly as good as one straight from the company in english.
Actually I just tested this on Arduino Every (MegaAVR) and it works in SPI mode 1, not in mode 0. So it does seem to be the case that some MCUs like mode 0, while others like mode 1 when using this sensor.