![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I'm just kind of thinking out loud here, but is it possible to use a 16F88 to sense the current of a small motor like this: http://www.goldmine-elec-products.co...p?number=G2110 Presuming the load resulted in something no greater than 1/2 an amp, could I use the 16F88 to cut the power to the motor when the current goes above that? Somehow I know the obvious answer is yes, but I'm just trying to figure out the best way to do that. I'm not looking for any code, or even schematics, but if you think it'd be helpful, by all means I'll take a look. Even just a description of the best way to do this would be great. Powering the motor with the PIC I'm okay with, I'm just looking for the best way to sense the current, so any tips would be greatly appreciated! | |
| |
| | (permalink) |
| This is how a lot of the modern stepper motor controllers do it. Check out some of the stepper controllers at Allegro - they have some great docs on how it works. They use a sense resistor in series on the ground side of the coils. This is used to feed a comparator and the comparator output enables the MOSFET drivers. When the current reaches a pre-set level the comparator turns off and cuts the MOSFET driver(s). This way, you can drive a motor at a much higher voltage than it's rated for. I'm not sure you would want to use the comparator in the PIC, depending on it's speed. You could use a digital pot to control the ref input of the comparator. A cruder way to do this is to calculate the pulse width needed to drive at a higher voltage. Then code that into you PIC program. Instead of varying the PWM duty cycle, you keep the pulse width constant and vary the PWM frequency. I suppose you could use the ADC to determine the supply voltage and compute pulse width from that. Hmmm, that might actually work pretty well. You might also be able to use the ADC to measure current but that's going to be a bit trickier - worth a closer look though. Last edited by philba; 1st October 2007 at 07:11 PM. | |
| |
| | (permalink) |
| Sense resistors are often called shunts because they're just really low value resistors. Often you have to pass the 'output' of a shunt through an opamp to get it to a high enough level to measure. Most shunts are valued in order to provide 200mv's or so of signal at it's full rated load to reduce wasted power. A lot of cheap charge circuits and feedback circuits where power dissipation isn't critical use 1ohm shunts, but it depends greatly on the total resistance of the circuit.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| As long as you are running the motor at its specified voltage, it should not go past its safe current rating. Why exactly would you need to measure this? In a stalled motor situation? In any case, these are low power motors and you might be able to get away with using a 1% 1ohm resistor and an op-amp to amplify the voltage across it, as Sceadwian mentioned. You could use a pnp transistor and a PIC output(low to activate transistor) to turn the motor on or off, and the A/D converter for the voltage from the op-amp. Last edited by Ambient; 3rd October 2007 at 02:15 AM. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
Motor current depends on external mechanical loading. If one overloads the motor, then motor current increases. The motor itself will not limit its operating current.
__________________ L.Chung | ||
| |
| | (permalink) |
| Hi Hank, for protect and verify any current in my applications like motors or other loads, i used a very smart component: VN610SP (manufacturer ST) Advantages is a current mirror accessible in the status pin, so you can measured with accuracy the consomption and detect any default like load disconnect or short circuit. It's an high side Mos driver, very easy to connect at any µC. It works well up to 42V and accept until 45Amps, package is SOPOWER-10, no cooler needed just PCB copper for I>10A (Rds(on)=0.01), price is 5.47$ for 1 item at digikey by example. Only 2 resistors around this and your application will be very robust, and quickly protect. Try it and you elect it. Good luck. Last edited by POWERMAN; 3rd October 2007 at 01:38 PM. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
the second approach was an attempt to eliminate the comparators and just use the micro. | ||
| |
| | (permalink) |
| Thanks for all the advice. The idea was to sense the current for the purpose of being able to cut the power to the motor whenever the motor stalled. That presumes that the only time the current spikes, the motor is stalled, which seems reasonable, I think. With that being (to my mind, at least) a most practical thing to want to do, I guess I thought the solution would be more obvious. I'm going to have to think about the options for a bit, but keep those tips coming! | |
| |
| | (permalink) | |
| Quote:
Yes, that would be much simpler but the controller has to be aware that something's wrong and take appropriate action as well. | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| High ADC sampling rate PIC, 18F needed? | bananasiong | Micro Controllers | 24 | 28th October 2007 01:13 PM |
| Can i make an Intelligent Switch by using PIC 16F84A | rukshankb | Micro Controllers | 3 | 22nd September 2007 04:58 PM |
| PIC Timing | baberjaved | Micro Controllers | 10 | 21st September 2007 02:06 AM |
| Four PIC with One LCD.. | meera83 | Micro Controllers | 13 | 20th September 2007 07:40 AM |
| Rf Pic | flemmard | Electronic Projects Design/Ideas/Reviews | 1 | 9th September 2007 09:34 PM |