All ESP32 chips have a built-in hall effect sensor, used to measure a prevailing magnetic field.
As I understand things, it is inherent to the chip itself and is not a peripheral, so presumably the field must be local to the chip.
In the Arduino IDE, I am told, it is straightforward to measure the output of the hall effect sensor using a dedicated 'HallRead()' function.
I haven't been able to find any mention of it in the MicroPython docs or with some dedicated Googling around.
Does MicroPython support it?
Thanks,
Brian H.
Hall Effect sensor?
-
- Posts: 60
- Joined: Sun Jun 23, 2019 4:55 am
- Location: Gateshead, Tyne and Wear
Re: Hall Effect sensor?
Hello
Taken from http://docs.micropython.org/en/latest/e ... ckref.html
Regards Mike
Code: Select all
esp32.hall_sensor() # read the internal hall sensor
Regards Mike
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Hall Effect sensor?
I believe the sensor is not very sensitive. For accurate measurements you're best off with an IMU device (inertial measurement unit), which will actually supply a vector - obviously at some cost in money and complexity.
Drivers for various devices are available on this site.
Drivers for various devices are available on this site.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Hall Effect sensor?
Not all IMUs have a hall sensor I think? But depends on what the topic starter wants to do; if it's really about measuring magnetic field values then money might be better spent on a dedicated and calibrated sensor instead of paying extra for the unused features in an IMU.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Hall Effect sensor?
Fair point: you need a 9DOF IMU. It's possible that the high production volumes of IMU's make them cost effective compared to dedicated magnetometers but I haven't investigated. The other advantage is that drivers exist. Devices like the MPU9250 produce a vector in units of μT. The driver enables the magnetometer to be calibrated by the usual method of rotation.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Hall Effect sensor?
Seeing prices in the range of 10$: yes it's going to be hard to beat that. I only briefly checked the specs but it seems something like an MPU9250 doesn't come with a dedicated temperature sensor along with the hall sensor so getting accurate absolute values out of it is not possible. Then again, for pure hobby projects and/or with the chip always running at roughly the same temperature this is normally not needed.
Re: Hall Effect sensor?
Thanks.DJShadow1966 wrote: ↑Sat Dec 21, 2019 6:28 amHello
Taken from http://docs.micropython.org/en/latest/e ... ckref.htmlCode: Select all
esp32.hall_sensor() # read the internal hall sensor
Regards Mike