Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 30 of 112 1 2 28 29 30 31 32 111 112
#4207953 - 12/19/15 06:24 PM Re: MMJoy/MMjoy2 - Build your own USB controller ***** [Re: Sokol1]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Kallisto,

Hard to say accurately without the circuit diagram, but they look like "pull down" resistors and in this case 10K should be fine.


Andy's simpit: http://www.simpit.me.uk
Inline advert (2nd and 3rd post)

#4208142 - 12/20/15 12:17 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2012
Posts: 9
Kallisto Offline
Junior Member
Kallisto  Offline
Junior Member

Joined: Jan 2012
Posts: 9
Thanks for the hint with resistor networks i used them once or twice before
Therefore the question are those the right resistor networks?
resistor networks 10k 9pins

thanks AndyB i will try to make a clear Circuit diagram unfortunately my electronic knowledge is not really good

#4208168 - 12/20/15 02:41 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
The electrical diagram is not this from Arduino.cc?

http://www.arduino.cc/en/uploads/Tutorial/ShftInExmp1_Schem.png

The resistor net is this on like, in Tm F22 PRO is used a similar (and same Shift Register mc).

#4208178 - 12/20/15 03:08 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jan 2012
Posts: 9
Kallisto Offline
Junior Member
Kallisto  Offline
Junior Member

Joined: Jan 2012
Posts: 9
Quote:
The electrical diagram is not this from Arduino.cc?


yes i used that as a template
mega_mozg_13 posted me some links among others an example with cd4021b from arduino.cc

#4208214 - 12/20/15 05:23 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Dec 2009
Posts: 748
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
Hi Kallisto,

Just a personal thing, but I don't like buying from China. You can get similar from CPC:

http://cpc.farnell.com/bourns/4609x-101-103lf/resistor-network-10k-2/dp/RE05350

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4208283 - 12/20/15 09:54 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jul 2010
Posts: 16
Bucic Offline
Junior Member
Bucic  Offline
Junior Member

Joined: Jul 2010
Posts: 16
Poland
Hi!

I have just started with Arduino (Pro Micro clone) and MMJoy2. For my previous project I've used a controller tken from an old Logitech joystick. And the problem seems to be the same - the actual usable resolution.

I have hooked up a test circuit with the following:
1. a 100k potentiometer
2. Allegro A??? + two small neod magnets

Now, the maximum number of steps I could get from mmjoy2 was:
ad.1. 1024 steps for the entire 270 degrees of its rotation range
ad.2. 100 steps for a 30 deg range

How do I get a 1024 resolution across a pre-defined rotation range using mmjoy2?
I'm pretty sure I'm not supposed to use a 1:10 gearing for the pot and ten times stronger magnets for the Hall sensor smile


BoB 2 Tutorials and vids http://www.tinyurl.pl?GBhZxXfj
Installation | (NEW!) User Interface (NEW!) | Starting a dynamic Single Pilot Campaign | Takeoff | Free Flight | Inkscape | more!

sig pic: http://alturl.com/xo6y
#4208361 - 12/21/15 04:17 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Bucic]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Bucic

Now, the maximum number of steps I could get from mmjoy2 was:
ad.1. 1024 steps for the entire 270 degrees of its rotation range
ad.2. 100 steps for a 30 deg range

How do I get a 1024 resolution across a pre-defined rotation range using mmjoy2?


1) try use more powerfull magnet and minimum distance hall-magnet.
2) mcp3201/3208 12Bit ADC(4096 point), x4 vs 10Bit internal ATmega ADC. 100*4 = 400 point for a 30 degs =).
3) goto digital sensor TLE5011 have 21000 points for 360 deg, 1740 points for 30 deg.
3.1) kma200 have 8196 for 180 deg, 1350 points for 30 deg.

#4208364 - 12/21/15 04:20 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Kallisto]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Kallisto

mega_mozg_13 posted me some links among others an example with cd4021b from arduino.cc

I never build hand made PCB or scheme for cd4021b(used only builtin from Thrustmaster/Defender Cobra M5). sorry I can't help. you will be first pathfinder here =)/

#4208384 - 12/21/15 07:11 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jul 2010
Posts: 16
Bucic Offline
Junior Member
Bucic  Offline
Junior Member

