Archive for the Electronic projects Category

Converting the Suncom SFS Throttle to USB

The time has come to convert the Suncom throttle as well.

sfs_throttle

Suncom SFS Throttle

 

The Suncom SFS is a pretty well made throttle with split grip and programmable buttons. The programmable feature was good for the days where game ports could only support 4 buttons, but USB game controllers have no such limit.

I strongly recommend reading the previous post on the Suncom joystick as it has several tips I will not repeat here.

 

Suncom SFS hardware overview

The Suncom SFS have pretty dense electronics under the hood. It has 3 separate PCBs and a whole bunch of cable harnesses. As opposed to the Suncom joystick, there is no separate controller for the buttons. Instead, the buttons are electronically ordered in a grid of 4 by 4, and need to be scanned sequentially to get their status.

SFS_original_electronics

Suncom SFS original electronics

 

Preparation before fitting the new hardware

1. Remove the old PCBs

3 PCBs need to be removed. The first one is the smallest. It holds the 2 extension connectors. Remove the screws and pull the PCB out. You will probably need to use some force and bend the surrounding plastic to get this one out. Do it carefully. The other 2 PCBs will be easier to remove. When removing the mid size PCB, pay attention that this will loosen up the 4 red button cups, take care not to loose them.

SFS_pcbs

Throttle’s 3 PCBs taken apart

2. Disconnect cables.

The main body should be disconnected now from the PCBs. There are 2 cable harnesses coming from the grips (11 pin and 5 pin) and 4 wires coming from the potentiometers.  All the wires are connected to the main PCB. The cables should be just pulled out from the board. The 4 POT wires should be de-soldered.

Main_PCB

Disconnecting cables and wires

 

3. Adding a 3rd wire to the POTs

In the original electronics, as in all PC Game-Port devices, only 2 wires are connected to the potentiometers. But in our case we need 3: VCC, GND and return. So, as in the joystick case, we need to add another wire to the POT’s pin number 3. The POTs are not easily accessible  for soldering. To get access we need to detach the grip assembly from the main body.  To do that, first remove the 4 screws attaching the grip assembly to the body:

GripAssyScrews

Yes, this time the screws are not just for decoration

Now carefully lift the grip assembly out of the main body. You will need to play with it a bit and again maybe use some slight force to do it. Be very careful not to damage the wires while doing so!

Now that the POTs are accessible, add a 3rd wire to both POTs by soldering an extra wire to pin number 1 (might be pin no 3 if the POT is flipped)

pot1

Right pot, a wire should be soldered to pin 1

pot2

Left pot with pin 1 already wired

Note wire colors for later:  Wire connected to the pin closest to the front of the throttle (pin 3 on both POTs in my case) is the VCC. Back wire is the GND, and middle wire is the return.

You can now reattach the grips assembly back to the body, again, careful on the wires.

 4. Salvaging parts from the main PCB.

Some electronic components from the main PCB are needed for reuse. You will need to carefully de-solder the following parts: The 9 LEDs, the 4 tact switches, the slide switch, the 5 pin connector, the 22 pin right-angled pin header, and the 4 diodes.

PartsToSalvage

Components from main board needed for the new PCB

Preparations done!

 

Assembling the new PCB

1. Collect necessary parts

Order a PCB from Itead Studio, using the attached Gerber Files.
Order parts from digikey or another place, using the attached BOM.
Find a USB cable.  I used a USB2 extension cable, and just cut the female end.
(For any of you who wish to play with the PCB, here is the complete KiCad project: SuncomSFS_Kicad)

2. Assemble the PCB

Start with the SMD parts.As noted in the Joystick post, there are many Youtube tutorials on how to solder smd parts. Here is my method:

For resistors/capacitors, First apply some lead with the soldering iron on one of the pads on the PCB. Then using tweezers pick the resistor/capacitor and solder one side to the already coated pad. Now that the component is fixed into place go ahead and solder the other side.

For fine pitch ICs, such the PIC MCU, again, apply some lead on one of the component pads on the PCB, then solder the component to its place, and since only 1 pin is being soldered to the one coated pad, it is easy to play with the IC until all pins are aligned correctly. Then solder another pin on the other side of the IC fixing it into place. Make sure that all the pins are still aligned to the pads, and then start to solder all the rest of the pins. You don’t have to be accurate and it is OK if you short a pin or 2 at this stage. When all pins are soldered, Use solder-wick to remove excess lead from the pins, freeing any of the shorted ones on the way. Use a cleaning solvent to remove any leftover dirt. Using a magnifier glass  inspect and make sure all pins are soldered correctly and no shorts left.

pcbSmd

New PCB with smd parts assembled

