[SOLVED] Help with measuring servo current for feedback control

Hi All,

I'm trying to figure out how I can measure the current draw off my servo to create some sort of feedback - doing so without any physical modifications to my servo like a wire connected to the servo's Pot. My intention is something similar to this


From what I've understood and read so far, I'm meant to use the analog input of the arduino to get a serial reading after converting the voltage reading. This is understandable but since I'm supplying an external power supply with 6v which is greater than the 5v limit I'm confused as to how I'd do this. I've tried initially using the basics example (ReadAnalogVoltage) in the program and got the servo to sweep and the serialread was just zero's (everytime the horn rotated) so I was obviously doing something wrong but it was showing a reading everytime it moved.. so I thought I was getting somewhere. I had a 0.3ohm resistor connected at the output of the servo, and the wire connected to the analog input of the arduino and common ground for both. But after finding out I can't read anything higher than 5v thats where I'm stuck. I've read that using a voltage divider would get readings but I dont know how that would affect the servo's performance? Sorry if this all sounds messy but I'd appreciate any constructive advice as to where I could go from here.

Note: I'm trying to do this as part of a robot arm sort of mechanism and wanted to control the applied force of the "fingers" so that it doesn't crush fragile objects or stop when an object is in contact hence why I need to do this for more than one servo ( about 5) . I have considered FSR's but I'm 'trying' to minimize the cost of the project as much as possible. I've also considered current sensors but again, cost so if there are any other suggestions as to how I can tackle this problem that'd be great.


You need a high-side current->voltage converter (high-side current monitor or sensor). It is doable with 1 op-amp and 1 transistor, or with specialized chips.
An example below. You may set the range with R3 resistor (do measure the actual current when servo with highest current, and adjust the R3 such it will get <5V at the Arduino analog pin). Provided as-is. No warranties of any kind :slight_smile:

serv100mA.bmp (935 KB)

serv1A.bmp (942 KB)

Hi Pito thanks for your reply,

I'll be honest and say that I'm not too experienced in this area, but I'm trying to get my head around this. I sorta have an understanding how the circuit works - in terms of wiring it up. I'm just having trouble understanding what kind of transistor or op-amp I need. Just so I can source it from a local shop or something... This is the place i usually buy from and, what I've found;



and also with the resistors I'm not sure as what wattage I would need. But, if it helps I do have the servo specs, at 6V :

Idle Current : 5mA Running Current (no load) : 500mA Stall Torque Current : 2500mA

On another note would a 'hall effect-based current sensor" be any better as an alternative? This one from what I've found so far



Check out the ZXCT1009FTA chip which is used to measure current in the below schematic of the open servo project.