Just thought of a neat idea for my project.
A diode in series with a piezo buzzer across the output terminals will give immediate indication that reverse polarity has been applied.
I like that idea. I had thought of a led indicator or something, but a buzzer will definitely warn you before something blows up.
Here is what I have on the PCB. I still have to make some final touches, but I think this is what I'm going for. I'll wait a couple days before ordering should anyone want to take a look and suggest any changes.
xavier60, I hope you don't mind to be included on the silkscreen, that is the least I can do.
Juan
Here is what I have on the PCB. I still have to make some final touches, but I think this is what I'm going for. I'll wait a couple days before ordering should anyone want to take a look and suggest any changes.
xavier60, I hope you don't mind to be included on the silkscreen, that is the least I can do.
Juan
Can you post a schematic mainly of the PWM filters and measurement op-amps areas?
Can you post a schematic mainly of the PWM filters and measurement op-amps areas?
Attached are the full schematics. I don't know if I should stick with the RC filters or not.They seemed to do just fine. The spare op-amp was "terminated" as a voltage follower from the ouput of the current sense amplifier.
Juan
Single stage filters aren't really good enough. Not just because of the poor theoretical performance, PWM signal can leak past the capacitor's parasitic resistance and inductance.
A double stage filter can give much better filtering without causing the voltage and current settings to be too sluggish.
http://sim.okawa-denshi.jp/en/CRCRtool.php4.7K, 1uF,33K and 100nF give a good result.
EXTRA: or double up the existing parts, 10K, 1uF, 10K and 1uF. The settling time is still short enough.
Single stage filters aren't really good enough. Not just because of the poor theoretical performance, PWM signal can leak past the capacitor's parasitic resistance and inductance.
A double stage filter can give much better filtering without causing the voltage and current settings to be too sluggish.
http://sim.okawa-denshi.jp/en/CRCRtool.php
4.7K, 1uF,33K and 100nF give a good result.
EXTRA: or double up the existing parts, 10K, 1uF, 10K and 1uF. The settling time is still short enough.
I added the second stage to the filters Component values can be changed anytime. I have also consolidated some drill sizes and labeled functional blocks.
Juan
Q5 needs C-E swapped.
R32 no longer has a clear benefit.`It was originally meant to break up a loop formed between bypass capacitors on the rail between two separate areas of the board.
Alright, thanks for spotting that. I'll make those changes and hopefully order tomorrow or the following day, as most prototype services in China close for the Chinese new year and I want to get this thing made sooner than later. I'll do some more testing on the current sense amplifier if I'm able to.
Juan
Attached is the final PCB and the revised schematics. I hope everything is ok. I'll order this afternoon.
Juan
Just ordered 10 of them (for the same price as 5 ?) and a couple spare components. About 1 € each board including shipping. Really cheap. Let's see how it goes.
Juan
We didn't discuss on/off control. Ill be turning off the reference voltage to the Pots.
I guess that you could do the same sort of thing. The filters will make the rise and fall times a little slow,shouldn't be a problem in practice.
We didn't discuss on/off control. Ill be turning off the reference voltage to the Pots.
I guess that you could do the same sort of thing. The filers will make the rise and fall times a little slow,shouldn't be a problem in practice.
That is what I had thought, just turning off the PWM. Rise and fall times won't be significant for manual operation I think. I can always add a hard switch that completely disconnects the output if needed.
Juan
I just realized I designed the current sense amplifier to give a maximum of 1.1 V in order to use the 1.1 V Arduino ADC internal reference, and tapped off the voltage feedback divider to measure voltage, which gives a maximum of 5 V
. I'll just increase the gain of the current sense amplifier to give 5 V out at full current, and use the 5 V rail as a reference (perhaps less precise, but I am using it for the PWM anyway) Fortunately, it can be easily fixed and PCB remains the same. I hope I haven't messed up anything else.
Juan
PCBs have got manufactured without any problems and have already been shipped. I will get them in a couple weeks. Meanwhile, I'll work on the software if I have time.
Juan
I have just received the PCBs and some misc components. They look fine as far as I can tell. Attached is a photo of the front, back and one with the big components fitted just for testing. I am not too happy about the PWM filter capacitors covering the Arduino's USB port, and the film ones that I ordered have too big footprints. I'll have to take the arduino out to program it anyways, so the serial comunications don't interfere.
I'll assemble it this weekend and see how it goes.
Juan
R8 and R16 (on my schematics) are 10 M. I don't happen to have resistors that high around. I'll have to order some. I assume they can't be 1 M or so (which is the highest I've got). I'll solder just the CV loop for now.
Juan
Don't fit R16, it might not be needed for your op-amp anyway.
Changing R8 to 1MΩ shouldn't cause a noticeable problem. We can check that later.
R17 needs to be recalculated depending on what current range you are aiming for.
Ok. I'll do just that. I have soldered the CV loop and it seems to work just fine from the PWM. I have to do further testing. I had to parallel/series a couple resistors in order to get values I didn't have around. Film capacitors clear the USB port no problem.
Hopefully tomorrow I'll try the CC out.
I am aiming for 0.5 A max output current.
Juan
Sorry for not posting in a while. I've been busy.
I have got the code working to a usable extent, and the CV loop works fine controlled from the micro. I can set the voltage/current with the encoder and show the measured values on the displays
Don't fit R16, it might not be needed for your op-amp anyway.
Changing R8 to 1MΩ shouldn't cause a noticeable problem. We can check that later.
R17 needs to be recalculated depending on what current range you are aiming for.
So do I just put a jumper where R16 was?
How is R17 calculated? I don't really understand how the circuitry around the CC op-amp works. Thank you.
Juan
Sorry for not posting in a while. I've been busy.
I have got the code working to a usable extent, and the CV loop works fine controlled from the micro. I can set the voltage/current with the encoder and show the measured values on the displays
Don't fit R16, it might not be needed for your op-amp anyway.
Changing R8 to 1MΩ shouldn't cause a noticeable problem. We can check that later.
R17 needs to be recalculated depending on what current range you are aiming for.
So do I just put a jumper where R16 was?
How is R17 calculated? I don't really understand how the circuitry around the CC op-amp works. Thank you.
Juan
R16 is to give the CC op-amp some positive offset if necessary. If you don't have the 10MΩ resistor, fit nothing in its position.
R17 and R15 form a divider that applies a positive voltage to the non-inverting input of the CC op-amp. R14 keeps the inverting input at 0V.
The current regulating setting is very close to the voltage applied to the non-inverting input divided by the shunt resistance.
125mV will give close to 500mA.
https://www.eevblog.com/forum/projects/linear-lab-power-supply/?action=dlattach;attach=629695Edit: corrected "R16" to "R17" in the 2nd line.
R16 is needed only if CC mode can't be set all the way down to zero amps.
I have tried the CC loop and it seems to work fine. I calculated R17 to be 400k. As a 470 k was already fitted I tried it temporarily with that. I'll have to do further testing and calibration and maybe add a calibration routine to the code, so I don't have to manually update the hard-coded calibration constants.
This project is taking shape, but lots of things to be done yet, including finishing the case, mounting the PCBs and adding more functionality to the code.
Juan
I sometimes solder in IC socket pins to where I expect to have to change component values later.
I get them from chopping up machined pin IC sockets. Or they can be bought in SIL form.