Next, Solder all through-hole components (3 connectors, 5 switches, 4 diodes and 9 LEDs). For each components, first solder 1 pin, then make sure the component is places correctly, and only then solder the rest of the pins. (if it is not places correctly, since only one pin is soldered, you can heat-up this pin with the soldering Iron and move the component until it is placed correctly.) for the LEDs, pay attention for the polarity: align the strait cut on the bottom of the led dome with the strait line on the PCB symbol. The LEDs should have a small bending on their leads helping you place them at the correct height above the PCB. Note also the diodes polarity – black stripe on diode goes to the white line on the PCB.
Important note: The the JST programming connector goes on the BACK side of the PCB.

3. prepare the USB cable.

To hold the new cable nicely into the body, we need to reuse the rubber gasket that held the original cables. There are 2 cables passing through the gasket. Cut both cables as close as possible to the surface of the gasket from both sides.

SFSGasket1

Cable gasket. Cut on both sides.

After cutting the cables, pull out all internal wires from the gasket to free the holes. Take the new USB cable. If you use a USB extension cable as I did, cut out the female side. Try to pass the cut edge of the new cable through the gasket hole (either of them).  If the hole is too tight, measure the cable diameter, and use a standard drill bit with the similar diameter to widen the hole. Make sure you insert the cable from the correct side.

SFSUSBCable

New USB cable inserted through gasket.

After the cable is inserted, expose about 1 Inch of wires from the cut edge, then from each wire expose a few millimeters of copper.

It is very important now to make sure the wire colors of the USB cable are correct. (In my case I found out that they ware not). Using a multimeter or similar device make sure the wire colors are as in the following pinout table:

USBConn

USB type A connector looking from the front side.

1. Red (VCC)
2. White (D-)
3. Green (D+)
4. Black (GND)

If the wiring is not correct, make sure you map them correctly when connecting to the PCB.

4. Connecting the PCB to the main body

First you want to solder the USB cable to the PCB. Use the following image to see where each wire goes:

SFSPCBUSB

USB cable to PCB wire connection.

Now you need to connect the 3 x 2 potentiometers wires.  Solder the POT wires using the image below and the notes you made at step 3 of preparation stage.

PCBPOT1

Left POT connections

PCBPOT2

Right POT connections

Last, you need to connect the 5 and 11 wire cables coming from the grip assembly. There is only one way to connect the 5 pin connector. The 11 pin connector connect to the upper line of pins in the 11 pin header, noting that the side with brown and black wires are toward pin number 1.

SFSPCBComplete

PCB fully assembled and connected to main body.

 5. Fitting the PCB in place.

Before placing the PCB in place, make sure the slide switch is aligned with its cup on the body. Now carefully place back the 4 red tact switch caps. Make sure the springs in the cups are placed correctly. Carefully turn the PCB upside down making sure all connected wires are getting in the way of the switches or the screw holes. Screw back the 3 PCB screws to hold the PCB in place.

PCBInPlace

PCB fit in place.

That’s about it for the hardware part!

Programming the software

The software for the PIC is similar to the one used on the F15 joystick. Similarly, when the slide-switch is on (LED is lit), several buttons become toggle buttons. The left and right grip are mapped to X and Y analog axis. In addition there are 16 switches, and 2 8-direction POVs.

Download the project from this link: SuncomUsbThrottle_PIC18F25K20

Use the same procedure as in the Suncom Joystick post to program the Throttle.

That’s it for the software part!

Final touch

Before closing everything, 2 last things should be done:

1. You may want to cover the original extension connector holes by inserting back the small connector PCB. Cut all wires coming out of it before you do so.

2. As one of the readers suggested, place a cable tie at the entry side of the USB cable, to make sure the cable will not be accidentally pulled out.  (Thank you, Craig!)

SFSFinalTouch

Final touch

SFSCableEntry

Cable entry and extension connectors in place

Thats all!

Close up the bottom plate, and enjoy your renewed Suncom SFS Throttle!

-SHS

Update:
As asked by Rajeen, here is a (rough) button connections diagram for the grip: GripButtonDiagram

Converting old Game-port joysticks to USB

This project intend to revive old PC Game port type joysticks by converting them to modern USB HID game device.

So, you want to convert your good old Suncom F15 Talon joystick from this:

OldCon

into this:

NewCon

In this post I will explain in detail how to convert an old Game Port joystick to USB using pic microcontroller. I will also provide PCB schematics and PIC firmware.

Note: This project requires basic electronics understanding and soldering skills, And of course, everything provided here is given as-is, use it wisely and on your own risk.

This project is intended to replace the hardware of a Suncom f15 Talon joystick, but with little tweaks can be used for other types of joysticks. The PCB have several extra inputs to accommodate for extra inputs/axis.

Suncom F15 Talon joystick

