go_away

Author Topic: sense and limit current  (Read 656 times)

0 Members and 1 Guest are viewing this topic.

Offline madchimpTopic starter

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
sense and limit current
« on: May 22, 2013, 04:47:36 PM »
Ok so my wife and I will be participating in maker fair Detroit, showing our model rockets. We have several new rockets in the works. Where I need help is the custom launch controller I want to build. The features we want are a five second forced count down, wired so a rocket cant be launched even if the micro controller gives the command without a keyed switch arming it, audible beep at each second of count down, lcd screen to show errors and countdown, able to tell a camera to take a burst of pictures each rocket launched, read the resistance of the igniter to determine which type and check for shorts or open circuits, and maybe measure current used to fire the rocket and limit it. I plan on using an arduino uno for the brains, a 19.2 volt lipo battery from my cordless drill, probably a rgb backlit lcd, misc buttons and switches, a relay to fire the rocket, 12v regulator. I plan on using the 5v from the arduino for the lcd the 12v for the camera remote and relays. I've figured out how to control the camera remote with the arduino and control the relay and read the misc buttons. Where I'm stuck right now is figuring out how to determine which igniter or check for shorts or open circuts and read the current used for launch and possibly limit it. I have considered just a high watt resistor to limit it but different ignitors require different amounts of current. one igniter says maximum no fire current is 500mA and minimum all fire current is 2A and resistance is .6904ohm the other igniter says maximum no fire current is 1.25A minimum all fire current is 3.8A and the resistance is 1.6ohms. I am also a little lost on generating the audible beep as far as what hardware would work. Well if you made it this far thanks and hope you can help.  :) If I left out important info please ask.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: sense and limit current
« Reply #1 on: May 22, 2013, 06:49:22 PM »
You probably want an operational amplifier (opamp) like the MCP601 connected to the two ends of the igniter, with the igniter being tied to ground.
Provide 5V out from an Arduino pin through a small signal diode, to a current limiting resistor (470 Ohm, say) to the igniter circuit.
The opamp has "+" on the output end of the resistor. Set the feedback resistors for 200x amplification. IIRC, this means 199 kOhm between out and - pin, and 1 kOhm between - pin and ground. Connect firing resistor ground and opamp ground together.
Now, the output of the opamp will be on the order of 1.4 Volts for the small igniter, and 3.2 Volts for the bigger one. You can easily sense this with an analog in on the Arduino, while providing 5V on the digital output pin.
If you get something over 4V (really, close to 5V,) then you know the circuit is open (no igniter present).
If you get something under 0.8V (really, close to 0V,) then you know the circuit is short.
The diode is there to protect the pin when you supply the 19V.

To make sound, hook up a buzzer of some sort. Radio Shack has a 5V capable buzzer that draws 30 mA or less, which you can drive directly from a digital out.
Or you can use an "analog" (PWM) output hooked to a transistor that drives a speaker. Or a cheap computer/ipod power amplifier through a 4:1 resistor divider (line in is about 1V p-p.) So, PWM out -> 4.7 kOhm resistor, tap this to tip of 3.5mm plug as well as 1 kOhm resistor to ground, connect ring of 3.5mm plug to same ground.

To control current, you need to modulate the output of the battery with PWM, and filter it with a large capacitor, to get the appropriate voltage. Or you can assume that anything above 4A is fine, and just plug the battery straight in. That will draw > 20A for the little one, so hopefully that will not kill it.
To modulate the voltage with PWM, you can't use a relay; instead, use a motor controller rated for sufficient amps and volts. The Pololu VNH5019 driver might do the trick: http://www.pololu.com/catalog/product/1451
Or, if you like margins of safety, this: http://www.pololu.com/catalog/product/1457

Note that the bigger Pololu board also has a current sensor you can use to measure the current, if you want to dynamically adjust the duty cycle.

For double safety, use the relay to disconnect the battery from the motor controller VMot in. So, the firing sequence would be:
1) Set appropriate PWM duty cycle on motor controller (connected to an "analog" PWM out)
2) initiate the countdown
3) when ready, turn on the relay so the motor controller gets voltage

Also, note that the relay coil probably is too heavy for the Arduino to drive directly (at most 30 mA or so per digital pin!) Instead, you may need a transistor to drive the coil. I recommend a 2N7000 / BS170. Hook Source to ground, Drain to coil, Gate to the digital output of the Arduino, and top of coil to coil voltage (5 or 12 V?)
« Last Edit: May 22, 2013, 06:55:22 PM by jwatte »

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 243
  • Helpful? 12
Re: sense and limit current
« Reply #2 on: May 22, 2013, 08:05:01 PM »
I've never seen a need to limit the current to the ignitor when you want to fire. I've even seen people build capacitive discharge launchers that give a pretty good kick when you trigger it.

I like the op amp as described above.
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline madchimpTopic starter

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
Re: sense and limit current
« Reply #3 on: May 27, 2013, 08:23:05 PM »
Thanks for the replies. I' ve been looking and doing some reading. I was considering the op amp but not completely following how to wire it all up. I was also thinking with that I could just use a mosfet to be able to control the current to the igniter. But I think the motor driver would be less of a learning curve and I'm a little limited on time since I only have a couple months and I work a lot of hours. I was looking at this http://www.pololu.com/catalog/product/1451. With the linked motor driver I should be able to control two launch pads? I was also thinking I should be able to use the motor controller to check the igniter by running a low duty cycle pwm and use the motor drivers current sense. The main reason I would like to limit the current is to save on battery and I read on a rocketry forum that with a 24v system they had more misfires than 12v systems.

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 243
  • Helpful? 12
Re: sense and limit current
« Reply #4 on: May 28, 2013, 11:11:20 AM »
Thanks for the replies. I' ve been looking and doing some reading. I was considering the op amp but not completely following how to wire it all up. I was also thinking with that I could just use a mosfet to be able to control the current to the igniter. But I think the motor driver would be less of a learning curve and I'm a little limited on time since I only have a couple months and I work a lot of hours. I was looking at this http://www.pololu.com/catalog/product/1451. With the linked motor driver I should be able to control two launch pads? I was also thinking I should be able to use the motor controller to check the igniter by running a low duty cycle pwm and use the motor drivers current sense. The main reason I would like to limit the current is to save on battery and I read on a rocketry forum that with a 24v system they had more misfires than 12v systems.


You could use the motor driver, a bit of overkill, and you would have to be somewhat clever in the way you use it to get it to control two independant pads, but I suspect it could be made to work.

PWM stikes me as a bad idea because you will be delivering the full current during the on phase  and are counting on the pulse being short enough that the ignitor won't pop - you would have to make the pulse very short and repeatable to get it to work at all.

I'm surprised to hear of more misfires with 24 volts compared to 12.
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: sense and limit current
« Reply #5 on: May 28, 2013, 11:41:11 AM »
You are not going to get two independent drives out of a single H-bridge. You won't be able to separately vary the duty cycle, and you're either not going to be able to fire both at the same time, or you aren't going to be able to only fire one at a time.
I recommend a dual driver carrier board if you want something robust:
http://www.pololu.com/catalog/product/2502
http://www.pololu.com/catalog/product/707
I use the latter one for the two airsoft guns on my walking robot, and it works well. Note that the version with the current sense built in (VNH2) is only rated for 16V.
Another option is to get two of the carrier you initially suggested! It's certainly the easiest way to trade a few dollars for available time.

Here's the circuit diagram for building it out of discrete parts with an opamp instead. Note that the ripple current for the capacitors may be significant!



« Last Edit: May 28, 2013, 11:55:10 AM by jwatte »

 


Get Your Ad Here

data_list