Smart Home Automation Forum

Full Version: ESPHome DAC output DC 0-10V
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I don't understand how to correctly integrate the AO 01-08 (0-10V) as DAC output in the ESPHome yaml.

Could you please show me an example programme?

Many thanks in advance
our demo config yaml file already create the analog output.
here:
light:
  - platform: monochromatic
    name: "a4s-Color-LED-1"
    output: PWM0
  - platform: monochromatic
    name: "a4s-Color-LED-2"
    output: PWM1
  - platform: monochromatic
    name: "a4s-Color-LED-3"
    output: PWM2
  - platform: monochromatic
    name: "a4s-Color-LED-4"
    output: PWM3
  - platform: monochromatic
    name: "a4s-Color-LED-5"
    output: PWM4
  - platform: monochromatic
    name: "a4s-Color-LED-6"
    output: PWM5
  - platform: monochromatic
    name: "a4s-Color-LED-7"
    output: PWM6
  - platform: monochromatic
    name: "a4s-Color-LED-8"
    output: PWM7


you can click a4s-Color-LED-1  ---  a4s-Color-LED-8 ico in home assistant dashboard, then will show the slide bard, that for output dc 0-10v
Thank you for the example. But unfortunately the output does not behave linearly.

If I set 50% in HA, I only get 2.5V.

Could you please show an example of how to make the output linear ( 0% = 0 V / 50% = 5 V / 100% = 10 V).
i got same problem in HA. Any solution ?? plsss
ok, when have free time, make a demo code for DAC.
This is the code. At the moment I only use input 1 with dimer 1. At 50% in HA ... I have 2.4 V. It is not linear. In a demonstration on YouTube made by you, I saw that the same thing happens to you.[attachment=3181]
there days during China National Holidays, when we begin work, we will test it.
Any news about my request ?
ok, next week will test it.
it's normal with different voltage we have tested. PWM 50% 100% not linear.
if you want voltage higher, you can modify the "frequence",
pca9685:
id: 'pca9685_hub'
frequency: 200