Hello Jcon,
Jcon>>of course I did a lot of work, but did not get good result, this why I am asking for new ideas .
I used 2 limiting resistors connected to a bridge with a divider resistors on the output with a cap as a filter.
Somehow I am not getting a stable result.<<
Well, a couple of things... you will get various readings. Every time you turn on a appliance, your voltage will drop. The Voltage will increase if you turn off a appliance. And depending upon how much current that apparatus has, you will have larger swings in voltage.
A cheapy way how to measure voltage, can be with two resistors, in series, valued at about 1/12 or so. Then run through a Bridge to Pulsate to DC. But if you use a capacitor, you will run into the problem of seeing the "Fluxuations".
With this in mind, you can use a comparator and constantly sampe the output...And as soon as the output starts dropping, you know your maximum voltage... and print that out to the LCD. then continue sampling until it starts to increase and peaks.
With a duel trace scope, you can monitor the input voltage and the output voltage.. and have a "converstion" factor. If its 120 volts in, and the peak after the Bridge is 4.5...then 0 volts is equivalent to 0 after your bridge... Solve the equations simtaniously, and get a equation like converting Cel to Far.
Realizing that the Voltage drop from 120 down to whatever will add a negative accuracy factor to your answer. But that small amount may not be a that big of a deal for you...
Either way, give us a idea what you are doing... show us a diagram...Some code... or both. A person can't expect to come on a forum and say "Give me this" or "Give me that" with code, schematic, and the works. I am sure this was not your intention. I think what you really wanted to say, is that your way or method of getting the data you wanted is not working well enough, and you need help in thinking of another way to do it. Or maybe you have no idea how to go about it, and need help in that direction.
Either way, Try posting another thread with your idea, what you have drawn up that works (or doesn't work), Tell what kind of outcome is happening, and ask if there is another way to accomplish the task a little better with everyday common parts. Add a schematic to the Thread, and Add your PBP code too. I am sure there are *many* folks (including myself) who will look at the info and say "This is good, but it may be more accurate and cheaper to do it this way".
I have asked for help a few times, and have had some beautiful reponses on ideas I never thought of. (Thanks Guys and Gals). Things like this is what makes a forum successful. I came from the Philips Microchips...ASM only... UV lights, and 25 min burn time... YUCK!. I am now hooked on these PICS, and have learned much about them... and have MUCH more to learn.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks