lesthegrngo Posted January 10, 2024 Posted January 10, 2024 (edited) Hi all This question is as much for non-flight sim use as anything - the particular application I have in mind when looking at it is a replacement for my home made double H pattern 'gearbox' used on my race sim rig. The concept would also be useful for some flight sim devices. The particular device I want to update does work well, and uses two gangs of four microswitches activated by a finger that protrudes from the base of the lever assembly. It's not particularly sophisticated, however and is bulky and lacks a bit of feel which is why I am looking at a redesign. However one part I do want to keep is the 32 button Bodnar board, as it has distinct advantages in that I can use it with (virtually) any game and it is instantly recognised, plus I can add analogue and digital inputs like extra buttons and handbrake levers really easily. However to help simplify and reduce the size of the new version, what I want is to use six switches in place of eight to activate the 8 Bodnar inputs. If you consider that there will be four switches arrayed so that at the lever rotates from side to side, each switch is closed. Additionally, there is a fore and aft switch. So in the case of gears 1, 3, 5 and 7, the front switch will be closed, so when it makes contact with one of the four array switches the combination of the two switches result in a particular input being selected. I was wondering whether MOSFETs may be usable? I know that with an Arduino I could do that with a simple sketch that looks for an 'if' or 'and' argument, but as stated I want to (if possible) keep with the Bodnar board. I hope I have made the idea clear enough, let me know if I haven't. So, is this possible? Les Edited January 10, 2024 by lesthegrngo
FroznAK Posted January 11, 2024 Posted January 11, 2024 If you use a Pro Micro board and the Joystick.h library, you could possibly write a sketch that map multiple physical inputs to a single joystick output. A Pro Micro is recognized as a HID device and would act like the Bodnar. Alternatively, you could use a SMT32 board and FreeJoy Github and use one button as a switch register. FreeJoy is super simple to use, and boards are cheaper than the Pro Mircos.
No1sonuk Posted January 11, 2024 Posted January 11, 2024 You could use relays to change over between top and bottom with the top/bottom switch controlling the relay coils. MOSFET switching might work. It'd be easier with a couple of logic chips as well, to do the "if/then" job in hardware.
lesthegrngo Posted January 13, 2024 Author Posted January 13, 2024 I need to check the working voltage of the Bodnar boards to see if they are compatible with the Mosfets, But I can see a way that it would work if so Les
No1sonuk Posted January 13, 2024 Posted January 13, 2024 This is what I mean about the hardware if/then: U1 and U3 are quad 2-input AND gates (74xx08). Power pins not shown. U2 is a hex inverter (74xx04 or 74xx14). Power pins not shown. Q1-8 are whatever will switch the Bodnar board inputs from a 5V active-high logic level. That may require additional circuitry. Theoretically, with the up/down switch open, the 4 position switches should fire the outputs only on U1, and with up/down closed, they should only fire the U3 outputs. There's nothing stopping more than one output firing if more than one input switch is closed. 1
lesthegrngo Posted January 15, 2024 Author Posted January 15, 2024 (edited) Thanks, I think this sort of setup is what I was wondering about. The only difference would be that I have to have two switches for the fore and aft position, as there is a centre neutral position because of the 'hold button for gear' type logic I will have a good look later to use your sketch as a basis for what I mean, assuming I don't make a meal of it Cheers Les Edited March 4, 2024 by lesthegrngo
No1sonuk Posted January 15, 2024 Posted January 15, 2024 That's easy. Duplicate the top switch and resistor. Connect the new switch to the input of U2b instead of the output from U2a.
lesthegrngo Posted March 3, 2024 Author Posted March 3, 2024 I'm coming back to this as I have been made aware of Unipolar Hall effect Switches (OH137 type) that may completely change my setup in terms of the physical hardware needed for correct actuation. I'd obviously heard of hall effect sensors, my homemade race sim pedals used them very successfully with a Bodnar board. However up to now I always assumed that they were a linear device, and stumbled upon the digit type while researching microswitches for the gearbox project. I am a bit disappointed that there don't seem to be any SMD versions available, but I am quite excited about them as it may allow me to make some bespoke multi position switches that would otherwise have been too complicated to do. It also means the possibility of incorporating a switch into other devices where it previously would have been impractical. For the use with the Bodnar board, I will go straight to them for the question of compatibility, however I assume that for Arduino use, they are essentially treated as normal Hall effect sensors? Or do they require different usage? Cheers Les
No1sonuk Posted March 3, 2024 Posted March 3, 2024 (edited) A digital output Hall effect sensor would be treated as a switch in DCS-BIOS if you get the open-collector or open-drain types. The transistor operates as a switch, shorting the output terminal to ground when the magnetic flux density is higher than the Hall effect sensor ‘on’ point. DCS-BIOS would turn on the internal pullup resistors required for use of open-collector or open-drain outputs, so no additional compenents should be required. Be careful about the type of digital Hall effect sensor too. "There are two types of digital Hall effect sensors: bipolar and unipolar, which differ depending on the type of magnetic field needed to operate them. Bipolar digital Hall effect sensors need a positive magnetic field (which comes from the South pole of a magnet) to operate them, and use the negative field (from the North pole) to release them. Unipolar sensors only need a single magnetic South pole to both operate and release them as they move in and out of the magnetic field." You'll probaly want unipolar if you just want to detect the presence and absence of the magnet. And FYI, this one is available in surface mount form. Not recommending this over others, just the first one that popped up. https://www.ti.com/product/DRV5023#params Edited March 3, 2024 by No1sonuk
lesthegrngo Posted March 3, 2024 Author Posted March 3, 2024 (edited) Thanks Leo Bodnar himself responded to say that they will work as switches on the 5v Bodnar boards, so the BU0836A, BU0836X and BBI- 32 boards. Apparently the BBI-64 versions are 3.3v Cheers Les ***edited to get of some weird formatting*** Edited March 4, 2024 by lesthegrngo
lesthegrngo Posted April 11, 2024 Author Posted April 11, 2024 (edited) For all those interested, I have made a couple of little PCB's with four of the OH137 type hall effect switches on them, and tested them with a Bodnar BU0836-LC board, and they work perfectly. While they are not going to be used for a lot of simple applications, I can see how these are going to be used by me for bespoke switches like rotary, or multi position lever switches. With a 3mm diameter, 1mm thick magnet, the distance that the switches operated at about 5mm distance, so even with tiny magnets it functions well. The sensors are 6mm apart for these boards, and with a larger 6mm diameter, 10mm long magnet (which is pretty powerful) there is no cross talk, so the switches can be quite close together. The bigger magnet activates the switch at over 10mm distance Hope this helps Les Edited April 14, 2024 by lesthegrngo
Recommended Posts