View Full Version : DC Motor current to an Analog Input
junkyarddawg
31-01-2002, 13:00
If this is already covered, my apologies. But, measuring magnetic field strength of DC current is the easiest method with the restraints put on the on the wiring by rule. This can be accomplished with an AMR or GMR or Hall Effect sensor, all available in the DigiKey Catalog. Look in the sensor section. If you then go to the web sites of the mfg., you'll find application notes to help you determine the exact distance from the center of the wire and angle to the wire to get the 0-125A range, 0-500A range etc.......
Low resistance shunts are also allowed in the rules. They must be in the custom circuit box and will require amplifiers to be useful.
Tim Skloss
12-02-2002, 12:25
We built a very robust current monitor for speed controls. The negative current return wire from the SC to the fuse block is used at the current shunt. 10 G wire has a resistance of about 0.005 Ohms per foot. This gives 50 mV signal when 10 A of current is flowing.
We simply connect a 24G wire from the negative power supply terminal on the SC to our PC board where a simple Rail-to-Rail op amp circuit amplifies the voltage by a factor of 50 to 200 such that the output voltage is 1V=10A. A variable gain of 1-200 on the op-amp allows us to use a shunt wire length of about 0.5 ft to 10 ft (really no upper limit).
We also use a 10Hz low-pass filter on the output of the op-amp to smooth the square-wave current signal to a stable DC voltage.
Our PC board also has a microcontroller that measures the currents on four SCs 5 times a second to generate a "fuse trip warning" that is transmitted to the RC. The uC uses a heat model to estimate the temperature of the 30 A fuse and alerts the RC when the fuse is within 1 second of tripping. The code in the RC then watches for the warning signals (digital inputs) and shuts down the the SCs when they are close to tripping the fuses. We also have a warning on the dashboard that shows which SCs are overheating the fuses.
The uC is also used to measure two shaft speeds via the optical sensors. The speeds are compared and if one is faster than the other the analog error signal output from the uC is used by the RC to slow one motor down. This keeps our robot going straight.
But in the end, we don't know how useful these little gadgets will be in competition.
bigqueue
13-02-2002, 07:47
Originally posted by JoeJ
Low resistance shunts are also allowed in the rules. They must be in the custom circuit box and will require amplifiers to be useful.
Let me ask why you would want to add any resistance into the circuit when you can use the resistance that exists there already? (and is required by the laws of FIRST :) )
We measure the voltage drop across the small circuit breakers. If I recall they have resistance of abot 5 and 8 milliohm (for 30 and 20 amp breakers respectively), and since they are already present and required you are NOT adding any drops or power-losses to your circuit.
All you have to do is build a difference amplifier with a common-mode input voltage range that includes it's Vcc rail. (and slighltly above) All this takes is a single OPAmp and 4 resistors.
If anyone is interested, I can share our schematic for this. (in PDF format)
-Quentin
.
I am interested, can you post the pdf?
Thanks!
Tim Skloss
13-02-2002, 09:25
[QUOTE]Originally posted by bigqueue
[B]
Let me ask why you would want to add any resistance into the circuit when you can use the resistance that exists there already? (and is required by the laws of FIRST :) )
Please read my post again. We are doing essentially the same thing you are: measuring the voltage drop across an already existing component in the system (negative lead to SC). However in our design the shunt resistance will not change (wire has much better resistance stability than the circuit breaker) as much and so the calibration is much more stable. Also, we don't have to used an expensive differential instrument amplifier and the associated extra wires. The dual channel R-R op-amp from Digikey is only $1.35 and it runs two channels of current sensing. One pot, two resistors and a capacitor make up the rest of the variable-gain amplifier.
I post the hand-sketched circuit diagram.
s_alaniz
13-02-2002, 10:02
Tim Skloss,
Great design, could I add one suggestion? I know the circuit breakers are designed to trip in .1 seconds once the current reaches 40 amps, but in case of a catestropic failure it could exceed that amount for a very short time. In the unlikely event something happens we've added a 5.1 V zener to the output of our sensors as protection for the RC analog inputs.
We actually take our measurements at the outputs of the speed controller and I think our circuit works... we'll know how well as soon as they allow us time to wire the robot.
Best of luck!
Steve Alaniz
"What good is technology if you can't abuse it?" - Ted Forth
Measuring the current across the circuit breakers could be a good idea. I must give that some thought. I don't like to measure the current on the low side of the circuit because that must change the ground reference of the victor. It all depends on how much resistance is being added. If you are measuring the difference in existing wires, the is not likely to be a problem.
The rules specificially state that you cannot modify the current path to the victors with the exception of adding insignificant resistances to measure the current.
Here is what I posted in a different forum on measuring the current.
The easiest on-board current measuring system is a PCB trace in series with the power to the Victor.
1.5oz copper clad PCB has a resistance of approximately 0.7milliohms per square. 1.5oz copper is the weight of the copper you get from a custom circuit board from AP Circuits (www.apc.com).
To measure the current, you measure the voltage drop across the copper trace. TI sells the INA169 through digikey. This chip is designed to provide a ground referenced voltage (0-x volts) from a voltage across a current sensing resistor. Gain is controlled by a single resistor.
Example:
With a 1" wide by 5" long patch of 1.5 oz copper, the final resistance is 3.5milliohms.
In order to see overcurrent conditions lets set 100A=5v output.
This requires a gain resistor for the INA169 of about 14Kohm.
The little breakers open around 30Amps or when we measure 1v out of the INA169.
For those of you concerned about power/voltage loses, we measured 125mV @ 30A across the copper I described above. This equates to 3watts of power. This is approximately the same loss as 5" of the 10awg wire. If you are really concerned, use 8awg wire instead of 10awg and keep the wire lengths as short as possible. The smaller the wire, the shorter the length.
Our custom circuit box includes two of the current shunts described above on one circuit board. A second circuit board is stacked above the shunts. The second board includes the INA169's, a PIC16F877, a 4 channel digital to analog converter to send analog commands to the robot controller. A connector for the Gyro (We scale and filter the gyro data before sending it to the robot controller) Connectors for the optical sensors, and 8 digital outputs to the digital inputs on the robot controller for digital commands. All of our high speed control code runs in the PIC16F877 (100x faster than robot controller) and commands are passed through the digital and analog inputs.
Tim Skloss
13-02-2002, 10:07
[QUOTE]Originally posted by s_alaniz
[B]Tim Skloss,
Great design, could I add one suggestion? I know the circuit breakers are designed to trip in .1 seconds once the current reaches 40 amps, but in case of a catestropic failure it could exceed that amount for a very short time. In the unlikely event something happens we've added a 5.1 V zener to the output of our sensors as protection for the RC analog inputs.
We actually take our measurements at the outputs of the speed controller and I think our circuit works... we'll know how well as soon as they allow us time to wire the robot.
------------------------------
Actually, we use a 5V regulator on the PC board to power the op-amp. This accomplishes the same thing. Besides, the uC that we feed the current signal into has built-in zeners.
Good comment! Always good to be safe!
s_alaniz
13-02-2002, 10:17
Tim oops! Just re-read you're first post. I guess you're not using the analog inputs the same way we are. never mind! Quick question, do you use two or four opticals for phase/direction of your drive shafts? (I assume you're not using "tank" drive since constant motor speed would prevent you from turning.)
Last question, HOW did you get your team to STOP rebuilding and give you time to put all this stuff on the robot? We're STILL waiting for them to give us time to wire up the electronics (Oh we need electronics? Sure there's a 6 inch square section we left for you. How long do you need it for? We can give you 30 minutes....I HOPE you chasis guys are reading this!!!!!) Sorry I digress.
Best wishes
Steve Alaniz
"You're saying we can look forward to robots behaving badly and demanding higher salaries..." - Sally Forth
Tim Skloss
13-02-2002, 10:30
[QUOTE]Originally posted by s_alaniz
[B]Tim oops! Just re-read you're first post. I guess you're not using the analog inputs the same way we are. never mind! Quick question, do you use two or four opticals for phase/direction of your drive shafts? (I assume you're not using "tank" drive since constant motor speed would prevent you from turning.)
Last question, HOW did you get your team to STOP rebuilding and give you time to put all this stuff on the robot? We're STILL waiting for them to give us time to wire up the electronics (Oh we need electronics? Sure there's a 6 inch square section we left for you. How long do you need it for? We can give you 30 minutes....I HOPE you chasis guys are reading this!!!!!) Sorry I digress.
-------------------------
Yes, we are using 1-stick tank drive. The shaft-sync is only used when the RC knows it's supposed to be going straight (x-axis at neutral).
The SC currents are being read by an on-board microcontroller that has analog inputs. The uC runs a heat model to predict when the fuses will trip. We tested each fuse and found some fuses to take TWICE as long to trip--these are now on our tank drive drill motors. Even at 100 amps of current, the fuses took about 0.5 to 1 second to trip. The RC can respond faster than that to stop the excessive current by shutting down the SC and sounding an alarm on the dashboard. The alarm resets when the control input is relaxed.
Our robot is in modular sections that can be easily removed for modification by the special functions' teams. Right now we have a bare chassis and drive train (plus all controls and pneumatics) that is used for driver training while the grabber and ball collector teams are finishing their sections.
I feel your pain... what I would give for just 5 extra more pounds of weight limit!!!
bigqueue
13-02-2002, 10:35
Originally posted by s_alaniz
Last question, HOW did you get your team to STOP rebuilding and give you time to put all this stuff on the robot?
Well, we just held back the controls and didn't give them a "real" way to power/control their motors. When left with just shorting them across the batteries, they understood the "power" we had over them...and they gave us a little respect. (and time :D )
Actually, it is tough...and you are NOT along in this problem..
-Quentin
junkyarddawg
14-02-2002, 15:34
We decided we did not have the time and people to properlly develop these devices for this competition, but we will continue to work on them and post the results for next years competition. I had originally abandoned the idea of shunts because of FIRST's tight control on wiring safety. We decided that we would run one wire from each of our four drive motors through the project box and use the resistance in 5" of the #10 conductor. It then occured to us that extending wires out of the project box did not violate the rules. Therfore, we could use the entire length of the black conductor from each motor speed controller and apply the 0-5vdc (0-100Amps) against thermal models on the 30Amp thermals and collectively against the 60 amp main breaker. We are thniking of applying the 0-5vdc directly to an RC circuit for the thermal model. We are open to suggestions. We have less than half of the technical people we had last year, so we are short on the most important resources, people. We have also not recieved any of the materials from Small Parts that we really needed.
bigqueue
14-02-2002, 15:39
Originally posted by junkyarddawg
We decided we did not have the time and people to properlly develop these devices for this competition, but we will continue to work on them and post the results for next years competition. I had originally abandoned the idea of shunts because of FIRST's tight control on wiring safety. We decided that we would run one wire from each of our four drive motors through the project box and use the resistance in 5" of the #10 conductor. It then occured to us that extending wires out of the project box did not violate the rules. Therfore, we could use the entire length of the black conductor from each motor speed controller and apply the 0-5vdc (0-100Amps) against thermal models on the 30Amp thermals and collectively against the 60 amp main breaker. We are thniking of applying the 0-5vdc directly to an RC circuit for the thermal model. We are open to suggestions. We have less than half of the technical people we had last year, so we are short on the most important resources, people. We have also not recieved any of the materials from Small Parts that we really needed.
Well, you might try measuring across the breaker itself. We do it, and it works real nice.....and it makes the wiring nice and short. (you do have to build a "Y" connection at one end of the breaker though....but this is no big deal)
-Quentin
Tim Skloss
14-02-2002, 15:48
Originally posted by junkyarddawg
It then occured to us that extending wires out of the project box did not violate the rules. Therfore, we could use the entire length of the black conductor from each motor speed controller and apply the 0-5vdc (0-100Amps) against thermal models on the 30Amp thermals and collectively against the 60 amp main breaker.
-----------------------
That's what we do. It only requires one wire and can be screwed using a ring terminal directly on the SC.
I have attached the C code we use in our PIC uController. Feel free to use it for ideas. If you would like to use uCs in future applications, I reccommend CCSInfo (www.ccsinfo.com). They have a great C compiler for PICs that is very easy to use. You can get their hobby kit for $189 that includes the compiler, manuals and a very high quality chip programmer. I have used it for 2 years to make imbedded controllers for all kinds of projects.
bigqueue
14-02-2002, 23:38
Originally posted by Tim Skloss
[QUOTE]Originally posted by bigqueue
[B]
Let me ask why you would want to add any resistance into the circuit when you can use the resistance that exists there already? (and is required by the laws of FIRST :) )
Please read my post again. We are doing essentially the same thing you are: measuring the voltage drop across an already existing component in the system (negative lead to SC). However in our design the shunt resistance will not change (wire has much better resistance stability than the circuit breaker) as much and so the calibration is much more stable. Also, we don't have to used an expensive differential instrument amplifier and the associated extra wires. The dual channel R-R op-amp from Digikey is only $1.35 and it runs two channels of current sensing. One pot, two resistors and a capacitor make up the rest of the variable-gain amplifier.
I post the hand-sketched circuit diagram.
I don't use any sort of expensive amplifier....it is a fairly run of the mill opamp made into a difference amplifier using 4 resistors.
The only tricky thing is choosing an opamp which will sense up near its rails....and that isn't really needed given the resostor dividers.
The old CA3130 works fine.....but Digikey stopped selling it, so I had to go with a newer National device.
I will upload the schematic when I get home.
No pots, no calibration.....(accurate enough for the stuff we are doing here with FIRST)
-Quentin
s_alaniz
14-02-2002, 23:46
OK, Finally figured out how to post this. This is our scheme for current sensing. we were able to "calibrate" our wires since the Maxim chip gives us a very accurate way of calculating backwards. We havn't actually tested it on the robot but we were able to get very good readings from last years robot's arm. I think a .22uf cap would have been a better choice but in the end we're getting more information than we need. We'll know tomorrow just how good this works. We're monitoring 6 motors and using the Analog inputs on the RC.
I hope to have our PC etching process laid out on our WP soon... (if you want to see a picture of Dean Kamen in his cowboy hat, check our site! http://www.leopards57.com/)
Best Wishes
Steve Alaniz
"Yeah those robots are cool, but if you can't play Nintendo on them, what good are they?" - Hilary Forth
bigqueue
15-02-2002, 09:12
I am attaching a PDF file of the schematics for our Motor Monitor (current monitor) circuit. This circuit simply measures the voltage across the circuit breakers with a simple one OP-AMP difference amplifier, amplifies (and filters) it and then sends it to the robot controller A/D analog input port.
We mounted the FIRST circuit breaker terminal block to the top of our custom circuit box, and this makes the wiring very short and easy to manage. (and since we are fighting the weight problem right now :( , all the weight we can save helps! :) )
Please feel free to use this, but please try to give team 811 credit if you find it useful. (NOTE: We also have a PCB file made for this and will share it if you would like.....and being made at ExpressPCB, it is inexpensive at $59.00 for three PCB fabs)
Enjoy, :)
-Quentin
Could you please post the PCB files as well? Oh yeah I'm not sure which types of capacitors and resitors to use so i would also apreciate if you guys could post the part numbers....
Thanks!
Eugene
bigqueue
25-02-2002, 23:02
Originally posted by Eugene
Could you please post the PCB files as well? Oh yeah I'm not sure which types of capacitors and resitors to use so i would also apreciate if you guys could post the part numbers....
Thanks!
Eugene
Ok...here you go. This is a ZIP file with schematics (PDF and Orcad file), ExpressPCB file and Bill of Materials (generally with Digikey Part numbers)
In order to use the ExpressPCB file, you will have to go to www.expresspcb.com and download the free design software.
Have fun!
-Quentin
PS: The Bill of Materials is for the entire custom circuit box, so it includes things like fuses, terminal blocks and the box itself that are NOT on the board!
Thanks Quentin!
Guys like you are what FIRST is all about, if it was not for you i would not have been able to include this component on our robot... I will be sure to mention 811 to judges!!!
Thanks!
Eugene
bigqueue
26-02-2002, 08:57
Originally posted by Eugene
Thanks Quentin!
Guys like you are what FIRST is all about, if it was not for you i would not have been able to include this component on our robot... I will be sure to mention 811 to judges!!!
Thanks!
Eugene
This is but the hardware which is of little use without the code that uses it.
BTW: This is nothing fantastic about what is done here. It is a simple op-amp circuit that is pretty basic in nature. In fact, most of the FIRST robots are the same....we are not talking about inventing such fantastic stuff....after all,the entire purpose of FIRST is to learn and encourage an interest in technology.
These circuits described in this and most theads are very basic....and if they could be copied given the simple tect description of what they do....no rocket science.
So, I hope that others will take this and at least learn of another way to go off and make PCBs....or become interested enought to learn more about OPAMPS.....or difference amplifiers....etc....
s_alaniz
26-02-2002, 09:53
OK This is our FINAL design. In application, it worked beautifully and told us a few things about our motors we were surprized to learn. We wanted a positive output in both directions. In other words, we get the full 0-5 v range for forward and the same 0-5 volt range for reverse. We wanted to have the maximum number of increments for accuracy. We were concerned with current magnitude and since we can determine direction by the joystick position number, this made most sense to us. (It's like the gas gauge, and tachometer in a car which both give positive readings regardless of your direction.) we also felt this would be less confusing to an operator who might only glance at the dashboard display (and simply the programming.)
Best of luck at Regionals and Nationals!
Steve Alaniz
"What good is technology if you can't abuse it?" - Ted Forth
ECarlson
26-02-2002, 10:15
Originally posted by s_alaniz
OK This is our FINAL design. In application, it worked beautifully and told us a few things about our motors we were surprized to learn.
Okay, now I'm curious. What things did you learn that were surprising?
s_alaniz
26-02-2002, 11:09
ECarlson,
Um Surprizing... well, even though we correctly geared our motors for speed and coupled FP, Drill and Chipawauh motors together, and they did a great job pulling... However, UNLOADED, the Chipawauhs sat back and let the drill and Fisher Price do the lions share of the work (something to do with the power curves..). So we had four motors sucking almost the full 30 amps apiece, heating up like crazy and draining the battery in about 2 minutes with no reserve for pushing against an opposing robot. We fixed it and actually decided the FP were inefficient so we deleted them from the drive. (If it were just the drill motor and the FP there wouldn't have been this issue) It was a trade off but in a game where battery drain is probably playing a major role in success, it makes all kinds of sense.
Best Of Luck !
Steve Alaniz
"You're saying we can look forward to robots demanding higher salaries and behaving badly." - Sally Forth
I'm using your scematics for the current monitorin circuit and I was wondering if you could answer some of my questions.
1. The orginal PDF file you posted his dated Feb 10th, but he file in the ZIP is dated January 28, the only difference between them is the fact that resistor that goes from the amp into the analog input is 2.2K instead of 100K, which one is better to use?
2. In your PCB file there is a stray trace and i'm not sure if it is intended to be there or it was just a stray trace. (See attached file, the trace i'm talking about is enourmously englarged, oh yes i had to change the file extension to ZIP from PCB to get this file attached, this is NOT a zip file, to open it change the extension back to PCB)
3. In that PCB file I was unable to find the spot to solder the 0.1uF capcitor that goes between the ground and +12V. Did u guys use that capacitor in your final design or I'm just blind?
4. According to your scematic for connecing this the +12V Fused and the positive input can all be combined into one pin in the connector. I was wondering if there was any reason why you guys did not do that?
5. I'm curius what are those other files in your ZIP file, i could not recognise any of those extensions
6. The programmer had asked me if I could make the circuit board more sencetive by changing its range to 0-50Amps or something, i was wondering if there was any reason why this should not be done. As far as i undersand this can be done by increasint the resistance betweent he negative and the positive input.
7. Did u guys have any problems with this design so far?
Thanks a lot!
Eugene
Team #920
bigqueue
27-02-2002, 11:25
Originally posted by Eugene
I'm using your scematics for the current monitorin circuit and I was wondering if you could answer some of my questions.
1. The orginal PDF file you posted his dated Feb 10th, but he file in the ZIP is dated January 28, the only difference between them is the fact that resistor that goes from the amp into the analog input is 2.2K instead of 100K, which one is better to use?
2. In your PCB file there is a stray trace and i'm not sure if it is intended to be there or it was just a stray trace. (See attached file, the trace i'm talking about is enourmously englarged, oh yes i had to change the file extension to ZIP from PCB to get this file attached, this is NOT a zip file, to open it change the extension back to PCB)
3. In that PCB file I was unable to find the spot to solder the 0.1uF capcitor that goes between the ground and +12V. Did u guys use that capacitor in your final design or I'm just blind?
4. According to your scematic for connecing this the +12V Fused and the positive input can all be combined into one pin in the connector. I was wondering if there was any reason why you guys did not do that?
5. I'm curius what are those other files in your ZIP file, i could not recognise any of those extensions
6. The programmer had asked me if I could make the circuit board more sencetive by changing its range to 0-50Amps or something, i was wondering if there was any reason why this should not be done. As far as i undersand this can be done by increasint the resistance betweent he negative and the positive input.
7. Did u guys have any problems with this design so far?
Thanks a lot!
Eugene
Team #920
1) The change from 100K to 2.2K was made because of the large error at high output voltage levels caused by the zener beginning to break down. The R-C at the output is there to filter the PWM spikes that make it through the amplifier....but when the amplifier output starts to approach the zener voltage (say 4.5V or more), the diode begins to conduct and you end up with a large error. The problem could be resolved by removing the zener, or lowering the resistor value....and I chose the latter. I was told that the A/D input was protected with internal diodes, and with a 100K source impedance, it was going to be fine....but I don;t have a spec on the A/D input, and I didn't want to trust that data. (even though it came from a Microchip Engineer on this forum) I could have also moved the filter into the amplidier itself, but that is better fixed in rev 2.0 because the board was already completed at that point..
2) I forgot about the stray trace...you are correct, this is an error, and was incorrectly dropped on my board. It can be quickly removed, or simply cut with an exacto-knife. (sorry for leaving it there)
3) The bypass caps are actually surface mount on the bottom of the board. If I remember, I think they are 1206 body sizes.....anyways, they are simply pads between the 12v and GND traces directly below the amplifier.
4) According to the rules, all connections must be made after the circuit breakers.....so there really is no way to directly measure the node between the 60A breaker and any opf the secondary breaker....at least I worried that the rules could be considered this way....so I simply took the + measurements from the same point as we powered the circuit. Since our circuit draws milliamps though a 8 milliohm breaker, the drop will me negligible....and ALL connections are safely behind breakers.
Also, I was anal about how first was going to consider the problem of our using a D connector since all connections are supposed to be made to power points with at least 16 AWG wire.. (in hind sight, i would have made solder points or another connector that accepted larger wires) Since this was already done, we simply added a two terminal blocks inside the box and connected the board to one, and the 16 AWG wires to the measurement points (circuit breakers) on the other....then we built jumpers between the two out of small leaded fuses....yes, these were the suspenders in a belt and suspenders solution....but I didn't want any question of safety to come up that caused the circuit to be disqualified. Again, in hindsight, I should NOT have used the D-connector, and simply used something that took 16 AWG wires directly.....save that for Rev 2.0
5) Yes, the range can be changed easily as the gain is set by the two pairs of resistors. (I don't have the schematic handy) But there are four resistors all together, with two pair having the same value....I think the gain is outlined in a formular on the first page....it is basically a difference amplifier....you need to set-up 4 resistors to set the gain. (Again, I forget the current values and refernence designators)
6) I think I discussed the problems we found above. Premature zener breakdown causing small error at full scale, hindsight use of D-Connector, extra "shorting" wire on layout.
I guess I would have fixed some of the problems differently if I were doing this again....for example, I would simply move the filter into the amplifier circuit itself and have a lower output impendance to the A/D inputs. (our cable lengths are short between amp outputs and A/D inputs, so noise pick-up is NOT a problem for us now....but if you had to drive it around the other end of your robot for some reason, it might be an issue.
Ditto for ground points.....we actually take our reference point from the A/D input connector (if i recall). This might be an issue if it ends up at the end of a huge cable.....but in our case, everything is short and sweet and it all works pretty well.
I hope this helps in some way,
-Quentin
Thank you so much for this comprehencive reply!
I Will Proboly Make my own PCB design and upload it here as soon as possible.
Eugene
ECarlson
27-02-2002, 23:50
I am really intrigued with the idea of being able to display the current of each motor.
With all the information provided here, I shouldn't have any problem building the electronics.
I also wouldn't have a problem with the robot controller code.
What I will have a problem with is displaying the output from the dashboard port.
Has anyone written a versatile, customizeable dashboard port display program (for DOS, Windows, or Palm-III) that they are willing to share?
bigqueue
28-02-2002, 00:25
Originally posted by ECarlson
I am really intrigued with the idea of being able to display the current of each motor.
With all the information provided here, I shouldn't have any problem building the electronics.
I also wouldn't have a problem with the robot controller code.
What I will have a problem with is displaying the output from the dashboard port.
Has anyone written a versatile, customizeable dashboard port display program (for DOS, Windows, or Palm-III) that they are willing to share?
I believe we have actually released the source of our Dashboard under an open source licence. I will check that out and try to post it.
Steve Bunning
08-03-2002, 11:32
I wrote a detailed description of a DC Current to Analog Input circuit we constructed based around a Hall Effect sensor available from Digi-Key. Its pretty simple to build and provides current readings to an Analog Input using a single electronic component.
The paper is too large to post as an attachement (629KB) , but here is a link to where you can pick up a copy.
Robot Current Monitor Paper (http://www.mildlyeccentric.com/first)
s_alaniz
08-03-2002, 11:43
Hey Steve,
I read through your paper. Great study! Thanks for sharing it. I looked up the transducer in digikey.... it was $35 a unit! Pricey little device, but with the information you provided, I'll bet there's a really clever application for this circuit!
Thanks!
Steve Alaniz
"What good is technology if you can't abuse it?" - Ted Forth
Steve Bunning
08-03-2002, 11:54
If you check the price of the Hall Effect transducer on-line, it has dropped quite a bit to $19.20 in single quantities.
ECarlson
17-03-2002, 15:46
Originally posted by bigqueue
I believe we have actually released the source of our Dashboard under an open source licence. I will check that out and try to post it.
What did you find out?
ECarlson
26-03-2002, 20:54
Originally posted by Steve Bunning
I wrote a detailed description of a DC Current to Analog Input circuit we constructed based around a Hall Effect sensor available from Digi-Key.
Thanks. I bought 4 current sensors from DigiKey, and they appear to work nicely.
To see how they worked, we took two of them and put one on each of the drive motors in last years robot, and used GreenDice's Dashboard Monitor 1.3 to view and log the output.
I haven't had a chance to plot the logged output yet, but will do that soon.
Hopefully, next year, FIRST will allow us to mount current sensors without having to put them inside a project box. On this year's robot, it would be difficult to route the wires for our four drive motors through a project box.
I'd also like to mount a drivetrain speed sensor on each side of our robot. Any suggestions on how to measure relative speed?
The two ideas I had were: 1. use a small motor to generate a voltage relative to speed, 2. use an optical sensor and a rotating disk with an alternating black and white pattern and convert the pulse rate into an analog voltage.
I like idea #2, but it requires circuitry to convert the pulses rate to an analog voltage.
Dave Flowerday
26-03-2002, 21:07
Hey guys,
I just posted a writeup of our current sensing circuit in the Technical Discussion forum. We avoided running the motor power lines through the sensing box by using 1 foot of the #10 wire as a resistor. Then we just used some sense leads from the #10 to the project box.
ECarlson
26-03-2002, 21:43
Originally posted by Dave Flowerday
Hey guys,
I just posted a writeup of our current sensing circuit in the Technical Discussion forum. We avoided running the motor power lines through the sensing box by using 1 foot of the #10 wire as a resistor. Then we just used some sense leads from the #10 to the project box.
The cool thing about the hall-effect current sensors from DigiKey is that there isn't any additional circuitry. They connect directly to the Analog inputs.
Dave Flowerday
26-03-2002, 21:52
The MAX4172s that we use could also go right to the robot controller if we wanted. We just wanted the ability to do some real processing at the robot end.
ECarlson
28-03-2002, 16:10
Here are our results using the http://www.lemusa.com/ current sensors from Digikey on our old robot, which has 2 drive motors. (The current sensor is pictures in the center of their main page, standing on the triangle.)
I had to average each reading with it's nearest 4 neighbors to smooth out the graph.
The values for amps are only an estimate since we haven't calibrated the readings yet.
http://www.invisiblerobot.com/robotics/robot-miscs/ed_2_current-01.gif
bigqueue
28-03-2002, 16:39
Originally posted by ECarlson
Here are our results using the http://www.lemusa.com/ current sensors from Digikey on our old robot, which has 2 drive motors. (The current sensor is pictures in the center of their main page, standing on the triangle.)
I had to average each reading with it's nearest 4 neighbors to smooth out the graph.
The values for amps are only an estimate since we haven't calibrated the readings yet.
http://www.invisiblerobot.com/robotics/robot-miscs/ed_2_current-01.gif
Fantastic results! One question....what is the X-Axis time scale for those readings? (Seconds, milliseconds, etc...?) Is the total time shown over a two minute round, or are you saying the current varies that much over a short time?
Do you see the chopping (PWM) variations, and can you perhaps just filter them out with an R/C filter?
We filtered these out/down on our current measuring circuit.
Just a thought/question,
-Quentin
ECarlson
28-03-2002, 17:00
Originally posted by bigqueue
Fantastic results! One question....what is the X-Axis time scale for those readings? (Seconds, milliseconds, etc...?) Is the total time shown over a two minute round, or are you saying the current varies that much over a short time?
Do you see the chopping (PWM) variations, and can you perhaps just filter them out with an R/C filter?
We filtered these out/down on our current measuring circuit.
Just a thought/question,
-Quentin
The timeframe was somewhere around two minutes, but it was just random driving around. I didn't time it, since my only goal was to get some data to plot. We'll run some more controlled tests later.
Each tick represents one log entry on the Dashboard 1.3 program. I don't know how much time that is per tick.
Yes, an RC filter would be good to smooth out the PWM pulses. Any suggestions for RC circuit values between the current sensors and the analog inputs?
I suppose if the output impedence of the sensor and the input impedence of the analog inputs were appropriate, I would only need a capacitor.
Al Skierkiewicz
01-04-2002, 23:17
ECarlson,
Dave Flowerday and I have already written on our use of the Stangsense circuitry in the electrical forum. One of the big advantages we have in A/D in the circuit is the ability to integrate the results and multiplex up to eight motors into one stream. Additionally, the use of current monitor on the input of the speed controller is unipolar (only flowing in one direction) and measures the exact load presented to the circuit breaker.
In either case you can see from your data (even after averaging) that instantaneous currents are pretty high. We can easily see from the graph you posted when you turned obviously using tank drive (one motor turning in the opposite direction of the other motor.) and more interesting is the higher current being drawn by the "blue" motor. If you were driving straight I would look to a tight transmission on that side or a misaligned wheel. Have you tried plotting the battery voltage against the currents yet?
Good Luck,
ECarlson
02-04-2002, 11:02
Originally posted by Al Skierkiewicz
We can easily see from the graph you posted when you turned obviously using tank drive (one motor turning in the opposite direction of the other motor.) and more interesting is the higher current being drawn by the "blue" motor. If you were driving straight I would look to a tight transmission on that side or a misaligned wheel. Have you tried plotting the battery voltage against the currents yet?
Thanks for the reply. I have the battery readings, but I have not yet plotted them.
We also need to do some test under more controlled conditions to really see what is going on with our old robot.
kmcclary
04-04-2002, 15:53
Originally posted by bigqueue
I am attaching a PDF file of the schematics for our Motor Monitor (current monitor) circuit. This circuit simply measures the voltage across the circuit breakers with a simple one OP-AMP difference amplifier, amplifies (and filters) it and then sends it to the robot controller A/D analog input port. {Attachment: motor_monitor.pdf}
Enjoy, :)
-Quentin Nice job, Quentin! A real KISS solution.
A couple of questions for you:
1) Your equation on the first page of the PDF says: [Vout = (V1-V2)*R1/R2]. I think that R1 and R2 are backwards in that equation. Shouldn't that be: [Vout = (V1-V2)*R2/R1] ??? (100K / 12.1K ~= 8.26)
2) Page 3 shows you are taking MxV+, and the power for the CC off of the same breaker CB1. I know you have bypass caps (C3, C4, C7, C8, C11, C12, & C14), and the CC doesn't use much power, but there are still common mode transient loads from line driving the wiring between the CC and the RC.
Assuming you have the spare breakers, wouldn't it be cleaner to simply use 2 breakers, one for "+12v_FUSED" to power the CC, and a second one as the MxV+ "common high side sniffing probe", or did you find the difference too small to worry about?
BTW... Everyone: make sure you don't add any other loads to CB1, especially motors! They'll mess up your data.
- Keith
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.