PCA9685 + Eccentric-Mass Motors = Haptic Vest?

Hello, I come to microcontrollers as a programmer but with hardly any knowledge of electronics and I was hoping to get some assistance with a crazy (?) idea.

Haptic vests aren’t justifiable for most casual Virtual Reality users with a starting price upwards of $400 but I got to wondering if I could create a low-cost vest design.

Easiest if I just outline the components I have in mind so far;

Training Vest w. Weight Pockets

5V(150ma)/6V(200ma) Eccentric Rotating Mass Motors (x 16)

5200mAh, 2.4A Output USB Power Bank

PCA9685 16 Channel 12-bit PWM Servo motor Driver

Does this look feasible as the makings of a haptic vest to be controlled over I2C?

If it does, I wonder if somebody would be prepared to suggest what I might need in terms of a circuit for each motor. I gather I’d need 3 wires on each and that somewhere inline there would need to be a MOSFET (+5V>Collector, PWM>Base, Emitter>Motor>GND) and probably also a diode? If that’s correct, could anyone tell me what parts to use and in what configuration? Wire run might vary from 10cm to 120cm and it would be much easier construction-wise if the transistor could be at the motor-end, would this be a problem?

I feel pretty confident about the software challenge but I just don’t know if the electrical side stacks up. Anyone?

1 Like

OK, a couple of problems here.

While you refer to the motors as 150 or 200 mA - I don’t know where you got those figures as I could not find the specifications in the Aliexpress link - that is probably the “no load” figure and they may require up to one Amp each to start. So the PCA9695 module could not drive then directly; you would require logic level FETs to actually drive the motors.

Do you actually expect to speed control the motors?

Hello, thanks for replying. I think I might have got the amperage off a different listing for the same thing; Vibration Massager Motor DC 5V 6V Dynamic Micro N20 Motor Precious Metal Brush Strong Vibrator DIY Electric Toy Model|DC Motor| - AliExpress but I freely confess I don’t have any idea of the exact implications - I just figured 16*150=2400 exactly matches the amps out on the power bank 5v output, surely a good portent ;-). As you can see, this is all witchcraft to me.

Significant to remember that for intended application it would probably never happen that all motors are spinning at once and I can limit the total running and/or stagger start-ups through the software.

Since posting I turned up this tutorial; Parts | Arduino Lesson 13. DC Motors | Adafruit Learning System which (I think) appears to detail a circuit I could replicate for all 16 motors with a PN2222 inline. Speed control isn’t a deal-breaker but it would be useful and I’d have thought should be available using this circuit.

If the above looks workable I’d be particularly interested to know if there’s any downside to locating the transistor, resistor and diode at the motor end of the (3-core) cable run, just to ease construction and swap-outs.

Any guidance gratefully received, thanks.

The 2N2222 is rated at an absolute maximum of 600 mA, and the datasheets show specifications only to 500 mA. While your circuit is designed on the expectation the motor draws only 200mA. its “stall” or startup current may quite possibly exceed 600 mA and the Adafruit article makes some comment on this though it does not warn of the limit of the 2N2222.

Most of us here would consider BJTs obsolete as control devices for motors and suggest you use a logic level FET. What one you may ask? Well, for example an AOD4184.

Exactly the sort of concrete advice I’d hoped for, much appreciated! Would a board like this be the way to go;

It does raise some further questions for me though;

It appears to come in 3 flavours, is there any reason (i.e. drop, heat) to prefer FR120N (100V 9.4A) or LR7843 (30V 161A) over the AOD4184 (40V 50A)?

Would these remove the need for the diode? The resistor?

The load side has 3 terminals (+, LOAD, -), which of these would I use for the motor?

The PCA9685 control outputs are in triplets (V+, PWM, GND) , presumably ground is common. Would I need to bridge grounds on this board?

Thank you again for any further advice.

Those are the sort of modules I was suggesting, but not the particular one. I have not received those modules yet.

I specified the AOD4184 as it is a logic-level FET. The LR7843 is also but the FR120N is not, so entirely unsuitable for anything less than 12 V.

