-
-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to add DFRobot i2c DAC output module (0-10v) #1354
Comments
Do you own one that you can test with? |
i am ordering one today to test with, just recently found these. |
don't think it would matter from your side, but i can always order one of their different versions for testing if you are interested in it. i just dont really understand the use of the (4-20mA) ones, i think there are really just commercial applications, but there are also the PWM ones |
No need to buy others, unless you have a use for it. |
ok, ordered, should be here within 2 weeks |
asking here to see if this is even something feasible if this output module gets added to the system if this output module is added, would it be hard to also add Trigger Configuration: Trigger: Output based on if this output gets added, would it be hard to add a similar trigger output based on this output device? does not seem like you can trigger things by i2c devices at this point |
It's feasible and wouldn't be too hard to develop. It would act like any other Value Output that allows you to set a value (between 0 and 10) and would work with the current Output Value Action. |
the parts have arrived. have 2 of 2-Channel I2C DAC Module (0-10V) and 1 1-Channel 15-bit I2C to 0-5V/10V DAC Module |
that could open some options for both Lights, Fan Control, Valves, VFD and some more hope we can test some soon with those chips |
0-1000 would be more suited for that kind of output in relation to 0.00v to 10.00v so we could send for 6.34v - 634 as value realworld 0.00-10.00v |
i got 2 2ch 15bit 0-10v modules today in the mail did we have by any chance some code to test with them |
no code from me, am in the middle of a move |
Yes, I have a module that you can test. I'll push the code later when I have access to my development system. |
I just committed an untested module. Give it a test and let me know if there are any issues. |
will try it hope it will work with the 15bit to |
So i try use the new module with the 15bit thats not working but throws no error so then i did a modifiy of the module code for the GP8413 the 15bit one missing the 5V/10V selection missing Name field for each Channel |
Have you tested the hardware the module was designed for? Let's stick to the original issue before bringing in other hardware into the discussion. I also don't see any links to the product you're referring to, so I wouldn't be able to even reference a datasheet. |
sure your right i have only the 15bit Version but the Control is the same for all of those only dif is the internal command for the value in Case of 12 or 15 bit etc showed that last week in a post Produkt Overview shop Produkt Overview wiki Link to Datasheets 8413 Joe2824 the lib you used linked to Pypi DFRobot Github Lib my Old reply to one of your replys
|
And does the code you linked to work? |
I don't think your library is a good solution. For one, it uses RPi.GPIO, which A) is not supported in Pi 5s, and B) is a terrible way to conduct I2C communication due to it changing the I2C pins to inputs and other issues that conflict with other libraries, such as smbus2. |
that´s true i linked that only for comparison |
no!
but i think the problem lies in the pypi Lib witch is only written for the 8403 |
Did you set the right sda & scl pins when you tested the code? |
Tested Your Code in my dev system on Raspi 5 but like i sad no error and no output but like i said the 8413 not the 8403 Nithalik has the 8403 did you look in the lib you used could it be the reason for that no output that the range setting is missing all modules of that kind have hat 5/10V to set the range |
I2C ist working fine with all other modules i have is set to gpio 2/3 61 is SCD30 |
SInce the library uses Rpi.GPIO, it is not compatible with Pi >= 5, as indicated in the Output module: Mycodo/mycodo/outputs/value_dac_p8403.py Line 40 in fd837e5
This doesn't directly answer the question of whether you set the same pins with the example code you posted. Also, see the note above about any library using RPi.GPIO, you need to use a Pi <= 4. To work with a Pi 5, the library needs to be refactored to use smbus2 or similar, with all use of RPi.GPIO removed. |
that statement was not in the first try 2 days ago i re downloaded today the module for the test and the pictures so it would be wise to get the original DFRobot Lib ubgraded for the pypi and without RPi.GPIO but my python skills are not at a point to take that on im happy that i can read and half way understand whats written there |
@silverhawk1983 I will try to update the pypi repository. |
@Joe2824 yeah happy to hear i will test the GP8413 as soon as posible Thanks for the invest! |
I just added a new Output module to test. |
@kizniche perfect thank you. Is it possible to hide the channel1 when I add a custom option like this: 'custom_options': [
{
'id': 'chip_select',
'type': 'select',
'options_select': [
('0', 'GP8503'),
('1', 'GP8211S'),
('2', 'GP8512'),
('3', 'GP8413'),
('4', 'GP8403'),
('5', 'GP8302'),
],
'name': 'Device',
'phrase': 'Select your GP8XXX device'
}
], For example GP8512 only support channel0. |
I haven't done anything except copy the other closely-related module and add the code to use only GP8403. The number of channels is hard-coded in the module, so a different module will need to be created for any device variant that has a different number of channels. |
@silverhawk1983 I created a pull request #1375. |
@Joe2824 sure i ty your lib on the weekend with the 8413 and some example code |
@silverhawk1983 no worries I have the 8403 and this worked as intended. |
@silverhawk1983 I made a mistake with the GP8431 data sheet and thought it only supported 0-10V. v0.0.4 should now have solved the problem. |
did it can be that the channels are switched around channel 0 gives at Out2 out and channel 1 at Out1 |
You have three options 0 for channel 0, 1 for channel 1 and 2 for channel 0 & 1. |
sorry all fine my wires did have a twist in it :) allfine works good and as it should |
@silverhawk1983 Yes, my 8403 has been running for about 5 days without any errors in production. |
Add Output for controlling GP8XXX 2-channel DAC (0-10 VDC) #1354
Found a awesome DAC from DFrobot, it is the first i2C device that i have found that outputs a 0-10v signal. also has 8 possible i2c addresses. i am a failure at programming so hoping this is universal enough for other people to find useful too.
https://www.dfrobot.com/product-2613.html
tons of lighting systems use 0-10v dimming, and this is the easiest way to add it to mycodo without making your own circuit, which is how i am currently doing it, this is just more user friendly
https://www.prolighting.com/blog/2020/03/25/understanding-0-10v-dimming-with-todays-led-commercial-fixtures/
wiki: https://wiki.dfrobot.com/SKU_DFR0971_2_Channel_I2C_0_10V_DAC_Module
probably somewhat similar to https://kizniche.github.io/Mycodo/Supported-Outputs/#digital-to-analog-converter-mcp4728
i envision the output to just have the option to select i2c address and set output voltage, bit simpler then the mcp4728
they also have 6 version of this board with various different outputs
The text was updated successfully, but these errors were encountered: