mkgdkdk
Posts: 4
Joined: Wed May 08, 2013 9:09 pm

gpio to analog 0-5v

Thu Nov 06, 2014 5:44 pm

Hey.
I need too control are large power supply. It comes whit are analog 0-5v input.
Do anybody have are good way too convert the"digital" gpio output to are 0-5v output?

User avatar
joan
Posts: 14959
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: gpio to analog 0-5v

Thu Nov 06, 2014 6:12 pm

Could you post a link to the power supply you are trying to control?

User avatar
mikronauts
Posts: 2794
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: gpio to analog 0-5v

Thu Nov 06, 2014 6:16 pm

Do you have a link to the specifications / documentation of the powersupply?

You man need as little as hooking up an SPI DAC such as:

MCP4901 (8 bit)
MCP4911 (10 bit)
MCP4921 (12 bit)

You may need some code to drive it.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

klricks
Posts: 7172
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: gpio to analog 0-5v

Thu Nov 06, 2014 6:17 pm

Give a link to the power supply or data sheet.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.


User avatar
mikronauts
Posts: 2794
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: gpio to analog 0-5v

Thu Nov 06, 2014 6:40 pm

Nice power supplies!

Says 0.2% accuracy for analog programming, so you want at least 9 bits for dac.

I'd use an MCP4921, 12 bits, pretty much the same price as the 10 bit one.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

Return to “Advanced users”