hi Al,
0.7uH may give a problem at UHF, but not on your PSU.
Another option, would be to put two 0.1R's in parallel, so you will only see a 0.05V drop at 1 amp.
Thats what I would do, a drop from say 5.00v to 4.95v on full load is insignificant.
I have two LM358 on the shelf if we need to debug any problems on the Vadc.
I could use 2 0.1r but they are the cement block ones and I would then need another 2 for the other side(var+) and I only have 2 and if I ever build one for the neg volts I would have to get a bigger case hehehe.
The one I made is of about 16 guage winding wire and will never even become warm at 1A and its tiny! And I can make more easily! Some time ago I built a small resistance meter that is pretty accurate down to about 0.01 as luck has it, so Ihave no problem making the 0.01s unless the 0.05 would be better for some reason.
I will be led by you in this.
I now have the code working for choosing the display, any one of the four I want at the click of a switch.
One question you may be able to answer though with your previous ownership of an electronics company is do you know of a rotary switch with 4 positions that has the positions at 90 degrees apart rather than the ones I have which are all about 10 degrees per click?
BTW I have implemented the rail switches you suggested but had to put the switches on the rear, but so long as I know where they are, to coin a quote, thats good enough!
hi Al,
These are my results of today.
My 5V has maximum current output of 0.5A, I dont have have a 0.01R so I had to use a 0.1R.
The circuit I used and results are in this image, it looks OK to me. This was mainly to check out that the LM358 would be ok, it is.
I will have to wind a 0.01R and use a different 5V source if you still have problems.
E.
OT:
It will be next week before I can complete all the tests.
Visiting my Bro in Rotherham this weekend, he is seriously ill with leukaemia, so I dont think I can pop in to see you.
hi Al,
Done some more testing and managed to reproduce your problem.
At switch ON the current charging the output cap is sufficient to drive the Vadc over 5V, this causes the OPA and transistor to go into a latched mode holding the Vadc close to 5V.
As a test, make the 2N3904 emitter resistor 10K and retest the Vadc out for various load currents.
I will try to work out a permanent solution.
The problem occurs whatever the OPA type is.
E.
Before you make any changes please let me know what actual Vadc is at 0amp and 1amp output.
What is the range of values that you are trying to mesure? One option is to run the PIC "upside down"....connect the VDD terminal to GND and connect VSS terminal to a
negative 5 volt power. Now all inputs and outputs to the PIC will be negative with respect to GND. If you can't do this (due to other circuit constraints) then you will need
to provide a negative power supply for your op amp circuit.
What is the range of values that you are trying to mesure? One option is to run the PIC "upside down"....connect the VDD terminal to GND and connect VSS terminal to a
negative 5 volt power. Now all inputs and outputs to the PIC will be negative with respect to GND. If you can't do this (due to other circuit constraints) then you will need
to provide a negative power supply for your op amp circuit.
We solved the problem with reading negative volts mate using an OPA that Eric designed on page 2 of this thread. The present problem is now trying to measure the load current on the +5v and Variable +v rails.
Eric has designed a circuit for this but at the moment it has just a slight hitch somewhere. Again this is an OPA circuit. Just teething problems, especially when the designer has to do it without the working circuit.
Try this quick fix, connect a 5.6V zener across the 2N3904 Base to 0V as shown in this image.
I will try it in hardware later today.
I would recommend that you adjust the Vadc 25kpot to give a 2.48V change for 0mA to 1Amp.
The Vadc is ~0.4V at 0mA and 2.88V at 1Amp, so in the program subtract this 0.4V offset count from the ADC value. So at 0mA the count will be 0 and at 1Amp the count will be 500.
If you multiply the value by 2, the count will be 1000 for 1Amp, giving a resolution of 2mA per count.
If you want a 1mA per count you could use a +Vref of 2.5V
I can't use a vref now, I have removed the 4096 one I planned on and realised anyway that the vref would steal one of my channels for ADC s I will have to stick with the internal.
A question. When I have this one working ok I will be doing the same on the +variable. Will the same setup again be ok and will it be ok to run the new OPA from the same 18v zener supply?
Saying that I wonder if it would be better to start again and use a new 358 for just both current circuits, it could simplify the board a little I suppose?
Just another quick question that I can't find the answer to in the datasheet. This is for next times project. I was wondering if you can go above the Vref if it is external at say 2.5 and have an input of 5v which is within the PICs spec?
Just had another setback! What I thought was 0.01r was obviously nowhere near. I measured drop across it and its virtually nothing even with the 1A load.
I will have to revert to the 0.1r at least with that I get a readable drop and it seems usable.
At 1030mA i get 105.0mV across the 0.1
At 108mA I get 10.5 across it so its fairly linear too and not so bad for the small readings. I can't forsee needind readings below about 5mA or above 1000ish so it may have to make do.
It does however mean my low resistance meter is all but useless! It seems all below .5r read as .01 DOH!