Play the onchip Hall sensor and temperature sensor

comcat
Posts: 7
Joined: Thu Sep 15, 2016 5:10 am

Play the onchip Hall sensor and temperature sensor

Postby comcat » Tue Nov 15, 2016 7:21 am

Quantum-onchip-sens-1024.jpg
Quantum-onchip-sens-1024.jpg (811.83 KiB) Viewed 24770 times
Quantum-onchip-sens-3.jpg
Quantum-onchip-sens-3.jpg (42.22 KiB) Viewed 24770 times

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "nvs_flash.h"
 
uint8_t temprature_sens_read(); 
uint32_t hall_sens_read();
 
void read_sens_task(void *pvParameters)
{
    while (1) {
        printf("ESP32 onchip Temperature = %d\n", temprature_sens_read());
        printf("ESP32 onchip Hall sensor = %d\n", hall_sens_read());
        vTaskDelay(4000 / portTICK_PERIOD_MS);
    }
}
 
void app_main()
{
    nvs_flash_init();
    system_init();
    printf("Welcome to Noduino Quantum\r\n");
    printf("Try to read the sensors inside the ESP32 chip ... \r\n");
    xTaskCreatePinnedToCore(&read_sens_task, "read_sens_task", 1024, NULL, 5,
                NULL, 0);
}

Quick start: http://wiki.jackslab.org/ESP32_Onchip_Sensor

uhrheber
Posts: 16
Joined: Sat Nov 12, 2016 12:07 pm

Re: Play the onchip Hall sensor and temperature sensor

Postby uhrheber » Tue Nov 15, 2016 2:40 pm

comcat,

I found your wiki today, and were playing around with the sensors, before I found your post here.
(see http://www.esp32.com/viewtopic.php?f=13&p=2064#p2064).

The hall sensor on my board (Sparkfun ESP32 Thing) seems to be fairly insensitive. I placed a really strong magnet on the chip, but the value barely changes. Also, it drifts over time, so I can't use a fixed threshold for detecting the presence of the magnet.
I assume that there's some sort of calibration and temperature/drift compensation mechanism necessary.

Anyway, nice find.

Did you try some of the other functions in librtc.a?

And BTW: Where can I buy a Noduino Quantum? It seems to be only available on Taoboa, so I'd have to use a Taobao agent to get it delivered to my country, which is always a time consuming and risky process.
Would you mind offering some on Ebay?

Another question: Have you considered making a version with 5V level converters?

Also I think that the ESP32 has the potential to become the chip of choice for 3D printer boards, if only someone makes a RAMPS or Smothie compatible board.
Who wants to have serial over USB anymore, when you can have WiFi and BT?

cu
Uhrheber

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Play the onchip Hall sensor and temperature sensor

Postby WiFive » Tue Nov 15, 2016 6:54 pm

Yes my magnet crashed the system before causing much of a change in reading. I don't know if it is due to amplification settings, ground plane, etc.. Not sure if it can be used as reed switch application. There was mention of current sensor application which would require specific layout. Waiting for official info.

comcat
Posts: 7
Joined: Thu Sep 15, 2016 5:10 am

Re: Play the onchip Hall sensor and temperature sensor

Postby comcat » Wed Nov 16, 2016 12:45 am

uhrheber wrote:comcat,

I found your wiki today, and were playing around with the sensors, before I found your post here.
(see http://www.esp32.com/viewtopic.php?f=13&p=2064#p2064).

The hall sensor on my board (Sparkfun ESP32 Thing) seems to be fairly insensitive. I placed a really strong magnet on the chip, but the value barely changes. Also, it drifts over time, so I can't use a fixed threshold for detecting the presence of the magnet.
I assume that there's some sort of calibration and temperature/drift compensation mechanism necessary.

Anyway, nice find.

Did you try some of the other functions in librtc.a?

And BTW: Where can I buy a Noduino Quantum? It seems to be only available on Taoboa, so I'd have to use a Taobao agent to get it delivered to my country, which is always a time consuming and risky process.
Would you mind offering some on Ebay?

Another question: Have you considered making a version with 5V level converters?

Also I think that the ESP32 has the potential to become the chip of choice for 3D printer boards, if only someone makes a RAMPS or Smothie compatible board.
Who wants to have serial over USB anymore, when you can have WiFi and BT?

cu
Uhrheber
1. Try the Neodymium magnet, seems like: https://www.aliexpress.com/item/Wholesa ... 02112.html
2. Quantum board should be buyed in aliexpress this month
3. Hmm, 3d printer is cool. we are planning to design shield boards ...

thx :D

uhrheber
Posts: 16
Joined: Sat Nov 12, 2016 12:07 pm

Re: Play the onchip Hall sensor and temperature sensor

Postby uhrheber » Wed Nov 16, 2016 7:23 am

comcat wrote:[
3. Hmm, 3d printer is cool. we are planning to design shield boards ...
I don't think that it'l make sense to do your own shield, as RAMPS(-FD) boards are dirt cheap, and lots of people already have them.
We'd need an Arduino Mega/Due compatible board, powered by an ESP32, that can replace the existing one.

The ESP32 doesn't have enough pins for that, but given it's speed, it should be possible to use I/O extenders - not to replace a full Arduino Mega, but to get just enough port pins to drive a standard RAMPS board and the usual extensions (displays, etc.).

That's not too complicated, but the biggest piece of work is clearly the software port.

cu
Uhrheber

uhrheber
Posts: 16
Joined: Sat Nov 12, 2016 12:07 pm

Re: Play the onchip Hall sensor and temperature sensor

Postby uhrheber » Fri Nov 18, 2016 9:19 am

comcat wrote: 2. Quantum board should be buyed in aliexpress this month
Unfortunately, I don't like Aliexpress. I had in fact so much trouble with them, that I'd rather skip your board than having to deal with Aliexpress ever again.
That's the reason why I asked for Ebay. Also every other shop would be OK, as long as they accept Paypal.

And BTW: Many thanks for your wiki.

cu
Uhrheber

Who is online

Users browsing this forum: Bing [Bot] and 143 guests