Notifications
Clear all

HMI device help

4 Posts
2 Users
0 Reactions
153 Views
(@john_coach)
Member
Joined: 1 month ago
Posts: 3
Topic starter  

Hi All,

I'm totally new to the hardware side of SBC/HMI boards etc...

I'm looking for a board/device with any MCU (a 2KHz 6502 would be fast enough for my application), a display around 4 to 5 inches (just for user interface in LVGL), and a DAC.

It is the DAC that is giving me problems.

The HMI kits I can find all use the ESP32-S3 - which does not have a DAC (the S2 does).

So I'm looking for any recommendations for a dev. kit, that does have a DAC.

 

OR - I would look at using a PWM output to make a DAC via a low pass filter.

Any comments/thoughts on that method, also welcome.

I'll only looking at very low frequency output, 1 to 100 Hz.

Thanks.

 


This topic was modified 1 month ago by john_coach

   
Quote
Topic Tags
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2508
 

@john_coach

As you have not gotten any reply I would suggest using ChatGPT AI

To the first part of your post:

The HMI kits I can find all use the ESP32-S3 - which does not have a DAC (the S2 does).

So I'm looking for any recommendations for a dev. kit, that does have a DAC.

 

ChatGPT responded with:

You’re running into the exact trap a lot of people hit with modern HMI boards:

  • The newer ESP32-S3 parts are excellent for LVGL + displays.

  • But Espressif removed the internal DAC from the S3. (ESP32)

The good news is: for an HMI/UI device, an external DAC is usually the better design anyway. The built-in ESP32 DACs were only 8-bit and pretty mediocre for anything analog-precision related. (ESP32)

So the cleanest path is usually:

ESP32-S3 HMI board + external I2S DAC

because the S3 still has very capable I2S peripherals specifically intended for audio/data streaming. (Espressif Systems)

Here’s what I’d recommend depending on what you actually need from the DAC.


Best overall approach

ESP32-S3 display board + I2S DAC breakout

For example:

Then add a tiny external DAC module such as:

  • PCM5102A

  • MAX98357A (if audio-oriented)

  • MCP4725 (simple I2C DAC)

  • ES8388 codec boards

This is the architecture most serious ESP32 HMI projects end up using.

Why this is probably the right answer

The ESP32-S3 gives you:

  • excellent LVGL support

  • lots of examples/tutorials

  • PSRAM for framebuffers

  • RGB LCD support

  • touch support

  • strong community support

…and the external DAC solves the analog side properly.

The I2S DAC modules are tiny and cheap — often under AU$10.


If you absolutely want an internal DAC

Then avoid the ESP32-S3 entirely.

You want either:


Original ESP32 (not S3)

The original ESP32 has two internal 8-bit DAC channels. (ESP32)

But there are drawbacks:

  • weaker LCD/display support

  • less RAM

  • older silicon

  • poorer LVGL experience

  • lower UI performance

You can do it though.

Typical setup:

Part Notes
Original ESP32-WROVER Has DAC
SPI TFT display 320x240 or 480x320
LVGL Works fine for modest UIs

Not ideal for modern 800×480 HMIs though.


STM32-based HMI boards

This is honestly the “professional embedded” route.

STM32 MCUs often include:

  • real DAC peripherals

  • better analog performance

  • LTDC display engines

  • excellent LVGL compatibility

Something like:

or

These are much closer to “real embedded HMI engineering” than the ESP ecosystem.


My practical recommendation

If your DAC needs are simple

(control voltage, waveform generation, analog reference, audio, etc.)

Use:

  • ESP32-S3 display board

  • external DAC

That gives you the best overall experience.


DAC choices

DAC Interface Good for
MCP4725 I2C Slow/simple analog output
PCM5102A I2S High quality audio DAC
MAX98357A I2S Audio + amplifier
TLV5618 SPI Fast/simple DAC
ADSR-style CV DACs SPI Synth/control voltages

What I would personally build today

Component Choice
MCU/display ESP32-S3
Display 4.3" 800×480 capacitive
GUI LVGL
DAC External I2S DAC
Audio/control PCM5102A or MCP4725

Something like:

…is honestly a very solid modern setup.


One important clarification

You mentioned:

“a 2KHz 6502 would be fast enough”

For LVGL, the display subsystem matters much more than raw MCU speed.

Even simple modern GUIs need:

  • framebuffer movement

  • SPI/RGB display throughput

  • touch handling

  • font rendering

So although your application logic may be tiny, the UI stack benefits enormously from:

  • PSRAM

  • DMA

  • fast display buses

That’s why the ESP32-S3 dominates the cheap HMI world despite lacking the DAC.


Attribute WaveShare ESP32-S3 4.3-inch Capacitive Touch Display Development Board mikromedia for STM32 M4 - Smart Color Display 320x240 TFT Riverdi STM32 EVALUATION BOARD WaveShare ESP32-S3 7inch Capacitive Touch Display Development Board
Internal DAC No Often yes (depends on MCU) Often yes No
LVGL ecosystem Excellent Excellent Excellent Excellent
Display performance Very good Good Very good Very good
Analog capability External DAC needed Better onboard analog Better onboard analog External DAC needed
Ease for beginners Excellent Moderate Moderate Excellent
Cost Low Medium Higher Medium
Best use DIY HMI/UI Embedded engineering Industrial HMI Large UI panels