Joined: Jul 2010
Posts: 16
Poland
Originally Posted By: mega_mozg_13
Originally Posted By: Bucic

Now, the maximum number of steps I could get from mmjoy2 was:
ad.1. 1024 steps for the entire 270 degrees of its rotation range
ad.2. 100 steps for a 30 deg range

How do I get a 1024 resolution across a pre-defined rotation range using mmjoy2?


1) try use more powerfull magnet and minimum distance hall-magnet.
2) mcp3201/3208 12Bit ADC(4096 point), x4 vs 10Bit internal ATmega ADC. 100*4 = 400 point for a 30 degs =).
3) goto digital sensor TLE5011 have 21000 points for 360 deg, 1740 points for 30 deg.
3.1) kma200 have 8196 for 180 deg, 1350 points for 30 deg.


So it is hard-coded? There is no way to tell mmjoy2: 'here's a 100k pot; divide its 0 through 30 deg range into 2014 steps'?

Could you tell me how? If I hook up 10k, 50k and 100k pots mmjoy2 will assign 1024 steps across 270 deg of pot rotation. So it doesn't assign steps per voltage/resistance variation but... I don't know. There's no way it knows what potentiometer (resistance range and rotation range) is connected.

I was thinking about using the first ~20 degress of a 1 megaohm potentiometer to get higher resolution but this won't seem to work due to the behavior described above.


BoB 2 Tutorials and vids http://www.tinyurl.pl?GBhZxXfj
Installation | (NEW!) User Interface (NEW!) | Starting a dynamic Single Pilot Campaign | Takeoff | Free Flight | Inkscape | more!

sig pic: http://alturl.com/xo6y
#4208397 - 12/21/15 09:14 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Jul 2015
Posts: 13
Vindicore Offline
Junior Member
Vindicore  Offline
Junior Member

Joined: Jul 2015
Posts: 13
My progress so far, 4 rotaries, 4 toggle switches and an analogue thumbstick added and working:


#4208399 - 12/21/15 09:42 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Bucic]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Bucic

So it is hard-coded? There is no way to tell mmjoy2: 'here's a 100k pot; divide its 0 through 30 deg range into 2014 steps'?

calibration auto or manual.

Originally Posted By: Bucic

Could you tell me how? If I hook up 10k, 50k and 100k pots mmjoy2 will assign 1024 steps across 270 deg of pot rotation. So it doesn't assign steps per voltage/resistance variation but... I don't know. There's no way it knows what potentiometer (resistance range and rotation range) is connected.

I was thinking about using the first ~20 degress of a 1 megaohm potentiometer to get higher resolution but this won't seem to work due to the behavior described above.

google it "how ADC works", it does not measure the resistance.

#4208488 - 12/21/15 02:48 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Bucic]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Quote:

1. a 100k potentiometer

Now, the maximum number of steps I could get from mmjoy2 was:
ad.1. 1024 steps for the entire 270 degrees of its rotation range


1024/270*30 = 113...

Solution (if not gears): Use a "joystick" potentiometer - this model has the resistive trail only in ~30 degress (e.g. Saitek use 32 degrees models) will read 0 ~5v in 30 degrees = ~1024.

Problem, this model is made for industry only, maybe in AliExpress find a source - of low quality ones... smile

