EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: lakis70 on December 17, 2024, 11:04:26 pm

Title: Panelmeter Front-end
Post by: lakis70 on December 17, 2024, 11:04:26 pm
Hello
I'm amateur hobbyist at electronics and not native english speaking, so forgive me for my faults. My first question.
I wanted meters for solar-panels and batteries. I bought 8 panel-meters from ebay but they have much error, 200mV measuring battery's voltage and with currents direction.
So I decide to make mine versions of theirs front-end. I study multi-meters front-end and i made the attached circuit. It works at LTSpice and breadboard. I want to ask for
any suggestions to improve it.
The combination of trimmer and R3 parallel for calibrating purposes
The bypass capacitors are C2 and C3 are right?
The R4-D1 inputs protection is right? what diode for D1?
The output filter R5-C1?
One varistor 130V at input will protect for over-voltage?
MCUs supply is 3.3V and op-amps 5V.
Sampling every 300ms. I dont know if it is a single measurement or an average of 5or10 successively measurements every 300ms. But for both situations is the filter ok?
I think they use 2V reference and 1024 bits ADC. I wll use a pic16f or try to reprogram theirs mcu if its ST8 as some said at other threads.
Op-amps second channel reserved for current measurements.
Ignore resistor Rmultimeter, i use it to see how another multi-meter taints the divider.
Title: Re: Panelmeter Front-end
Post by: David Hess on December 18, 2024, 01:30:00 am
The combination of trimmer and R3 parallel for calibrating purposes

Yes.

Quote
The bypass capacitors are C2 and C3 are right?

C2 and C3 and R2 tailor the frequency response of the divider; maybe the original design had to also support AC measurements.  For DC applications, C2 and C3 could be left out.

Quote
The R4-D1 inputs protection is right? what diode for D1?

Yes, they limit the voltage and current applied to U2.  D1 could be the base-collector junction of a 2N3904 or BC546 for low leakage.

It seems like there should have been another diode from the input to negative supply to protect against negative inputs.

Quote
The output filter R5-C1?

It is a filter, but not in the conventional sense.  It protects against charge injection from the ADC input and provides a low AC impedance to the ADC.

Quote
One varistor 130V at input will protect for over-voltage?

R4, and the input divider, and D1 already protect against high voltage.

Quote
Sampling every 300ms. I dont know if it is a single measurement or an average of 5or10 successively measurements every 300ms. But for both situations is the filter ok?

Many measurements should be taken over a period of 100 milliseconds, or a multiple of 100 milliseconds, and averaged.  This will reduce noise, and create nulls in the frequency response at multiples of 50 and 60 Hz to remove power line noise.
Title: Re: Panelmeter Front-end
Post by: lakis70 on December 18, 2024, 01:57:29 am
David Thank you for your reply.
About the capacitors C2 and C3 you are right, its from a Heathkit multimeter, but i think is needed one capacitor in the place of C3. In Breadboard tests i use a big 220nf capacitor for C3 to stabilize the measurements. What do you think?

About R5-C1 do you think theirs value is right for 100 or 300 ms rate, I dont know how to express it, the capacitor will go to the new voltage if input change or discharges slow and measures are false?
Title: Re: Panelmeter Front-end
Post by: David Hess on December 19, 2024, 12:53:36 am
About the capacitors C2 and C3 you are right, its from a Heathkit multimeter, but i think is needed one capacitor in the place of C3. In Breadboard tests i use a big 220nf capacitor for C3 to stabilize the measurements. What do you think?

I am not sure what Heathkit was trying to do with this particular design.  I would remove R2 and adjust the other divider resistances appropriately, and then replace C3 with a trimmer and set C2 to make a compensated divider.

Quote
About R5-C1 do you think theirs value is right for 100 or 300 ms rate, I dont know how to express it, the capacitor will go to the new voltage if input change or discharges slow and measures are false?

Yes, the R5-C1 is plenty fast, and those are about the values I would use.  R5 isolates the capacitance from the operational amplifier, which could otherwise oscillate, and C1 provides the charge to the ADC when it samples its input.  This type of circuit is commonly recommended for sampling ADC inputs like you will find with microcontrollers and successive approximation ADCs.
Title: Re: Panelmeter Front-end
Post by: lakis70 on December 19, 2024, 01:21:00 am
Quote
and then replace C3 with a trimmer and set C2 to make a compensated divider.
how would you calculate theirs value?

and final question i think
what is the allowed length of a cable from the op-amps filtered output to theirs ADC input and the coaxial cable for microphones is good for that?
Title: Re: Panelmeter Front-end
Post by: Kleinstein on December 19, 2024, 11:38:07 am
The distance from the OP-amp to the ADC input can be quite long. It may be limited by the cable / trance capacitance, but even there the resistor R5 could help.

I would prefer to use the same supply for the OP-amps as for the µC/ADC. This way there is no issue with to high a voltage reaching the µC. The sepration from 3.3 V supply and 2 V ref. is just enough to avoid the input cross over glitch of the MCP6001 OP-amp.

For the gain trim there is the question if one want a trimmer or prefers a numerical scale factor, that is adjusted.
Title: Re: Panelmeter Front-end
Post by: David Hess on December 19, 2024, 03:01:23 pm
Quote
and then replace C3 with a trimmer and set C2 to make a compensated divider.
how would you calculate theirs value?

The capacitors have the same ratio of reactance as the resistors, so for instance if the resistors are 9 megohms and 1 megohm, then the capacitors could be 20 picofarads across the 9 megohm resistor, and 180 picofarads across the 1 megohm resistor.  The smaller capacitor is typically trimmed.  The idea here is that the attenuation remains the same at all frequencies.  Without the capacitors, stray capacitance will cause the attenuation to change with frequency.

Quote
what is the allowed length of a cable from the op-amps filtered output to theirs ADC input and the coaxial cable for microphones is good for that?

The length could be practically unlimited, and coaxial cable would be a good choice.
Title: Re: Panelmeter Front-end
Post by: lakis70 on December 19, 2024, 09:21:55 pm
I would prefer to use the same supply for the OP-amps as for the µC/ADC. For the gain trim there is the question if one want a trimmer or prefers a numerical scale factor, that is adjusted.
Can you explain a little more the numerical scale factor?

About the supplies because the panel-meter has a LDO 6203A for 3.3V in the PCB, so i thought to supply the add-on with the 5V for the regulator. I have and 2V more overvoltage protection for MCP6001. But if its silly, i can sold one cable more to take a 3.3V from PCB.

Can we have any idea about its mcu if its unknown Chinese or European-american? It has 16 pins (not a pic 16f) pin 1 is GND, pin 16 is Vdd, pins 15 and 14 for ADC, and the rest 14 pins outputs. 8 of them drives the 7segments and 4 of them drives one 74HC138 which switch the voltage - current LCD.
Title: Re: Panelmeter Front-end
Post by: lakis70 on December 19, 2024, 09:24:48 pm
Quote
The length could be practically unlimited, and coaxial cable would be a good choice.

David thank you for your clear answers.