Skip to main content
Topic: Computer controlled PS/function gen/multimeter (Read 227164 times) previous topic - next topic

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #15
I'll do some application notes search and some number crunching tonight. I'll include both DC input and mains input in my calculations just to be able to see if AC is manageable for future revisions (Actually I still prefer mains supply). I think I saw an app note which is used for increasing ADC resolution with oversampling, if it is feasible, we can use that.

For computer connection: It will be used for firmware upgrades for sure but we can use it also for sending commands as in BP. Shall we also include a user panel?

One other thing: Only DC output or shall we include also AC output?

We can include the circuit in the EEVblog as a basis for constant current sink and maybe constant current supply.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #16
I'm generally against control panels in cheap designs, but a few buttons would be nice. It could be used by the PC software as a trigger for tests. Maybe a header too so you could probe around with tip press or button triggered tests.

If the difference in design is a few components, why not include AC. If it creates a secondary system or major design pain, then my vote is for DC only in v1 to keep it doable and quickly rewarding.
Got a question? Please ask in the forum for the fastest answers.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #17
My understanding of constant current supplies is that the only difference from voltage supplies is that you use current for feedback rather than voltage. Since the loop is in software it should be simple to switch between the two.  I may be way off here, I didn't do much power electronics in college. The limit of the constant current output is going to depend on the load impedance and the supply voltage. 

My idea is that with this device you could hook up a circuit and then run a script. This script would say vary the voltage and at each step record a number of parameters. At the same time it would make sure the current stays within allowable limits. So in all I'm thinking its going to need 12-16 adc channels. They all don't have to be high resolution, but at least 4 of them do. I'm thinking the feedback from the PS outputs needs at least 12bit if not 16 and two universal inputs.

I'm thinking this should be just a board with screw terminals for power in and outs and just .1" headers for the analog inputs, maybe two 5x2 headers so it can use the same breakout cables as the bus pirate. All of the left over IO should be broken out to headers for   user expansion.  Oh and it really should have mounting holes on the PCB, it bugs me that both my bus pirate and usbtinyISP  are missing mounting holes.

We should encourage people to design their own cases or panels for this project. I like the way projects like the bus pirate and many other open source projects leave that to the end user. This also keeps initial cost low.

Has anyone looked in to doing ncurses like implantation on a micro-controller? It would be cool if the measured values could be constantly updated on screen without scrolling. Time to  go read up on how terminal emulation works....
 
I would like to see an AVR used just because the code could be built in Linux. We don't need the PIC's assignable IO pins features that the  bus pirate requires. Now if it comes down to it and there is a far more suitable PIC for the same price as the AVR, PIC it is.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #18
What AVR did you have in mind? Just the Atmega168?

I didn't mean to step on any toes. I looked at PICs because the mention of recycling the Bus Pirate interface. I'm willing to design with any chip that's readily available. What AVR debugger do you use? Do you recommend it? I trashed my "cheap" ebay mkii clone and need to get/build a new one.

