It is currently Mon Oct 15, 2018 10:49 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: NES Rumble Controller
PostPosted: Mon Aug 27, 2018 7:14 pm 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 15
I started this project a while ago and figured I would share some of what I have so far. It's based on a PIC12f1501 and is pretty simple in practice. The PIC simply counts the amount of clock pulses between latch signals and is able to control the motor from there. 8 clock pulses are ignored, 10 clock pulses disables the motor and 12 clock pulses enables the motor. Simple as that! Unfortunately this means the controller won't work with the four score or satellite... It also has a potentiometer that sets the vibration strength via PWM. The controller and test rom have only been tested on an nes front loader.

Included in the .zip file are some pictures of the prototype pcb and some oscilloscope images while the motor is running to show there is some voltage interference on those lines. There is also my controller test rom and some code which was added to Excitebike to demonstrate how to add rumble to an existing game. I included a screenshot of an Excitebike graphic hack I'm working on (and yes, the speed and temp meters are fully functional!)

Let me know if this is something developers would be interested in for future games. I'd be happy to put together some mod kits once the design is fleshed out!


Attachments:
nes_rumble.zip [588.76 KiB]
Downloaded 61 times
Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 7:40 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7648
Location: Seattle
What's the voltage regulator doing there?

(Or is it a transistor in a beefy package to drive the motors?)


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 7:47 pm 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 15
Just a beefy transistor to control the motors.


Top
 Profile  
 
PostPosted: Mon Aug 27, 2018 9:01 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7648
Location: Seattle
How much current do those motors want?


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 4:05 am 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 15
The motors are rated at 90 milliamps each. I know that transistor package is unnecessarily large for the job but it was what I had at the time. Here are a few current measurements I took.

Controller w/ ammeter between white wire and controller port:
motors on ~ 185mA
motors off ~ 1.82mA

7805 w/ ammeter between 5v leg and pcb (NES-CPU-10):
motors on ~ 510mA
motors off ~ 310mA


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 4:25 am 
Offline
User avatar

Joined: Sat Aug 15, 2015 3:42 pm
Posts: 146
Location: France
Interesting! I was thinking about it yesterday.

Will take a look.

_________________
My first game : Twin Dragons available at Broke Studio.


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 10:55 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7648
Location: Seattle
emerson wrote:
7805 w/ ammeter between 5v leg and pcb (NES-CPU-10):
motors on ~ 510mA
motors off ~ 310mA
Huh, that's kinda big. Do you see or hear any obvious crosstalk from the power supply into the video/audio signal?


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 1:25 pm 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 15
I never noticed anything obvious like static or cpu glitch. I put the scope on the audio and video pins going to the rf box and found about 18mV of interference on the audio line. I use a Commodore 1702 for my development monitor and never turn the volume past 1/3, but an audible hum can be heard if I turn the volume up past 1/2. The video signal appears to be unaffected which is good.

Maybe some capacitors placed in parallel near the motors would help reduce that 18mV?


Attachments:
audio_interference.JPG
audio_interference.JPG [ 101.27 KiB | Viewed 1680 times ]
Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 3:59 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7648
Location: Seattle
Standard thing you're "supposed" to do in this case is make a "power" lowpass filter, just an inductor and capacitor, to vaguely isolate the 5V supply for the digital logic inside the NES and the shift register from the power supply used by the motors.

(In practice, getting a large enough inductor is often hard: you may just want a resistor or diode instead)

Another option would be looking for lower-current vibration motors. Apparently there's one company that makes some.


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 5:06 pm 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 15
I found that increasing the capacitor I have between 5v and ground to 1000uf helps a lot but still isn't perfect. Interference on the audio channel is gone as well as the audible hum. The data line still has interference on the logic low portion of the signal. I'll try the low pass filter idea and see how it works.