I presume that you connect “+” and “-” to the 5 V motor supply and the motor between “+” and “LOAD”. I observe there is a diode on the module but cannot be sure it is connected across the motor until I have one in my hand. :grin:

“Gnd” connects to the Arduino ground, not necessarily the same as the motor supply. If using a common supply, you need to wire the motor negative - with all the motor wiring always bundled together - directly to the power supply and the Arduino 5 V and ground - also bundled together - directly to the power supply .

Thank you again. Of course I understand you cannot be definitive without having examples of the components yourself but I wanted to ask you if the following is the most-likely configuration (with the caveat that you cannot guarantee this). I think the key difference from your description is no separate PSU as I’m hoping to provide power via the PCA9685 (I think I read it’s good for up to 8A - at least the original Adafruit board should be).

A vest arrived yesterday so it looks like I’m definitely having a crack at this!

That looks quite plausible but for one thing, you are not making use of the opto-isolator and I think it is preferable to keep the heavier motor currents off the PCA9685 board where possible. OK, that’s two things, isn’t it? :laughing:

So just wire the motor supply directly to the FET module - on the left side - and the PCA9685 board PWM and GND to the corresponding pins on the FET module.

@Paul_B Just wanted to thank you again for all of your advice, it is much appreciated. Have some components on order and am looking forward to trying to put it all into practice.

Having received the vest I estimate I can fit a slightly larger motor (20mm DC 3V 5V 6V Strong Vibration Micro Mini 130 Vibrating Motor Vibrator DIY Toy Massager Hobby Model|DC Motor| - AliExpress) but, mindful of your caution over stall current, I’ll be sure to measure this first and try to manage total draw accordingly. Cheers!

EDIT: Actually there was one further thing I wanted to quiz you on. You said you are not making use of the opto-isolator - is that a by-product of the common ground (I’d have thought everything else was pretty standard)? Is there then a case for adding the IN4001 diode, presumably between ‘+’ and ‘LOAD’ (per the Adafruit tutorial)?

MORE: Turned up this more complete description of the driver board; D4184 MOSFET Control Module - ProtoSupplies and it says a Flyback Diode should be added. It also suggests the board requires at least 6V for the load side :frowning: - though they also list these which should serve; High-Power Dual MOSFET Switch Module - ProtoSupplies

That is correct. You should not use the PCA9685 module to distribute the power for the motors, so the motor ground should only connect to the FET module. Your black and yellow wires go together, only from the right hand side of the board in the diagram, to the pins on the PCA9685 module which is set up specifically to drive small servos which have that three pin connector.

And it gives a terrific diagram which saves me figuring it out!


It appears the diode on the board is not placed as a “snubber” so yes, you do need to add one.

The only plausible explanation of the diode’s presence at all is that it must actually be a 12 V Zener to limit the gate voltage of the FET when actually used with a 36 V supply. Now I come to look at that circuit, the board is not really suitable for use at less than about 10 V (at least not for any substantial current) unless you remove and short out the upper 4k7 resistor.

I cannot see what use the 100 Ohm resistor is at all and with the 4k7 resistors and optocoupler, it really does not appear to be very suitable for PWM, certainly not above a few hundred Hz. :roll_eyes:

For PWM or 5 V, the other module - albeit not opto-isolated - would appear to be much more appropriate.

I’m back :grinning:.

Some motors arrived yesterday. The vibration is surprisingly strong for their small size but so too is their draw. Looks like about 1A to start, a little less once spinning (I guess load is pretty much built-in with the eccentric mass), and 1.5A stall. This pretty much puts paid to any hope of having more than one running at a time. My ambition has been chastened but I still think a useful result might be possible and I mean to continue.

Right now I’m wondering precisely what flyback diode to use. My reading suggests switching speed is important for PWM and that I might want a schottky part.

Would an SB260 (60V 2A) be a suitable choice for this application?

Any diode capable of the current, not in any way critical, it only has to switch on fast, and
this is not a problem for diodes, its switching off that can be slow.