How about the 16bit external ADC - did you have a chip in mind? I'm curious what affordable options there are for 4-6 (8) channel 16bit serial ADCs, and how fast we can actually drive them.
Got a question? Please ask in the forum for the fastest answers.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #19
Just made some quick calculations for selecting inductor and capacitor values, the excel file is attached. It is zipped as I cannot attach xls files (learned the hard way, all post was deleted. :( ) I'm just thinking about a buck converter with 12-24VDC input and 0-12VDC output. I didn't do anything for AC output as it requires 3 more MOSFETs, but can be done with H-bridge topology. The book I'm using somehow differs from the Microchip application notes but I based my calculations on my book. Down is a list for application notes from Microchip:


For Linux programming, I'm working on porting the latest C30 compiler to Linux. I finished most of it, just have to check if libraries are correctly arranged and do some final tests then I'll post it on my blog. You can check out here, I'm doing this because had major problems with Wine and I also have access to a Windows computer both at home and lab. Just need a little time though, next week I have major exams, but after that I'll have enough time for it.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #20
Great work on the C30 compiler, I'm going to post it up. If you want to keep it in our SVN you're welcome, it's also easy to start your own Google Code project or GIT Hub project.
Got a question? Please ask in the forum for the fastest answers.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #21
[quote author="ian"]
Great work on the C30 compiler, I'm going to post it up. If you want to keep it in our SVN you're welcome, it's also easy to start your own Google Code project or GIT Hub project.
[/quote]
Just to be clear, that blog is not mine, I'm merging his patches with another method which was stopped around v3.11 I guess. I'm just getting rid of the dust of that outdated method which suits me more as I have one Windows laptop for general stuff, and another eeePc for Linux based codes, tests etc.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #22
Ah, sorry, I misunderstood. Still a great resource, and your progress is exciting. Thanks for the update.
Got a question? Please ask in the forum for the fastest answers.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #23
[quote author="ian"]I don't know if 1MSPS ADC is realistic without going to some parallel interface external ADC. Even a 1MSPS serial interface ADC with 16bits resolution will have to go 16Mhz+ SPI for the PIC to get the data at 1MSPS. And that's just for one ADC. I'm reticent to do that on a new design because the routing and sourcing gets so difficult that it's no fun to work on anymore. I'll try to find some PICs with multiple 16bit ADCs.[/quote]Texas Instruments has the ADS7951 series A/D with 1MSPS and 4 to 16 inputs (multiplexed).  I'm using the 8-channel version on a custom board, and you're right about the serial SPI speed needed.  I had to run at 18 MHz, which includes a stop bit or gap between the 16-bit command words.  In this case, my main CPU is the TMS320, which happens to have SPI ports capable of 16-bit and even more than 18 MHz.

As far as routing, I'm actually sending the 18 MHz SPI signals across flex cable between multiple boards.  I have pad for RC tuning of the clocks and data, but have not needed to use them.  In other words, 18 MHz serial doesn't seem to be too challenging, at least not with these TI parts.

P.S. The ADS7951 is 12-bit, so I'm mostly using it as an example of a high-speed serial, multi-channel A/D.

Re: Open source project idea: Computer controlled PS/function gen/multimeter

Reply #24
I'm not sure how appropriate the following article might be, but perhaps there are a few tricks to be learned from MAXIM:

App note: Variable resistor and temperature-indexed lookup table (LUT) compensate for regulator output

This application note shows how a variable resistor controlled by an integrated, programmable, temperature-indexed lookup table (LUT) is used to offset the temperature drift of regulators. In this application the variable resistor changes value every 2°C based on the LUT. The variable resistor thus effectively nulls any temperature changes (-40°C to +85°C) in a voltage regulator's output, and improves critical system parameters. The DS1859 dual variable resistor serves as the example device.

More Info

Re: Computer controlled PS/function gen/multimeter

Reply #25
Great resource. I attached the resulting graph they made. If we're going to measure with high accuracy, this looks like a good way to go. It would be nice to find some more generic options, as Maxim has a rep for poor availability.
Got a question? Please ask in the forum for the fastest answers.

Re: Computer controlled PS/function gen/multimeter

Reply #26
Sorry, didn't have time to read the whole topic yet, but I've long wanted to make something like this. Here is a link to what I've found. Hope it helps :) http://www.tuxgraphics.org/electronics/ ... unit.shtml

Re: Computer controlled PS/function gen/multimeter

Reply #27
An idea just popped into my mind: Maybe we can use a DC/DC converter IC and a digital potentiometer IC for feedback resistor divider. I attached a picture from MC34063EB datasheet. Instead of the resistor divider pair R1 and R2 we can connect a digital potentiometer to set the output voltage. Another possibility is to use PWM output of a PIC as a DAC and feed it to feedback input. This might save time IMO.

Re: Computer controlled PS/function gen/multimeter

Reply #28
[quote author="tayken"]Maybe we can use a DC/DC converter IC and a digital potentiometer IC for feedback resistor divider. I attached a picture from MC34063EB datasheet.[/quote]Not a bad idea.  That chip supplies up to 1.5 A

Re: Computer controlled PS/function gen/multimeter

Reply #29
I draw a block diagram of the system. You can find it below. There are dsPICs with 16-bit DAC output but they have a maximum ADC resolution of 12 bits as far as I can see. Because of that I didn't draw any type of controller as ADC/DAC can be another IC with high resolution. We need 2 for output voltage measurement, 2 for current measurement, 8 general inputs (no voltage dividers drawn) which makes a total of 12 ADC inputs. If we include a current sink, we will need another DAC channel for each current sink (for giving the sink current).

Connection can be made with microcontroller connected directly to USB or with an FTDI chip as a converter. If we connect the lines between microcontroller and FTDI chip  to a header people can use it to connect some kind of a display and control box. If FTDI chip is not used, it might be a good idea to have a header where UART output is sent and even a jumper for selecting communication channel.

For DC/DC buck converter sections an MC34063ECD can be used (SO-8 package) however, the thermal resistance between junction and ambient is quite high (160 C/W) but the thermal resistance between junction and casing is the lowest in the datasheet (20 C/W). There is also DIP package variant (MC34063ECN) with JA thermal resistance of 100 C/W and JC thermal resistance of 42 C/W. DIP package variant is a little cheaper (Digikey price for 1 ECD is 1.06$ and 1 ECN is 0.72$).