12v variable analog output to esp32 s3 boards.

ArtemK
Posts: 1
Joined: Sun Jun 09, 2024 6:51 am

12v variable analog output to esp32 s3 boards.

Postby ArtemK » Sun Jun 09, 2024 7:22 am

Hi guys, absolutely new to the whole microcontrollers therefore following discussion may seem a bit out of my league
Currently working on my old..er motorcycle, trying to add few upgrades and came across esp32 s3 based boards with screens. (Once again don't know much about them) however from what I've seen I seems like(atleast in theory) there should be a way to connect my motorcycle cluster wires to such display/microcontroller, and have speedometer, tachometer and various indicators in digital form on lcd display. After all its a hand full of "on/off state" wires and "2 variable current" ones for speedometer and tachometer.
To simplify question, is it doable on esp32 platform, or does it require a full size micro computer like Arduino board or RaspberyPi ?
https://youtu.be/cBtsLxZ13hQ?si=ORIyqBd7BcB-Vn1i this video is what I'm referring to, but I'm my case instead of buttons being a sourse of output, id like to use cluster connector wires.

lbernstone
Posts: 791
Joined: Mon Jul 22, 2019 3:20 pm

Re: 12v variable analog output to esp32 s3 boards.

Postby lbernstone » Mon Jun 10, 2024 1:59 am

Most esp32 dev boards come with an AMS1117 LDO regulator which will convert DC voltage at 5-15V down to the 3V3 that the microcontroller wants. Hook the battery up to the pin marked 5V, and you should be good to go. It doesn't magically make that source 5V, so you need to be careful not to connect any of your low voltage equipment or a PC to the 5V bus (aka USB) on the board (this might be suggested on many DIY sites about setting up displays). The instruments will likely run at 12V, so you will need to be careful about interfacing those with the mcu as well. A voltage divider will work for analog/binary signals from them.

noweare
Posts: 67
Joined: Tue Jul 02, 2019 11:35 am

Re: 12v variable analog output to esp32 s3 boards.

Postby noweare » Mon Jun 10, 2024 1:47 pm

ArtemK wrote:
Sun Jun 09, 2024 7:22 am
You will have to get familiar with the esp32 inputs types and what voltage levels they can accept. You will also
need to change each signal from your bike before connecting to the esp32 board. That means you will have to
breadboard or design a custom board just to "condition" each signal that you bring in.

Then after that is done you will be able to write some code that reads each input and output to the display.
Sounds like a cool project.

adrian650
Posts: 4
Joined: Tue May 28, 2024 8:28 am

Re: 12v variable analog output to esp32 s3 boards.

Postby adrian650 » Mon Jun 10, 2024 7:01 pm

Hi, don't know how 'old..er' your moto is, I've worked on electrics from 70s to 90s. Nothing CANBus at all. A few things I've run into:
1. It's not really 12V. If you've standard lead acid battery and alternator/charger it may reach nearly 14V, and on an old moto with a weak alternator and a big headlamp voltage may droop to below 11V. Plan your PSU accordingly.
2. You may find signal spikes, HV ignition system doesn't help, dodgy regulators etc etc. Include suppression on PSU and all of your inputs. ESP is cheap so not a big deal financially but could be if you want the information! Look at opto isolators, clamping diodes, VDR etc
3. You said speed and tacho would be voltages - not often I'd say, but depends on your moto. More likely to be some sort of pulse chain with frequency proportional to signal. Tacho could be low level or noisy depending how it's pulled off ignition. Some commercial displays use a simple inductive pick up for tacho of a wire wrapped around the spark lead.
4. From all of the above, the analogue aspect is likely to be the hard bit!

Good luck.

Who is online

Users browsing this forum: No registered users and 85 guests