Yes motors carry large currents, it always seems to catch the unwary out. And going for
“super strong vibration motor” wasn’t going to help - smaller and lighter motors are a
possibility.

Yeah, these were actually the largest that would fit in the vest pockets (20mm ‘130’ - larger than the first example I linked) and I wasn’t entirely surprised they’re a bit hungry. Certainly will source some smaller types (15mm ‘030’, 12mm ‘N20’), just wanted to investigate the ideal case first.

Wondering if PWM is material to my amperage budget? If I run the motors at 50% duty do I still need to budget the full 1A or is there a saving I might count on in terms of total draw?

Well that is an interesting question. :grin:

At 50% duty cycle, the motor - each motor - will draw the full (running) current for 50% of the time. So that is what the power supply sees. There may be times when all of the motors which you are running at a particular time, are on that 50% part of the PWM cycle and will be drawing the full current.

You also need to consider the stall - starting - current of the motors. You may say that only a certain number of motors will be powered at any one time and size your power supply to that parameter, but will need to be very careful that you make no mistakes in the coding. :astonished:

Which raises another interesting question.

What happens if I try and draw too much from a power bank? I’m a pretty experienced programmer but bound to get it wrong during development.

If there’s a prospect of damage, particularly of the smoking, fizzing or exploding kind, is there a current-limiting protection circuit I might employ?

I guess a 2A fuse might be the simplest solution?

Hello everyone! this is great to find that me and @ionman are basically working in parallel on a similar idea. i just want to mention to ionman that i have gone through a different route while using the PCA9685. I instead am going to use the " PWM Vibration Motor Module" which does give me the motor, mosfet and the pwm signal IN in one cheap package. why not use them @ionman ? simplify everything. by the way that vest seems overkill too, maybe it needs to be lighter, thinner and maybe tighter?
motor

by the way i would need your help in the software part, do you think you can help me too? i am gonna use an Arduino for controlling the PCA9685. I look forward to everyone help here too.

Hello @tojax , welcome to the discussion.

That’s an interesting module with lots of advantages in terms of connectivity and power use. But I would expect it’s incapable of representing heavier ‘touches’ like being hit or the recoil through a rifle stock - obviously even the motors I’m planning to use are actually inadequate, but closer to what’s required.

I could certainly see a hybrid design or these vibrators incorporated on an inner array (maybe via a second, daisy-chained PCA9685) to signal lighter contacts. The parts are so cheap compared to buying a ready-made vest there’s plenty of scope for doing something more elaborate.

Yes, I would prefer a less rigid vest but equally, to find something cheap, size-adjustable and ready-made with a grid of longitudinal pockets evenly distributed all over the body was something of a Godsend too. Probably I will remove the thin interior padding behind the pockets I use to ensure maximum transmission to the wearer.

But it all hinges on software support, which is why the likes of bHaptics can charge what they do because they’ve put in all the hard yards to get developers to incorporate their API. I’m really only looking on this as a hobby/maker project and will probably be largely content to simply prove that it’s possible. If other people take it up then maybe it might become more.

My starting point is to get it working with Dr. Beef’s DOOM 3 port for Quest - which has source code available on Github. It’s currently having bHaptics support added and I figure I can probably tap into the existing logic with an alternate implementation. Have pretty much decided that UDP packets over Wi-fi should be the communication channel. It may well be that my software could drive your vest design also.

Are you Quest or PCVR? Where in the world do you live? I’m in the UK.

How do you know it is a FET?

I see, you have many points indeed but for me those small motors would be just enough. I am not trying to stimulate multiple punchs on the user after all :laughing:

My work is mostly away from gaming and I do it as a form of a non profit art installation hoping for quest. I thought of Bluetooth for comms instead wifi. Since the module is cheaper for Arduino. By the way I am within the central Europe. Since you asked my location.

Hi @Paul_B it is a FET. I zoomed on the image and the code is A2SHB which is a small package mosfet. You can Google it to find it’s data sheet.