Just for fun I
wrote a software to recognize the beat of a Cock Hero video, seeing that it performed quite well,
I also decided to built the vibrating toy that goes with it and... I was very pleased with it!
Since the Cock Hero community is quite
big, I figured that someone could be interested in building one for
himself, I'm going to explain how in this blog.
The CHM software reads SubRip Subtitle files (.SRT) format, here's an example of an .SRT file content:
1
00:00:00,000 --> 00:00:05,000 <<<Time interval to perform the action
100 <<<Speed (from 0 to 100%)
2
00:00:05,500 --> 00:00:06,000
20
3
00:00:07,000 --> 00:00:08,000
50
4
....
You can use the new keyboard shortcuts to jump from an SRT command to another and to fine-tune the SRT game with the CH video timeline(check out the Readme).
Now the CHM is completely functional, but it's a mess of circuits and flying wires, let's make a nice enclosure.
A nice enclosure for the CHM
Here's what you need:
A plastic box big enough to fit all the components inside
A perforated prototyping board
Two banana jacks (male)
Two panel mount banana jacks (female)
2.5mm panel mount power jack(female)
First of all cut a piece of perforated board the right size to fit inside the box, place the components and solder all in place. Follow these schematics:
Connect the mosfet module:
Connect the HC-05 bluetooth module:
Drill three holes in the plastic box for the panel mount connectors, stuff the circuitry inside the box (hold things down with hot glue), solder the female banana plugs and the power jack, then close the box(To reduce the size a bit, I switched the Arduino Uno for an Arduino Nano, not a big deal since the pinout is the same):
To get rid of the annoying USB cord, all we need is a little HC-05 module and a PC with bluetooth connection.
Follow this diagram to add an HC-05 Bluetooth module to the Arduino board:
Now the Arduino doesn't need the USB cord anymore and it's directly powered by the 12 volt power supply.
To pair the HC-05 module with your computer, use the default password
"1234".
Check the device properties on your PC to see if it is correctly paired and the COM port is available:
This part is a bit tricky but not at all difficult, for every step there's a short video tutorial to make things easier, all you need is bit of manual dexterity and the right tools.
We are going to build this object out of brass and silver steel (all measures in millimeters):
Let's start with the grocery list (all can be found online on Ebay or Amazon):
10mm diamater brass bar
2mm diameter silver steel bar (basically the shaft of a small DC motor, you can extract it from a motor or buy online).
Epoxy glue.
Insulated wire with a solid core of about 1.5 mm diameter (AWG 15)
Stainless steel shaft sleeve for a 2mm shaft
A few basic tools are also needed: plyers, an hacksaw, a grinding machine (or a file), a good soldering iron, 2mm and 10mm drill bits and a drill press (but you can get along with a regular drill and a steady hand).
First of all let's cut a 10mm height cylinder from the brass bar, square its two faces as best as possible and build a fixture for it by drilling a 10mm hole into a scrap piece of wood:
Next, glue the motor shaft into the center hole and a piece of the silver steel bar into the other hole, when the glue is cured cut the silver steel bar to about 10mm:
Last step is to take a piece of the insulated wire, strip the insulation on one end and with the help of some plyers create two loops: one to fit the silver steel rod to be kept in place with the shaft sleeve, the other one to fit your size...:
As a final touch add some hot glue as strain relief for the wires and wrap everything up with a shrink tube for a better grip and to protect the motor from sweat or any other fluid...
The CockHeroMachine is open-source, so you can produce your own at any time from the guidehere. However, if you can't be bothered, you can buy one directly from me. Here'sthe deal:
If you are interested in getting one, write me an E-mail with your shipping address. I'll reply back with a payment request. I'll proceed with packaging and mailing as soon as the transaction is confirmed.
(*)I take the most care to ship the items but there's always a small chance the package could be damaged or lost. I DO NOT RESHIP, if you're not willing to take the risk, please consider building one yourself.
To build the circuit you'll need a good soldering iron and a few readily available electronic components: a mosfet driver module, a DC motor and a 12V power source.
This is the most common mosfet module you can find in online stores:
It allows the Arduino to drive the motor. Follow this schematic to connect it:
The module can be used as it is, but I strongly recommend to add a schottky diode and a 100pF ceramic capacitor in parallel with the output to protect the Mosfet:
(Be sure the diode is in the right direction)
For the motor, anything with more than 20g*cm torque is fine. Be sure the shaft is at least 1cm long.
If you're in doubt, the ubiquitous FC-280PC/SC is a good choice for its high torque and low cost:
You can use an 8 cell AA battery holder as a power source:
If you don't like to waste batteries, any 12V / 2Apower supply adapter would work as well.
Follow the schematic, when everything is connected, test the circuit using the Cock Hero Machine software:
To build the Cock Hero Machine, the first thing you need is an Arduino:
Arduino UNO
The Arduino boards came in different flavors, I'm going to demonstrate with an Arduino UNO, but the method is the same for all the different types of Arduino boards:
The Cock Hero Machine Software uses the Open Source Computer Vision Library(OpenCV)
to detect the beats in the beatmeter of Cock Hero videos.
The CHM software is free and opensource, here's the direct link to the latest release:
If the Cock Hero Machine is already connected to your PC, hit the CONNECT button and wait a few seconds until the connection is established.
To play Cock Hero follow these 4
simple steps:
1) Take a screenshot of the beat, do it
by moving the mouse cursor over a single beat on the beatmeter of the CH video and
press F9, a window with the screenshoot will pop up.
2) With the Xsize and Ysize sliders
frame the beat.
3) Check DETECT SETUP and play the
video, every time the program spot a correspondency, a green light
came up, adjust the Treshold slider so that the beats are detected
perfectly(keep an eye on the numbers in the consolle, they may be helpful in this task).
4) When you're ready to play, set the toy in place and check DETECT to start the game.
To change the pulse
frequency and speed use the TIME ON and the SPEED sliders.
With the "Invert" flag selected, the software detect any major
shape change instead of looking for a match. This may be helpful for CH
videos with beats that are harder to detect because they change shape.
If you use this method, the only thing to remember is to take a
screenshoot of the baseline instead of the beat:
Numpad 1 and Numpad 2 vary the speed of the motor;
F9 Take a screenshot;
F10 Update the screenshoot without using the mouse (very useful when the mouse triggers the timeline of the movie player);
F11 Save current state;
F12 Load previous states(from latest to first).
(You can change the default keys by editing setup.txt in the main folder).
That's it! The ALWAYS ON and PULSE buttons are there if you just want to have fun without playing Cock Hero.
A few considerations:
Sometimes there are some elements that
interfere with the detection, Beats that change colors, shapes or position are
harder to detect, sometimes beats jump a frame and are missed. There
are a few work around, you can play with the treshold and XYsize
slides, also the invert flag helps a lot in same cases... It really depends on the type of the beatmeter, just experiment for yourself with various CH videos.
Other features:
V0.9.7: Toy-code support, Funscripts on the CHM! V0.9.5: Subtitle files (.SRT) support V0.9.3: Vibratory patterns