Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

DRV8835 for model railroad

Patrick,

Can you recommend a current sensor to use with my Dual MAX14870 Motor Driver for Raspberry Pi (item #3758)? I’m guessing I’ll need a pair of them, one for each of the two voltage sources.

How about either:

  • the #4030 ACHS-7121 Current Sensor Carrier (-10A to +10A), $4.95 each, or
  • the #4041 ACS-724 Current Sensor Carrier (-5A to +5A), $14.95 each?

Could you also please recommend a good way of mounting these little guys? Perhaps hanging ‘em off the motor driver board, near the RasPi’s 40-pin header, would be good.

Hanging them off the 40-pin header with short 3-pin female headers would be ideal, assuming I can figure out which pin numbers to connect to and if I get lucky with the pin alignment availability. Can you provide recommendations for which pins to use for OUT, VCC, and GND connections? …or perhaps bring in the OUT signals via a spare input on one of the I/O I2C cards. (I would have been lost without your help on the motor driver board.)

Thanks.
-Russ

If you want to monitor the current from both output channels of your dual MAX14870 driver, then you will need two bidirectional current sensors that can read currents up to around 2.5A (i.e. the sensor’s range needs to be at least ±2.5A). Either of the sensors you mentioned seem like good choices. The most significant difference is that the ACS724, item #4041, has greater sensitivity than the ACHS-7121, item #4030 (400 mV/A versus 185 mV/A) .

Our current sensors output an analog voltage to indicate the current passing through them. None of the pins on a Raspberry Pi can read analog signals, so you will need other electronics to convert the signals from our current sensors if you want to use them. Using something like this ADS1115 carrier from Adafruit might be an easy way to do that.

There are several ways you could mount our current sensors in your application, though the lack of any analog input pins on the Raspberry Pi rules out your suggestion of plugging them directly into your Rasberry Pi header. Our current sensors have mounting holes suitable for #2 or M2 screws that you could use. The product pages for the sensors you mentioned have a dimension diagram available under the “Resources” tab that show the hole locations.

- Patrick

Thanks. I’ll look into it.

…another quick question: my software already uses library “WiringPi”. I see that the software library used for the dual MAX14870 python programs (also usable with C, it looks like) is “pigpio”. Do you know if it possible to use the two libraries at the same time? (Should I ‘root around’ in the source code to see if there are any naming conflicts?)
-Russ

We have not tried using WiringPi and pigpio together, so I am not sure if it is possible. Even if it is possible to get them working together though, I suspect it would be best to stick to one or the other.

- Patrick