Can you feel it ? Yes we can !

In the components familly, it was time for the Hall effect sensors to be tested.

The sensor:

We used the SS39ET from HonneyWell. This sensor has 3 pins. One is GND, one is Vcc and the last is the output. The output is a voltage proportional to the magnetic field. We choose for Vcc a value of 3.3V.

First tests, let’s use a voltmeter.

To do the first tests we measure the output voltage with a voltmeter. To power the device we used a DC power supply. We also added an ampermeter to measure the current going to the Hall effect sensor.

And here is the result:

So as you can see, while I am spinning the magnet, the voltage value starts by going up until I reach the pole and then decrease as it goes back to the other one. The Hall effect sensor will now be tested with our board.

Preparing the board:

As I wrote in this post, we will use the IoT-node from STMicroelectronics to do our tests. We also work with FreeRTOS that we already set up. Yet to configure the ADC to use the analog pins of the board we had to regenerate the HAL. I also wrote a fonction to print integers through UART to display the voltage value. Then finally, we code a function to read the value of our pin.

Let’s test it:

We powered the captor with the 3.3V output of the board and we plugged the output of the sensor to our pin. The distance between the captor and the magnet was 2.4 cm (because that was the size of a red cube I used to hold the wood).

To have a clearer display I added two bounds. When the voltage is lower than the low bound we have the pink side of the magnet up. When the voltage is higher than the high bound, it’s the silver one. And finally if we are between the two bounds then we are between the two states. Let’s try it:

note: on the screen we can see :
In between sides
Pink side is up
In between sides
Silver side is up
In between sides
Pink side is up

So at this point the sensor works, we made tests with a coil between the sensor and the magnet, it worked. We tried with two magnets and spin only one of the two, it also worked. The next step will be to put two sensors below two different magnets and see if everything works fine.

Leave a Reply

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