esp 32 wroom MODULE current reading #10093
Replies: 7 comments 2 replies
-
Could you please explain your problem better and provide a minimal sketch to reproduce the issue ? How are you trying to measure the current ? Starting from 3.0.0 the HAL sensor is not supported anymore due to changes in IDF |
Beta Was this translation helpful? Give feedback.
-
#include "driver/periph_ctrl.h"
#include "driver/spi_master.h"
#include "driver/adc.h"
#include "esp_sleep.h"
#include "driver/gpio.h"
#define SPI_SCK 18
#define SPI_MISO 19
#define SPI_MOSI 23
#define SPI_CS 5
#define ADC_PIN 36
void setup() {
Serial.begin(9600);
delay(100);
Serial.println("Starting setup...");
periph_module_enable(PERIPH_SPI_MODULE);
gpio_reset_pin((gpio_num_t)SPI_SCK);
gpio_set_direction((gpio_num_t)SPI_SCK, GPIO_MODE_OUTPUT);
gpio_set_level((gpio_num_t)SPI_SCK, 0);
adc1_config_width(ADC_WIDTH_BIT_12);
adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_DB_11);
esp_sleep_enable_timer_wakeup(10 * 10000);
Serial.println("SPI clock enabled. No other peripherals are initialized.")
;
}
void loop() {
float voltage = readVoltage();
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
if (voltage < 3.0) {
enterDeepSleep(); //diff power modes
} else {
enterLightSleep();
}
delay(100);
}
float readVoltage() {
int adcValue = adc1_get_raw(ADC1_CHANNEL_0);
float voltage = adcValue * (3.6 / 4095.0);
voltage *= 2;
return voltage;
}
void enterLightSleep() {
Serial.println("Entering light sleep mode...");
esp_light_sleep_start();
Serial.println("Waking up from light sleep mode...");
}
void enterDeepSleep() {
Serial.println("Entering deep sleep mode...");
esp_deep_sleep_start();
}
void enterActiveMode() {
Serial.println("Entering active mode...");
}
above code downloaded in ESP 32 wifi WROOM module using Arduino IDE 2.3.2
after uploading, measuring current using multimeter in uA.
it shows Overload,
can you provide proper guide
Thanks
Viru KM
…On Tue, Jul 30, 2024 at 7:30 PM Lucas Saavedra Vaz ***@***.***> wrote:
Could you please explain your problem better and provide a minimal sketch
to reproduce the issue ? How are you trying to measure the current ?
Starting from 3.0.0 the HAL sensor is not supported anymore due to changes
in IDF
—
Reply to this email directly, view it on GitHub
<#10086 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCZD4ZR3IKBGKHTL4XXTZDZO6L73AVCNFSM6AAAAABLWH5FPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGQZDKOBSGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The multimeter measurement is going out of scale. Please put the multimeter in mA mode. |
Beta Was this translation helpful? Give feedback.
-
ESP 32 module power modes, I am reading current, i hope it should read in uA.as attached |
Beta Was this translation helpful? Give feedback.
-
If you are reading from a board the components used can have a big impact in the power consumption. I dont know exactly what is your setup and what were the conditions for these test results. |
Beta Was this translation helpful? Give feedback.
-
Hi
I sent a attachment, my setup and code, its reading more current
I need a current in power modes of ESP 32
i am giving supply 3VDC and measuring current my connecting series with
thew supply,
Thanks
…On Wed, Jul 31, 2024 at 7:03 PM Lucas Saavedra Vaz ***@***.***> wrote:
If you are reading from a board the components used can have a big impact
in the power consumption. I dont know exactly what is your setup and what
were the conditions for these test results.
—
Reply to this email directly, view it on GitHub
<#10093 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCZD44XRPRYA7QZFIG4SLLZPDRUFAVCNFSM6AAAAABLYP7EPSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRQGE3DMOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi team
herewith i attached I2C code with current measurement in miliamp,
kindly check and tell where we are wrong and help me for the solution.
Thanks
Viru KM
…On Thu, Aug 1, 2024 at 3:44 AM Lucas Saavedra Vaz ***@***.***> wrote:
I understand. Can you tell me how much it is measured ?
—
Reply to this email directly, view it on GitHub
<#10093 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCZD46PQTPAV5DFYACCLCLZPFOTJAVCNFSM6AAAAABLYP7EPSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRQGU3TCNY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Related area
AFTER DOWNLOADING ny codes like I2C, WIFI ANY CODE
Hardware specification
Support ESP32 WROOM module wifi
Is your feature request related to a problem?
after downloading the any codes unable to reading current in uA
Describe the solution you'd like
any codes examples from ESP 32 Arduino ide examples also same issue
Describe alternatives you've considered
No response
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
Beta Was this translation helpful? Give feedback.
All reactions