Einleitung
The positional tracking system built in to the OSVR HDK uses a collection of IR LEDs built in to the headset synchronized with a high-framerate IR camera. The LEDs are driven (in particular timings, patterns, etc.) by a dedicated STM8 microcontroller on a separate board inside the HDK, which unfortunately cannot be re-flashed over the HDK's existing USB connections.
This guide shows how to access the IR board and where/how you'd want to solder wires and a connector (though it doesn't teach how to solder or get into similar details). It forms a part of the overall instructions to reprogram the IR driver microcontroller.
There are tempting references sprinkled throughout that mention the "P5" programming connector and not having to solder. The only case in which you can use this is if and only if: a: your device actually has this connector (HDK 1.4 and HDK 2), and b: your programmer is an official ST-Link V2 bundle from ST or one of their distributors that came with the standard 0.1" pitch to 4-pin "Erni" cable (top-left cable in the image on that link to Digi-Key). Probably 99% of the devices you'll find labeled "ST-Link V2" do not meet these requirements.
Portions of this guide are based on other community-contributed iFixit guides for the HDK - thank you to those contributors for their work, especially their great photography! Their disclaimer applies to this as well, of course: they are not responsible if you break anything following this guide.
Werkzeuge
Ersatzteile
-
-
Lay HDK headset face down on a soft surface. Remove the two Phillips #00 screws from the bottom.
-
-
-
Turn the headset upright.
-
Behind the red box is a connector between a ribbon cable attached to the faceplate and a ribbon cable wrapped inside the body of the HMD. It's taped together in addition to the force of the connection, but is still somewhat fragile, so when opening, this left side should be treated as the "hinge".
-
There are now only two pairs of magnets at the top in the corners holding the faceplate to the body of the HMD. (In the inside image, one of the faceplate magnets is not pictured.)
-
There are two grooves on top, marked, to use in faceplate removal. Keeping in mind the minimal force holding the faceplate on, and the location of the faceplate connector, gently pull/fold the faceplate out and to the left. Do not use any tools for this step!
-
-
-
If you are following this guide to reprogram the IR board, and are able to use the "P5" programming connector - no more disassembly is required. The pink box indicates the location of P5 in an assembled HDK 1.x with the connector (1.4 units shipped with a P5-containing IR board).
-
Disconnect the board-to-board ribbon cable (connecting the IR board to the main circuit board) by lifting/tilting the white locking piece then gently sliding out the ribbon cable.
-
Flat on the surface of the IR board, about where the yellow arrow points, the orange ribbon cables (which carry the IR LEDs and additional positional tracking circuitry) connect to the IR board with the same sort of flat connector that is used between the faceplate ribbon cable and the main body.
-
The connector section of the ribbon cable is reinforced with a small board, which you can see just past the edge of the IR board itself. In a 1.4 or newer, as shown, it's right above the P5 connector (pink). If you come in from the front, you'll likely need a fingernail or pick/spudger. From behind the connector, a finger will probably be enough.
-
Once those two cables have been removed, you should be able to shimmy the IR board out: be careful not to tug on any of the orange ribbon cables (they should be attached to the HMD case with adhesive on rubber bumpers at each LED location). It's OK to press the rubber bumpers back down onto the case if the adhesive has pulled away.
-
-
-
First photo: connector attached, with ribbon cable unfolded out of the way for a clear view. Viewing the "top" of the board, which faces out the side of the HMD when installed.
-
When inside the HDK, the green arrow would be pointing out the front of the HMD.
-
When the orange ribbon cable with the LEDs is correctly left intact, it would actually gently bend (near the marked black line) over the IR board so that both blue arrows would point toward the top of the HMD.
-
Second image: connector immediately after disconnection, with both halves of the connector facing the camera. Again, ribbon cable unnaturally unfolded for ease of photography. As before, green arrows would point out the front, and blue arrows would point toward the top.
-
Here, you can see both the ribbon-cable side of the connector ("receptacle"), in yellow, and the board-side connector, highlighted in red. For a clearer view of how they mate, see the JAE WP7 series connector datasheet (board uses a JAE-WP7B-P040VA1) which has 3d renderings.
-
-
-
Here you can get a better look at the features from the previous step which may help in reassembly.
-
This is the board-to-board ribbon cable. Removing the main board end is much easier to re-assemble than removing the IR board end, so just leave this cable attached to the IR board while it's out.
-
This is the board half of the connector to the orange ribbon cables - you can see it's flat against the board and rectangular in shape (and not necessarily perfectly square with the board), which might help you visualize reconnecting it.
-
This is the "P5" programming header suitable for use with official, full ST-Link v2 kits with cable bundle. Earlier boards do not have this connector or even this section of circuit board jutting out - that's nothing to worry about. The pinout is a duplicate of P3.
-
At the bottom-center, below the STM8 microcontroller, is a pair of unpopulated headers. The P3 header, highlighted in orange, is the programming header, and thus the one we're interested in. Pin 1 and 4 are numbered in the silkscreen, and pin 1 is also marked with a dot and has a square, rather than circular, pad.
-
-
-
For both of my examples, I chose a CD-ROM Audio connector that I scavenged and desoldered from an old sound card. Nothing special, except that they are the right pitch (0.1 inches), 4 pins, and have a clearly labeled pin 1, so when the "notch" is down, the pins match the order of the header on the board.
-
Unless you come up with a clever alternative method, you'll have some bare wire here after soldering. If there's a lot, you might want to use heat shrink tubing (or at least electrical tape) to avoid the possibility of causing a short.
-
The particular connector you choose doesn't really matter as long as you can solder to one end of it, you can keep track of which end is pin 1, and it's the right pitch for the cable from your STM8 programmer (which is often 0.1").
-
-
-
You'll want to choose some wire that is not too thick (needs to fit in the holes in the circuit board) and ideally flexible enough that you can easily fold the connector and wire back into the HDK and reassemble.
-
The example with the red wire is solid hookup wire from a spool, 22 AWG (0.65mm diameter). It's a little stiff: it works, but it's not very bendable.
-
The multi-colored wire in the other example is two of the four twisted pairs out of some "riser-rated" CAT5e - 24 AWG (0.51mm diameter) solid. (I put the two pairs into heatshrink to make it tidier.) This is much nicer: flexes easier to move in and out of the headset, and less bulky. The pairs don't really matter since only one wire is a data wire.
-
Whatever wire you choose, you'll want 4 wires about 1.5" or 4cm long, with ends stripped and tinned so you can solder them. You'll also want to take care during the process, especially if your wires are all the same color, that you're keeping the wires in order.
-
-
-
Start by soldering the connector end of the wires to the connector you've chosen. How to solder is beyond the scope of this guide, but remember that you want smooth, shiny solder joints.
-
-
-
Insert the wires from the connector through the "top" of the board (the side with the P3 silkscreen), making sure that you've matched pin 1 of P3 with the pin 1 wire from your connector.
-
While holding the wires in place, carefully turn the circuit board over so that the "top" side faces down and the tinned ends of the wires protrude through the circuit board. (You may wish to use a soldering clamp or similar tool to help at this point.)
-
Apply flux and carefully solder all four wires (heating both pad and wire, then applying solder once hot). The solder should wick down through the plated through-hole to the other side, turning the copper pads to a silver color on both sides and smoothly reaching up the wire.
-
Once the solder joints have cooled (without moving!), and you are confident that they are solid, clean, and shiny all around, you can trim the excess wire protruding from the bottom of the board.
-
-
-
If you're using a generic, metal-cased "USB stick" style programmer, it will likely have a pinout diagram on it like this. Recall from the P3 pinout that we have 3.3V, SWIM, GND, and RST, in that order, on the board - and now on your connector!
-
Conveniently, this programmer has those same pins right next to each other (though in reverse order) starting at its own pin 1, indicated by that embossed arrow in the plastic. I used the cables it came with, connecting white to RST, black to GND, brown to SWIM (the data line), and red to 3.3V.
-
On my CD-Audio connectors, with the notch for the "tab" down, pin 1 is on the left, so that means the correct order left to right would then be red, brown, black, and white, as pictured. The cable colors may vary, but make sure the order matches.
-
You can now proceed with the programming!
-
Proceed with the rest of the IR board programming instructions. If you wish to re-program the board in the future, you will only have to open the faceplate and access the header you've already added (if applicable).
To reassemble your device, follow the disassembly instructions in reverse order.
If you added a header on a cable, fold it in carefully. Some have modified their headset so that they can leave the header cable protruding out the bottom for future upgrades without opening the faceplate.
Be sure to not disturb the location of the rubber bumpers and LEDs on the IR ribbon cables.
Give the connector to the faceplate ribbon cable a gentle squeeze to make sure it has stayed connected.
If any rubber bumpers around LEDs have pulled away from the HDK outer case, re-adhere them back on to the case without disturbing their position in the other directions.
2 Kommentare
Hi Ryan,
I’ve found that 4-pin ERNI ‘P5’ connector is very similar to 4-pin speaker connectors used in many tablets and laptops (at least Asus and Acer brands [but Dell and Lenovo are thicker]). This speakers connectors are a bit narrower than ERNI, so pins distance is shorter too. But it’s small difference, so pressing it with force gently wil bend pins enough to fit.
I do wonder about which programmer to buy, because original STM programmer costs about $12( [CN] version, without ERNI connector) or $22 ( [EN] version with proper ERNI 4pin connector). Generic clones costs $3-$4, and as you stated provide enough juice to drive board with leds(so I understand it’s safer than using original STM programmer and additional power supply for HDK2?).
On the other hand I’ve found info that STM32 can be programmed using USB-to-Serial adapter(which I got few around), but not sure if it’s apply to HDK2 IR board too (probably proper bootloader is needed, some boards needs switching jumpers to ‘BOOT’, etc.) Any idea about HDK?
It’s STM8, not STM32, which is why you can’t just do USB serial. STM8 is very barebones and cheap.
I think Adafruit now actually sells cables of the right type or very close: https://www.adafruit.com/product/4722 Only five years after I needed one :) I never had one of the original STM programmers, and I did the second firmware revision. I personally did both the “add a connector you have” approach in the guide, as well as bought some cheap 1.25mm/1.27mm connector pairs on eBay and filed them down until they fit. (To be honest the Adafruit ones look like the ones I have - so some filing might be required.)
The legit STM one with the cable isn’t too expensive, honestly, so if you might use it for something else later, just go for that and save yourself the hassle.