If you want, I can also recommend:

  • the simplest possible external DAC modules

  • a fully integrated board with audio codec already onboard

  • a Linux SBC option

  • or a minimal-parts-count architecture for your exact application.



   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2508
 

@john_coach

OR - I would look at using a PWM output to make a DAC via a low pass filter. Any comments/thoughts on that method, also welcome. I'll only looking at very low frequency output, 1 to 100 Hz

Again ChatGPT response:

For 1–100 Hz analog output, PWM + low-pass filtering is actually a very reasonable solution — and probably the simplest one.

At those frequencies, you’re in an easy regime compared to audio DAC work.

A few practical observations:


PWM-as-DAC works surprisingly well

If you:

  • run PWM at a much higher frequency

  • low-pass filter it properly

  • buffer it if needed

…you can get a very usable analog voltage.

For:

  • control voltages

  • dimming

  • slow waveform generation

  • sensor simulation

  • modulation

  • actuator control

…it’s extremely common.


Why your use case is easy

Your output bandwidth is tiny:

  • max signal frequency = 100 Hz

That means you can run PWM at:

  • 20 kHz

  • 50 kHz

  • 100 kHz

…and filter it aggressively.

The higher the PWM carrier relative to your signal bandwidth, the cleaner the output.


The main tradeoffs

PWM DAC advantages

  • no external DAC IC

  • cheap/simple

  • available on basically every MCU

  • ESP32-S3 PWM hardware is excellent

  • good enough for many applications


PWM DAC disadvantages

  • ripple

  • noise

  • nonlinearity near rails

  • output impedance issues

  • filter settling time

  • requires buffering for some loads

But for 1–100 Hz, most of these are manageable.


ESP32-S3 is actually very good at PWM

The LEDC peripheral is flexible:

  • high PWM frequencies

  • decent resolution

  • hardware-controlled

You can absolutely build a nice low-frequency analog output this way.


Recommended architecture

Simplest viable solution

ESP32 PWM
    |
    R
    |
    +---- analog out
    |
    C
    |
   GND

Classic RC low-pass.


But use TWO poles if you can

A second RC stage massively improves ripple suppression.

Example:

PWM
 |
R1
 |
+----R2----+---- OUT
|          |
C1         C2
|          |
GND        GND

This performs much better.


Good practical numbers

Suppose:

  • PWM frequency = 40 kHz

  • desired analog bandwidth = 100 Hz

Then a filter around:

  • 100–200 Hz cutoff

works nicely.

Example:

Component Value
R 10k
C 100nF

Cutoff:

That gives roughly:

  • 159 Hz cutoff

Good starting point.


Important: buffer the output

If the output drives anything substantial, use an op-amp buffer.

Otherwise:

  • load impedance changes the filter

  • voltage accuracy suffers

  • ripple changes

A cheap rail-to-rail op-amp helps enormously.

Examples:

  • MCP6002

  • TLV2462

  • LMV358


Resolution considerations

PWM resolution matters.

Example:

PWM bits Steps
8-bit 256
10-bit 1024
12-bit 4096

ESP32 can usually do:

  • ~10–12 bits at practical PWM frequencies

That’s already better than the old ESP32’s internal 8-bit DAC.

So ironically:

PWM on ESP32-S3 can outperform the original ESP32 DAC.


One subtle issue: update stepping

At 1–100 Hz, if you generate smooth waveforms:

  • sine

  • ramps

  • envelopes

…the update rate matters too.

You want:

  • PWM carrier high

  • waveform update rate high enough

Typical:

  • PWM = 40–100 kHz

  • waveform update = 1–5 kHz

Very easy for an ESP32-S3.


My recommendation

For your application, I would absolutely try:

  • ESP32-S3 HMI board

  • PWM DAC

  • 2-pole RC filter

  • optional op-amp buffer

before adding a real DAC IC.

You may find it already exceeds your requirements.


When I would switch to a real DAC

Use a proper DAC if you need:

  • precision voltage references

  • low drift

  • calibration accuracy

  • very low noise

  • multiple channels

  • audio-quality output

  • very fast settling

  • industrial analog outputs

Otherwise PWM is often enough.


One final thought

If you later decide PWM ripple is annoying:

Adding an external DAC later is trivial.

That means starting with:

  • ESP32-S3 HMI board

  • PWM output

is a very low-risk design path.

 



   
ReplyQuote
(@john_coach)
Member
Joined: 1 month ago
Posts: 3
Topic starter  

@robotbuilder 

Thanks for the reply - yes, this is kind of the way I was leaning.

To start with using a PWM/DAC.

Should be good enough for my needs (not audio).

So now there are plenty of HMI boards to choose from.

 



   
ReplyQuote