Or try with voltage amplifier. See this solution for the same problem (replace joy'pot with conventional 270 degress type):

http://www.rcgroups.com/forums/showthread.php?t=2007556

Dont know about the possible electrical "noise" of this solution.

But in today "contactless sensor days", use pot'? smile

Quote:

2. Allegro A??? + two small neod magnets
ad.2. 100 steps for a 30 deg range


If this Allegro is A1302 (for strange reason is most "recommended" in sim foruns...), depends on magnet position can be need ~180 degrees of magnet movement to read 0 - 5 v (as work in analog mode). See:

http://simhq.com/forum/ubbthreads.php/topics/3225807/all/DIY_hall_sensor.html

In theory with this above assembly - "Bic HALL pot" (magnets far from sensor) - can be achieve: 1024/180*30 = ~170...

But I use this model A1302 (and PRO Micro MMjoy2) in brakes of the CH PRO pedal show in this thread and achieve better resolution than 100 (the brakes dont need 1024), the brake pedal movement is very limited, probable less than 30º, the trick is leave the gap at minimum possible, less than 1mm.

For something similar you want, a "PnP" solution: "here's a 100k pot; divide its 0 through 30 deg range into 2014 steps"? is need programmable sensor, e.g. Melexis MLX90333 digital sensor and compatible controller, e.g. MFG SiMM8Rge. wink

Or, as Mega_Mozg suggest, use TLE5011 for improve the practical resolution.

Last edited by Sokol1; 12/21/15 03:15 PM.
#4208514 - 12/21/15 03:39 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jan 2012
Posts: 9
Kallisto Offline
Junior Member
Kallisto  Offline
Junior Member

Joined: Jan 2012
Posts: 9
Quote:
I never build hand made PCB or scheme for cd4021b(used only builtin from Thrustmaster/Defender Cobra M5). sorry I can't help. you will be first pathfinder here =)/


np i will report about it if i am successful

#4208678 - 12/21/15 10:25 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jul 2010
Posts: 16
Bucic Offline
Junior Member
Bucic  Offline
Junior Member

Joined: Jul 2010
Posts: 16
Poland
@mega_mozg_13
@Sokol1

Let's put workarounds for too low resolution aside for now, please. External ADCs, 2-ton magnets, 13.7 deg potentiometers, epicyclic gearing... I would really appreciate if either of you could simply explain to me why. MMJoy2 takes a valuable resource which is the resolution of 1024 steps and wastes it by spreading it over 270 degrees of potentiometer rotation range. Why is that?

Especially that both the Allegro A-series as well as potentiometers are analog devices i.e. providing infinite resolution. The resultant resolution in an actual application is only limited by controller used.


@mega_mozg_13
But calibration only works by picking a part of the 1024 range, right? So for a potentiometer granted 1024 steps for the entire 270 deg I only put e.g. 400/450/500 (min/center/max) in the calibration fields.

I do know how ADCs work but not much beyond that. smile


BoB 2 Tutorials and vids http://www.tinyurl.pl?GBhZxXfj
Installation | (NEW!) User Interface (NEW!) | Starting a dynamic Single Pilot Campaign | Takeoff | Free Flight | Inkscape | more!

sig pic: http://alturl.com/xo6y
#4208711 - 12/22/15 12:40 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
smile


#4208764 - 12/22/15 04:10 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Bucic]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Bucic
Why is that?

short ADC:
1) have a reference voltage (0v-5v for a ATmega).
2) have a precission (10Bit/1024 points for a ATmega).
3) and calculate sensors voltage with this conditions.
no more. against the laws of physics can not do anything. if you sensor send only "2.0v - 2.5v - 3.0v" what to do?

want more points.
1) try decrease "reference voltage" - mcp3204/mcp3208 accept it(differential mode).
2) increase "precission" - mcp320x 12Bit/4096 points.
3) make more powerfull signal from sensor. mcp601 - electrical amplifier. gears - kinematics amplifier.

tle5011 cost ~4$, and dont want try calculate another solutions price.

Last edited by mega_mozg_13; 12/22/15 04:11 AM.
#4208815 - 12/22/15 11:14 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: mega_mozg_13]  
Joined: Jul 2010
Posts: 16
Bucic Offline
Junior Member
Bucic  Offline
Junior Member

Joined: Jul 2010
Posts: 16
Poland
Originally Posted By: mega_mozg_13
Originally Posted By: Bucic
Why is that?

short ADC:
1) have a reference voltage (0v-5v for a ATmega).
2) have a precission (10Bit/1024 points for a ATmega).
3) and calculate sensors voltage with this conditions.
no more. against the laws of physics can not do anything. if you sensor send only "2.0v - 2.5v - 3.0v" what to do?

want more points.
1) try decrease "reference voltage" - mcp3204/mcp3208 accept it(differential mode).
2) increase "precission" - mcp320x 12Bit/4096 points.
3) make more powerfull signal from sensor. mcp601 - electrical amplifier. gears - kinematics amplifier.

tle5011 cost ~4$, and dont want try calculate another solutions price.

ad.1) So that's the culprit! This is what I expected initially - 0V through 5V reference voltage. Hence my question mentioning 'hardcoding'. OK, this explains it.