The SFT joystick, aside from Game-port connector, have a keyboard bypass connector that enables the joystick to convert joystick buttons into keystrokes. This function was necessary since PC Game-port supports only 4 buttons. It has a programmable feature to set what key is mapped to which button. This function is now obsolete since a USB joystick can support as many buttons as needed. The joystick itself contains 2 PCBs inside, one at the base that controls all programmable functions and keyboard emulation, and another one inside the grip that collects all button presses and communicate them with the base PCB. I had to reverse engineer this communication since the communication chip was too old to find a datasheet for. Turns out its a simple parallel to serial converter, easily handled by a microcontroller. This also eliminate the need to replace the PCB in the grip.

Dismantling the SFT base PCB

We now need to carefully remove the base PCB taking notes of some wiring connections.

Open the base: remove the suction cups by unscrewing them. Reveal the base screws by pealing off the rubber pads. Unscrew the base screws and remove the metal base.

Remove the PCB: Unscrew the 5 PCB holding screws. Lift the PCB. Using a soldering iron start removing all wires from the PCB. There are 4 wires connecting the pots, and 9 wires connecting the grip. 5 of the wires coming from the grip must be carefully noted and marked before disconnection: GND, PR, CS, D0-D1, and Pi-P/S

bottom_pcb_note

Note and mark these wires!

The other 4 wires coming from the grip are the original game port buttons and we don’t need them. (There is a button in the grip just under the POV lever, that selects if the 4 main buttons will be send using the com chip or using the 4 direct wires. By default its on, so we do not need the direct button wiring)

Salvage necessary components: Some parts are needed to be salvaged from the main PCB, to be used on the replacement one. Carefully remove the 4 tact buttons, the slider switch and the 5 LEDs. (these parts are rather standard, so they can be replaced with new ones if needed)

Further preparations: The original game-port used only 2 wires per potentiometer it used a very unreliable method to measure the pots state. The new PCB used DA converters to detect POT state. For this we need 3 wire per pot – VCC, GND, and return. Applying VCC and GND to the POT ends, gives a voltage on the return pin that is relative to the POT dial position. Add an extra wire to each POT as in the following photo, and take note of the pin names:

pot_conn

Potentiometer connections


Replacement PCB

The new PCB I designed is based on Microchip’s PIC18F25K50. All other components are just capacitors/resistors and the salvaged parts. Here are all the files you need in order to make this PCB yourself:

Schematics:  SuncomF15
Kicad Project: SuncomF15KicadProj
Gerber files: gerbers_suncomf15_5by10_Green_HASL_1.6mm
Part list: Suncom_F15_BOM

Feel free to use/change/distribute these files. There are no restrictions whatsoever.

The simplest way to have this PCB is to get it manufactured on line. For merely 15$ you can get 10 pieces using this fine website:  IteadStudio. Just select and buy the “2Layer Green PCB 5cm x 10cm Max“, note the order #, and send them an email with the Gerber zip file attached. (see detailed instructions on the product page).

PCB Assembling

After obtaining the parts and PCB you will need to assemble it. The PCB is 2 layered with components on both sides. First you should assemble the PIC, the programming connector, and all capacitors and resistors. Then on the other side, assemble LEDs and switches. Then connect all the wires.

Assembling PIC and res/caps: This stage is mostly SMD soldering. If you are not familiar with it, there are a lot of tutorials on Youtube. Its not that difficult. Start with the PIC, then resistors/capacitors, then solder the JST programming connector.

Assy_step1

Assembling SMD components

Assembling the Switches: First assemble the tact buttons. Make sure they are fully inserted into the PCB:

Assembling tact switches

Assembling tact switches

Next you need to solder the slide switch. The PCB I designed have no space for the switch mounting holes, so you will have to Cut/file the mounting legs out:

Cutting slide switch mounting pins

Cutting slide switch mounting pins

Then solder it to the PCB, direction is irrelevant, it is symmetric.

Assembling the LEDs: The LEDs are a bit tricky to solder since they have to be mounted in a certain height to fit the led holes in the plastic base correctly. Any method can be used but here is how I did it. First I placed a piece of  tape over the holes of the LEDs from the outside:

Placing a tape over the holes of the LEDs

Then I inserted the LEDs into the PCB without soldering them. Next, I carefully turned the PCB over and placed it inside the base in the correct location, using the screw holes as guides. I then let the LED fall into place. The tape will prevent them from falling too low. And if you use a clear tape, you can make sure the LEDs indeed fell into place correctly. I then put 2 screws to hold the PCB, and solder the LEDs inside the plastic base. Take extra care as not to damage the plastic with the soldering iron.

Placing the PCB and letting the LEDs fall into place.

Placing the PCB and letting the LEDs fall into place.

