Good point.Wouldn't it be possible to measure it on the real thing with a memory scope or logic analyser?
Good point.Wouldn't it be possible to measure it on the real thing with a memory scope or logic analyser?
I don't have any tools for that currently.Wouldn't it be possible to measure it on the real thing with a memory scope or logic analyser?
I may do that if I can't figure it out by guessing.You could also set up an arduino and use that to measure the delay. A bit more work, that's a fact.
If this game has its own profile will it override some of the default profile values? The reason why I ask, I believe the Deluxe cab had additional I/O that the Standard Cab doesn't even use. Hopefully that is not extra work on your side to even account for the Deluxe cab setup. (It might be the tilt feature that references the Y axis or Shifters)F-ZERO AX has the weirdest control scheme with all kinds of analog inputs and buttons. With a little work using the MEGA JVS, I can get it playable in OR2SP's cab as follows:
Start button lines up to Start in game.
View Change is currently mapped to both a View Change button and the Boost button, though I don't think the View Change functionality does anything in-game. There are like 4 view change buttons on this game, so not sure.
Steering wheel is steering X axis.
Shifter up/down map up to the paddle left/right on the game that let you strafe left/right, though not sure how absolutely necessary this feature is... maybe in more difficult tracks?
Brake is brake.
Gas is mapped to both Gas and Steering Y axis. When you calibrate controls, you need to do so with gas slightly pressed it so that when it's released it equals Y down. When it's pressed in it equals Y up and Gas. I'm not seeing where Y movement is that integral to this game, but again, maybe in later races.
It's not the most ideal setup, but it's definitely nice having yet another racer to boot up in my cab.
At this point every profile is a complete mapping of controls, so every profile overrides what's loaded by default or what was loaded from a previous profile. Only the last selected profile is what drives the mappings at any point. Does that answer your question?If this game has its own profile will it override some of the default profile values?
I'm guessing the deluxe version wouldn't even be bootable outside of the dedicated cabinet. Has that version been dumped?The reason why I ask, I believe the Deluxe cab had additional I/O that the Standard Cab doesn't even use. Hopefully that is not extra work on your side to even account for the Deluxe cab setup. (It might be the tilt feature that references the Y axis or Shifters)
Nothing to see here...The other issue is that the start lamp seems to be activated by MIDI FFB activity. It will blink with different intensities according to communication going to the MIDI board. The I/O doesn't have anything to do with MIDI communication, so I believe it's an EMI issue and I'm hoping it can be resolved with a pull-down resistor on the associated MOSFET. Either that or the MOSFET has started going bad. It doesn't happen with the View Change lamp. This was happening before I started working on the NAMCO FFB translator, so it's not a new issue that came about as a result of that.
In a cabinet, yes, the profile switch would have long wires between the board and the switch, and that is the case in my current setup. That is the case with all of the switches in the cabinet. For simplicity in design I make use of internal pullup resistors for all inputs, so that a pin just has to be grounded to be activated.I assume you have long wires between that switch and the arduino input that is pulled to gnd by it?
It would probably be best to have these hardware solutions tied to every input. Component cost isn't an issue, but space on the board is, especially if I want to stick with through-hole components for easy assembly. If I'm counting correctly, I think I'm dealing with a potential of 28 inputs coming from a Type 1 harness, plus any MEGA JVS specific inputs like the profile switch and a couple of optional switches.You might place a small bat85 diode in serie with that signal wire. Such will also protect the input against incoming voltage (either due to EMI or due to misconnection) A 330 ohm resistor in serie can limit the current. If during software development the controller pin is accidently set as output and high, you won't overload it if you press the switch. Finally, a 100nF capacitor to gnd can remove most of the EMI picked up by the wire. It's not like the response time of that switch is very important.
I haven't finalized V2 and submitted it for ordering yet, so I am open to your suggestion. I just have to see if I fit everything. I haven't found much info on hardware debouncing for figuring out the component values as they relate to response time. Would you have any advice to offer for the inputs where I want to filter out noise and debounce, but still be very responsive?It's not like those components will increase the price much. If your pcb is on it's way, my advice comes 2 late.
How I've handled powering components is that the Arduino is only responsible for powering some things and has worked fine under just USB power in all of my tests:usually if they both have common earth that should avoid any problem.
What could also happen is that you unplug the sun and then it's the arduino powering everything and that could be too many mAmps and fry the Arduino.
My two cents.
I did find this page with a lot of info on debouncing.You might place a small bat85 diode in serie with that signal wire. Such will also protect the input against incoming voltage (either due to EMI or due to misconnection) A 330 ohm resistor in serie can limit the current. If during software development the controller pin is accidently set as output and high, you won't overload it if you press the switch. Finally, a 100nF capacitor to gnd can remove most of the EMI picked up by the wire.
It's unclear why your first Arduino hot fried when you connected both usb power and external power. The arduino was designed to allow powering it from both external and usb. Maybe your first arduino (clone?) had a fault in it's power supply circuit. The arduino leonardo (The one I normally use) has a diode on it's external power input that should conduct if it's reverse polarised. If you have a beefy supply (like an arcade sun) it will turn that diode into a led for a fraction of a second. After that, it will turn the rest of the electronic components into high temperature liquid silicium.Another interesting update: A previous test left me scared about applying external power to the Arduino while simultaneously plugging in USB power from the PC. My previous test ended up frying the Arduino.
I just had my board out for troubleshooting the start lamp issue mentioned in the previous post, plugged it back in with the external power while simultaneously plugging in USB for programming it without thinking. I just now realized the board was still powered after I unplugged USB, and apparently the onboard management of power sources when both are available is working. Maybe I had polarity reversed in the previous test.
I just tried plugging and unplugging USB a few times while the 12v source was on, and it registered on the PC without any interruption to JVS communication.
At any rate, it seems to have no ill effect when the external 12v is powering it while USB is plugged in, too.
That's my main concern. I like the idea of it being easy to assembly for everyone. I would probably like to experiment with SMD components, but maybe in a future revision. @Darksoft wants me to design the board where everything is on one board, and the Arduino and modules are eliminated, but I doubt I'll go that far.If you intend to sell it as a "assemble it yourself" package, I can understand.
Considering the debouncing. Whenever you use hardware or software debouncing, it will always introduce a short delay in response time. In software, you can adjust the debounce timers and check if everything still works fine.
I think since software debouncing is working, I will probably just stick with that for now.Not all buttons have equal debounce behavour which is why it's not an exact science.