BUT!
What about different potentiometer values? With 10k, 50k and 100k all being 270 deg, does mmjoy2 read all three of them as providing 0-5V variation? I only have 100k pots at hand so I can't tell.

As for the other solutions. Are there separate wiring diagrams and instructions on how to integrate:
a) "mcp3204/mcp3208 (differential mode)"
b) external ADC
c) (most importantly) TLE5011 sensor

BTW, mega_mozg_13. Having you around I would like to thank you for your work with mmjoy2 as well as for hanging around here, answering questions. I would also like to take the opportunity to ask whether there are plans to opensource mmjoy2?


BoB 2 Tutorials and vids http://www.tinyurl.pl?GBhZxXfj
Installation | (NEW!) User Interface (NEW!) | Starting a dynamic Single Pilot Campaign | Takeoff | Free Flight | Inkscape | more!

sig pic: http://alturl.com/xo6y
#4208826 - 12/22/15 12:09 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Bucic]  
Joined: Jan 2014
Posts: 274
mega_mozg_13 Offline
Member
mega_mozg_13  Offline
Member

Joined: Jan 2014
Posts: 274
BELARUS, Minsk
Originally Posted By: Bucic

c) (most importantly) TLE5011 sensor

from folder "MMJoySetup" subfolder "PCB", open here "MMJoy2_TLE5010". just solder and it ready to use...

#4208933 - 12/22/15 04:07 PM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Quote:
BUT!
What about different potentiometer values? With 10k, 50k and 100k all being 270 deg, does mmjoy2 read all three of them as providing 0-5V variation? I only have 100k pots at hand so I can't tell.


This 10k... 100k is the capacity of resistance variation across the potentiometer trail, some circuits, e.g the old joystick gameport work with this resistance measure and not voltage variation like joystick USB Controllers. The pot' can read resistance and voltage variation.

In other forum a guy say that in general terms a low resistance pot (e.g. 1-10k) take more Amperage from USB circuit, what can be issue if many pot' are used and a high value (e.g. 50-100k) is more prone to pick "noise" in the signal, so, as "Rule of the Thumb" for use in joystick USB controllers pick one between 10-50, but no harm try with 100k.

What matter here is: use potentiometer Type B* = linear response, and working angle = joystick makers use low angle pot (30~40, NOT 270 degrees!!!

HOTAS Cougar use this CTS model: CTS251B15F104B2NB - Look at datasheet for see the working angle.

* This code may varies in countries.

BTW - A cheap source for low reading angle potentiometer.

Just assembly in a way that make easy replace, they don't last longer... wink

Quality potentiometers cost more than contact less sensors, besides the above "complications".
Tm/Saitek adopt HALL sensor in his HOTAS not because is "better for sim'ers" but because is cheap solution,
but the last still saving some cents using ~0,10$ pot in some axis...

HALL sensor assembled like a pontentiometer (15$): http://www.bitechnologies.com/pdfs/6120.pdf

Notice that the Electrical Angle can be, depends on model 35 to 360.

If I pick a 360 model and hook in BU0836A... and turn only 30 degrees no way to achieve 12 bits resolution, without some "workaround".

#4210980 - 12/29/15 06:50 AM Re: MMJoy/MMjoy2 - Build your own USB controller [Re: Sokol1]  
Joined: Dec 2015
Posts: 1
Rabso Offline
Junior Member
Rabso  Offline
Junior Member

Joined: Dec 2015
Posts: 1
Hi Every one,

first, big thanks to mega_mozg for his great work and efforts.


I am planning to do my own project and I have read all this topic to understand MMjoy2. however, I have some questions:

1. I need to use a magnetic angle sensors, in this topic I saw people using TLE5010/5011. does TLE5012 will works with MMjoy2?

2. regarding the TLE501x PCB, in your folder I saw the PCB .lay6 but when I opened the file I saw several layout design, is any once can be used? for example I like this simple one:


3. Last, does any one know about Sensors 2GO from Infineon? does this will work direct with the computer or how?

thanks

Last edited by Rabso; 12/29/15 06:51 AM.
Page 30 of 112 1 2 28 29 30 31 32 111 112

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

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


Recent Topics
CD WOFF
by Britisheh. 03/28/24 08:05 PM
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
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0