LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Output voltage measurement

I'm currently working on 4th year undergrad project. I was wondering whether somebody could tell me how to obtain a voltage output measurement from the NXT brick using LabVIEW. I'm currently controlling a model electrical motor using the brick attached to a mosfet in order to run the motor from a 12V battery. The LabVIEW NXT toolkit appears to only allow me to specify a percentage output and I wish to avoid having to use a voltmeter to get Volts vs % curves. If anyone has any suggestion I'd be very grateful since this is all relatively new to me.  
0 Kudos
Message 1 of 5
(7,368 Views)
I believe the voltage is constant, although I don't remember what it is.  I'm sure it is specified in the LEGO Mindstorms Hardware Developer Kit at http://mindstorms.lego.com/Overview/NXTreme.aspx.
0 Kudos
Message 2 of 5
(7,363 Views)
Usually what you apply to the motor outputs are digital pulse width modulated (PWM) signals.  The precentage (vs %) refers to the duty cycle of the PWM.  If you put 50% you will output a square wave, and get  your mosfet to apply half power, kind of like applying 6V instead of 12V to your motor.  If you put 10% you will make a square wave that is high 10% of a certain frequency. 
0 Kudos
Message 3 of 5
(7,281 Views)
Hi sgrad,

Check out this link.  Just remove the 556 timer as that is being used as a VCO.  Then you are left with an analog voltage output at pin 9 of U1

Is that what you wanted ?

regards
Peter

Peter
0 Kudos
Message 4 of 5
(7,254 Views)
Thank you all ever so much. After some research, I realised the NXT was using PWM to trigger the motor. So, I used an oscilloscope to measure the high time on the PWM signal over a range of % motor powers. This allowed me to plot exact voltage vs. motor power.
0 Kudos
Message 5 of 5
(7,162 Views)