Edit: Lower current motors would be the best place to start


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 5:33 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7648
Location: Seattle
Searching for "low current vibration motor" provides one vendor (Jinlong / K'OTL) who sells a variety of 17-40mA 3V vibration motors, plus some others. Just looking at the lower power options from some other vendors also provides some options: for example Precision Microdrives also has at least one 0.25gee model that they claim can operate on as little as 14mA.

Another thing to try would be gradually changing the PWM duty as you turn the motor on, ramping up the voltage instead of just turning it abruptly on. This should help with inrush current.


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 6:24 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3569
Location: Indianapolis
I may be interested in using this, also. My game is nowhere close to being done, though.

I've always been a little concerned about putting that much current through the controller port. Like when I was thinking of doing a wireless transceiver, I was thinking of putting a large cap on the board which would be charged through an NTC thermistor to limit the current. Maybe I'm just overly cautious? And that's obviously a completely different power profile, compared to a motor. I haven't really considered the current capacity of Nintendo's cables since I'm usually thinking about the 3rd-party extension cables (that have all 7 wires), maybe they're OK. Speaking of that, if you release this, you might want to caution against using certain types of extension cables (I could maybe ID the worst ones). Some of them are just like 3 tiny strands of copper for the wire, I can't imagine 200mA going comfortably though that..

Will it be possible for a game to control the rumble intensity? I suppose the game could do a very slow PWM by updating it once per frame, but I wonder what that effect would be like.

Sorry to dump a feature request on you, please make it however you want. This is what, at least naively, seems like an ideal setup:
10,11 pulses - disable
12,13 pulses - enable (intensity from potentiometer)
x+0,1 pulses - enable intensity 0
x+2,3 pulses - enable intensity 1
..
x+14,15 pulses - enable intensity 7
x+16,17 pulses - disable

Intensity could be the actual PWM, or could be a value scaled by the potentiometer. Disable at the end being I was thinking would be less likely to leave it in a stuck-on state. Thinking of that because programs that expect a Zapper, or asynchronous serial to USB adapter, will put out an unpredictable amount of clocks. And the clocks are divided by 2 because of the DPCM clock glitch.


Top
 Profile  
 
PostPosted: Wed Aug 29, 2018 1:07 am 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 809
If someone sold those controllers for okay price and in decent supply, I'd probably support them, but as mod kits not interested.

edit: May also need a switch on the controllers to disable it, in case some game would erroneusly turn it on.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 5:09 am 
Offline

Joined: Fri Nov 18, 2016 7:29 am
Posts: 15
Did a little shopping around and it seems like I have a few options for low current motors so that's good. I've tried the coin motors before. They're noisy and don't produce enough vibration so I want to stick with cylindrical motors.

I think having the game controlled PWM is a great idea! I have a 1:2 prescaler on the counter of the PIC already so odd numbered clock cycles would be ignored at this time. It is possible to have 1:1 prescaler though so odd clock cycles are possible, but if the clocks would have to be divided by 2 because of the DPCM are they really necessary? I guess programs that don't use DPCM could run faster... I only just started with audio programming and don't know much about the DPCM issues, only that there is an issue with controller reading? I'll study up on it.

I used my calipers and measured the diameter of the wires coming from the motherboard to the controller ports in the console itself. They measure approx. 0.015" diameter or 28awg. I counted 7 strands inside which measure approx. 0.005" diameter or 36awg. Im getting different values for max current of 28awg wire but the lowest I found was 226mA so Im pretty maxed out at the moment.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 10:29 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7648
Location: Seattle
There are two sources of current limits with wire:
#1 is voltage drop, just I·R. 250mA and 28awg and 4 meters is 0.2V. (Have to account for both +5V and ground lines). Probably not a problem? But you have been having problems, I guess.
#2 is self-heating, I²R÷length. At 250mA and 28awg, that's 13mW/meter (doubled, have to dissipate power on both +5 and ground lines) ... the insulation on a cable is like 2mm thick, so that's still something like 0.06K rise.

... ok, I'm impressed at just how conservative that rule of thumb is.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group