Connecting a USB cable: You will need a USB cable for this. Either salvage it from an old unused USB device, or just get a USB2 extension cable from EBAY and cut the female edge. You will also need to salvage the rubber gasket at the entry of the cable into the base, from the old cable. Just cut the old cable from both sides of the gasket and remove the inner wires from it. Then, insert the cut side of the USB cable through the gasket, making sure it is from the correct side:

Passing the USB cable inside the gasket

Passing the USB cable inside the gasket

Next, Solder the cable to the PCB from the switch side. The cable should be color coded, if not, you will have to figure out each wire functionality.
Connect green wire to D+
Connect white wire to D-
Connect red wire to the square pad
Connect the black wire to the last pad

USB cable wire connections

USB cable wire connections

PCB completed with LEDs switches and cable

PCB completed with LEDs switches and cable

Connecting grip wires: Its time to connect the 5 grip wires. They should be connected based on the markings made in the “Removing PCB” section. I have added wire colors based on my own joystick, but I can not guaranty its the same for all.

Connect CS wire (Dark blue) to CK pad
Connect Pi-P/S wire (Brown) to ST pad
Connect D0-D1 wire (Gray) to DA pad
Connect PR wire (Red) to the square pad on the bottom left
Connect GND wire (Black) to the bottom right pad

assy_grip

Connecting the 5 wires of the grip

Connecting the potentiometers: We now connect the potentiometers to the analog inputs. Connect x axis pot to the A1 analog input and the y axis pot to A2.

assy_pots

Connecting the potentiometers

Note: Make sure the potentiometers wires are long enough, if not, you must replace or extend them.

Wrapping up: That’s it! The hardware part is finished. All is left is to fix the PCB into the base. Place back the red button cups with their spring in place. Align the slider switch hat with the slider switch itself. Carefully place the PCB into its place aligning the switches with the cups. Fasten the 3 screws to hold the PCB in its place. Press the red buttons and move the slider switch to make sure all is working mechanically.

Placing red cups and aligning the slide switch

Placing red cups and aligning the slide switch

Lastly, Fit the rubber cable gasket in its place.

PCB is fasten in place. Rubber gasket is fit.

PCB is fasten in place. Rubber gasket is fit.


 

Software

The software for the PIC is based ob Microchip’s HID game device demo. I have adjusted it to fit specifically for the Suncom F15 Talon. For other joysticks you will have to tweak the SW accordingly. It shouldn’t be that hard. A feature I added in my version is that when the slide-switch is on (LED is lit), the base buttons become toggle buttons. When the switch is off, they are momentary.

Download the project from this link: SuncomUsbJoystick_PIC18F25K20

The project can be compiled with Microchip MPLAB IDE 8.56 and up. If no tweaks are needed, just use the hex file available in the above zip. You will have to make an adapter cable from PicKit/ICD to JST. Just connect pins 1 – 5 of the programmer to pins 1 – 5 of the JST connector. Pin 6 is unused. Here is an example programming cable for pickit 3:

pic_cable

PicKit 3 programming cable

Thats it!


 

An optional mechanical tweak

This step is optional, but I find this tweak as a very nice improvement to the Suncom joystick.  The Suncom have a 4 way POV. The POV input comprises of 4 tact switches for north, south, east and west directions. Theoretically, by detection of two switches pressed together, it is possible to add the sub-directions as well: north-east, north-west, south-east, and south-west. However, the Joystick mechanically prevents it. Here is a way to overcome this mechanical limitation. Caution:  do this tweak carefully as you might mechanically damage the stick.

For this part, you will have to take apart the joystick’s grip. First, pull out the 2 4-way controls cups. Then unscrew the grip screws and carefully separate the 3 plastic pieces comprising the grip. After opening the grip, remove the 2 screws holding the grip’s PCB, and remove the PCB. During this process, springs and button cups may fall, so be careful not to loose anything. Now take a look at the POV base (The POV is the right 4-way control). There is a concave indentation with 4 pins from 4 sides. These pins limit the POV stick movement. Cut about 2 mm from their height to remove this limitation:

pov_tweak1

Cutting the limit pins

Next, we address the POV stick itself. We need to add some thickness to the stick plate. We do it by adding a layer of isolation tape to the bottom side of the plate:

pov_trweak2

Adding a layer of tape

Lastly we need to address the cover. The opening in the grip plastic for the POV stick is “+” shaped to make place for 4-way movement. You will need to file it to make way for the 4 other directions. I used a small round file to add slits for the “X” directions:

pov_tweak3

Filing the “X” directions.

Voila! You have an 8 directions POV now. You might need fine tune these changes if it does not work at the first try.


 

Good luck, and if you have questions, feel free to leave a comment.

-SHS