Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   DC Motor current to an Analog Input (http://www.chiefdelphi.com/forums/showthread.php?t=2205)

bigqueue 14-02-2002 23:38

Re: Re: Use the FUSES themselves as measurement shunts!
 
[quote]Originally posted by Tim Skloss
[b]
Quote:

Originally posted by bigqueue


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

Our Current sense circuit
 
1 Attachment(s)
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

Here are our Motor Monitor Schematics
 
1 Attachment(s)
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

Eugene 25-02-2002 21:17

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

1 Attachment(s)
Quote:

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!

Eugene 25-02-2002 23:27

Thanks Quentin!
 
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

Re: Thanks Quentin!
 
Quote:

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

Final Design (Finally)
 
1 Attachment(s)
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

Re: Final Design (Finally)
 
Quote:

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

Surprising..um...
 
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

Eugene 27-02-2002 10:16

Question to Quentin.
 
1 Attachment(s)
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

Re: Question to Quentin.
 
Quote:

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

Eugene 27-02-2002 16:38

Thanks 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

Display Software?
 
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

Re: Display Software?
 
Quote:

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.


All times are GMT -5. The time now is 23:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi