![]() |
Current Sensor
Does anyone have anything on programming the code for the current sensor. All I really need to know is what type of input the sensor is, what type of value it returns, and the range of the value (and perhaps that value's meaning)
|
Re: Current Sensor
Quote:
Wire the sensor up to a PWM cable and plug it into one of the analog inputs on the FRC. The current sensor gives an analog output voltage between 0 and 5 volts. The output voltage corresponds linearly to the current measured, with 0 volts = -75 amps, 2.5 volts = 0 amps, and 5 volts = 75 amps. Look at the graphs in the documentation I've attached for more info on the voltage vs. current characteristics. Use your program to read the analog voltage, then calculate the corresponding current using these characteristics (we just use a linear y = mx+b calculation). If you need help getting your software to read the analog value, look at the 2004 Programming Reference Guide available here. Hope this helps! Good luck, and let me know if you need any more help. |
Re: Current Sensor
This should work, thank you!
|
Re: Current Sensor
Quote:
ACS NOTE RANGE: 1Vout = -75A 2.5Vout = 0A 4Vout = 75A (0V ~-100A, 5V ~+100A, not guaranteed linear) see my replies posted elsewhere |
Re: Current Sensor
I checked the programming guide, and I couldn't find anything on the current sensor. It would be great if someone could explain the programming to me or just give me some code for the current sensors. Thanks!
|
Re: Current Sensor
Quote:
Code:
|
Re: Current Sensor
Quote:
Be careful here guys. I made a mistake in my earlier post when I quoted the Volts vs. Amps characteristics of the current sensors, which Dale was nice enough to correct. Here are the correct values: Quote:
I = 50 * V - 125 where I is the current and V is the voltage you measure on the analog input. Also, in the code above, I think you want to use a Get_Analog_Value(rc_ana_01) in order to convert to an analog voltage. You also want to cast to an integer before printf'ing. user_routines.h: Code:
Code:
|
| All times are GMT -5. The time now is 11:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi