Posts: 2
Threads: 1
Joined: May 2023
Reputation:
0
05-06-2023, 11:39 PM
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
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
05-07-2023, 12:08 AM
(This post was last modified: 05-07-2023, 12:09 AM by admin.)
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
Posts: 2
Threads: 1
Joined: May 2023
Reputation:
0
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).
Posts: 10
Threads: 1
Joined: Jul 2023
Reputation:
0
i got same problem in HA. Any solution ?? plsss
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
ok, when have free time, make a demo code for DAC.
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
there days during China National Holidays, when we begin work, we will test it.
Posts: 10
Threads: 1
Joined: Jul 2023
Reputation:
0
Any news about my request ?
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
ok, next week will test it.
Posts: 6,311
Threads: 808
Joined: Oct 2020
Reputation:
154
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