|
-
Jan 7th, 2010, 08:13 AM
#1
Fanatic Member
Re: [RESOLVED] Converting voltage level into graphical display
 Originally Posted by catherine0136
@TokersBall_CDXX
i believe its DC ? Because the solar cell is connected to a Analog-to-Digital board then this whole thing is connected to the power supply and its also connected to the comp via a RS-232 cable.
And i've heard that drawing a straight line for my project is much better and more sensible, but during my presentation of the project to the supervisors, they want me to do into waveform.
DC has no frequency, therefore there is no waveform. The line will always be flat across the horizontal plane.
with out a frequency you cannot display a sinewave/waveform
-
Jan 7th, 2010, 11:16 AM
#2
Re: [RESOLVED] Converting voltage level into graphical display
 Originally Posted by TokersBall_CDXX
DC has no frequency, therefore there is no waveform.
 Originally Posted by Wikipedia (Waveform)
...the term 'waveform' is now also sometimes used to describe the shape of the graph of any varying quantity against time.
That could include a DC voltage which varies in time, such as the output of a solar cell when you wave your hand in front of it. So I think we can forgive Catherine's supervisors for (ab)using the term.
@Catherine. I'm glad you have a real voltage signal, but the question is: are you able to read it in your program yet? I suppose not, because otherwise you would have said.
I'll take a wild guess at how to could get the signal. In the designer, look for the SerialPort tool in the toolbox. (If it's not already there, right-click the toolbox and select Choose Items. Find SerialPort in the .Net Components tab and tick it.) Now drag a SerialPort onto your form and view its properties. Change the ReadBufferLength from 4096 to 1, but leave everything else as it is. Then (if it works) you can read the voltage on the RS232 port at any time like this:
Code:
volts = CSng(SerialPort1.ReadByte / 255)
You could put that in a timer Tick sub and take a reading say every 100 milliseconds. It will be nice if this works, but it's mainly guesswork and I don't have any way to try it out.
I can give you an example of how to turn a series of voltage readings into a "waveform" but I don't have time right now -- maybe later this evening or tomorrow (W.European time). You are on the right lines with the Graphics.DrawCurve statement.
BB
Last edited by boops boops; Jan 10th, 2010 at 07:42 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|