Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4378631 - 09/09/17 05:35 AM FLCS Arduino/MMJoy conversion - need a little help  
Joined: Apr 2017
Posts: 79
Tazz Offline
Junior Member
Tazz  Offline
Junior Member

Joined: Apr 2017
Posts: 79
Wellington, NZ
I'm working on converting my first FLCS and TQS set using two "Arduino" Micro ATmega32u4 5V / 16Mhz controllers I picked up through AliExpress.
(They *say* Arduino on them but I think its safe to say that these are clones, they seem to be working though.)

I'm planning on converting my second FLCS and TQS set using a single SAM4S-XPRO but this is a little trickier due to placement reasons so I've decided to cut my teeth first using two Arduino's.
Also note that I only have the most cursory understanding of electronics and this is the first time I'm doing anything like this. So please be gentle smile
(I do have a programming background but me and a soldering iron is akin to giving your lightsabre to an Ewok. Neither is going to end well.)

Where I'm at right now:

1. I've created two 3-way, 1-female to 3-male splitters for both the 5V and Ground, as the Micro only has 1 pin for each there is very little space in the FLCS to put in a large breakout board.
(I've checked both splitter cables using the mutli meter and they seem to work fine (and yes, all splices are soldered and covered with electrical tape as I'm out of heat shrinks at the moment . Sure as heck won't win any awards but its sturdy and does the job!)

2. I've removed the original PCB from the FLCS, stripped the wires, crimped female DuPont connectors on them and checked each wire through continuity testing using my multi meter. All show the desired result.

3. Based on bits and pieces of information I've found online, I've wired up the Micro as such, using the below image as reference:

[Linked Image]


Green - Ground on the 3-way splitter
Yellow - MISO (2nd from top right)
Orange - SPI SCK (1st from top right)
Red - on D5 (I got the impression from various posts that it doesn't matter too much which digital axis port you put this on?)
Brown - 5V on the 3-way splitter

I'm still using the original CTS 295 pots with both the Ground and 5V on the remaining 3-way splitters and the X/Y axis on A5 and A4 respectively.

4. Based on recommendations from others, I decided to use MMJoy2 to configure and load the firmware. So I've downloaded version 20151118 and configured it as below - note that these screenshots were taken with the FLCS/Arduino disconnected:

[Linked Image]

[Linked Image]

Now as simple as MMJoy2 may be to use, I really have no idea what I'm doing here so I just made a best guess on where and how things should be configured.

Based on screenshots and info from others that I could find online I setup the MMJoy2 to use the IntSensor for the X/Y axis and 4021 for the shift register (based on KBirds photo of his FLCS stick internals) and I setup the FLCS as a 21- button stick.
(3 x 4-Way hats for TMS/DMS/CMS plus 1x 4-Way hat for POV/Trim, 1x pickle, 1x missile step, 1x pinky, 1x toggle switch, 1x trigger which should be 2-stage so... erhm 22 buttons/switches? Doesn't really matter for now).

5. I managed to load the firmware onto the Arduino and connect it and voila, my own TazzFLCS device shows up in Windows 7. Awesome except for the fact that nothing reacts to any movements or button presses in the calibration screen.

So to simplify things, I decided to hook up just a single pot on one of the axis - just to see if I can get Windows and the VKB Joystick Config tool to register movement in any axis.

I got out my multi meter and checked that the pot gets power. On the pot I register 4.30 V. If I remove the connectors, I register 4.30V on the Arduino using the 5V/Ground pins. (Should I not be seeing something closer to 5V?)
When I measure ground and the axis connector on the pot, my multi meter does show a range of ~0.80V to 3V when moving the stick along that particular axis so resistance is correctly being applied when the pot brushes are being rotated/moving along the disc.
(It was extremely akward to hold everything in my hands to the actual voltage readings aren't very accurate but my point was more that I saw the voltage correctly change as resistance increased along the pot discs when the stick was being moved.)

Not knowing anything about MMJoy2, I assume I stuffed up the config and that causes it to not correctly register the stick movements? Or is the Arduino simply outputting too low a voltage, e.g. it should be closer to 5V than 4.30V?

*** UPDATE: I just noticed that I had the Arduino hooked up to a USB hub on my desk out of sheer convenience. I hooked up the second Arduino to see if that would give me different voltage reading but no it was the same.
I then connected it to the front-panel USB on my PC and the voltage registered as 4.9V instead! So I'll try all this again but now hooked up to my PC's USB ports directly. (Front panel).

I'm very open to suggestions and improvements smile At this stage I'd be over the moon to just see ANY button press and stick movement register in the Windows Calibration Screen or the VKB Joystick tester smile

Last edited by Tazz; 09/09/17 05:55 AM.
Inline advert (2nd and 3rd post)

#4378678 - 09/09/17 01:54 PM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Tazz]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
FLCS/F22 PRO/Cougar count 22 buttons (Warthog 23), under trigger are two individual press buttons.

Strange is that your device don't appear in MMjoySetup "Device list and configuration" window in above screens.

In MMjoySetup, under "Shift Register" you need select how many are using, the pictures show 0. In Tm Shift Register PCB are 3 chips, but I am not sure if you should declare 1 (PCB) or 3 (chips), await more informed opinion.

BTW - You are using old version of MMjoy2 firmware (2015), the latest is 20161101.

https://sites.google.com/site/mmjoyproject/fajly-dla-skacivania

Quote

Green - Ground on the 3-way splitter
Yellow - MISO (2nd from top right)
Orange - SPI SCK (1st from top right)
Red - on D5 (I got the impression from various posts that it doesn't matter too much which digital axis port you put this on?)
Brown - 5V on the 3-way splitter


The existing instructions for connect Shift Register in MMjoy2 is confuse, but seems the only pin name from grip Shift Register connector that need match their name with Arduino pin is the SPI-SCK (Orange in grip connector).

ShRg-Data and ShRg-CS can use any free pin for digital input - labeled BM on MegaMOZG scheme, what B-3 pin is, but if you plan use TLE501x sensors for axes will need this B-3 pin for TLE501x MISO connection.

So is convenient don't use B3 (MISO) for Shift Register, despite the misleading name in MMJoySetup, but the selection there show that any (BM) pin could be used. Your setup is not wrong, but prevines use TLE501x.

If MMjoySetup use Shift Register connector names, ShRg-Data and ShRg-CS, the things are more clear.

#4378772 - 09/09/17 10:09 PM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Tazz]  
Joined: Apr 2017
Posts: 79
Tazz Offline
Junior Member
Tazz  Offline
Junior Member

Joined: Apr 2017
Posts: 79
Wellington, NZ
Thanks, I took everything off and used just the pots and noticed that the 20+ year old wiring was toast. So I soldered new wires onto the pots and now I actually get feedback.

However, it seems to be spiking all over the place - bad pots perhaps? I'll try some other ones. Or could it just be a calibration problem?

Thanks for the download link, I'll update my MMJoy software as well!

#4378903 - 09/11/17 12:33 AM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Tazz]  
Joined: Apr 2017
Posts: 79
Tazz Offline
Junior Member
Tazz  Offline
Junior Member

Joined: Apr 2017
Posts: 79
Wellington, NZ
Hi Sokol1,

I've just ordered a set of TLE5010 PCB kits - these should have their own internal ADC and would not require a separate MCP3208 to achieve 12-14 bit resolution? Do I understand that correctly?

#4378977 - 09/11/17 03:10 PM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Tazz]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Yes, TLE5010/11 has 14 bits ADC, send signal for Arduino using digital protocol through SPI connection (6 wires) instead analog mode (voltage variation). Now you will need that MISO pin. smile


BTW- When I bough a F22PRO in 1999 they pot already came with spikes, although they are CTS and look very similar to pot used by CH Products don't have the same quality.

Open the pot case - lift the tabs - and inspect the resistive trail, if is intact (in old (>15 years) R/C transmitter pot here the trail crack), wash with isopropyl alcohol, mayby improve a bit - at least for test, until your sensor kits arrive.

Increase the number for FILTER in MMjoySetup help deal with spikes.

#4379051 - 09/11/17 10:55 PM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Tazz]  
Joined: Apr 2017
Posts: 79
Tazz Offline
Junior Member
Tazz  Offline
Junior Member

Joined: Apr 2017
Posts: 79
Wellington, NZ
Thanks, I'll keep an eye out on the TLE5010 kits. Is there any recommended distance we need between the magnets and the sensors?

I'll have to see how I can best create axles that connects to the (plastic) gimbals, to which I can attach the magnets.

A very kind gentleman in Croatia (I believe) donated two CH pots to me, I'll hook those up and see if they are indeed better than the ones that came with the FLCS/TQS I bought for this project.

My own SWF22 FLCS and TQS are still working though I had to replace the pot in my throttle as that had developed a blind-spot (basically from 20-80% it just wasn't registering).

Once I have converted the current FLCS/TQS set, I'll look to apply my learnings to my SWF22 set and do a Hempstick conversion.


Last edited by Tazz; 09/12/17 01:29 AM.
#4379219 - 09/12/17 04:45 PM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Start positioning the sensor at ~2mm from magnet, move close or far for tuning if need.

Originally Posted by Sokol1

If MMjoySetup use Shift Register connector names, ShRg-Data and ShRg-CS, the things are more clear.


Funny, the Shift Register pin names changed in MMjoySetup for more informative ones in last firmware versions - picture from Kbird topic. smile

http://SimHQ.com/forum/ubbthreads.php/ubb/download/Number/4369/filename/Capture77.JPG

#4381030 - 09/24/17 02:55 AM Re: FLCS Arduino/MMJoy conversion - need a little help [Re: Tazz]  
Joined: Apr 2017
Posts: 79
Tazz Offline
Junior Member
Tazz  Offline
Junior Member

Joined: Apr 2017
Posts: 79
Wellington, NZ
So I've now get the pots working (still using my CTS 295s until the TLEs come in form China), I found out that when I put them back into the gimball housing, I had turned them so that only their non-effective range was being used when moving the stick (duh!).
I redid some soldering and now when I just connect the pots themselves to the Arduino Micro, I see proper value changes in the VKB Joystick Tester and without any massive spiking either.

However, I'm getting nowhere with the actual stick buttons.

I'm using this picture from KBird as my reference:

[Linked Image]

And this schema for the Arduino Micro:

[Linked Image]

Here's my MMJoy setup:
[Linked Image]

So based on the image posted by KBird, I've got the following:

Ground (green) on GRND pin
VCC (brown) on the 5V pin
SPI-SCK (orange) on the SCK pin (pin 1 top right)
SPI-CS (red) on A0/F7 and configured in MMJoy as such
SPI-MISO (yellow) on D7/E6 and figured in MMJoy as such

But when I go to the VKB Button Tester..... I get absolutely nothing? Is the wiring as described above correct?

Also when assigning hardware button numbers.......how do I actually know what is button 1, button 2, button 3, etc. on the actual stick? Or doesn't that matter?

Last edited by Tazz; 09/24/17 02:56 AM.

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0