This is my first post and I am a beginner in arduino development.
Although I am learning more by the day, I am keep looking for a board that has already Bluetooth and (optional) connection implemented and ready to use, since I would like to use it for my project. With my search I am keep stumbling upon boards like this: https://www.amazon.com/Diymore-ESP-32-Wireless-Bluetooth-Development/dp/B071XP56LM
It looks really promising, even so that it wouldn’t make sense to buy a regular arduino. But I guess I am wrong. Idk.
I couldn’t find an information what is an input voltage. And there are other questions I am interested about too.
I would like to put the arduino on my motorcycle. It has 12V to 14.4V output. For a regular arduino that shouldn’t be a problem. What about for this board? And if it’s not compatible, what should I do to make it able to connect it to my motorbike?
Other question would be, can I use all capabilities and devices that I can use with a regular arduino also with this board? I also see, that this board has a higher frequency rate of 240MHz. What kind of impact does this have, what should be considered when writing a sketch?
fbele:
I would like to put the Arduino on my motorcycle. It has 12V to 14.4V output. For a regular Arduino that shouldn’t be a problem. What about for this board? And if it’s not compatible, what should I do to make it able to connect it to my motorbike?
There is something you need to understand for a start.
The Arduino boards and ESP32s you have looked at require a regulated 5 V DC power source. You need to provide exactly that to them, generally using a switchmode "buck" converter to supply this from your automotive "12 V" source.
Do not be confused by the fact that some Arduinos have an on-board regulator. This is essentially, decorative and useless for almost anything you might wish to implement. It was something provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.
So my message: you need to have a proper switchmode "buck" converter as the basis for your project. There is some concern that you may get transients much greater that 14 V due to starter motors and such so it may need a significantly higher input voltage tolerance as well.
fbele:
Other question would be, can I use all capabilities and devices that I can use with a regular arduino also with this board?
The developers of the Arduino core for the ESP32 have tried to provide a standard, compatible interface as much as possible. However, this is a different architecture and there are some inevitable differences. Many sketches and libraries you find online will work with the ESP32 just as well as with a standard Arduino board. Others will not. Sometimes you can find an ESP32 compatible alternative. Really, you're going to run into that anytime you use a different architecture. The AVR architecture (e.g. Uno, Mega, Nano, Leonardo) has by far the best support because it's been around so long. ESP32 is relatively recent so it hasn't had time to accumulate so much support from the Arduino community. That said, the ESP32 is fairly popular and the support is not too bad (and getting better all the time).
Regarding "devices": the biggest difference you'll notice between the ESP32 and the typical AVR board (e.g. Uno, Mega, Nano, Leonardo) is that the ESP32 runs at 3.3 V. Many of the common devices used as accessories in the Arduino world use the 5 V logic levels. If you subject the IO pins of the ESP32 to 5 V, you will probably kill the board. You can get level converter modules that make it easy to interface between 3.3 V and 5 V devices.
I use ESP32's. With dual cores running at 240Mhz and the freeRTOS, it's one dang fine board for the price. There is a learning curve. I use it because of its small physical size, big power, and dual cores that are individually programmable. From my experience if you can handle a Due with a RTOS type of environment, go for it.
fbele:
Although I am learning more by the day, I am keep looking for a board that has already Bluetooth and (optional) connection implemented and ready to use, since I would like to use it for my project. With my search I am keep stumbling upon boards like this: https://www.amazon.com/Diymore-ESP-32-Wireless-Bluetooth-Development/dp/B071XP56LM
Can you tell us more about your project like what type of Bluetooth connection are you looking for as there are several protocols (like Keyboard/Mouse, Serial, Audio etc) and not all of them work on a standard Arduino core.
Does this device only work when the bike is in use or will it be powered all the time from the bike battery?
Paul__B:
There is something you need to understand for a start.
The Arduino boards and ESP32s you have looked at require a regulated 5 V DC power source. You need to provide exactly that to them, generally using a switchmode "buck" converter to supply this from your automotive "12 V" source.
Do not be confused by the fact that some Arduinos have an on-board regulator. This is essentially, decorative and useless for almost anything you might wish to implement. It was something provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.
So my message: you need to have a proper switchmode "buck" converter as the basis for your project. There is some concern that you may get transients much greater that 14 V due to starter motors and such so it may need a significantly higher input voltage tolerance as well.
Thank you for this clarification. I was always sure, that since it's specified, that Uno's recommended input voltage can be 7-12V and limit 6-20V, I could just simply wire it to the motorbike's battery. There shouldn't be more 14.4V, but I know, it's still in the limit range and the regulator would be necessary.
There are many regulators and converters out there and I am not so sure which one would be appropriate for me in my case. Would you kindly give me a link to one such regulator and "buck" converter that I need? Or specify which in your opinion would be the right one for me?
I was thinking to wire the Arduino to the battery, through the ignition and then through an additional on/off switch. I am not so good when it comes to an electricity, but in my opinion, the spike because of the ignition should never come. Or am I wrong here?
pert:
The developers of the Arduino core for the ESP32 have tried to provide a standard, compatible interface as much as possible. However, this is a different architecture and there are some inevitable differences. Many sketches and libraries you find online will work with the ESP32 just as well as with a standard Arduino board. Others will not. Sometimes you can find an ESP32 compatible alternative. Really, you're going to run into that anytime you use a different architecture. The AVR architecture (e.g. Uno, Mega, Nano, Leonardo) has by far the best support because it's been around so long. ESP32 is relatively recent so it hasn't had time to accumulate so much support from the Arduino community. That said, the ESP32 is fairly popular and the support is not too bad (and getting better all the time).
So more or less it just comes up to library support for ESP32? Other than that, the board should be supported enough to work with Arduino IDE?
Is there anything else to be considered, like dealing with 240MHz or using dual-core?
pert:
Regarding "devices": the biggest difference you'll notice between the ESP32 and the typical AVR board (e.g. Uno, Mega, Nano, Leonardo) is that the ESP32 runs at 3.3 V. Many of the common devices used as accessories in the Arduino world use the 5 V logic levels. If you subject the IO pins of the ESP32 to 5 V, you will probably kill the board. You can get level converter modules that make it easy to interface between 3.3 V and 5 V devices.
I understand then that I shouldn't wire input voltage of more than 3.6 V. Would you kindly give me a link to what kind of level converter modules should I be looking at?
Idahowalker:
I use ESP32's. With dual cores running at 240Mhz and the freeRTOS, it's one dang fine board for the price. There is a learning curve. I use it because of its small physical size, big power, and dual cores that are individually programmable. From my experience if you can handle a Due with a RTOS type of environment, go for it.
Thank you for your reply. freeRTOS? As I see on google that is an operating system. How do I load it on ESP32 device and what can one benefit of it?
From your experience, how could I benefit from dual core architecture? Can I achieve that only with using RTOS?
Is there anything else to be considered when developing code fore it, like using 240 MHz etc.?
Riva:
Can you tell us more about your project like what type of Bluetooth connection are you looking for as there are several protocols (like Keyboard/Mouse, Serial, Audio etc) and not all of them work on a standard Arduino core.
Does this device only work when the bike is in use or will it be powered all the time from the bike battery?
Well the idea about Bluetooth in my project is that you would only use it when the bike is on and the rider is of the bike and only raw data would be sent from the device. I am not exactly sure if I'll be sending anything to the device yet.
There wouldn't be any using of peripheral devices like Keyboard/Mouse, Serial, Audio etc. Only sending few bytes, maybe kilobytes of data. As far as I learned (read) until now, BLE should suffice this cause. What is your opinion on it?
I was thinking to wire the device to the battery, through the ignition and then through an additional on/off switch.
fbele:
So more or less it just comes up to library support for ESP32? Other than that, the board should be supported enough to work with Arduino IDE?
Library support is a big one, but the community support in general is not quite as good as with some of the architectures that have been around longer. You'll find less tutorials, YouTube videos, blog posts, forum threads, and people who can answer questions here on the forum or elsewhere for ESP32-specific topics. I'm not saying that the support is bad; it's just not as good.
fbele:
Is there anything else to be considered, like dealing with 240MHz or using dual-core?
The 240 MHz shouldn't be any problem. I think the dual core will only be troublesome if you are specifically trying to take advantage of that feature. I believe the ESP32 core is designed so that you can ignore the dual core aspect if you like. I should say that I'm not an ESP32 expert. I have dug through their code a bit and contributed here and there. I do own an ESP32, but I haven't used it for anything other than occasionally trying to help people here on the forum or GitHub.
fbele:
I understand then that I shouldn't wire input voltage of more than 3.6 V. Would you kindly give me a link to what kind of level converter modules should I be looking at?
Anything like this should work: https://www.ebay.com/itm/332962387234
You can get them from any of the usual sources for electronics parts (Aliexpress, Amazon, SparkFun, Adafruit, Seeed, etc.). They make ones with more channels if you need it.
fbele:
There wouldn't be any using of peripheral devices like Keyboard/Mouse, Serial, Audio etc. Only sending few bytes, maybe kilobytes of data. As far as I learned (read) until now, BLE should suffice this cause.
That's okay, I was just checking you was not trying to use the ESP32 Bluetooth for audio intercom or music.
fbele:
Thank you for your reply. freeRTOS? As I see on google that is an operating system. How do I load it on ESP32 device and what can one benefit of it?
From your experience, how could I benefit from dual core architecture? Can I achieve that only with using RTOS?
Is there anything else to be considered when developing code fore it, like using 240 MHz etc.?
Thanks
freeRTOS is, basically, already built into the ESP32. You benefit from using freeRTOS from it being a Real Time Operating System vs a schema that is based on a loop that executes your code.
The dual core gives the ability to actually do 2 things at once.
You can achieve an RTOs using other methods. The recommended way, for the ESP32, is through the use of freeROTS, a built in OS.
I do not understand the thing about 240mHz, 240mHz means that both cores are running at 240Mhz and doing complex instructions takes less time at 240mhz then at 16Mhz.
Oh, the ESP32 really has 3 cores but the other core, the ULP, is only programmable through MASM and most likely be not used by the typical user. The ULP, Ultra Low Power core, that allows the dual cores to go to sleep and when real time trigger comes in, the ULP will wake the other cores to handle the interrupt.
Idahowalker:
freeRTOS is, basically, already built into the ESP32. You benefit from using freeRTOS from it being a Real Time Operating System vs a schema that is based on a loop that executes your code.
The dual core gives the ability to actually do 2 things at once.
You can achieve an RTOs using other methods. The recommended way, for the ESP32, is through the use of freeROTS, a built in OS.
Ok that sounds good. I thought I have to do something extra to get it working with this RTO.
Is there any good IDE to work with this RTO?
Idahowalker:
I do not understand the thing about 240mHz, 240mHz means that both cores are running at 240Mhz and doing complex instructions takes less time at 240mhz then at 16Mhz.
Ok I’m just asking if this makes any impact on the coding itself.
Idahowalker:
Oh, the ESP32 really has 3 cores but the other core, the ULP, is only programmable through MASM and most likely be not used by the typical user. The ULP, Ultra Low Power core, that allows the dual cores to go to sleep and when real time trigger comes in, the ULP will wake the other cores to handle the interrupt.
Ok that’s a bit too technical for me at this time xD
But still, it’s a really nice input and I appreciate it.
Can you tell me how you power your ESP32? I’m having kind of trouble with that. In this documentation I see that the input power can be up to 12V:
Could this mean that I could connect it to the motorbike battery?
I would still rather regulate it to about 5V though. I’ve heard that for that one needs to use a so called buck converter, but then I am having difficulties which one to chose because of the current.
pert:
Library support is a big one, but the community support in general is not quite as good as with some of the architectures that have been around longer. You'll find less tutorials, YouTube videos, blog posts, forum threads, and people who can answer questions here on the forum or elsewhere for ESP32-specific topics. I'm not saying that the support is bad; it's just not as good.
The 240 MHz shouldn't be any problem. I think the dual core will only be troublesome if you are specifically trying to take advantage of that feature. I believe the ESP32 core is designed so that you can ignore the dual core aspect if you like. I should say that I'm not an ESP32 expert. I have dug through their code a bit and contributed here and there. I do own an ESP32, but I haven't used it for anything other than occasionally trying to help people here on the forum or GitHub.
Anything like this should work: https://www.ebay.com/itm/332962387234
You can get them from any of the usual sources for electronics parts (Aliexpress, Amazon, SparkFun, Adafruit, Seeed, etc.). They make ones with more channels if you need it.
That’s a really valuable information to consider also, thanks
Can you tell me how you power your ESP32? I'm having kind of trouble with that. In this documentation I see that the input power can be up to 12V:
Could this mean that I could connect it to the motorbike battery?
I would still rather regulate it to about 5V though. I've heard that for that one needs to use a so called buck converter, but then I am having difficulties which one to chose because of the current.
I use a 7805 to power the ESP32's. I have pre filtering of a electrolytic and ceramic cap and post filtering with a electrolytic and a ceramic cap. I use the 1 amp version of the 7805's, no heat sink.
Putting a voltage greater than 3.3V on the I/O pins of the ESP32 will allow the magic smoke to escape.
As a note: the ESP32 has a built in CAN bus controller. I use the CAN bus to read my car's CAN bus and display the info on a LED screen, of the various automobile systems. You'll need a CAN transceiver to interface with your machines CAN bus. It takes some digging, research, to find the codes used by the auto maker to get at the information available.
The linear regulator on the full-size Arduino boards can take 7~12V - but particularly at the high end of that range, the current handling is very poor, because as a linear regulator, it's dissipating the extra power as heat, and the current is limited by heat dissipation of the regulator. With the power that an ESP32 can pull when active, a linear regulator with 12v input is just not going to work out well. Vendors always seem to give unreasonably optimistic input voltage spec's when using linear regulators. For example, the Arduino board specs to which you referred.
A buck converter that will output 5v from the motorcycle power is dirt cheap. Use one of those (the ESP32 development boards that can be powered from micro USB have a regulator on them to take the 5v to 3.3v) - the extra stage of conversion also gives more filtering, which is important when taking power from a vehicle's battery - the 12v supply on a vehicle is notoriously noisy. You can get really cheap buck converters that have 5v output and a USB port, and just connect it up with a USB cable.
fbele:
Can you tell me how you power your ESP32? I'm having kind of trouble with that. In this documentation I see that the input power can be up to 12V: Zerynth | Documentation
And that is also extremely misleading just as I explained about Arduinox in #1.
fbele:
Could this mean that I could connect it to the motorbike battery?
Absolutely not! Get all such ideas completely out of your mind.
fbele:
I would still rather regulate it to about 5V though. I've heard that for that one needs to use a so called buck converter, but then I am having difficulties which one to chose because of the current.
As DrAzzy explains. "Pololu" is considered a quality source.
DrAzzy:
The linear regulator on the full-size Arduino boards can take 7~12V - but particularly at the high end of that range, the current handling is very poor, because as a linear regulator, it's dissipating the extra power as heat, and the current is limited by heat dissipation of the regulator. With the power that an ESP32 can pull when active, a linear regulator with 12v input is just not going to work out well. Vendors always seem to give unreasonably optimistic input voltage spec's when using linear regulators. For example, the Arduino board specs to which you referred.
A buck converter that will output 5v from the motorcycle power is dirt cheap. Use one of those (the ESP32 development boards that can be powered from micro USB have a regulator on them to take the 5v to 3.3v) - the extra stage of conversion also gives more filtering, which is important when taking power from a vehicle's battery - the 12v supply on a vehicle is notoriously noisy. You can get really cheap buck converters that have 5v output and a USB port, and just connect it up with a USB cable.
Thank you for this valuable information.
I really can't understand why would all this manufacturers mislead us the consumers with such important information. Someone like me could easily burn the board quickly.
Or... is that their true intention...? Hmm...
Would it be also okay to convert the power straight to 3.3V? What is here preferred?
Does it also matter what the current should be?
Paul__B:
And that is also extremely misleading just as I explained about Arduinox in #1. Absolutely not! Get all such ideas completely out of your mind.
As DrAzzy explains. "Pololu" is considered a quality source.
Sorry to make you so appalled Didn't mean to. These are just
It is nowhere specified also what should the current be. Does this matter in this context?
Would it be also okay to convert the power straight to 3.3V? What is here preferred?
Thank you for all the information.
It's hard to understand why would all this manufacturers mislead us consumers with such important information.