How much resolution or precision do you need? For example, do you need high resolution like 2.5 V or something more lenient such as integer voltage only.
It would be possible to use a voltage divider to get the voltage to a useable range,·then put that output into a ADC, and then take the reading output of the ADC and multiple it by the same quantity to get the 0-40 range back.
For example, if you divided the voltage by 10 (9k/1k voltage divider), that·output to the ADC input,·then multiple the output of the ADC by 10 to get the appropriate 0-40 voltage. That should give you a 0-40 with 1V per division. Would·that be enough resolution? What is this project for?
Yes that would be adequate. The BS2 would be the heart of a solarcell system; read light intensity and position cell board accordingly.
I know it can be done with a simple circuit without involving BS2, but I also need to monitor voltage output of the cell among other data (like temp. and wind speed) and log the data into a computer via vb.net application.
I guess I can find a voltage divider diagram within the forum.
Since you only need integer numbers then you should be able to use an 8-bit ADC (ADC0831) and you could use the BS2 you already have the Board of Education. As for a diagram, Mikes suggestion will help greatly to figure out the output of the voltage·divider.·Once you know the wiring of a voltage divider, you would take the output and put that into the input of the ADC; reference the datasheet for the correct physical pins to connect. For example for the ADC0831, pins 2 and 3 is the input from the voltage divider. I hope this helps
So a voltage divider is needed because the ADC0831 cannot READ more that 5Vdc on pins 2 and 3. If this is true, then I'm off to order the part and try it.
If R1=1K and R2=140 then Vout=4.912 .... So all what I need now is a code to get data from ADC and then play with a formula to get the orijinal reading.
Not only that the ADC0831 cannot READ more than 5V, but it can be damaged if you apply more than 5V to it. The ADC0831 datasheet shows how much you can apply to the various pins (under Absolute Maximum Ratings). It's probably slightly more than 5V. Most IC inputs have protective diodes to the 5V bus and ground bus on the chip. These diodes can handle a limited amount of current before they're (and the rest of the chip is) damaged. See Note 4 on page 6 of the datasheet.
The 1K resistor would not be high enough to limit this "fault" current if something happens to the 140 Ohm resistor or the connection to it. You can use multiples of the values of the resistors in the voltage divider. I would suggest at least 10K and 1.3K. With a 40V input, this would limit the "fault current" to about 4mA which the ADC0831 can withstand according to the datasheet note.
Comments
How much resolution or precision do you need? For example, do you need high resolution like 2.5 V or something more lenient such as integer voltage only.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
It would be possible to use a voltage divider to get the voltage to a useable range,·then put that output into a ADC, and then take the reading output of the ADC and multiple it by the same quantity to get the 0-40 range back.
For example, if you divided the voltage by 10 (9k/1k voltage divider), that·output to the ADC input,·then multiple the output of the ADC by 10 to get the appropriate 0-40 voltage. That should give you a 0-40 with 1V per division. Would·that be enough resolution? What is this project for?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
I know it can be done with a simple circuit without involving BS2, but I also need to monitor voltage output of the cell among other data (like temp. and wind speed) and log the data into a computer via vb.net application.
I guess I can find a voltage divider diagram within the forum.
Thank you Joshua.
I have a maximum of 40Vdc to measure and need a diagram for connecting an ADC (which type) to BS2.
rgrds
Since you only need integer numbers then you should be able to use an 8-bit ADC (ADC0831) and you could use the BS2 you already have the Board of Education. As for a diagram, Mikes suggestion will help greatly to figure out the output of the voltage·divider.·Once you know the wiring of a voltage divider, you would take the output and put that into the input of the ADC; reference the datasheet for the correct physical pins to connect. For example for the ADC0831, pins 2 and 3 is the input from the voltage divider. I hope this helps
ADC0831 [noparse][[/noparse] datasheet ]:
http://www.parallax.com/Portals/0/Downloads/docs/prod/datast/dsadc0831.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
If R1=1K and R2=140 then Vout=4.912 .... So all what I need now is a code to get data from ADC and then play with a formula to get the orijinal reading.
Excellent, when you are done you can post in the completed projects forum; it's always nice to see members projects completed.
Parallax Forums [noparse][[/noparse] completed projects ]:
http://forums.parallax.com/forums/default.aspx?f=21
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
The 1K resistor would not be high enough to limit this "fault" current if something happens to the 140 Ohm resistor or the connection to it. You can use multiples of the values of the resistors in the voltage divider. I would suggest at least 10K and 1.3K. With a 40V input, this would limit the "fault current" to about 4mA which the ADC0831 can withstand according to the datasheet note.