So I got idea for little project but not sure about lot of details.
What I was thinking is replacing my motorcycle battery with DIY LiFePO4 but adding esp32 inside as well.
ESP32 should monitors the state of the motorcycle battery and any movement from accelerometer (for security reasons, it's semi-public garage). All communication would go through MQTT while motorcycle is in garage.
Question is what hardware I need besides ESP32 to preferably run it from motorcycle battery and with sleep mode of some kind?
I'll just throw in all the questions on my mind so answer to any of them is welcome.
-Should I use simple voltage divider to measure 12V battery or there is better way?
-Is it better to have dedicated battery for esp32 or buck converter from motorcycle battery?
-Is MPU-6050 good choice for gyroscope and accelerometer?
-Can accelerometer monitoring even work while esp32 in sleep mode?
-Will dc-dc converter, accelerometer and voltage divider drain my motorcycle battery even when esp32 is in sleep?
I am open to changes to my idea if something is not possible or not the best idea.
Thanks for any tips, answer to my questions.
Project for motorcycle
Re: Project for motorcycle
Interesting project!
I can offer my opinion on some of your questions:
I can offer my opinion on some of your questions:
I would use a voltage divider then into ADC. The battery voltage of 12V is nominal and there will be some kind of discharge curve. The ADC will give you detailed information.-Should I use simple voltage divider to measure 12V battery or there is better way?
You would need a dedicated battery if (1) you need information via the ESP32 while the battery is discharged, or (2) you are concerned about the ESP32 draining battery power (although I do not believe that's a big concern necessarily... see below). Otherwise, I think you could use the motorcycle battery and a buck converter. However, you might want to put an oscilloscope on the battery power to check its behavior under various conditions (e.g., when the motorcycle is started, switched off, or other changes) to make sure that any voltage/current variations are tolerated by the buck converter.-Is it better to have dedicated battery for esp32 or buck converter from motorcycle battery?
Of course it will drain some, but not very much. Without actually doing some calculation, my hunch is that it is negligible compared to normal motorcycle battery use....
...
-Will dc-dc converter, accelerometer and voltage divider drain my motorcycle battery even when esp32 is in sleep?
Re: Project for motorcycle
Thank you, and thank you for your input.
I just started with electronics so sorry if its silly question but you think something like (from my fast google search) ADS1115 or ADS1015?I would use a voltage divider then into ADC. The battery voltage of 12V is nominal and there will be some kind of discharge curve. The ADC will give you detailed information.
ADC provided in ESP32 analog pins is not precise enough for this purpose?
You would need a dedicated battery if (1) you need information via the ESP32 while the battery is discharged, or (2) you are concerned about the ESP32 draining battery power (although I do not believe that's a big concern necessarily... see below). Otherwise, I think you could use the motorcycle battery and a buck converter. However, you might want to put an oscilloscope on the battery power to check its behavior under various conditions (e.g., when the motorcycle is started, switched off, or other changes) to make sure that any voltage/current variations are tolerated by the buck converter.
Of course it will drain some, but not very much. Without actually doing some calculation, my hunch is that it is negligible compared to normal motorcycle battery use.
I am leaning to using buck converter. I am just not sure how it will work with alternator charging at and motorcycle starting. Regulator/Rectifier Output Voltage by motorcycle service manual is 14.3 - 14.7V.
Also I don't really need any info when motorcycle is running, just when in garage and on wifi.
Re: Project for motorcycle
I guess I didn't really specify whether to use the ESP32's ADC or an external one. With a suitable voltage divider, the internal ADC is probably fine for your application. I recommend reading online about the ESP32's ADC nonlinearities outside of a certain range. I seem to recall something like 0.3V - 2.0V roughly would be a good input voltage range if you need reasonable linearity.LuckyTNT wrote: ↑Mon Dec 05, 2022 11:16 amI just started with electronics so sorry if its silly question but you think something like (from my fast google search) ADS1115 or ADS1015?I would use a voltage divider then into ADC. The battery voltage of 12V is nominal and there will be some kind of discharge curve. The ADC will give you detailed information.
ADC provided in ESP32 analog pins is not precise enough for this purpose?
Who is online
Users browsing this forum: No registered users and 90 guests