Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circuit schematic/pcb layout #1

Open
minipc opened this issue Mar 17, 2020 · 7 comments
Open

circuit schematic/pcb layout #1

minipc opened this issue Mar 17, 2020 · 7 comments

Comments

@minipc
Copy link

minipc commented Mar 17, 2020

more of a request than issue:

i was wondering if either the circuit schematic or pcb layout for this project were available anywhere? and if not if they could be made available?

i have scrutinised frame grabs of the pcb layout and assembled pcb taken from the second and first youtubes relating to this project and am having trouble reconciling the positions of the resistors and bridging connectors visible in the finished assembly featured in the first video with positions of the solder pads of the pcb layout featured in the second video.

@Atrixium
Copy link
Owner

Sorry about that, the documentation is... Not great. I never actually expected anyone else to see this project! I'm sure I have everything backed up, board layout, PCB etc, so I'll make sure to get it all on here and answer any questions you might have!

@Atrixium
Copy link
Owner

I just uploaded basically all I have on the project, hopefully that helps. I remember something about having to bodge something on the board as well, so I'll take it apart later on and see if I can remember what it was.

@minipc
Copy link
Author

minipc commented Mar 18, 2020

no need to apologise :) i guess interest in the project may largely depend on how many people happen to have vintage thrustmaster sticks and throttles they're considering upgrading to the 21st century ;)

i happen to have a basically unused thrustmaster pro flight control system stick and am wondering if it's worth trying to source a weapons control system ii throttle in order to do a conversion similar to yours, or whether to just convert the stick alone. the possibility of restricting mods to a potentially beat up second hand throttle, and leaving the stick in pristine condition seemed attractive, although i note from what you've uploaded that some modification of the stick's wiring is unavoidable.

there are a number of youtube tutorials that cover the use of shift registers and pots with arduinos. and there are clues in the arduino sketch. so i could have probably inferred that side of things, if i'd really put my mind to it. what wasn't so clear was how the game and ps2 ports connected up. which is why i reached out.

it's interesting that you mention perhaps bodging something on the pcb. while comparing the youtubes, i did wonder if i was looking at two different versions of it. indeed, the layout in the uploaded brd file is quite different from that shown in the second youtube.

thank you so much for such a speedy and thorough response. the brd file alone will be a great help. all i can think of further to ask is whether with hindsight there was anything you might have done differently, like perhaps locating the pro micro board closer to the edge of the pcb? or was there some reason to set the micro usb connector back from the side of the enclosure? actually, i think you've already done enough for the issue to be closed :)

@Atrixium
Copy link
Owner

The design decisions were mostly fueled by my inexperience :) Going back and doing it again I definitely would have either mounted the micro in such a way that the USB port was easier to get to, or wired in an extension to allow better port placement. I think I also would have gone straight to the 16bit ADC, the 10 bits of precision Saree good enough and on par with most joysticks, but why not make it better :)

I think a better electrical engineer (I'm just a self-taught hobbyist) could have made the circuit work without modifying the joystick, but I couldn't figure out how to do it at the time and I also figured I'd never have another machine with a game port connection :)

Anyway, thanks for your interest in the project and I'll post any other useful tidbits as I recall them! I'd really like to finish this project and get the rudders working properly but real life keeps getting in the way!

@minipc
Copy link
Author

minipc commented Mar 19, 2020

thanks for sharing your insights.

i'm guessing that the gameport standard involved the analogue signals being read as some kind of measurement of resistance, as the pots in the flight stick are wired up as rheostats. obviously if you ground the unconnected terminals you produce a voltage divider that can be measured directly on a arduino analogue input. you could also create a voltage divider by connecting the pot's tap terminal to a fixed value external resistor connected to ground. if you feed the tap voltage into an analogue input it won't vary linearly with stick movement. but knowing the input voltage and the fixed resistor value allows you to calculate the resistance in the pot. and that should vary linearly with stick movement. which would avoid stick modding.

regarding 10bit adc precision, busting out the digital multimeter reveals that the 10bits apply to practically the whole effective electrical angle of the 100k pots, at least on my device (your sketch suggests the same for your top gun variation.) that resolves at the end of a roughly 200mm stick to about a 0.3mm step size. which seems more than adequate. but even before resorting to high precision external adc's, you could apply the technique of oversampling and decimation to improve bit precision in software. the sketch already takes an average of five 10bit readings. taking 4 readings and applying a single right shift to the sum effectively produces 11bit precision. taking 16 readings and applying a double right shift would produce 12bit precision. and so on. but given the geometry of the stick even 12bit accuracy would seem like overkill. excessive oversampling can severly limit frequency analysis of rapidly varying signals. but that wouldn't really apply in this situation. so there's no reason not to use it, at least for 11bit precision.

just some thoughts :)

@minipc
Copy link
Author

minipc commented Mar 20, 2020

isn't it always the way that you only spot your mistakes after you've expressed them in public? ;)

of course, using an external resistor to form a voltage divider in the way i describe reduces stick resolution. so probably not a good idea. my bad.

i've since discovered gameports measure resistance using a capacitor charging timer method. seems there's more than one way to skin this particular cat. (no cats were harmed in the creation of this post.)

@Atrixium
Copy link
Owner

Yeah, my first attempt was to just add a resistor, but the lack of resolution was a problem, and then when I messed with the divider ratio I ended up with non-linearity, so in the interest of getting the project done I stuck with what I knew would work and just rewired the stick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants