So first things first, hello. I'm new in town. I'm also feeling like I may have jumped in over my head with this last project for school, so any help or advice would be appreciated :~
Here is the plan - controlling eight 1.5V erm motors (turning on and off in a specific order with a specific amount of time between) with the help of four sn754410 drivers.
I've attached the sketch I've come up with so far in Fritzing. Is it doable? Are the connections right? I'm planning on dropping the 4.8V supply to 1.5V (resistors between each sn754410 and the motors). Or is there a better way?
Oh that my prayers fall upon the eyes of a kind and patient soul with time to burn
Thanks for any help!
Will have a look but in the mean time (assuming you are eagerly testing away) make sure you put flyback diodes in there to protect, well... everything. The nasty little habit of motors is that when the power comes off they don't exactly stop on a dime and for that brief time they are freewheeling and acting as little generators, feeding juice back into your circuit and the other motors. The diodes will prevent this.
From experience, depending on the speed you want to hit, there is a threshold level of current a motor will kick on with, once running however you can actually drop down below that level and keep them running. So what happens is , as you ease up on the power, nothing, and then a spurt of activity far faster than you expected - something to watch out for.
Let me have a gander at what you've got.
(without knowing the application, would stepper motors be better?)
Do you need to be able to drive the motors backwards as well as forwards? Since they seem to be haptic (vibe) motors, I suspect not, in which case you can get away with half that number of drivers.
You may find those two grounds have to be connected even though they talk about separate VCC for each "side" of the chips. This grounding is more for the data coming out of the arduino than anything else.
And it looks like they have incorporated the flybacks into the chip already.
I also didn't see any capacitors on the outputs. You won't need very large ones (in the pf range i would think) but that will depend on the wave you are putting out.
Thanks so much for the quick feedback! The eight motors are going to be under someones butt to give haptic feedback So the motors only need to go forward (and erm motors were the way to go so I've been told).
ardshark:
You may find those two grounds have to be connected even though they talk about separate VCC for each "side" of the chips. This grounding is more for the data coming out of the arduino than anything else.
And it looks like they have incorporated the flybacks into the chip already.
I also didn't see any capacitors on the outputs. You won't need very large ones (in the pf range i would think) but that will depend on the wave you are putting out.
Do you mean the two ground strips on the breadboard? As for the capacitors - are they between the positive of the motor and the sn754410 in order to get over the threshhold you talked about in the previous post? And lastly, where would the flybacks go in the circuit? Again, thanks for the help!
PeterH:
Do you need to be able to drive the motors backwards as well as forwards? Since they seem to be haptic (vibe) motors, I suspect not, in which case you can get away with half that number of drivers.
I've heard tell that I could get away with just two sn754410 but how would I be able to individually control the motors? Doesn't the "enable" input on that side tell both the motors to run? Thanks for your input!
Yes the two ground strips: whenever you've got data coming out of the arduino you should try and make sure the sending arduino and the receiving chip and it's devices are on the same ground. The caveat here is that you might get noise back from the motors so have a look and see.
As for the caps, they would go (on each motor) across the two leads. I'd say maybe 100nf but you'd have to base that on what kind of frequency and amplitude you are running and how much if any noise you need to clamp.
Oh and it looks like the flybacks are already built into the chip. (I mean really you would think they would be since it's is just the way things are for motors until we abolish inertia)
Thanks so much ardshark! I'll test that configuration out with my meter and let you know how it goes. May the gods of karma bestow upon you heaps of points
@PeterH - I forgot to mention that besides turning on and off and timing control, we'll want to be able to adjust the speed (pwm control?) so that we find a sweet spot for being able to feel the vibration through a few mm of seat stuffing and a pair of jeans. The motors are rated up to 6G, so it shouldn't be too hard to find a range that will work. All the motors will run at the same speed, but we need to fire them individually. Since the motors have two leads, would I connect those to a single wire and run each from the four motor pins? (green on the attached pic)
Ya that's right for the motor connections (the wording wasn't clear so for clarity that's one motor per side of chip, just like your drawing).
See below for where the caps go.
Also keep in mind the direction of force for the motors when putting them in the "seat". The line length in this drawing indicates the amount of force you will get in which directions.
Remember to tie any of the analog output pins that you aren't using on the arduino to ground to cut down on noise.
If you are getting erratic behaviour you might also consider putting a resistor (something large like a 10k is my goto) tied to ground or to Pos rail - depending on how you are phasing the motors-on each of the input pins on the H Bridge chip. In the absence of a signal from the arduino this will send that pin constant high or constant low as needed in the "off" mode, but the juice coming from the arduino will easily overpower the resistor when switched on. This seems to have been looked after in the block diagram of the chip but I've run into this before where the internals need a little help due to other noisy things on the board.
As for PWM, there's lots of cool ways I can think of inputing the PWM including going into the enable pins to control speed, but the big issue is in your drawing you don't have the inputs on the chip connected to PWM pins on the Arduino - the mega PWMs are pins 2-13 and 44-46 (that's from memory so give that a check)
We've got the motors sideways, and tested one to see how the vibration feels. Should be A-okay. Hmmm... I'm a bit concerned about the number of pwm ports available (you were dead on about 44-46; One can wonder why they aren't listed as such on the board). If the inputs and the enables are all pwm that makes for 16 - and there are only 15. Do the enable pins have to be pwm or is there another option? I've seen some motor projects where they are tied to the same positive strip that the 5V out on the Arduino is connected to.
I'll try the resistor on the ground trick as well!
I had another look at your initial drawing and it's right - just move all the wires going into the arduino digital outputs over to the the PWM outputs and that should do it.
xorbelbeeb: @PeterH - I forgot to mention that besides turning on and off and timing control, we'll want to be able to adjust the speed (pwm control?) so that we find a sweet spot for being able to feel the vibration through a few mm of seat stuffing and a pair of jeans. The motors are rated up to 6G, so it shouldn't be too hard to find a range that will work. All the motors will run at the same speed, but we need to fire them individually. Since the motors have two leads, would I connect those to a single wire and run each from the four motor pins? (green on the attached pic)
The picture in Reply #7 shows each motor connected to two half-h-bridges. This configuration lets you drive each motor backwards and forwards. That's overkill for your application since you only need to drive each motor forwards, and it only lets you drive two motors per chip.
For each motor, you would connect one terminal to one of the half-h-bridge output pins (shown green in your pic) and the other terminal to ground. That gives you an enable pin and a pwm pin for each motor, so you can control the speed but not the direction. This lets you drive four motors per chip.