Controller vibration
Moderators: B00daW, Moderators
Controller vibration
Rez for PlayStation 2 supported a "Trance Vibration" peripheral, a USB controller to fit in the player's pocket that provided stronger vibration than the Dual Shock 2 controller alone. In this thread on NintendoAge, WhatULive4 joked about a game supporting a "trance peripheral" for next year's compo.
So would it be worthwhile to make a Rumble Pak for the NES controller? I imagine it would send codes over the controller port like an SPI peripheral: To start or stop vibration on controller 1, write each bit of the code to $4016 and then read $4016 to clock player 1's port. To start or stop vibration on controller 2, write each bit of the code to $4016 and then read $4017. Codes might be, say, $E8 (11101000) for on and $E0 (11100000) for off.
But how much would it cost to make such a peripheral? I can think of a housing, a passthrough 7-pin connector, PCB, MCU, and vibration motor. Does the NES controller port pass enough current on +5V to spin a motor?
So would it be worthwhile to make a Rumble Pak for the NES controller? I imagine it would send codes over the controller port like an SPI peripheral: To start or stop vibration on controller 1, write each bit of the code to $4016 and then read $4016 to clock player 1's port. To start or stop vibration on controller 2, write each bit of the code to $4016 and then read $4017. Codes might be, say, $E8 (11101000) for on and $E0 (11100000) for off.
But how much would it cost to make such a peripheral? I can think of a housing, a passthrough 7-pin connector, PCB, MCU, and vibration motor. Does the NES controller port pass enough current on +5V to spin a motor?
Wow, the current question is a very good one. Clone systems might be a problem too as far as current is concerned.
Would it be easier to interface a Dual-Shock controller to the NES? I have never read about the hardware interface, but if it is some sort of SPI interface you could do it with some glue logic.
Would it be easier to interface a Dual-Shock controller to the NES? I have never read about the hardware interface, but if it is some sort of SPI interface you could do it with some glue logic.
- NESHomebrew
- Formerly WhatULive4
- Posts: 418
- Joined: Fri Oct 30, 2009 4:43 am
- Contact:
If someone could design and sell a wireless replacement PCB for the original NES controllers I'd be all over it. Having an independent power source would also alleviate the possible current draw problems from a small motor. I've seen people do LED mods without any problem, but I'm guessing a motor might be a bit overkill.
- infiniteneslives
- Posts: 2102
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
- Contact:
Well I must say the first time you have a NES controller vibrate in your hands is a strange experience. I crammed a Wiimote inside a NES controller awhile back so games like SMBwii would play better and I included the "rumble" motor it turned out pretty well.
I don't think current would be too much of an issue if you didn't have some big dual shocks in there. There are some pretty small motors out there. I could test out to see what a Wiimote motor draws but I wouldn't expect it to be much. Even if it was an issue you could throw a cap in there and since you'd only have short bursts of the motor you should be fine.
You're really only talking about $10 of components if you did it right. The most expensive part would be the cable potentially. If you could use a standard NES controller cord you wouldn't have to buy one. But the standard cord is only a 5 wire: 5v, gnd, clock, latch, data. If you needed the other two wires you'd have to buy a extension cord that had all seven wires. I'm not sure how you'd do things from the NES perspective but I could see one way that might be simple is to give yourself access to the extra two wires GUN light and trigger. If you needed those wires you'd have to spend $5 on a extension cord to gain access to all seven wires.
I could easily make something like this and post it up if I knew what kind of signal you were giving me to the actual controller.
I don't think current would be too much of an issue if you didn't have some big dual shocks in there. There are some pretty small motors out there. I could test out to see what a Wiimote motor draws but I wouldn't expect it to be much. Even if it was an issue you could throw a cap in there and since you'd only have short bursts of the motor you should be fine.
You're really only talking about $10 of components if you did it right. The most expensive part would be the cable potentially. If you could use a standard NES controller cord you wouldn't have to buy one. But the standard cord is only a 5 wire: 5v, gnd, clock, latch, data. If you needed the other two wires you'd have to buy a extension cord that had all seven wires. I'm not sure how you'd do things from the NES perspective but I could see one way that might be simple is to give yourself access to the extra two wires GUN light and trigger. If you needed those wires you'd have to spend $5 on a extension cord to gain access to all seven wires.
I could easily make something like this and post it up if I knew what kind of signal you were giving me to the actual controller.
I made an IR version for a school project this past year but IR isn't as reliable it would be nice for it to be RF. I'm also working NES RF controllers for Wii and USB right now too. Afterwards I was thinking about making the RF version for the NES. The issue with wireless is price though. More complex parts and the need for internal rechargeable batteries. I've done it using LiIon and a camera charger to cut on cost but there is still a lot of work involved. Parts quickly exceed $50 mark. Not to mention if you wanted to communicate both ways for rumble features it would be even more expensive with XMT and RCV parts in both the controller and the dongle.If someone could design and sell a wireless replacement PCB for the original NES controllers I'd be all over it. Having an independent power source would also alleviate the possible current draw problems from a small motor. I've seen people do LED mods without any problem, but I'm guessing a motor might be a bit overkill.
- NESHomebrew
- Formerly WhatULive4
- Posts: 418
- Joined: Fri Oct 30, 2009 4:43 am
- Contact:
Pretend we only need to control one vibration motor for a moment-
We could just use the LATCH line from the NES/Famicom to specify whether to vibrate the motor. Use a lowpass filter to smooth over the transitions while reading — or better yet, over several vsyncs to allow PWM to give multiple different intensities — and now you don't even need a microcontroller.
We could just use the LATCH line from the NES/Famicom to specify whether to vibrate the motor. Use a lowpass filter to smooth over the transitions while reading — or better yet, over several vsyncs to allow PWM to give multiple different intensities — and now you don't even need a microcontroller.
- infiniteneslives
- Posts: 2102
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
- Contact:
If you could just control it over LATCH that would be nice. You wouldn't even need a Low pass filter aslong as you pulsed the latch signal. You'd just need a transistor to allow the latch signal to control the current supplied to the motor. As long as latch pulsed frequently enough there wouldn't be significant delay from the controller's input. You just couldn't have it on for more than a couple msec other wise the controller would be latched onto to old button data. And you wouldn't want to apply latch while reading out the shift register. That requirement alone would satisfy timing requirements.
I tested some stuff out quick
The Wii Mote vibration motor draws 130mA when connected directly to 5V.
But usually it runs of 3V or so, I used a voltage regulator to bring it down to 3.3V and it drew 90mA from the 5V supply.
Not knowing what the NES could safely supply I tried out some standard components.
NES controller: 1mA
NES satelite console unit: 11mA
NES advantage: 16mA
When I did the IR wireless project I powered my dev board off the NES 5v supply and ran it for long periods of time and never had issues. I tested that out and it drew around 45mA.
I really don't think any of this is an issue though. I checked the NES board and the controllers are powered directly off the 5V plane on the mobo. So as long as the NES powersupply has room for 100mA more loading you'd be fine. Not to mention it wouldn't be continuous so whatever limit we may be getting close to wouldn't matter for our short durations. I would feel safe with my NES based on these assumptions.
Who knows about clones though. I'm sure they're made as cheap as possible but I would be suprised if it couldn't handle the short duration loading.
The only real issue then is sourcing vibration motors. The one from wiimote is really nice it's all self contained no moving external parts. And it's about the size of a stubby coin cell battery. I measured it as 10mm diameter and 2.5mm thickness. It would be nice to find a similar source. The only thing labeled on my knock off wiimote motor is SZJK MOTOR and the fact it's made in china of course.
[/quote]
I tested some stuff out quick
The Wii Mote vibration motor draws 130mA when connected directly to 5V.
But usually it runs of 3V or so, I used a voltage regulator to bring it down to 3.3V and it drew 90mA from the 5V supply.
Not knowing what the NES could safely supply I tried out some standard components.
NES controller: 1mA
NES satelite console unit: 11mA
NES advantage: 16mA
When I did the IR wireless project I powered my dev board off the NES 5v supply and ran it for long periods of time and never had issues. I tested that out and it drew around 45mA.
I really don't think any of this is an issue though. I checked the NES board and the controllers are powered directly off the 5V plane on the mobo. So as long as the NES powersupply has room for 100mA more loading you'd be fine. Not to mention it wouldn't be continuous so whatever limit we may be getting close to wouldn't matter for our short durations. I would feel safe with my NES based on these assumptions.
Who knows about clones though. I'm sure they're made as cheap as possible but I would be suprised if it couldn't handle the short duration loading.
The only real issue then is sourcing vibration motors. The one from wiimote is really nice it's all self contained no moving external parts. And it's about the size of a stubby coin cell battery. I measured it as 10mm diameter and 2.5mm thickness. It would be nice to find a similar source. The only thing labeled on my knock off wiimote motor is SZJK MOTOR and the fact it's made in china of course.
[/quote]
- infiniteneslives
- Posts: 2102
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
- Contact:
Found some little vibrating motors that appear to have simlar power usage as the wiimotes and are only slightly larger than what I have. They would totally fit inside!
http://www.hobbyengineering.com/H3425.html
How difficult would it be to add some vibration function to a game? Does anyone have a game they'd like to try it out with? I'd be more than willing to make the prototype if someone would implement it into a game.
We could create a "vibration series" on NES carts
I don't see any reason that this would cause problems even if someone didn't have a vibrating controller. Unless there are some oddball clone issues but that's minor.
http://www.hobbyengineering.com/H3425.html
How difficult would it be to add some vibration function to a game? Does anyone have a game they'd like to try it out with? I'd be more than willing to make the prototype if someone would implement it into a game.
We could create a "vibration series" on NES carts
I don't see any reason that this would cause problems even if someone didn't have a vibrating controller. Unless there are some oddball clone issues but that's minor.
The problem I saw with just using control over the D0 out (latch) line is that it goes to both players. That's why I wanted a microcontroller to respond to $E0 and $E8 sent over the latch line, so that the controller can listen only when it is being addressed. Send $E8 when clocking player 1: player 1's motor turns on. Send $E8 when clocking player 2: player 2's motor turns on. If you don't understand what I mean by "send $E8", ask me to draw some signal timing diagrams.
- infiniteneslives
- Posts: 2102
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
- Contact:
That sounds simple enough, I just didn't realize you were sending it serially over the Latch line.tepples wrote:The problem I saw with just using control over the D0 out (latch) line is that it goes to both players. That's why I wanted a microcontroller to respond to $E0 and $E8 sent over the latch line, so that the controller can listen only when it is being addressed. Send $E8 when clocking player 1: player 1's motor turns on. Send $E8 when clocking player 2: player 2's motor turns on. If you don't understand what I mean by "send $E8", ask me to draw some signal timing diagrams.
I have all the parts and could code up the uC so if someone wanted to do up a demo or something I could test it out.
Here's a project from last year that turns on the motor when both the strobe and clock lines are held high.
http://andygoetz.org/post/an-nes-rumble-pak
This seems like an easier solution then Tepples' idea of SPI over the strobe line, since the only component really required is an AND gate. The clock lines are separate per controller. It does have the disadvantage that the controller can't be read while vibration is on, but it seems like it would be easy enough to turn off the motor for a few microseconds to read the bits out of the controller registers.
http://andygoetz.org/post/an-nes-rumble-pak
This seems like an easier solution then Tepples' idea of SPI over the strobe line, since the only component really required is an AND gate. The clock lines are separate per controller. It does have the disadvantage that the controller can't be read while vibration is on, but it seems like it would be easy enough to turn off the motor for a few microseconds to read the bits out of the controller registers.
The problem with this method is that on NES the clock line can't be held high, it'll only go high momentarily when $4016/$4017 is read. So this method would need a quite lot of CPU time.Grapeshot wrote:Here's a project from last year that turns on the motor when both the strobe and clock lines are held high.
- infiniteneslives
- Posts: 2102
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
- Contact:
The engineering expo this guy talks about is at my school. It'll be the same expo I'll hopefully be displaying the NESDEV cart at next yearGrapeshot wrote:Here's a project from last year that turns on the motor when both the strobe and clock lines are held high.
http://andygoetz.org/post/an-nes-rumble-pak
Hm. That could be fixed in analog (to charge a capacitor with an assymetric charge/discharge path), but we should probably just use a microcontroller instead now.thefox wrote:The problem with this method is that on NES the clock line can't be held high, it'll only go high momentarily when $4016/$4017 is read. So this method would need a quite lot of CPU time.Grapeshot wrote:Here's a project from last year that turns on the motor when both the strobe and clock lines are held high.
*EDIT: No, wait, better idea! Instead of the AND gate, use a latch or shift register, clocked on RD but with Din hooked up to the strobe line from the NES. Then, after both joypads have been read, reassert strobe and read once from each joypad you want to vibrate.
Not a useful post, but I wanted to mention that I remember there being a Famiclone called the "Rumble Station" that had games by Color Dreams built into it (maybe the only one that isn't loaded with bootlegged games?). It had a vibration motor in it, but what was stupid about it was that it activated whenever you pressed the A and B buttons. Totally pointless. It looked like a Dreamcast controller casing, so maybe they just had a bunch of those sitting around with the motors included.