Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESPHome DAC output DC 0-10V
#1
Question 
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
Reply
#2
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
Reply
#3
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).
Reply
#4
i got same problem in HA. Any solution ?? plsss
Reply
#5
ok, when have free time, make a demo code for DAC.
Reply
#6
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.
.txt   kc868-a4s.txt (Size: 6.64 KB / Downloads: 111)
Reply
#7
there days during China National Holidays, when we begin work, we will test it.
Reply
#8
Any news about my request ?
Reply
#9
ok, next week will test it.
Reply
#10
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
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)