2-Channel I2C 0-10V DAC Module DFR0971 ESPHome integration

userHead waring192 2023-02-14 08:59:47 1488 Views0 Replies

Hello all,

 

This is my first DFRobot product (well I bought two of them, DFR0971) and I am very impressed with the build quality. Also when using the sample code it was very easy to output any stable voltage between 0-10v on either channel using Arduino IDE. I will be using this and the other one for the dimming of my LED driver which has 0-10v analogue dimming but not PWM like most Meanwell drivers.


I do a lot of automation using Home Assistant and most of that is using ESPHome which acts as the coding and communication from Module to ESP32/ESP8266 to Home Assistant. 

 

Unfortunately, the DFR0971's chip (GP8403) is not supported by ESPHome yet. I have put a request in but takes some time. I was wondering if someone from the DFRobot community is able to create a custom I2C Component in ESPHome so the Voltage range, which channels or both and Voltage output between 0-10v.

 

The links for the product are below and the links to building a custom component in ESPHome are linked also. I have tried my hardest myself but I really don't know where to start as I find Arduino code just as hard, I have to source other material and then alter it as I do in anything .yaml. The second link is the Github with the DFRobot_GP8403.h file which would be needed to be installed in Home Assistant in: config/esphome/custom/DFRobot_GP8403.h

 

https://wiki.dfrobot.com/SKU_DFR0971_2_Channel_I2C_0_10V_DAC_Module

 

https://github.com/DFRobot/DFRobot_GP8403

 

https://esphome.io/custom/i2c.html

 

https://esphome.io/custom/custom_component.html

 

 

Many thanks