We’re talking small like, <1 cm diameter. I need to drive 32 of them, but the most that would be operating at once should be 3. Also the multiplexing of shift registers helps with this. My question is, can the Arduino handle it? As a follow up question, if not, can I connect an external power supply to VCC and ground of the shift registers? Thanks
The 74HC595 is rated for ~6mA. Just enough for a small LED, probably not ok for the motors you have.
The TPIC6x595 family has higher current capability, and can work with a separate motor supply (0-50volt). You need four of them for 32 motors. Add another one if more motors are needed. Only three data lines (and 5volt and ground) between Arduino and the shift registers. Leo..
No. Unless your motors are rated at ~20mA stall current or so with built-in schottky free-wheel diodes (which they won't be). Even small motors take lots of stall current, and give out inductive kicks of dozens of volts.
Motors need a motor driver, not a logic signal.
Directly driving the motors, no. The shift register has a similar maximum current capability to an Arduino IO pin. You can however use those outputs to control the motors via a transistor which can control current many multiples of that.
An explanation of how to do this is here (Adafruit tutorial). The transistor in their example can switch 600mA versus the typical 20mA of the IO pins, or 250mA from higher rated shift registers like TPIC6c595 mentioned above. That still may not be enough for your motors - look for the data sheet 'stall current' value for the maximum you need to design to cater for and choose a transistor to suit.
Note your control will only give you on/off with a shift register and no speed nor direction control.
A TPICxxxx is basically a 74HC595, eight power mosfets, and active kickback suppressor. All in one.
No extra parts needed except for a 100n decoupling cap close to the chip from VCC to ground.
The ‘A’ version is 8x 350mA, 50volt
The ‘B’ version is 8x 150mA, 50volt
The ‘C’ version is 8x 100mA, 33volt
Voltage is also the kickback clamp.
I would prefer the ‘C’ version for small low voltage motors/solenoids/relays.
Attached is an picture of 8-relay driver boards with a TPIC6C596
We’re talking small like, <1 cm diameter. I need to drive 32 of them, but the most that would be operating at once should be 3.
So the very first thing you do, is to know their specification, and in particular, the stall current. Do you have the full datasheet? If so, post a link to it here, which of course, should have been part of your first question.
If you don’t, than that is your next step. Connect the motor to a supply of the designated voltage, put your first multimeter in series with it on the 200 mA range and your second multimeter in parallel with the motor on the 20 V range. Hold the motor shaft so it cannot rotate, measure the current. If the voltage across the motor at this point is significantly less than the intended supply voltage (because you have lost some in the multimeter set to the current range) then you will need to compensate for that.
Well the specific motor I'm looking at is a jerk and didn't provide the stall current OR power rating (that I can find)... but looking at some similar motors it's probably around 140mA. I also can't measure it right now because I haven't actually bought anything yet... But would 140mA work with the TPIC6C595? Or TPIC6C596? And what is the difference between those two if any?
Also it occurs to me that I will need these to go both directions... I've only started working on this circuit :P I can use PWM for speed, but do you have any suggestions for controlling that many motors bidirectionally? (Keeping in mind component footprint matters)
Sorry, must have looked at the wrong datasheet for the C version. Updated the post. That one is 100mA continious, all outputs. Single output is 250mA max. The only difference I can find in the datasheet is a slight clockspeed increase for the 596. Not relevant for this application.
These chips can't reverse the motor. PWM would be possible (per chip) if you switch the enable pins. Guess you have to look for another motor driver. Leo..
Other than reversing, you want the "A" version of the chip, not the "C".
Ok, so basically what I'm getting here is that an H bridge using 4 transistors per motor is a better idea? This would be good but... I really don't want to try to work with 128 transistors if I can help it... Is there an IC you can recommend with multiple H bridges integrated into it?
Something like this for two motors.
L298 might also be a consideration; e.g. on a board like L298 Dual H-Bridge Motor Driver - V2. Possibly a bit overkill for your intended use.
The same chip is also used on the Arduino motor shield. I just mention this because the schematic shows how you can wire it with minimal use of PWM pins.
There are a few shields that give you multiple PWM outputs. E.g. SparkFun PWM Shield or Adafruit 16-Channel 12-bit PWM. Both give you 16 PWM outputs. You can find more when you google for arduino pwm shield
I'm not going to mention that problem, but it might be useful to know what these motors are supposed to do.
Patience Paul. We are only on the first page. Leo..
I should probably mention that the only space I have to squeeze this into is a 6.25 cm diameter sphere, which is just big enough to fit a headerless Nano, 2 16-channel analog multiplexers, and a 9V or two, with a tiny bit of space for other stuff... Yeah I guess that makes things more difficult doesn't it...
Ultimately what I'm trying to do here is be able to drive 32 identical linear actuators, each 8.5 cm range. By the way excuse my advertising, but if any of y'all want to fund this it's my senior project for school and you can donate and/or find some more info on it here. I'm making a 3D-printed 1/4 scale model to start with, which means it will have a 17.5 outer diameter and 6.25 cm inner diameter, with the pistons in between. Check out the link and this may make more sense, I really should've provided that first!
But yeah it doesn't have to be strong, just preferably mobile, and if all else fails I could just have 2-4 pistons operational and hold the robot in my hand for the presentation because I aim to make it clear that this version is basically just proof of concept.
Hey, so it occurs to me, if what I need here is precise control over the position of the pistons... Read by a potentiometer... And motors moving it... Sound familiar? Is there any reason I couldn't just gut 32 servos and hook them up to 3 of these suckers having them control my own motors and read my own pots?
They also come in expansion board.
Ooo that expansion board you linked to is looking devilishly handsome... So would it be ok to chain 3 of those together to get the 32 (36 but 4 unused) servos I need and then hook up the servo circuit board to whatever I want? What do the dangers look like with that in terms of power consumption? I assume the board multiplexes so it only really drives one servo at a time?
Squirt_5432: So would it be ok to chain 3 of those together to get the 32 (36 but 4 unused) servos I need and then hook up the servo circuit board to whatever I want?
What do the dangers look like with that in terms of power consumption? I assume the board multiplexes so it only really drives one servo at a time?
In theory you can chain ~60 of those boards. Look at how many I2C address lines can be set.
The chip itself runs on 5volt from the Arduino, and uses next to nothing. The servo connectors can be plugged onto the 3-pin headers. Servos need their own power source (big connector on the board). No multiplexing. The chip works autonomously once a servo position is written to it. Leo..
Ok, so that's awesome. Couple questions remaining: 1) What purpose would the capacitor serve? And 2) I've never done what I'm describing with taking the circuit board to a servo and swapping the motor/pot, is this a common thing to do and is it ok, or like is there a specific servo you'd recommend to use for doing this?