David_
Advanced Member level 2
- Joined
- Dec 6, 2013
- Messages
- 573
- Helped
- 8
- Reputation
- 16
- Reaction score
- 8
- Trophy points
- 1,308
- Location
- Sweden
- Activity points
- 12,242
Hello everyone.
I am designing a lab power supply that will be controlled by a AVR micro-controller, but I am not very knowledgeable regarding MCUs and I have some different approaches to how to implement the control part of the circuit.
The supply has two identical isolated channels(0-30V/2,5A), the output voltage and the current limit is set by individual one channel DACs and the output voltage and actual current through the rail is read by a 4 channel ADC. The channels are isolated and the digital communication is being transferred with a digital isolator and all chips are using I2C.
I found online a person how has done a very similar project and I am using the same ADC as he is, MCP4324.
Its a ADC that can read in 18, 16, 14 and 12 bit mode but he found that the 18bit mode was to slow and he had to go with 16bit.
However I'm not really satisfied with 16bit ADC reading, as the first MSB bit is used to indicate polarity the circuit can set the voltage in 65,536 steps but only read the output in 32,767 steps. MCP3422 is rated with 3,75SPS for 18bit and 15SPS for 16bit.
I am going for as high precision as I can possibly get and the first thing that comes to mind is speeding up the communication?
I am using arduino IDE and if I'm not mistaken the Wire library(I2C) is going at 100kHz as default, if so the chips I use can support up to 400kHz, that might help some.
Or I might look for new ICs that use SPI instead, am I right in thinking that if I would use SPI communication the over all preformens of the system could be increased?
If so a idea could be to use two smal uCs, one for each channel to monitor its channel and report to a master that takes care of LCD and such. As it is now ATmega328 won't do it and I am currently designing with a ATmega 2560 in mind. It would save me some hazzle by using two smaler to controll each channel and one 328 to control user interface.
All thoughts is appreciated.
I am designing a lab power supply that will be controlled by a AVR micro-controller, but I am not very knowledgeable regarding MCUs and I have some different approaches to how to implement the control part of the circuit.
The supply has two identical isolated channels(0-30V/2,5A), the output voltage and the current limit is set by individual one channel DACs and the output voltage and actual current through the rail is read by a 4 channel ADC. The channels are isolated and the digital communication is being transferred with a digital isolator and all chips are using I2C.
I found online a person how has done a very similar project and I am using the same ADC as he is, MCP4324.
Its a ADC that can read in 18, 16, 14 and 12 bit mode but he found that the 18bit mode was to slow and he had to go with 16bit.
However I'm not really satisfied with 16bit ADC reading, as the first MSB bit is used to indicate polarity the circuit can set the voltage in 65,536 steps but only read the output in 32,767 steps. MCP3422 is rated with 3,75SPS for 18bit and 15SPS for 16bit.
I am going for as high precision as I can possibly get and the first thing that comes to mind is speeding up the communication?
I am using arduino IDE and if I'm not mistaken the Wire library(I2C) is going at 100kHz as default, if so the chips I use can support up to 400kHz, that might help some.
Or I might look for new ICs that use SPI instead, am I right in thinking that if I would use SPI communication the over all preformens of the system could be increased?
If so a idea could be to use two smal uCs, one for each channel to monitor its channel and report to a master that takes care of LCD and such. As it is now ATmega328 won't do it and I am currently designing with a ATmega 2560 in mind. It would save me some hazzle by using two smaler to controll each channel and one 328 to control user interface.
All thoughts is appreciated.