This project has (unlike many of my side-projects) made great progress from its humble beginnings... now on its 2nd version, the aftermarket Trance Vibe is now actually semi-professional looking (or at least not ghetto), designed sanely for (basement-)manufacture, and fully buzzword compliant. For continuing progress, build-logs and lessons learned, watch the Dildonics section of my blog. The beginnings and very early history are documented below.
It all started when my friend Jane 'acquired' a copy of Rez for the PS2. "Wait, isn't that the game that comes with the vibrator?", I said. Well, yes and no. The vibe is a pack-in with the Special Edition Japanese import; long since discontinued, and as far as I can tell, the company that made them is now defunct.
Talk followed, as it inevitably does, into "...you're an EE, right?...", which followed into idle BSing about how much in the way of parts would be required, and shortly after that, the realization that, even though I'd never lay hands on the official hardware, thanks to some previous reverse engineers, I did indeed have enough information to build my own! Whatever you do, don't give a geek a challenge.
I noticed from someone's dump of the original trance vibe's USB descriptors, it only requests 98mA of current from the port... a wimpy, puny, pathetic little 98mA. The PS2 purports to be fully compliant to the USB specifications (note the USB logo on the front...the USB-IF is pretty strict about that), and those specs allow up to 500mA per device, so this will not do at all!
<Tim Allen voice> You know what this vibrator needs? ...a little more power! That's right, let's knock it up a notch and make that kitty really sing.
The actual vibrator used for the Drmn' Trance Vibe prototype is a set of glowing bullets made by California Exotic Novelties. Exhaustive process of selecting the best of the best? No... we were going out clubbing, and she noticed that right next to Boston's premiere gay nightclub (not gay this particular night...just the xmortis gothy fetishwear crowd) is an all-night (or, at least 'til midnight) sex toy store, and this is what they had with a nice external control box that I could gut and mount my own electronics in.
The control box is very simple and consists of a battery compartment with springs and a large potentiometer to set the power level. I brought it to the lab after hours (folks, don't try this at home!...er, work rather), set my favorite bench supply to 3V and hooked up one of the bullets, at which point it started drawing almost an amp and rattled angrily off the table. That sucker was powerful! Although you're not going to get an amp at 3V from a pair of AA batteries (and if you could, they might not last long enough for your girl to climax anyway). The one purchased was the "double bullets" model, which has two of these things wired in parallel. Holy burning batteries Batman! Even with both bullets in series, they still pulled about 400mA @ 3V. I think we can design the electronics with the assumption that these things are pretty much short-circuits.
We don't want our trance vibe burning out what we plug it into, on the Playstation end or otherwise. Adult toys and the electronics thereof (e.g. motors) vary wildly in quality, so we should assume the worst. To this end, the electronics are designed to play nice with the USB end even in the event of a dead short across the motor end. A series resistor limits the motor current at 5V to 500mA, neglecting any additional series resistance of the motor(s) or FET. Additionally, a fast-acting surface-mount fuse in series with the USB V+ line will blow if the total device drain (motor + controller + any LEDs, etc.) exceeds this value.
Although the intended application, Rez, typically only sets the motor to full power for brief periods at a time, the motor could be left maxed out indefinitely if the game crashes or the user sets this via the Tezt.exe program on a PC, and the design must account for this. To ensure device longevity and reliability, high-current components in the trance vibe sit on plenty of heat-spreading copper.
For those who just want the money shot, here is the finished
product, and a peek at the innards. Yay, it works! I think you have to
be a girl to really appreciate it, though. Oh well... I can be happy
knowing that I am doing my part to bring more orgasms to the world :-)
Since I don't have a copy of Rez (or, for that matter, a PS2) at my house, I wrote this program for testing the trance vibe on a Windows PC. I think user interfaces don't get much more simple than this. I don't have one to test with, but this should be able to control those non-homebrew trance vibes too. Based on some example code from others who have written similar software (as well as the amount of redundant data Rez sends), the official vibe's communications might be somewhat hit-or-miss.
Trance Vibe Test Program - requires LibUSB-Win32.
Source code for the above. Note, please
disregard any talk about cameras in the code/comments - I basically
copied the project files over from a previous USB-related project, Single-Use Camera Reader, and changed as little as possible to make it talk to a USB vibrator, because I Am LazyEfficient.
If you're into geeking/building electronics and still with me, you can put on your propeller hat and continue onward, through what is known as the technical crap.
I had a couple spare boards laying around from now-dead work projects, so I got them running and brought them to my friend's house to test on a live PS2 running Rez. Uncle Sam may have lost his interest in box tampering detection (hee hee), but the spare prototype boards (based around PIC18F4550 microprocessors, which have built-in USB interface hardware) can still be pressed into service as a USB sniffer and debugging platform.
While waiting for the real vibe boards to come in, I
programmed one of the prototype boards to log every packet sent by the
PS2 to a serial port. Here is the log
from a playthrough of one complete level, ASCII hex format. Each line is
one 8-byte control packet sent to the vibe's Endpoint 0 (Control).
Video: Packet-snarfing test boards
For some reason, contrary to several reverse-engineered Rez vibe control programs I've seen for the PC, I'm getting bRequest of 0x00, not 0x01, from the PS2. In reality, since ASCII Entertainment's vibe only does one thing (vibrate), only one type of request would ever need to be sent, so their trance vibe probably ignores that field anyway. We can do the same.
Data format from PS2 appears to be:
bRequest: 0x00
wValue: Both bytes set to (unsigned char) vibration level
wIndex: Low byte is lower nibble of vibration level; high byte 0x03 always.
Count: 0x00 (no data phase)
Ex: setting vibration level to 0x42
So, what's that weird low-nibble crap in wIndex? Maybe meant as a crude checksum? Maybe a bitfield originally meant to control something else, like an array of colored LEDs? Indeed, Rez only sets the vibe to a small set of possible values, and the contribution of the low nibble is unlikely to be noticeable to the user. (Can you tell the difference between vibration level 0x80 and 0x8F?) So it's entirely possible this was meant for greater things, but scrapped at the last minute. USB has its own checksum system built in at the hardware level; if you receive a packet at all you can be pretty sure it's valid. I considered adding a footprint for a tri-color LED just for giggles, but decided not to bother since the CalExotics control boxes are fairly opaque anyway. Maybe in the next revision :-)
The Drmn' Trance Vibe is based around a PIC18F2550 microcontroller, which incorporates its own program-storage FLASH and builtin USB interface. Kind of overkill, since we're only using 1 I/O pin, but it's a single-chip solution that can be had for about $5 in quantity (1000+) and $10 in single quantity from Digikey. The vast majority of the firmware is basically to handle the complex gyrations of talking over USB; for this I grabbed a copy of Bradley Minch's assembler USB stack and adapted it for vibratory use. All that had to be added was a bit of PWM and timer-messing code, plus some serial port I/O and debug code for my own diagnostics. (I did spend an ungodly amount of time writing and debugging my own USB stack in assembler, never managed to get it working past about the 2nd packet of device enumeration, and that's when Prof. Minch posted an announcement of his already-working code on the Microchip forums. Whee!)
Since I don't have my own PIC programmer, I adapted a copy of
the Jolt/Colt PIC18F bootloader for the x550, programmed the chips at
work, then loaded all subsequent tests / firmware files to it over the
serial port. My debug code streams a running commentary of the
comms/enumeration process to the chip's serial port pins, but will be
disabled by default in the actual vibrator to avoid missing any command
packets while writing out a long string of bytes. (Also, there's no
RS232 hardware anyway.)
Firmware ASM source and binary, relocated to 0x0200.
Even more technical crap...
I was sending a (legitimately work-related) board layout to be done by PCB Fab Express, who charge $65 for 5 pieces up to 10in^2. That's actually a fair amount of space, and far more than I needed for what I was sending out (three tiny stepup converters), so there was room to add some additional circuits, including the trance vibe. I've been getting steadily lazier about adding bogus traces between circuits to make them "one layout" in the eyes of the board house (they'd much rather charge you for each circuit as a separate order, even if it's only 1"x1"). This time they called me on it, wanting an extra $150 (on a $65 order, mind you) due to blatantly duplicated part numbers. I pointed out that we had been loyal customers for years, that it costs no more to manufacture a board with a "U1" next to a "U1" on the silkscreen, and that the competition will cheerfully run these boards, but they were still sticking out their hand for that $150, so I cancelled the order. Gold Phoenix made 155in^2 worth of boards for $119 including shipping, duplicate partnumbers and all, and even cut them apart for free. Now I have more vibe boards than I know what to do with. (I hear the chanting now... "Ebay them!") If there is demand, and people don't mind buying electronics that were assembled literally in some guy's bedroom, perhaps I will. $80+ for eBayed ASCII vibes is just outrageous.
The board layout is shown here (top) (bottom). The FETs, sitting on some copper for heat dissipation, were intended to each drive a single motor: I did have this shiny new "double bullets" apparatus in my goodie bag, after all. From my very brief (and interrupted) lab test of the bullets, I was expecting the vibe to easily drive two at 100mA or so. No dice. In the end I ended up driving a single bullet at near the full 500mA. Driving this through a single SOT23 FET--regardless of the manufacturer's claimed power rating--made the part uncomfortably warm and me a bit nervous. Ultimately I added the 2nd FET and paralleled them by scratching off a bit of the resist (green crap) between the two copper halves and bridging the gates together with a drop of solder.
Since you can't exactly just Google up a .dxf drawing for the
CalExotics vibrator, the hole pattern had to be determined by attacking
it with calipers. Amazingly, they're pretty exact - the control board
is a drop-in replacement for the original guts, no glue/drilling/filing
required (a first for one of my projects!).When populating the board I found that the assumptions I made
during layout (quick & dirty, after hours, and with the help of a
cold Heineken or three)--namely, "oh, this through-hole stuff won't
stick out far enough on the other side to get in the way" and "but if
it does, I can just clip the ends off"--were premature. The pins from
the oscillator and program header stick through enough, even after
clipping them down as far as possible, to prevent the PIC chip from
sitting flush against the board. Luckily, it's "good enough for
government work", so to speak, with a bit more generous solder
application. I actually had my company's CFO down in the lab soldering the first
prototype! It beats sitting and staring at Excel sheets all day. Of
course, she doesn't know she was building a vibrator, and I'd just as
soon keep it that way.
Email: drmn4ea @ that google-y moogley mail place
My bloggg