The NEW Build Your Own Arcade Controls
Main => Main Forum => Topic started by: ranma on August 08, 2010, 05:43:05 pm
-
I thought about this today, to implement on my new cab. I figured it couldn't be too hard to do. From the software side, it's easy to execute a script before entering the game to check what should be the correct setting. From the hardware side I think it should be simple too, but would like to see what others think.
I didn't investigate much and I've been away from building anything hardware related for some time. Thoughts:
1. I was thinking a standard servo should do OK to turn the 4way/8way plate 90°. And on the other hand, I see that using the joystick hardly produces any force upon the plate, even if it's loose (not locked by screws) it won't turn when used. So it shouldn't be a problem for any servo to keep the plate in place.
2. I need to find the way to use the servo with the computer easily. Maybe an IPAC with the led outputs and some electronics should do. I still have to investigate.
What do you think?, I'd like to hear ideas.
-
For the cost of doing what you're thinking, why not just go with a U360?
-
For the cost of doing what you're thinking, why not just go with a U360?
Because a U360 is not a true "physical restriction switching joystick" and that's why some folks are still plopping down restricted 4-ways next to them. But a servo is mucho bucks, and there are easier (and cheaper) ways to flip restrictor plates into one of two positions.
I've thought about it, but not prototyped the idea yet, well at least not the "auto" part ;).
RandyT
-
hmm, I don't know exactly how that stick works. I see from the description that it has 2way, 4way, 8way, etc modes, but I don't get if this restricts the movements or just the input detection, as it also says it comes with restriction plates to physically restrict movements.
What I'm looking for is the true feeling of a 4way joystick on games that require it or where it's convenient (like Tetris The grand master 2). Can the U360 provide that? (without the physical restriction plates)
-
For the cost of doing what you're thinking, why not just go with a U360?
Because a U360 is not a true "physical restriction switching joystick" and that's why some folks are still plopping down restricted 4-ways next to them. But a servo is mucho bucks, and there are easier (and cheaper) ways to flip restrictor plates into one of two positions.
I've thought about it, but not prototyped the idea yet, well at least not the "auto" part ;).
RandyT
Our messages crossed. That's what I though...
So, anything specific on the "easier (and cheaper) ways to flip restrictor plates into one of two positions"? ;)
As I said, although I'm an electronic engineer, I'm not very close to the hardware side of things any more.
-
So, anything specific on the "easier (and cheaper) ways to flip restrictor plates into one of two positions"? ;)
As I said, although I'm an electronic engineer, I'm not very close to the hardware side of things any more.
Well, some hardware is going to be a necessity regardless, but think about geared motors / solenoids and limit switches. The LED-Wiz will likely be able to drive just about any reasonable hardware approach that can twist the restrictor...a relay might be necessary though. Existing software might even handle it as well.
RandyT
-
Auto would be great. If the Mag stick were a better 8-way, it's solution would be fine but for now I don't mind my Sanwa JLW and bottom rotating restrictor...it does a great 8 way and a great 4 way. All I do is open the coin door and reach up and rotate. Really only for Robotron or Crazy Climber type games the rest of the time the left stick is perma 8 way and right is set to 4 way.
-
I think it would be an awesome project. For proof of concept if nothing else.
On the software end, the issue might be keeping track of which position it's already in and communicating that to the LEDwiz.
If you're using a motor to spin the plate one way or the other and it has stops in each direction, it probably wouldn't hurt anything for the motor to just pulse toward the direction that it's already in. Kinda sloppy, but you really wouldn't have to do anything on the software side except for setting up the LEDwiz.
I wouldn't sell it to someone else, but I'd use it.
A small throw actuator would probably be the most reliable. Mounted between the joysticks, it could rotate both restrictor plates.
:angry: I have too many things started already. I have more than one machinist friend and wouldn't mind getting in on this.
-
Hmmm.....wonder what the stroke is on this thing?
http://cgi.ebay.com/Lego-Technic-Mindstorm-Electric-Linear-Actuator-9-VOLT-/400142027450?pt=LH_DefaultDomain_0 (http://cgi.ebay.com/Lego-Technic-Mindstorm-Electric-Linear-Actuator-9-VOLT-/400142027450?pt=LH_DefaultDomain_0)
There are always door locks actuators, but those things draw a lot of current.
-
Robotron
Robotron is Not a 4 way joystick game.
It uses two 8-way Wico Balltop leaf-switch Joysticks.
-
For the cost of doing what you're thinking, why not just go with a U360?
Because a U360 is not a true "physical restriction switching joystick" and that's why some folks are still plopping down restricted 4-ways next to them.
Yeah, though highly playable with the U360, I still want 4-way physical restriction, which is why I ordered one of your snazzy new 4-way sticks. ;D
(Though it's mostly just to test out for a future 4-way vertical cab...)
-
The mag-stick plus is switchable from above the panel using a fairly simple mech so maybe you can borrow from it's design to modify another stick?
-
So, anything specific on the "easier (and cheaper) ways to flip restrictor plates into one of two positions"? ;)
As I said, although I'm an electronic engineer, I'm not very close to the hardware side of things any more.
Well, some hardware is going to be a necessity regardless, but think about geared motors / solenoids and limit switches. The LED-Wiz will likely be able to drive just about any reasonable hardware approach that can twist the restrictor...a relay might be necessary though. Existing software might even handle it as well.
RandyT
Looking around and I found this (Linux) software I'd like to try http://sampo.kapsi.fi/ledcontrol/ (http://sampo.kapsi.fi/ledcontrol/), it doesn't seem to have enough resolution to directly use to control a servo, but maybe it could do. If that's not the case, I guess you could control a 555 circuit to output two different signals for each of the required servo positions with a keyboard led, could use Scroll lock led on the on and off position for example.
As for the servo, I found some cheap ones for around 5USD, and since this doesn't require any high torque or anything, I think it might be worth the try.
-
On the software end, the issue might be keeping track of which position it's already in and communicating that to the LEDwiz.
Actually, if it's wired right, with limit switches, you don't care what position it's in. You just tell it to move to the desired position and it either needs to go there or it doesn't.
RandyT
-
Robotron is Not a 4 way joystick game.
@Xiaou2
Read my post before you slam on the reply button ;)
If you read it again...you will note that I said I only ever have my right Sanwa JLW in 8 way mode for games LIKE Robotron or Crazy Climber...meaning when I WANT it in 8 way ;)
The rest of the time as per my text...I leave it in 4 way...
-
Auto would be great. If the Mag stick were a better 8-way, it's solution would be fine but for now I don't mind my Sanwa JLW and bottom rotating restrictor...it does a great 8 way and a great 4 way. All I do is open the coin door and reach up and rotate. Really only for Robotron or Crazy Climber type games the rest of the time the left stick is perma 8 way and right is set to 4 way.
Hey Epyx,
Thats the same thing I'm doing with my new control panel. I don't want 3 joysticks so instead I'm using 2 JLW (Great sticks) and just keeping the player 2 one set for 4-way.
I'm pretty much the only one using the game anyway so it works
-
Hey Epyx,
Thats the same thing I'm doing with my new control panel. I don't want 3 joysticks so instead I'm using 2 JLW (Great sticks) and just keeping the player 2 one set for 4-way.
I'm pretty much the only one using the game anyway so it works
Agreed, they are great sticks...my favourite, and I have tried a lot. I also like the configuration (player 2 in 4 way)...easy enough to change it for the odd game that requires 2 8 ways (fighters which I don't play a lot anyways or of course the ones I mentioned already!).
-
For anyone interested I just finished a prototype for my idea with servos and works very well, I'm very happy with the result.
From the software side I used either xset command or ledcontrol on Linux, both work good to turn on and off the scroll lock key. That I use it to drive a relay via a transistor, so that it consumes 5mA. The relay switches between two different resistance paths for the 555 circuit to send the different pulse sizes, which correspond to two different servo positions and thus, the 4/8way positions on the joystick.
It really works very well, and I like the servo corrects the position if it moves for any reason. I'll have to test it further and put it into stress now.
-
^^ show us, show us!!!
-
^^ show us, show us!!!
Ok, just remember it's a quick prototype... ;)
Automatic 4way/8way arcade joystick (http://www.youtube.com/watch?v=9lL_pxD9wQY#ws)
-
Very nice!
-
:o That looks promising!
I hope it passes the stress-test. :applaud:
-
That's much simpler than I thought you were going to build. Simplicity is good!
-
Ok, just remember it's a quick prototype... ;)
Very nice! When you wrote servo, all I could envision was those big servo motors on one of my vinyl cutters :)
I see that these gizmos are pretty common out there for RC / robotics apps and even come with a handful of actuators to play with. I have a nice switchable stick build that might get one of these bolted on to see how well it can handle it. I'm a little concerned about the torque and longevity, but it's definitely worth a try (now that I understand what these are) There's also the "what if" scenario of something getting stuck. They don't give up until they are in position, and I'm not sure what happens if they are physically prevented from getting there for a length of time. Maybe that's what the gear rebuild kits are for :).
-
wow, that's awesome
-
Ok, just remember it's a quick prototype... ;)
Very nice! When you wrote servo, all I could envision was those big servo motors on one of my vinyl cutters :)
I see that these gizmos are pretty common out there for RC / robotics apps and even come with a handful of actuators to play with. I have a nice switchable stick build that might get one of these bolted on to see how well it can handle it. I'm a little concerned about the torque and longevity, but it's definitely worth a try (now that I understand what these are) There's also the "what if" scenario of something getting stuck. They don't give up until they are in position, and I'm not sure what happens if they are physically prevented from getting there for a length of time. Maybe that's what the gear rebuild kits are for :).
Couldn't it be made into an enclosed unit, with some kind of cap - maybe with screw terminals on the outside for the microswitch connectors?
-
I see that these gizmos are pretty common out there for RC / robotics apps and even come with a handful of actuators to play with. I have a nice switchable stick build that might get one of these bolted on to see how well it can handle it. I'm a little concerned about the torque and longevity, but it's definitely worth a try (now that I understand what these are) There's also the "what if" scenario of something getting stuck. They don't give up until they are in position, and I'm not sure what happens if they are physically prevented from getting there for a length of time. Maybe that's what the gear rebuild kits are for :).
That's actually the same concern I have, and I'm not sure what's the response. The good thing is that you really cannot force the plate to turn (and thus, do any force to the servo) using the joystick, the only way to block it is to keep it with force into a corner of the plate while the servo tries to turn the plate. In any case, this kind of servo costs 7USD on my country, and I think the price is half that or so in the US, not much to worry about.
If you work something similar, please let us know your experience.
An upgrade I made to the circuit is I took the relay out and used the transistor "switch" to enable directly the second resistance path for the alternate position.
Now I have to check if ledcontrol can have the resolution needed to drive the servo (signal) in itself with no electronics involved in the middle, that would be great, but I would need microseconds resolution and I'm not sure if that's possible, even changing the code.
Thanks all for the feedback. :)
-
Other than using metal gear RC servos to prevent the gears from stripping out under too much load or use, that looks like a great idea.
-
I guess I'm a little confused why you need complicated software to control this. Seems like you could just set the position to 4- or 8- way and leave the signal on. I'm thinking the limit switch would then turn off the servo for you, kinda like those "useless toys" that are on youtube.
The Most Useless Machine EVER! (http://www.youtube.com/watch?v=Z86V_ICUCD4#)
-
That's awesome!
I bet you could do 4way diagonal (Q*bert) too?
-
That's awesome!
I bet you could do 4way diagonal (Q*bert) too?
A squarish restrictor in 8-way pretty much already is ;)
-
I guess I'm a little confused why you need complicated software to control this. Seems like you could just set the position to 4- or 8- way and leave the signal on. I'm thinking the limit switch would then turn off the servo for you, kinda like those "useless toys" that are on youtube.
A servo doesn't rotate continuously when you apply a signal (although they could be modified to do so), they go to a predetermined position according to the input signal. The good thing about a servo is that it's very precise, even with cheap ones, and on the other hand, it will correct it's position as long as you apply an input signal. This means that if any external force makes them move, they will go back to the same predetermined position.
As for the software, it's not complicated at all, I use the scroll lock connector of the keyboard encoder to send a signal to my circuit, led off is 8way position for the servo and led on is 4way position. And some additional scripting to check what the game needs before launching the game.
-
What about a 2-way system via a pull? That way you could use a loose restrictor and 4 way and 8 way both pull as opposed to any push action. You could then spring load them so that if the restrictor were to get stuck the spring would activate and prevent any damage.
-
You could then spring load them so that if the restrictor were to get stuck the spring would activate and prevent any damage.
If you look up something called a "servo saver" you'll see that they already make something like that for servos. A spring loaded switching system with solenoid would be ok too, but also be a little complicated. The best approach would be something along the lines of the way a pinball flipper works. Full power at first activation, and then half power to hold it in place, so it doesn't cook the solenoid coil. Probably need a dedicated power supply as well. You can get more torque out of a geared motor with lower power requirements.
If you mean a pull attached to a servo, it would make more sense to just use the servo to move the restrictor to both positions.
RandyT
-
Pretty cool!
That's it, I'm ordering a cheap door lock actuator so I can tinker too :laugh:
-
I guess I'm a little confused why you need complicated software to control this. Seems like you could just set the position to 4- or 8- way and leave the signal on. I'm thinking the limit switch would then turn off the servo for you, kinda like those "useless toys" that are on youtube.
The Most Useless Machine EVER! (http://www.youtube.com/watch?v=Z86V_ICUCD4#)
I think the idea is to work out a way for it to be autoswitched depending on the game rather than hitting a switch or something
-
Of course! I just posted the video since it's a very simple example of a very similar task. I didn't realize he had wired it up so that a single signal (led on/off) could change positions. That's easier than two position "on" switches.
Looks great though! Hopefully it will survive some testing so a similar concept can hit the market (AFFORDABLY) at some point!
-
Will this work to controll those type of servos?
Electronic Toggle Switch
[E002] $6.00
(http://)
Click to enlarge
Electronic Toggle Switch kit can be used for switching On/Off application of home appliances like fan, light etc.
Supply input 12 VDC
Onboard ON/OFF switch
Relay output SPDT relay
Relay specification 5 A @ 250 VAC
Relay state LED indicator
Power-On LED indicator
Screw terminal connector for easy relay output connection
Terminal pins for supply input connection
Four mounting holes of 3.2 mm each
PCB dimensions 46 mm x 58 mm
-
I thought about this today, to implement on my new cab. I figured it couldn't be too hard to do. From the software side, it's easy to execute a script before entering the game to check what should be the correct setting. From the hardware side I think it should be simple too, but would like to see what others think.
I didn't investigate much and I've been away from building anything hardware related for some time. Thoughts:
1. I was thinking a standard servo should do OK to turn the 4way/8way plate 90°. And on the other hand, I see that using the joystick hardly produces any force upon the plate, even if it's loose (not locked by screws) it won't turn when used. So it shouldn't be a problem for any servo to keep the plate in place.
I had thought about this for my sanwas on my cocktail. Since the monitor rotates, I thought it would be awesome if the restricotr plate rotates too. Never did do it. If I did, it was just going to be a toggle since I'm a tard with the software side of things. Instead, if I ever feel strongly, i'll retrofit with those sticks that have the little toggle to move the restrictor. I can never remember the name of them...
Edit: Omnistick Prodigy. That's it! from Randy T :)
Edit: A radio control type servo that can do this job wont draw very much current, or cost much. Should be able to get them for under ten bucks each nowadays...
Edit edit:
maybe I should read the whole thread next time :D
^^ show us, show us!!!
Ok, just remember it's a quick prototype... ;)
Automatic 4way/8way arcade joystick (http://www.youtube.com/watch?v=9lL_pxD9wQY#ws)
-
Just tried this with a door lock actuator. Travel was a bit short, but could have overcome by moving the pivot point closter to the center of the restrictor plate.
The big reason for the fail was that the actuator drifted back toward center after moving positions. It would work if power was constantly applied, but that would burn the motor up in no time. Cheap servos or expensive industrial actuators seem the way to go.
Keep this thread alive, I want to see this work! :)
-
Keep this thread alive, I want to see this work! :)
I had it working a week ago ;D
Just beating the crap out of it now.
RandyT
-
Will this work to controll those type of servos?
Electronic Toggle Switch
[E002] $6.00
(http://)
Click to enlarge
Electronic Toggle Switch kit can be used for switching On/Off application of home appliances like fan, light etc.
Supply input 12 VDC
Onboard ON/OFF switch
Relay output SPDT relay
Relay specification 5 A @ 250 VAC
Relay state LED indicator
Power-On LED indicator
Screw terminal connector for easy relay output connection
Terminal pins for supply input connection
Four mounting holes of 3.2 mm each
PCB dimensions 46 mm x 58 mm
Where did you source this? I'm thinking this could be a cheap way to turn on/off things from inside Windows with software (like a 15kHz monitor for instance).
-
I have no idea where it is. I lost the link to it. I just know that it will not run a servo.
-
I think I found the place. :cheers:
http://www.indiamart.com/anykits/timer-controller-kits.html (http://www.indiamart.com/anykits/timer-controller-kits.html)
-
I think I found the place. :cheers:
http://www.indiamart.com/anykits/timer-controller-kits.html (http://www.indiamart.com/anykits/timer-controller-kits.html)
Yes this is it. :applaud:
-
Very interesting!
One question that might be an obvious one (I've never used a switchable stick)..
What would happen if someone (kid or drunken adult) was hanging off the stick when
the servo attempted to rotate the restrictor plate?
-
The stick and restrictor plate are two different parts so there shouldn't be any issue there.
Just a thought but I wonder if muscle wire would work (though a little more pricey). Muscle wire is used in robotics, its a length of wire that retracts (like a muscle) when a voltage is applied to it.
I've never used it and I don't know how far the travel is but I wonder if it would work.
-
The stick and restrictor plate are two different parts so there shouldn't be any issue there.
Just a thought but I wonder if muscle wire would work (though a little more pricey). Muscle wire is used in robotics, its a length of wire that retracts (like a muscle) when a voltage is applied to it.
I've never used it and I don't know how far the travel is but I wonder if it would work.
Would it be cheaper than a 5 buck servo?
-
Speaking of cheap 5 buck servo.... any info on the servo used on the joystick in this particular thread. I am looking for a servo just like that for a homebrewing related project, but alot of what I find are well over 5 bucks.
-
Speaking of cheap 5 buck servo.... any info on the servo used on the joystick in this particular thread. I am looking for a servo just like that for a homebrewing related project, but alot of what I find are well over 5 bucks.
One of these:
http://www.dealextreme.com/details.dx/sku.12859 (http://www.dealextreme.com/details.dx/sku.12859)
You should be able to get one of those in any RC hobby shop I guess.
-
This might be a good application for the nutchip,
http://www.nutchip.com/progetti/stepper_en.htm (http://www.nutchip.com/progetti/stepper_en.htm)
however you would also need a driver for the stepper. A ULN22823A Chip might work, if the stepper is a unipolar.
Or a L297 driver chip.
Very interesting project.
Edit: what kind of driver does this use? It looks like it only has 3 wires. Most have 4 or 6 and a few have 8.
Edit again. The one on deal extreme is a servo not a stepper.
Looks to me like the best thing would be limit switches to tell the driver that the motor is at one end of it's run. Unless there is a some type of feedback position encoder then it could easily get lost. (power failure while moving).
Position feedback encoder could be complicated and expensive. My advice would be cheap micro switches.
-
Edit again. The one on deal extreme is a servo not a stepper.
yes, it's a servo, someone asked what was used on the example on this thread and that's what I've used. Driving a servo is very easy, using just a 555 and this allowed me to control both servo positions with a simple scroll lock on and off positions.
-
The stick and restrictor plate are two different parts so there shouldn't be any issue there.
Just a thought but I wonder if muscle wire would work (though a little more pricey). Muscle wire is used in robotics, its a length of wire that retracts (like a muscle) when a voltage is applied to it.
I've never used it and I don't know how far the travel is but I wonder if it would work.
Would it be cheaper than a 5 buck servo?
No it wouldn't be that cheap, but most servos are more $5
-
yes, it's a servo, someone asked what was used on the example on this thread and that's what I've used. Driving a servo is very easy, using just a 555 and this allowed me to control both servo positions with a simple scroll lock on and off positions.
Got a schematic or wiring diagram?
-
After playing with servos for a bit, I can say that I wouldn't be comfortable with the cheapest servo in the world when used in this application. Contrary to what has been stated here, the joystick can, and does, move a restrictor out of position without something beefy holding it in place. And a servo connected to one is very adamant about putting it where it thinks it should be. That means that there are always opposing forces at play when in use, and whatever servo one uses needs to be up to the job of keeping the restrictor in position, and not overheat, strip gears, etc...
It also has to be strong enough to overcome any type of random resistance that might occur, and have a "fail-safe" of some nature to protect the motor. Nothing kills a servo faster than it wanting to move someplace where it isn't allowed to go. This type of situation will be similar to turning on a DC motor at full speed, but constantly putting more resistance on the shaft than the motor is designed to handle. It doesn't take long for it to overheat and die. I've also seen them get into an "oscillation" situation where they flutter between two adjacent positions. As they are constantly drawing a decent amount of current when this happens, it eventually causes them to overheat.
So basically, what I have found is that it can be done fairly well, but the "cheapest and easiest" route probably will not be the best approach. The cheapest servos won't last too long and the simplest circuits have no way to protect the motors.
RandyT
-
yes, it's a servo, someone asked what was used on the example on this thread and that's what I've used. Driving a servo is very easy, using just a 555 and this allowed me to control both servo positions with a simple scroll lock on and off positions.
Got a schematic or wiring diagram?
I don't have the diagrams at hand or the page I used, but if you search, there are lots of places where you can find similar circuits using a 555 in astable configuration and a transistor on the output to invert the signal, it's the same astable circuit you find on the 555 Datasheet, just search "servo 555".
As for your comment Randy, I really think that these Sanwa joysticks I've got are really hard to turn from the joystick, there is almost no friction. I know that they turn slowly if you play a lot, but you have to play a long time. In any case, to solve the problem of the servo always trying to correct it's position and risking it to burn, I'm trying configurations where I send signals to the servo for 1 second every 5 seconds, or every 10 seconds or so... This way the servo can put the switch in the initial position and check every certain amount of time that the switch is in the correct position and correct if necessary. This assumes as I said before, that your joysticks keep their position and they are not turn easily from the joystick.
-
How much rotational force does a player exeret vs a servo? could you hold the plate in the desired position with a magnet?
-
ok i thought of a much more complicated but more interesting way. The idea would be to have the servo arm follow a track that would deposit the plate in place then detach the arm (thereby eliminating the stress from a moving plate). The idea is roughly outlined below (only one side of the track is illustrated but it would obviously be mirrored on the other side).
(http://i10.photobucket.com/albums/a145/king_026/platerotater.jpg)
The arm would rotate around the track with the plate attached via a magnet. When it reaches the area where the plate should be there is a stopper which detaches the plate from the arm. The plate falls onto a peg which fits into a hole on the plate and holds it in place. On the way back the arm would come over the plate and pick it back up with the magnet and travel to the other position where a similar thing would happen. It is fairly complicated and would be difficult for someone at home to build but it was what i thought about in the shower and that is what i came up with.
-
Couple of ideas.
A small solenoid to lock the rotation of the restrictor. Solenoid pin just goes in/out of a hole in the plate.
Maybe use a motor with a worm gear to rotate the restrictor. Then use an optical sensor to know when it is done, which then tells the previously mentioned solenoid to lock the plate. Obviously this means a custom made restrictor plate that matches the gear on the motor.
It would be cool if the 4-way could rotate to a Q-Bert setting. You would still have to setup the MAME buttons as the diagonals (eg. Up + Right,) but at least you would have the restriction.
D.
-
If anyone just wants to spend $$$ and get it over with:
http://store.firgelli.com/l12-s-linear-actuat12.html (http://store.firgelli.com/l12-s-linear-actuat12.html)
(mini actuator, built in limit switches, $80 +S&H)
-
Couple of ideas.
A small solenoid to lock the rotation of the restrictor. Solenoid pin just goes in/out of a hole in the plate.
Maybe use a motor with a worm gear to rotate the restrictor. Then use an optical sensor to know when it is done, which then tells the previously mentioned solenoid to lock the plate. Obviously this means a custom made restrictor plate that matches the gear on the motor.
Still think the servo thing is much cheaper and easier to do than this, but when I was considering things I thought about that. For this, instead of a custom plate I considered attaching a lego gear to the current plate and build everything from technic parts. (Acquiring individual technic parts is cheap and easy from bricklink)
-
Sorry to revive an old thread, but I just completed a new cabinet and was checking to see if anyone else had done the auto 4/8way joystick.
I'm using Ultimarc Mag-stick plus joysticks, and a Pololu 6-channel servo controller. When the game is selected in the FE, a small batch file runs that will automatically tell the servos to move to the 4 or 8-way position and then run mame. Works a treat- I'm really happy with the result
(http://i1219.photobucket.com/albums/dd425/terrahwk/IMG_1651-sml.jpg)
-
Looks good!
Does that stick restrict actual diagonal movement when in 4 way, or does it just disable diagonal switches?
-
Looks good!
Does that stick restrict actual diagonal movement when in 4 way, or does it just disable diagonal switches?
Yes, when in 4-way mode the stick is physically incapable of moving to the diagonals
-
Can you post video/build pics/parts list/batch file? (yeah, I asked for everything+kitchen sink...)
That looks really neat and might not need this servo (http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=10571) that I looked up...
-
Well, I don't have a build video... but will see if I can describe it.
Servos and servo controller came from www.robotgear.com.au (http://www.robotgear.com.au) but any local hobby/robotics store should have this stuff.
I used these servos http://www.robotgear.com.au/Product.aspx/Details/421 (http://www.robotgear.com.au/Product.aspx/Details/421)
And the Pololu 6-channel micro maestro servo controller http://www.robotgear.com.au/Product.aspx/Details/403 (http://www.robotgear.com.au/Product.aspx/Details/403)
I fell in love with the servo controllers, they are very flexible and quite small.
This shot has the I-Pac keyboard encoder, one Pac-Drive LED controller and the servo controller. The servo controller is the really small board under the keyboard encoder.
(http://i1219.photobucket.com/albums/dd425/terrahwk/IMG_1649-sml.jpg)
The joysticks I used are Ultimarc Mag-Stick Plus 4/8-way switchable. The white lever on the site is part of the locking plate. There's a small lump on the joystick housing that helps keep the locking plate in the correct position - I removed it using a dremel so the servo has an easier time moving the locking plate. I could probably have left it there, the servo is surprisingly strong.
It's really just a matter of getting everything mounted and connected, and that will vary according to your control panel. Most of the stuff was just found about in the shed - the push-rods that connect the servo to the joystick for example are simply steel rod that has had a flat section ground into each end. They are connected to the joysticks with very small nuts and bolts that came off an old broken helicopter (model). The servo controller itself runs off USB power, but it needs an external 6V supply to power the servos. I'm running my servos off 5V, as that's what I had available.
The servo controller contains a small amount of flash RAM, and it comes with software and a simple programming language. With a servo, you simply tell it where you want it to "be" and it will rotate to that position and stay there. Any attempts to move it will be met with resistance, depending on how strong the servo is. The position will vary according to each build. You can use the software that comes with the servo controller to play with it until you find the right value.
(http://i1219.photobucket.com/albums/dd425/terrahwk/PololuServoController.png)
You can use the software and move the slider, the servo will move in real time. Basically I wrote the following script in the above software and saved it to the servo controller. The script gets called whenever I want the servos to move.
8
sub start
8 equals if
4105 frame
else
7373 frame
endif
0 frame
quit
sub frame
dup
0 servo
1 servo
1000 delay
return
I'm no coding guru, so all this does is set up some simple logic - If I call the script with the value "8" (or no value) then it will tell both servos to move to position 4105. If the script is called with any other value, the servos will move to position 7373. (The scripting language uses RPN-like notation, which is why it might look a little odd) These values were found by experimentation.
The batch file (I'm using Windows XP) looks like this and I call it "runmame.bat":
@echo off
d:
cd d:\mame
findstr /b /r "%1$" game-stick-mapping.txt > result.txt
for /f %%A in ("result.txt") do if %%~zA NEQ 0 goto four
echo 8-way
usccmd --sub 0,8
goto end
:four
echo 4-way
usccmd --sub 0,4
:end
mame "%1"
Again, I take the easy way out. I have made a hacked version of controls.xml and it simply contains the rom names of roms that are 2 or 4-way games. I did this as my XML parsing skills are non-existant, but I can write a simple batch file :)
Basically, the batch file searches for the ROM name in the file "game-stick-mapping.txt". The result is written to a temporary file. If the file size is 0 then obviously the ROM name wasn't found so the assumption is made that the game is 8-way. It then calls the servo controller and passes the parameter "8" (or "4", if the ROM was found) and then finally calls mame. The file I use is here (but all credit should go to the creators of controls.xml, any mistakes are likely to be from me) http://pastebin.com/download.php?i=twbzDgSf (http://pastebin.com/download.php?i=twbzDgSf)
The batch file is therefore called like you would mame:
runmame.bat 1942.zip
I use Hyperspin as the front-end. Hyperspin won't run batch files, so I came across a utility called "Bat-to-exe-converter" here http://www.f2ko.de/programs.php?lang=en&pid=b2e (http://www.f2ko.de/programs.php?lang=en&pid=b2e)
You can feed it a batch file (like the one above) and it will "convert/compile" it into an exe. Hyperspin then accepts this exe instead of mame.exe. (although I don't pass any other parameters to mame.exe - I have it all set up in mame.ini. If you pass parameters through you might need to adjust the batch file)
I'm sure someone with a little coding knowledge could write up something that properly parses controls.xml and calls the servo controller directly. I thought about trying - I used to do a bit of C coding, but that was over 10 years ago... so it's a bit beyond me at the moment.
-
Very cool!
I bet you could create a mala plugin to act as the bat file does.
Very interesting work.
I may try this on my next build.
-
Very cool!
I bet you could create a mala plugin to act as the bat file does.
Very interesting work.
I may try this on my next build.
Yeah, nice work (",)
I've only just discovered mala and the plug ins aspect of it looks very useful indeed...
-
this is a pretty cool idea. i just went with a dedicated 4 way stick on my cab.. but i could see this coming in handy if you do not have a lot of room.. like converting a cab to mame.. some of them cabs have small control panels.. also this would be nice in a bar top too. will book mark this for when my skills reach the desire level needed for this. :)
rock on.
chris.
-
this is a pretty cool idea. i just went with a dedicated 4 way stick on my cab.. but i could see this coming in handy if you do not have a lot of room.. like converting a cab to mame.. some of them cabs have small control panels.. also this would be nice in a bar top too. will book mark this for when my skills reach the desire level needed for this. :)
rock on.
chris.
Not just that, but some CP's with a stack of joys on it look, to use an American euphemism, 'like ass'...
-
i found the controller 5$ cheaper + free worldwide shipping
http://cgi.ebay.com/MICRO-MAESTRO-6-CH-USB-SERVO-CONTROLLER-ASSEMBLED-/170544529885?pt=LH_DefaultDomain_0&hash=item27b53f01dd (http://cgi.ebay.com/MICRO-MAESTRO-6-CH-USB-SERVO-CONTROLLER-ASSEMBLED-/170544529885?pt=LH_DefaultDomain_0&hash=item27b53f01dd)
i have 7" screen on my CP and i connected to it a servo so i can change the angle i will upload a video soon
-
this is what i did with the servo i bought it from ebay
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=320621254330&ssPageName=STRK:MEWNX:IT (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=320621254330&ssPageName=STRK:MEWNX:IT)
control 7" screen on my arcade cabinet with a servo (http://www.youtube.com/watch?v=jGjOiFWzDf8#)
in the video i control the servo with servo tester" but i will connect it to the pc and conrol it with some script
-
A couple of other choices for controlling servos from a PC.
Mini SSC II (http://www.seetron.com/ssc.htm) I have not used this one, but it has been around a while and has a good reputation.
Phidgets Servo Controller (http://www.phidgets.com/products.php?category=11) I do have two of the older version that I have played around with and they work very well.
I forgot to add that Phidgets also has Stepper controllers. (http://www.phidgets.com/products.php?category=13)
-
I was inspired by terrahwk's effort, I really liked how he used two servos to make two Mag-Stick Plus joysticks switch automatically from 4-way to 8-way mode.
I currently have a mock control panel for seeing how everything fits together for when I build my arcade machine and I thought the way I had my Mag-Sticks mounted I could emulate what terrahwk has done but hopefully get away with using just one servo.
Anyway today I got the servo controller and servo working, I followed terrahwk's instructions with the software and got the servo moving as I ran different MAME games.
Next I installed the servo into my mock control panel and added a bar linking the two Mag-Stick to the servo.
I then hooked it up to the computer and ran the software and no probs the little servo switched both Mag-Sticks at the same time easily.
I will have to be more precise when I make up my real control panel as when the joysticks switch one of them is out by a millimetre or two from going all the way.
Also my mount for the servo is dodgy as, which probably doesn't help.
It doesn't really matter for the mock panel, this was just a check to see if the servo had the power to shift both at once.
(http://img227.imageshack.us/img227/1237/servoswitchingjoystick.jpg)
Here's a video of it switching, I ran Juno First followed by Donkey Kong, just from the command line.
4-way - 8-way auto switching (http://www.youtube.com/watch?v=j2r5UnU0F0Q#)
I haven't been able to get it working in HyperSpin as yet, I'll have to play around with it a bit more.
-
very cool :)
chris.
-
Is it just me, or does the servo flex the mounting bolts when it nears the end of motion? If so, you will probably see a premature failure of this setup. My guess would be the mounting holes on the servo will go, but something in there won't last IMO.
I like what you guys have come up with here! Perhaps one of the vendors will see the value in this and create a ready-to-install solution. :cheers:
-
Is it just me, or does the servo flex the mounting bolts when it nears the end of motion? If so, you will probably see a premature failure of this setup. My guess would be the mounting holes on the servo will go, but something in there won't last IMO.
Also my mount for the servo is dodgy as, which probably doesn't help.
Yeah it was just a quick put together, I wouldn't mount it like this if it was a real panel.
-
I have it working automatically in HyperSpin now by using a batch file but I'd like to eventually write a script for HyperLaunch to do it all within HyperSpin.
-
Sorry to revive this old thread, but I have an update that might interest someone who wants to automate the joystick.
I have just finished a Mala plugin that allows you to call bat files for the joystick position needed per game.
It is called JoyChoose.
JoyChoose can call just about any program that actually controls the servo motors.
It can be individual programs for each joystick position, or one program with arguments for each position.
JoyChoose can issue program requests for 8 way, 4 way, and 2 way.
Anyone thought about making a 2 way switch?
I havent uploaded it to the MalaFE website yet, just thought I would give you guys a sneak peek.
If you are interested in test driving JoyChoose, drop me a PM, I can email it to you.
Once it is available on the MalaFE site, I will announce it in the Mala Forum on here.
Anyway, here is a pic of the JoyChoose configure screen:
-
Sound interesting DaOld Man, I use HyperSpin and one of the members of the forum over there wrote an AutoHotkey script to do the same thing.
Where does JoyChoose get it's information on the joystick directions for each rom?
-
Mame.xml I think.
-
JoyChoose is now available for download on the malafe.net website, under "plugins".
-
Just been searching around because I am ready for a new project and will be using servostiks. I am finding that links are rather circular. Go to malafe.net and it tells you to look here, from here you are sent to malafe.net! Just wondering if there could be a fresh clean thread started just on controlling servostiks (without all the R & D posts that preceded)? In particular using Mala (in the mala section) but probably to be fair the thread should cover all means of controlling servostiks.