none 7 Posted August 18, 2013 Share Posted August 18, 2013 I'm trying to measure load current controlled with TI DRV8801 (http://www.pololu.com/catalog/product/2136) with a Launchpad Rev. 1.5 and MSPG2231 using this code #define CURRENT BIT1 ... // start adc //ADC10CTL0 &= ~ENC; // Disable ADC ADC10AE0 = POS | CURRENT; ADC10CTL0 = ADC10SHT_2 // sample-and-hold time (64) + MSC // "sequential conversion"? //+ REF2_5V // //+ REFON // + ADC10ON // ADC on + ADC10IE // ADC interrupt enable ; ADC10CTL1 = INCH_1 // Channel //+ ADC10SSEL_3 // SMCLK //+ CONSEQ_0 // Conversion sequence (single channel) //+ CONSEQ_1 // Conversion sequence (scan) + CONSEQ_2 // Conversion sequence (repeat channel) //+ CONSEQ_3 // Conversion sequence (repeat scan) ; ADC10CTL0 |= ENC + ADC10SC; // Enable and start conversion Pin1.1 is connected to the driver module's CS (current sense) pin, in addition to VCC (3.3V), GND, DIR, PWM. The module' load side is powered by a lab supply at about 11 V (too low of a supply voltage and the DRV8801 started to oscillate when supplying 100%, probably because of the supply leads or so). I observe the following If the pin is configured as normal input, the floating level is pretty much zero Unconnected ADC pin with buffers disabled has 0 V Unconnected ADC pin as above but configured as ADC input has about 1/2 Vcc, e.g. 1.5 V (am I outputting the reference voltage?)This will pull up the sensor signal from 40 mV to 150 mV and render it useless The ADC reading from ADC10MEM is consistent with the externally measured voltage, e.g.155e-3 V /(3,6V/1024) = 44 Same effect with other pin and other G2231 not connected to DRV8801 Launchpad TXD/RXD jumpers are open Is this normal? How can the ADC input pull up the output? Will I have to use a buffer amp for the signal? The DRV8801 datasheet does not say much about the VPROPI output drive capability. Quote Link to post Share on other sites
none 7 Posted August 18, 2013 Author Share Posted August 18, 2013 This is only noticeable when continuously converting (as configured above or single conversions retriggered in interrupt). A 10 k pot set to 750 mV is pulled up a few mV and gets a lot of noise (3 mV -> 133 mV peak to peak). My guess is that the ADC is charging up the filter cap and the driver output has no chance to sink the extra voltage through the 10k filter resistor (btw, the parts have the right values). So buffering or bypassing the filter may work? Quote Link to post Share on other sites
none 7 Posted August 18, 2013 Author Share Posted August 18, 2013 Bypassing the filter improves things slightly, but the MSP pulls the 1 mV signal (no current) up to 20 mV . I'll have to reduce sampling or try a buffer. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.