Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

Poll

-- deleted poll --

-- deleted poll --
0 (0%)
-- deleted poll --
0 (0%)

Total Members Voted: 0

  

Author Topic: GUN4IR - The Ultimate 4 Points Lightgun System  (Read 188307 times)

0 Members and 2 Guests are viewing this topic.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
GUN4IR - The Ultimate 4 Points Lightgun System
« on: September 30, 2019, 01:25:12 pm »

GUN4IR®
The Ultimate 4 Points Lightgun System

Copyright © Jean-Baptiste Bongrand 2019-2021, All Rights Reserved.
This system, including hardware and software, is Copyrighted© and trademarked® by Jean-Baptiste Bongrand.
Any unauthorised / commcerial use of the system or any part of it is strictly prohibited.



But why yet another IR points system??
Because it's not a standard IR system! The main goal of this system is to have a more affordable and highly customizable system, that keeps the experience as close as possible as the arcade experience.
It has many advantages over other modern lightgun solutions:


  Perfect line of sight accuracy! Thanks to the 4 leds of this system and a tons of advanced math that does auto calibration in realtime, you get a perfect line of sight accuracy all the time!
  Ultra low latency! This system use a fast IR camera, and the firmware is heavily optimized, reducing the total processing latency to around 4ms. Lowest latency of all modern IR systems!
  No calibration everytime you play! You have to do the calibration only once to setup your camera and led points. After that, it will work with perfect accuracy no matter the angle/distance from the screen!
  No need for special software! Everything is handled by the arduino, making it plug and play with any system that supports a mouse/keyboard or a controller. No extra software needed (the GUI is optional).
  No extra processing! There is no processing needed on your gaming platform, no cpu overhead, nothing added to the game screen. You can use your games as usual!
  USB and Bluetooth HID compatible! Since it's using standard HID mouse, gamepad and bluetooth, it's compatible with everything that supports a usb/bt mouse & gamepad!
  Reduced minimum distance! This system allow you to play closer to the screen than most other modern system, and even more if you add a fully supported wide lens to the camera!
  Full offscreen tracking/reload! It keeps you tracked even outside of the screen, and support various offscreen option like offscreen reload.
  Support any screen size/type or aspect ratio! You can use this system pretty much on any screen, it will work.
  Various feedbacks support! You can add a solenoid, rumble motor and RGB led to your gun, and fully control how they behave and react to your games!
  Nunchuck support! You can plug a nunchuck controller if you need more button!
  DIY hardware! You can build your own custom gun from you favorite gun shells!
  Many other options! The gun is fully customizable, making it the most versatile and complete solution on the market.


If you wish to support my system and help with the development, you can donate here:

Since both the firmware and this GUI requires a lot of time and money to make, the GUI licenses, along with personal support will be provided to 15$ donator tier only.

I am using those donations only for this system expenses.
The firmware on its own stays free if you prefer of course.
Don't forget to also attach your name, username (forum or discord, both work) and email address to the donation (it will stay private), so that I can create a proper personal licence file for you  ;)
Warning: your personal license, as the name imply, is personal. Don't share it with anyone, or else you might get banned from using the software and next firmware update.
I check all license requests manually so it might take up to 24 hours for me to generate the license, please be patient.

This project is closed source, and is the property of Jean-Baptiste Bongrand.
Selling and distribution of this system or part of it without the consent of the author is forbidden.



Everything you need to build this system is written in the pdf user guide, you can find it
along with the firmwares and tools in a package in my gdrive

====> HERE <====


Everything can also be downloaded from my discord server (recommended if you want to stay up to date and want help):
JB Discord Server


A little preview of the gun system GUI;



Some videos to show the system:

2 cool videos made by Foxhole on Point Blank and Sports Shooting USA, this guy has skills 8)



2 other nice videos by hyo2012 that show my system really well;  ;D



A review video of the system by Ben:


Demonstration of the pinpoint accuracy of this system:

Note that the latency in the video is mainly caused by my test app and my screen, the latency in-game is lower.

Updates history:

*2021/02/07 - GUI 1.26beta - FW2.62

In this update I mainly modified the way the offscreen reload and screen content mode work.

Previously, you could only switch between full screen or 4:3, but now you can switch between fullscreen and a user defined aspect ratio. You can change this aspect ratio either from the GUI (to save in eeprom) or from a serial command (for per game setup). Everything on that new mode is written in the guide and the GUI.

Now when offscreen is in "Disabled", you can't fire offscreen (other buttons still work offscreen of course), and a 4th mode "Normal Shot" was added if you want to be able to shot offscreen without reloading.

User Guide:
- Corrected and modified various data
- Added all the previously undocumented serial commands, now you can modify most of the gun aspects through serial

GUI:
- updated to support the new modes

Firmware:
- updated to support the new modes
- fixed the gamepad buttons issue
- removed the gamepad mode dpad to save space (dpad now works as normal buttons, allowing to use it for something else)
- fixed an issue when changing modes through combo would keep some buttons hold
- better combo button switching, now just pushing the mode+button combo should always switch to the correct mode, no need to do them in a specific order
- slightly increased the mode button and trigger button debounce (20ms)

*2021/01/30 - GUI 1.25beta - FW2.58

User Guide:
- Updated and added various info, including the DIY camera and the Wii Nunchuck connection

GUI:
- updated to support the new boards
- made the "Test Screen" button enabled no matter if a gun is detected or not, allowing to test with any mouse device, and also having a guide for Leds placement
- various bug fixes and cleanup

Firmware:
- updated to support the Micro full pinout
- various bug fixes and cleanup

*2020/12/30 - GUI 1.21beta - FW2.55 - Goodbye 2020 update

Global:
- Brand new name for the system! Less generic than JB4PLG ;)

GUI:
- brand new interactive calibration process with more info and options, now fully done in app, making it more reliable and convenient!
- added fullauto trigger timing change option
- various bug fixes and cleanup

Firmware:
- fullauto trigger timing added
- temporary (not saved in eeprom) calibration serial command ('C')
- added debounce for trigger and mode buttons
- various bug fixes and cleanup

*2020/12/14
- User Manual v1.0 uploaded
- Main Post cleaning
- Uploaded Gun updates (that was uploaded on discord first

*2020/11/24 - GUI 1.17beta - FW 2.52
Firmware
- fixed axis flip with bluetooth
- fixed an incompatibility with linux mouse management

GUI:
- stability fixes

*2020/11/18 - GUI 1.16beta
GUI:
- improved the flashing error detection
- added a version write/read on the arduino, so that you will know what version is currently flashed on it. It's a test feature.
- fixed a bug that prevented to make the blue led blink

*2020/10/29 - GUI 1.12beta - FW 2.48
Firmware
- big serial commands change, to make them more unified and versatile (see the usage section changes)
- various leds detection updates and optimizations, to make it more stable and failproof
- new fullauto mode added, "always on", for games that always use fullauto but don't have outputs

GUI:
- new manual calibration mode from the GUI, you can now refine the calibration very easily
- matched the serial command changes

*2020/10/24 - GUI 1.0beta - FW 2.39
http://forum.arcadecontrols.com/index.php/topic,161189.msg1726424.html#msg1726424

*2020/10/08 - GUI 0.991beta - FW 2.33
http://forum.arcadecontrols.com/index.php/topic,161189.msg1725318.html#msg1725318

*2020/10/05 - GUI v0.97beta - Firmware 2.30 Anniversary edition
Firmware - for the 1 year anniversary of this firmware, I wanted to do a big update on it, so here are the updates so far (more incoming);
- Rewrote all libraries and code to take less space and have less global latency (down to ~4ms total processing time)
- Fixed various bugs that was causing issues to the calibration and the accuracy
- Improved a lot the global precision, especially on the sides of the screen or when moving around
- Added a "sync mode" that waits for the position to be calculated before activating the pressed buttons, instead of pressing them right away. It allows to get perfect accuracy on fast motion with a very small latency tradeoff. I recommend to leave it on.
- Changed the calibration to 5 steps (instead of the usual 3). Since the calibration has to be done only once, I decided to change it to make it way more accurate and failproof. Note that each step will only be validated if the camera sees the necessary IR points (4 for center, 3 for each side).
- Prepared the firmware for the next updates.
GUI:
- small fixes and modifications to support the new firmware.

*2020/09/28 - GUI v0.96beta
- While working on the next big update, I wanted to release a small update mainly to add direct support for the Sparkfun pro micro boards. So now no more empty sketch flashing needed!
- added the official Sparkfun drivers to the package, for those who are using Windows 7.
- added an icon to the GUI exe.

*2020/08/21 - GUI v0.94beta - Firmware 2.26
- firmware: fixed a bug that prevented the sensitivity profiles to load correctly
- GUI: removed the custom max sensitivity level, as it's not working correctly

*2020/05-08 - 2.25
http://forum.arcadecontrols.com/index.php/topic,161189.msg1721170.html#msg1721170

*2020/04/30 - 2.22
- big update of the detection and tracking, it now works better, faster and more precise than ever
- various update to make it compatible with the GUI

*2020/04/30 - 2.16
http://forum.arcadecontrols.com/index.php/topic,161189.msg1713662.html#msg1713662

* 2020/04/13 - 2.07
http://forum.arcadecontrols.com/index.php/topic,161189.msg1712259.html#msg1712259

* 2020/04/11 - 2.06
http://forum.arcadecontrols.com/index.php/topic,161189.msg1712063.html#msg1712063

* 2020/04/09 - 2.05 - unified firmware
http://forum.arcadecontrols.com/index.php/topic,161189.msg1711912.html#msg1711912

* 2020/02/29 - 1.93
- reworked the aiming and detection, to make it faster and better
- fixed some bugs

* 2020/02/29 - 1.91
- rewrote the 3 points aiming calculation, it's way more precise now
- changed the test tool to better see the led recognition.

* 2020/02/28 - 1.87
- 2 points detection is now inactive if too close from the screen, to avoid misdetection

* 2020/02/28 - 1.86
- fixed calibration issues
- fixed aiming issues
- fixed the flash/clear tool

* 2020/02/28 - 1.85 major update, please read the changelog carefully before updating!

- rewrote the whole flashing and config tool, now a lot more user friendly!
- made a double timing test to be able to flash any arduino. No need to modify the bat file anymore.
- various optimizations
- IR points detection bug corrected, it should be a bit more stable now
- reworked the buttons management
- merged normal and test firmware, now the test tool should trigger the test mode (replug the arduino once to reboot in normal mode)

- added RGB LED support for the 7 button + LED firmware! If your gun uses more than 7 buttons or if you don't want LED support please use the 11 buttons firmware
- added temperature sensor support! connect a tmp36 sensor to pin A0
- added rumble and LED feedbacks when changing modes
- added various LED feedbacks
- added EEPROM save and load gun data

- updated the game screen ratio modes for better usage and compatibility, now there are only 2; fullscreen and 4:3
- updated the test tool, now the one pde tool supports both normal and full screen, and has more options (don't use the old tools)

* 2020/02/18 - 1.76
- reworked the buttons management again and fixed the remaining issues (with the calibration for instance)
- fixed the bug with the feedback when offscreen reload is disabled, now it should trigger the solenoid (the way it works remain unchanged when offscreen reload is enabled)
- modified the flashing batch file to be more compatible (detects bootloader whatever the model, and waits for 6 seconds now)
- rewrote part of the guide, added installation instructions

* 2020/02/16 - 1.75
- fixed the combo buttons functions (joystick mode, offscreen shot...)
- reworked the buttons management to decrease risks of bugs and future-proof it
- did a lot of small optimization to increase the execution speed.
- changed the zip file, firmware name and flash bat again, now you can know which firmware you have, and choose between normal and test firmware. Please don't mix with the previous files.

* 2020/02/15 - 1.70
- restored the cursor accuracy without increasing the load, it should eliminate most wobbles
- put everything in only one zip and renamed the batches file for more clarity.
- added diagrams for the gun feedbacks

* 2020/02/12 - 1.68
- Improved 2 points detection, optimized other functions
- updated the .pde sketch for IR testing

* 2020/02/12 - 1.66
- fixed bugs and 2 points detection

* 2020/02/11 - IR cam testing tool
- added test app

* 2020/02/09 - 1.55 beta
- Rewrote aiming calculation
- Added a better tilt/twist detection, it increases the maximum tilt to 89 degrees on each side.
- Added a function to disable the press of secondary button when shooting offscreen.

* 2020/01/19 - 1.35
- improved the led and twist detection

* 2020/01/18 - 1.3
- cleaned code, added manual screen calibration.

* 2019/10/26 - 1.2
- first public version



Special credits:
PL1 for his Pro Micro diagram
Foxhole for his support and careful testing
And everyone else in the forum for supporting this project and keeping the arcade love alive  :cheers:
« Last Edit: November 07, 2021, 05:41:58 am by JayBee »

Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:November 30, 2021, 07:25:06 am
  • Arcade enthusiast !
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #1 on: October 01, 2019, 03:16:32 am »
Great work JayBee, looking forward to more details  :applaud:

ryoken

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:June 02, 2021, 03:36:23 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #2 on: October 01, 2019, 03:41:38 am »
Very impresive... nice for sharing

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4214
  • Last login:December 01, 2021, 10:34:52 am
  • I have a gaming addiction.....
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #3 on: October 01, 2019, 04:36:52 am »
Cool :)

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 12, 2021, 06:40:28 pm
  • SAMCO Light Gun Creater
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #4 on: October 02, 2019, 05:57:54 am »
Nice work JayBee, can't wait to check out your code.

I was wondering is the reason you mentioned you have to stand in front of the screen to fie because of the tight angle of the leds? Just because I've looked around and found some wide angle leds on AliExpress https://www.aliexpress.com/item/32491780864.html?spm=a2g0s.9042311.0.0.41bf4c4dNxe3jj they don't have UV coating on them so wouldn't suggest for everyday unless you want to mount them behind a UV filter (or even better eventually find some that already have it like the Adafruit ones). But these increase the viewing angle massively.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #5 on: October 02, 2019, 06:55:22 am »
Nice work JayBee, can't wait to check out your code.

I was wondering is the reason you mentioned you have to stand in front of the screen to fie because of the tight angle of the leds? Just because I've looked around and found some wide angle leds on AliExpress https://www.aliexpress.com/item/32491780864.html?spm=a2g0s.9042311.0.0.41bf4c4dNxe3jj they don't have UV coating on them so wouldn't suggest for everyday unless you want to mount them behind a UV filter (or even better eventually find some that already have it like the Adafruit ones). But these increase the viewing angle massively.
Actually this time I'm not sure I will share the source code yet, for ease of use, update and prevent any problem.
Instead I was thinking of providing two things: a sketch that will write to the Arduino EEPROM all your custom settings you need, like pin numbers, screen res and all, and bin files, one for each Arduino type. Like this you just need save your settings once, no need to modify the sketch again every time I update it  :)

Yes, I mentioned at the same time for led angle, and because the system doesn't work that well if you are too much up or down (works fine from left and right).
I actually bought 200mW/Sr LEDs with 30degrees angle, they work quite nicely so far, but don't have UV filter or coating. What's the risks without UV filter? I have a limited knowledge on the matter.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 12, 2021, 06:40:28 pm
  • SAMCO Light Gun Creater
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #6 on: October 02, 2019, 08:44:53 am »
Sweet, sounds good man.

Unfortunately I don't know too much about UV filters either apart from a few Google searches. Mainly just didn't want to suggest a solution that was potentially unsafe which seems to be the general consensus from the little research I've done.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #7 on: October 03, 2019, 01:31:52 pm »
Quick news, now the code is fully functional and very stable for full use. More infos, videos and code coming soon, stay tuned  ;)

SammyWI

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 457
  • Last login:December 04, 2021, 09:47:47 am
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #8 on: October 03, 2019, 03:03:04 pm »
Very cool.  Great to see more options coming out.  :applaud:

lllll44

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 154
  • Last login:November 29, 2021, 02:23:20 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #9 on: October 12, 2019, 04:38:22 pm »
cant wait to hear more! amazing.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #10 on: October 14, 2019, 01:49:26 pm »
Good news, thanks to Howard_Casto and his Mamehooker software, I was able implement mame output with my lightgun. I can send recoil, rumble and led control and parameters directly to the guns for each game independently.
For the games/emulators that support output, the solenoid, rumble motor or led that you have installed in your gun will react like in the real arcade machine.
It will also be very easy to customize.
And since it's switching the games automatically, for games that don't support output, the recoil, rumble and led will go back to be controlled by the Arduino.

This is very close to complete!
Next, I will add a way of checking the solenoid temperature with a small chipset, to modify its speed of actuation if getting too hot, and avoid frying it.
It could also allow you to continue to fire in full auto but with reduced speed as long as the solenoid is hot.

Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:November 30, 2021, 07:25:06 am
  • Arcade enthusiast !
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #11 on: October 15, 2019, 04:34:16 am »
Good news, thanks to Howard_Casto and his Mamehooker software, I was able implement mame output with my lightgun. I can send recoil, rumble and led control and parameters directly to the guns for each game independently.
For the games/emulators that support output, the solenoid, rumble motor or led that you have installed in your gun will react like in the real arcade machine.
It will also be very easy to customize.
And since it's switching the games automatically, for games that don't support output, the recoil, rumble and led will go back to be controlled by the Arduino.

This is very close to complete!
Next, I will add a way of checking the solenoid temperature with a small chipset, to modify its speed of actuation if getting too hot, and avoid frying it.
It could also allow you to continue to fire in full auto but with reduced speed as long as the solenoid is hot.
:applaud: :applaud: :applaud:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19236
  • Last login:Yesterday at 06:36:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #12 on: October 15, 2019, 01:59:44 pm »
You got it done before I even had a chance to sit down and work on it.   :afro:

What type of interface did you use?

One thing I would suggest would be to add a pulse mode to your code.....  99% of the mame and model 2 library pulse the output for you with games like terminator 2, ect., but If I remember correctly Operation Wolf just has a steady on when the gun is firing.  It has to do with the mechanical operation of the guns... (op wolf and a couple others use a motor spinning a piston instead of a solenoid).  I have the outputs mapped for the model 2 emulator and some of the pc/techno parrot stuff as well, but I haven't released an updated troubleshooter 2 yet. 

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #13 on: October 16, 2019, 02:11:07 am »
You got it done before I even had a chance to sit down and work on it.   :afro:

What type of interface did you use?

One thing I would suggest would be to add a pulse mode to your code.....  99% of the mame and model 2 library pulse the output for you with games like terminator 2, ect., but If I remember correctly Operation Wolf just has a steady on when the gun is firing.  It has to do with the mechanical operation of the guns... (op wolf and a couple others use a motor spinning a piston instead of a solenoid).  I have the outputs mapped for the model 2 emulator and some of the pc/techno parrot stuff as well, but I haven't released an updated troubleshooter 2 yet.
It wasn't so hard, your tool makes things so much more simple :cheers:

I'm using your serial write command to send combinations of characters and numbers, and read the serial buffer in the arduino. I'm really happy with the way it works, reading the serial buffer is very fast and doesn't add much latency to the overall execution.
Plus I am also sending special commands to completely control the behavior of the gun, meaning I won't have to change any settings manually anymore.

For the pulse mode, I already have one (king of) in my arduino code, it automatically starts full auto mode when holding the trigger button. I can also trigger it with a serial command, so it should be easy :D

The only issue I have is with games that have a variable speed pulsed command like terminator 2.
In my arduino code, I read the serial buffer every 3~5ms, and I also rely on specific timing for the solenoid holding and the minimum pause between each trigger (to avoid it to overheat). So the code detects the pulse command within 3~5ms, and then triggers the solenoid only if it's ready to be triggered. It means the game pulse and the solenoid pulse are getting totally out of sync.
Still scratching my head trying to find an elegant solution for that  ???

Yeah I didn't test the m2emulator outputs yet, but I will sure do it, would love some good Virtua Cop with accurate recoil!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19236
  • Last login:Yesterday at 06:36:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #14 on: October 16, 2019, 07:57:13 pm »
Honestly getting m2emulator ready to run with mamehooker is a giant pain in the butt, mostly because I'm getting it to do something it isn't supposed to do.  I'm working on it though. 

Yeah getting the pulse synced up is an issue.  Wait commands can be used to hold the solenoid open a bit longer so things can be slowed down somewhat, but that's about it.  I guess finding a solenoid that fires at the same rate as some of the positional guns would be the ideal solution, but I don't know how hard that would be. 

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #15 on: October 18, 2019, 11:06:48 am »
I can send you the Arcade Guns Aimforce dongle software to look at if it would be helpful?

It looks like they borrowed some of your work with mame hooker and added their own front end with some additional options. It essentially allows you to set up recoil for each game individually including the type of recoil (auto or semi) and the speed of recoil. It works with any gun game including Model 2 and 3. Plus, it also has a hooker option to take instructions from the game like mame hooker, and space to add your own code.

Changing the speed of a solenoid should just be a case of changing the frequency. I do it manually with a pot on my ne555 board. I use the 0-50hz jumper and then turn the pot until I get roughly 6-10 activations per second. I assume this would be possible to set any solenoid to the right speed for the game in software with the right know how.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #16 on: October 18, 2019, 11:17:59 am »
Honestly getting m2emulator ready to run with mamehooker is a giant pain in the butt, mostly because I'm getting it to do something it isn't supposed to do.  I'm working on it though. 

Yeah getting the pulse synced up is an issue.  Wait commands can be used to hold the solenoid open a bit longer so things can be slowed down somewhat, but that's about it.  I guess finding a solenoid that fires at the same rate as some of the positional guns would be the ideal solution, but I don't know how hard that would be.
Yeah I guess it has to be very hacky to get support in m2, like memory read and stuff? looks like a huge headache to make that work  :-\

By the way, in Mamehooker if I use the mamestart in a game ini file, it's overwriting the default ini mamestart, right?
Is it possible, in some way, to no overwrite it but execute both in order? (default mamestart => game mamestart => playing game => game mamestop => default mamestop)
With my setup pretty much all lightgun games will need to open/close the serial connection, and send the default parameters commonly used by mame (used screen aspect ratio for instance), then some games have specific parameters I need to send (recoil/rumble mode).
I can of course copy paste the commands one by one for each games, but I wanted to ask you in case you have a better way of doing it.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #17 on: October 18, 2019, 11:35:23 am »
I can send you the Arcade Guns Aimforce dongle software to look at if it would be helpful?

It looks like they borrowed some of your work with mame hooker and added their own front end with some additional options. It essentially allows you to set up recoil for each game individually including the type of recoil (auto or semi) and the speed of recoil. It works with any gun game including Model 2 and 3. Plus, it also has a hooker option to take instructions from the game like mame hooker, and space to add your own code.

Changing the speed of a solenoid should just be a case of changing the frequency. I do it manually with a pot on my ne555 board. I use the 0-50hz jumper and then turn the pot until I get roughly 6-10 activations per second. I assume this would be possible to set any solenoid to the right speed for the game in software with the right know how.
It is technically possible to activate the solenoid at the right frequency with Mamehooker and my arduino code, with a 3-5ms precision, but unless we have the matching solenoid for each game, the activation/hold/release/pause timings will not match my solenoid, and won't work or make it overheat. It's not really an issue with games without variable speed full auto, where speed of solenoid activation doesn't matter so much.
For instance games like terminator 2 have a recoil working clearly way faster than any of our solenoids can handle, so it gets out of sync when its speed is changing (gun overload and all).
Right now, I am actually building a rumble system beside the solenoid that I want to use instead of recoil in those games, it won't feel the same but will sure work better and more in sync.
« Last Edit: October 18, 2019, 11:37:58 am by JayBee »

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #18 on: October 18, 2019, 01:27:01 pm »
I think there's two different issues. One is obviously choosing a solenoid that is rated for continuous duty and that can handle full auto recoil. That has to be done no matter what. I have rescued and repurposed a lot of arcade guns and any that used full auto recoil via a solenoid in the original coin-op will generally work fine with other games, even if other games had faster recoil.

The second issue is setting the recoil speed for each game. Now, it's true that there are differences between solenoids because the length of piston and range of travel varies. As does the force of the return spring. Also, a lot of full auto only arcade guns use a recoil motor instead of a solenoid. This doesn't mean you can't use one solenoid for multiple games. It just means you can't switch solenoids without redoing the speed settings.

With software that allows you to adjust recoil speed for each game (like the Aimforce software), you can simply find one gun with a decent full auto solenoid and set each game to your liking. Or, with mame hooker, you can use the original games frequency. But...Unless you had direct knowledge of the original recoil speed for each game, I doubt you'd get it exact. But, it wouldn't be far off as most of my arcade solenoids have around 10mm of travel. For games that used a solenoid, I doubt most people could perceive a difference between 10 activations per second and 12.

It's also worth noting that one T2 cab (for example) would vary in recoil speed to another, just based on the age of the solenoid and how recently they oiled the piston. The difference is huge immediately after you add a little oil. So the original speed we remember may not be exact either. Most Time Crisis guns I have used in the wild have really slow and anemic recoil due to poor maintenance. My TC arcade gun recoil is a beast.

Personally, I think it's more trouble than it's worth to worry about making the recoil speed exact. The amount of enjoyment it adds is minimal compared to the headache. I think it's more important to make the full auto recoil speed feel convincing to me than it is to make match an original speed.

I set mine up to recoil once when I pull the trigger and full auto when I hold it down. This works well for 99% of the gun games I ever played. The only one it doesn't work so well on (so far) is Alien 3 the gun, as I get full auto recoil even when I have the flame thrower...



Perhaps the bigger issue for me is that I prefer to use the PS2 for light gun games, so none of the current software solutions are compatible. The Arcade Guns guys said they were working on a recoil box that would offer Aimforce-like recoil control for any console, computer or PCB. I haven't seen it yet though. I might invest in something like that as the PS2 is unmatched for this genre. Kickstarter anyone?
« Last Edit: October 18, 2019, 01:29:59 pm by Zebra »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19236
  • Last login:Yesterday at 06:36:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #19 on: October 18, 2019, 01:36:38 pm »
Well the main reason for recoil is to make the player aware of the gun's status, as gun games and be frantic and an excitable player might not notice that they are out of ammo, or the gun has over heated, ect.  So long as "firing", "overheat", "empty" and possibly "special" are distinguishable from each other, it should be close enough. 

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #20 on: October 18, 2019, 06:00:11 pm »
It's definitely nice if a gun behaves just like the coin-op but, for me, recoil makes it feel more realistic and fun. It's still worth it even if it doesn't stop recoiling when you run out of ammo. The gun just feels dead without it.

Not that many games let you run out of ammo. It's technically possible in games like Op Thunderbolt and Op Wolf but only if you don't shoot the falling ammo. The ones that make you reload by shooting off-screen usually shout "reload, reload" at you, and I usually reload before that out of habit. I always notice. Most people play these games at home with no recoil at all so keeping an eye on your ammo is just part of the game. The potential for overheating is a real issue though. I've seen it happen.

Some solenoids can get hot enough to melt the gun plastic. It's one of the reasons why I prefer to use guns with a recoil motor for full auto only games. Games like Crisis Zone on the PS2 require long periods of continuous full auto fire to dispense end of level bosses. It's more relaxing if I'm not worried about the solenoid.

I could never get the over heating warning working right in the Aimforce software. These guns don't have heat sensors so you can never rely on it anyway, so I gave up on it. It kinda seemed like it needed setting up for each game and I lacked any meaningful data to do it right. One thing I would say though, my full auto arcade guns rarely over-heat if set up right. The one I had issues with was my Aimtrak solenoid. It's really not suitable for full auto.



JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #21 on: October 18, 2019, 10:45:48 pm »
Actually the temperature sensors I ordered for my lightguns are on the way, it will be very easy to add solenoid speed variation depending on the temp. It should make it a lot safer to use.
For the speed variation and timing, I can already change them for each games, have auto full auto and things like that, that's not an issue.
Not matching the game speed is not an issue either.

As I was saying, the only issue is with games that have solenoid speed variation.
In T2, the game recoil full auto is supposed to start at full speed, then the longer you will hold it the more it will slow down.
But since my solenoid is out of sync, the faster speed is kind of slow, then suddenly become faster at lower speed, when the game recoil speed gets around the same speed as my solenoid. So far it's pretty much the only game where I had this issue.
That's why I want to use rumble motors, that don't have this timing issue.
The second solution I was thinking about is sending a special command to my Arduino to tell it to measure the timing between each activation/deactivation, and change the solenoid full auto speed accordingly.
It's not that hard to do, I just need some time, and it should cover every game that behaves like that.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #22 on: October 19, 2019, 01:44:03 pm »
OK I understand the issue now. T2 doesn't just change recoil speed for heat control though. It changes for different guns you pick up along the way too. A number of arcade games do this. I noticed it on the Jurassic Park (Raw Thrills version) too. It would be awesome to be able to replicate that feature. Recoil should pick up the pace if you grab a gatling gun in-game.... Have you managed to make this work?

I haven't seen any arcade guns that have a heat sensor inside. I'd be interested to hear how you'd make the game change recoil speed based on the output from the heat sensor. I'm not sure how much difference it will make in practice though.

My experience has been that full auto arcade recoil gun solenoids don't dangerously overheat, even after a long play session. That is, assuming they are set up right. They are made to take a hammering all day every day so typical home play doesn't really tax them. I spent over two hours playing Time Crisis 3 and Crisis Zone yesterday and my Time Crisis arcade gun solenoid was barely warm. It's the same with my Op Thunderbolt and Gen X guns (if I keep the pistons oiled).

If a solenoid is getting dangerously hot during regular play then I'd assume it was either the wrong type of solenoid or it was set up wrong (too much power or a duty cycle that's too high). Either way, I'd want to stop using it all together and let it cool down properly instead of reducing the frequency. When I tested my Aimtrak solenoid with full auto, after three minutes of play, it got hot enough to burn my fingers and melt the surrounding wires. This was using the same 555 circuit (with the same frequency) as I use for my arcade gun solenoids. It taught me an expensive lesson.

It's important to know if you have a momentary or continuous duty solenoid. Momentary solenoids (like the one in the Aimtrak) usually pack more force but require cool down time between activations and shouldn't stay activated for more than a second or two. Continuous duty solenoids are designed to say activated for longer periods of time (without burning up the coil). They usually pack less force but they generate less heat and are more suitable for full auto.

Have you experienced over-heating issues with full auto arcade gun solenoids? If so, I'd be interested to hear which guns had issues and what frequency you used?


JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #23 on: October 19, 2019, 03:05:16 pm »
OK I understand the issue now. T2 doesn't just change recoil speed for heat control though. It changes for different guns you pick up along the way too. A number of arcade games do this. I noticed it on the Jurassic Park (Raw Thrills version) too. It would be awesome to be able to replicate that feature. Recoil should pick up the pace if you grab a gatling gun in-game.... Have you managed to make this work?

I haven't seen any arcade guns that have a heat sensor inside. I'd be interested to hear how you'd make the game change recoil speed based on the output from the heat sensor. I'm not sure how much difference it will make in practice though.

My experience has been that full auto arcade recoil gun solenoids don't dangerously overheat, even after a long play session. That is, assuming they are set up right. They are made to take a hammering all day every day so typical home play doesn't really tax them. I spent over two hours playing Time Crisis 3 and Crisis Zone yesterday and my Time Crisis arcade gun solenoid was barely warm. It's the same with my Op Thunderbolt and Gen X guns (if I keep the pistons oiled).

If a solenoid is getting dangerously hot during regular play then I'd assume it was either the wrong type of solenoid or it was set up wrong (too much power or a duty cycle that's too high). Either way, I'd want to stop using it all together and let it cool down properly instead of reducing the frequency. When I tested my Aimtrak solenoid with full auto, after three minutes of play, it got hot enough to burn my fingers and melt the surrounding wires. This was using the same 555 circuit (with the same frequency) as I use for my arcade gun solenoids. It taught me an expensive lesson.

It's important to know if you have a momentary or continuous duty solenoid. Momentary solenoids (like the one in the Aimtrak) usually pack more force but require cool down time between activations and shouldn't stay activated for more than a second or two. Continuous duty solenoids are designed to say activated for longer periods of time (without burning up the coil). They usually pack less force but they generate less heat and are more suitable for full auto.

Have you experienced over-heating issues with full auto arcade gun solenoids? If so, I'd be interested to hear which guns had issues and what frequency you used?
I'm not using arcade fun solenoids, just the cheap one with enough strength that fits in the gun. I know what you are going to say, but I'm very happy with those  ;)
They overheat only after something like non stop 15-20 minutes of full auto, and one (the bigger one) is heating way more than the other.
I couldn't find any affordable not quality continuous duty solenoid. But if you know places where I can get some, it would be very usefull.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #24 on: October 19, 2019, 10:30:02 pm »
The only affordable quality recoil solenoid I know of is the one for Terminator Salvation arcade guns. There aren't many arcade companies left these days but Raw Thrills parts are generally far more reasonable than Namco and Sega parts. They can be found for a little over $30. If a person can't afford $30, my suggestion would be to not spend anything on gaming peripherals at all until they can.

The other cheap option, and probably the one I would recommend for a project, is a used PS1 jolt gun. They have a decent full auto solenoid and you benefit from also getting a shell designed to fit it. It saves a lot of time and wasted cash.

The issue with cheap solenoids over-heating isn't just that they get hot. If you can feel a noticeable amount of heat building up in a properly lubed solenoid, it's because you are burning up the coil. In other words, it won't last long. I destroyed a bunch of "cheap" solenoids before I realized that it was cheaper to just buy one that was suitable for the job. Ultimately, you want to be able to play without worrying about this stuff, or it's not fun.

I spent a good amount of time searching for decent continuous duty pull solenoids on ebay a while ago. They can be found but the saving over the Raw Thrills solenoids is usually too small to matter.

I can't honestly criticize what you are trying to do with the cheap eBay solenoids as I tried to do the same and for the same reasons. I'm almost 100% sure that you'll eventually come to the same conclusion though.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #25 on: October 20, 2019, 05:48:52 am »
The only affordable quality recoil solenoid I know of is the one for Terminator Salvation arcade guns. There aren't many arcade companies left these days but Raw Thrills parts are generally far more reasonable than Namco and Sega parts. They can be found for a little over $30. If a person can't afford $30, my suggestion would be to not spend anything on gaming peripherals at all until they can.

The other cheap option, and probably the one I would recommend for a project, is a used PS1 jolt gun. They have a decent full auto solenoid and you benefit from also getting a shell designed to fit it. It saves a lot of time and wasted cash.

The issue with cheap solenoids over-heating isn't just that they get hot. If you can feel a noticeable amount of heat building up in a properly lubed solenoid, it's because you are burning up the coil. In other words, it won't last long. I destroyed a bunch of "cheap" solenoids before I realized that it was cheaper to just buy one that was suitable for the job. Ultimately, you want to be able to play without worrying about this stuff, or it's not fun.

I spent a good amount of time searching for decent continuous duty pull solenoids on ebay a while ago. They can be found but the saving over the Raw Thrills solenoids is usually too small to matter.

I can't honestly criticize what you are trying to do with the cheap eBay solenoids as I tried to do the same and for the same reasons. I'm almost 100% sure that you'll eventually come to the same conclusion though.
As I already told you, none of the options you suggest are available here in Japan where I live.
Plus, a good gun solenoid will also require a proper gun shell, so it will increase the price way more no matter what.
I calculated the price I would have to pay to make a proper gun with a proper recoil, it would cost me at least 200$~400$, everything included.
My guns cost me a bit more than 60$ each in total, and they are only for casual use.

Your comparison is like saying to someone who only use his car once a month for short travel "you should buy this very expensive sport car, it will be more comfortable". Of course it would be more comfortable, but that's not the point.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #26 on: October 20, 2019, 04:31:44 pm »
It's more like saying "regardless if you plan to use the car once per month or every day, you should get one with brakes that work". And, "if you can't afford a car with working brakes, it's better to get nothing at all".

I don't live in Japan or know the market there but I don't believe that it's not possible to buy a continuous duty solenoid. Especially as some of the solenoid brands I've seen are Japanese companies. Plus, there is a bunch of low cost arcade parts sellers that are based in Asia and ship internationally. And, there are plenty of ebay sellers who ship internationally. I order stuff from Japanese sellers all the time. I'm sure that if you kept an eye on ebay, you'll find a jolt gun from a seller who'll ship to Japan.

Also, Namco, a Japanese company, sell new Time Crisis 4 gun shells and recoil solenoids for $120 in America. I'm sure they will have a parts distributor for their home market and that it wouldn't be significantly more expensive which means, if you know where to look, there will be used parts selling for less.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #27 on: October 20, 2019, 05:46:10 pm »
It's more like saying "regardless if you plan to use the car once per month or every day, you should get one with brakes that work". And, "if you can't afford a car with working brakes, it's better to get nothing at all".

I don't live in Japan or know the market there but I don't believe that it's not possible to buy a continuous duty solenoid. Especially as some of the solenoid brands I've seen are Japanese companies. Plus, there is a bunch of low cost arcade parts sellers that are based in Asia and ship internationally. And, there are plenty of ebay sellers who ship internationally. I order stuff from Japanese sellers all the time. I'm sure that if you kept an eye on ebay, you'll find a jolt gun from a seller who'll ship to Japan.

Also, Namco, a Japanese company, sell new Time Crisis 4 gun shells and recoil solenoids for $120 in America. I'm sure they will have a parts distributor for their home market and that it wouldn't be significantly more expensive which means, if you know where to look, there will be used parts selling for less.
The jolt gun I found + sending fees was more than 100$ in total.
Arcade parts here are actually more expensive and hard to come by than outside of Japan, thanks to the high demand of arcade centers that are everywhere here, that would pay any price to get their parts.
Plus none of those gun part shop is open to the public, only people with an arcade company can order. They are protective of their market and tech.
So getting official part would be very expensive for me AND extremely troublesome.
But if you can show me some model of continius duty solenoid you think are good and than can fit in my guns, I will gladly take a look at it.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #28 on: October 26, 2019, 10:07:08 am »
* 2019/10/26 - 1.2
- first public version

It's here guys!
Feel free to test it and give me your feedbacks ;)
A lot of schematics and pictures are still missing, I will add them later.
« Last Edit: October 26, 2019, 11:52:33 am by JayBee »

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #29 on: October 26, 2019, 12:51:16 pm »
This looks great. Can’t wait to get it built and try it out.
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #30 on: October 26, 2019, 01:35:37 pm »
This looks great. Can’t wait to get it built and try it out.
Yeah, I should be adding schematics and pictures of everything tomorrow ;)

Mysli0210

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:June 11, 2020, 06:08:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #31 on: October 28, 2019, 06:36:31 pm »
Thanks, @JayBee @Samco @Hifi and all others involved, you're awesome!
After retrofitting my old trusty sluh-00017 Konami Justifier with the JayBee 2 point software, i stumbled upon Hifi's software and actually started to make the same.
but now i found this, so i guess its not needed anymore.
Though i tried to implement the ir led offset from the screen, to make it 100% accurate.

If this is needed i do not know, as im currently waiting for a package of 100 940nm leds from china.
For those interested in the link:
https://www.aliexpress.com/item/32755919314.html?spm=a2g0s.9042311.0.0.21694c4dLn44LN

As for the gun itself, i didnt use the DFRobot IR positioning camera.
But rather the IR camera from a wiimote, which i found out you can actually take out of the metal/plastic housing, so you dont even need to desolder it from the wiimote, just pry it out of the holder, and you have 8 solderpads on the rear.
(I will provide pics for the next gun, i'm planning to build)
The reason for taking that route is that i thought that the DFRobot camera was pretty pricey, and i actually had a wiimote at my disposal.
The rest of the components was/is accessible free of charge at the local hackerspace in which i'm a member. (except for a 3.3v switchmode regulator that cost about 0.43$ incl. shipping)

If anyone is interested in going that route i could whip up a pcb in kicad and the components as a kit for a modest price (most certainly not the reason for making this post!)

I guess most of you have seen the old wiimote arduino guides?
Well they do level conversion of the i2c signal which is overly complicated and completely unnecessary!
I just powered the camera through the previously mentioned 3.3v regulator, pulled the SDA and SCL lines to that 3.3v through 2.7k resistors.
The 5V atmega32u4 reads those 3.3v i2c signals just fine.
Other than that its just a 20MHz crystal, 2 capacitors and a 33k (or lower) resistor to hold the reset pin on the camera HIGH.

@JayBee, i know it seems like a good idea to only release the hex file, though if you'd be willing to i'd very much like to have the sketch provided, i will ofcourse contribute if i come up with something good :D

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #32 on: October 28, 2019, 07:56:59 pm »
It's more like saying "regardless if you plan to use the car once per month or every day, you should get one with brakes that work". And, "if you can't afford a car with working brakes, it's better to get nothing at all".

I don't live in Japan or know the market there but I don't believe that it's not possible to buy a continuous duty solenoid. Especially as some of the solenoid brands I've seen are Japanese companies. Plus, there is a bunch of low cost arcade parts sellers that are based in Asia and ship internationally. And, there are plenty of ebay sellers who ship internationally. I order stuff from Japanese sellers all the time. I'm sure that if you kept an eye on ebay, you'll find a jolt gun from a seller who'll ship to Japan.

Also, Namco, a Japanese company, sell new Time Crisis 4 gun shells and recoil solenoids for $120 in America. I'm sure they will have a parts distributor for their home market and that it wouldn't be significantly more expensive which means, if you know where to look, there will be used parts selling for less.
The jolt gun I found + sending fees was more than 100$ in total.
Arcade parts here are actually more expensive and hard to come by than outside of Japan, thanks to the high demand of arcade centers that are everywhere here, that would pay any price to get their parts.
Plus none of those gun part shop is open to the public, only people with an arcade company can order. They are protective of their market and tech.
So getting official part would be very expensive for me AND extremely troublesome.
But if you can show me some model of continius duty solenoid you think are good and than can fit in my guns, I will gladly take a look at it.


It sucks to be in Japan (for light gun fans)....

You should be able to find one cheaper than that though. I can order a jolt gun right now off ebay for $35 delivered. For you, it's probably best to search for UK sellers. These guys will send me this PS1 recoil gun from the UK for less than $30 delivered:

https://www.ebay.com/itm/Playstation-2-SATURN-SILVER-AVENGER-PRO-LIGHT-GUN-CONTROLLER-PS2/333345578110?hash=item4d9cf1dc7e:g:120AAOSwnD1dkejz

There is usually a lot of jolt guns there. If you put an offer in for ones like this, I'm sure they'll take it:

https://www.ebay.com/itm/Pistola-Gun-per-Playstation-1-PS1-e-Sega-Saturn-con-pedale-Funzionante/303335038088?hash=item46a02d5c88:g:MKcAAOSw~KpcduNN

In terms of solenoid models, just add the word "continuous" to an ebay search for pull solenoid, or check the specs for Duty cycle: Continuous.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #33 on: October 28, 2019, 09:12:54 pm »
It's more like saying "regardless if you plan to use the car once per month or every day, you should get one with brakes that work". And, "if you can't afford a car with working brakes, it's better to get nothing at all".

I don't live in Japan or know the market there but I don't believe that it's not possible to buy a continuous duty solenoid. Especially as some of the solenoid brands I've seen are Japanese companies. Plus, there is a bunch of low cost arcade parts sellers that are based in Asia and ship internationally. And, there are plenty of ebay sellers who ship internationally. I order stuff from Japanese sellers all the time. I'm sure that if you kept an eye on ebay, you'll find a jolt gun from a seller who'll ship to Japan.

Also, Namco, a Japanese company, sell new Time Crisis 4 gun shells and recoil solenoids for $120 in America. I'm sure they will have a parts distributor for their home market and that it wouldn't be significantly more expensive which means, if you know where to look, there will be used parts selling for less.
The jolt gun I found + sending fees was more than 100$ in total.
Arcade parts here are actually more expensive and hard to come by than outside of Japan, thanks to the high demand of arcade centers that are everywhere here, that would pay any price to get their parts.
Plus none of those gun part shop is open to the public, only people with an arcade company can order. They are protective of their market and tech.
So getting official part would be very expensive for me AND extremely troublesome.
But if you can show me some model of continius duty solenoid you think are good and than can fit in my guns, I will gladly take a look at it.


It sucks to be in Japan (for light gun fans)....

You should be able to find one cheaper than that though. I can order a jolt gun right now off ebay for $35 delivered. For you, it's probably best to search for UK sellers. These guys will send me this PS1 recoil gun from the UK for less than $30 delivered:

https://www.ebay.com/itm/Playstation-2-SATURN-SILVER-AVENGER-PRO-LIGHT-GUN-CONTROLLER-PS2/333345578110?hash=item4d9cf1dc7e:g:120AAOSwnD1dkejz

There is usually a lot of jolt guns there. If you put an offer in for ones like this, I'm sure they'll take it:

https://www.ebay.com/itm/Pistola-Gun-per-Playstation-1-PS1-e-Sega-Saturn-con-pedale-Funzionante/303335038088?hash=item46a02d5c88:g:MKcAAOSw~KpcduNN

In terms of solenoid models, just add the word "continuous" to an ebay search for pull solenoid, or check the specs for Duty cycle: Continuous.
I think I already told you, jolt gun delivery fees to Japan are >50$, and for the last time, I am not interested in buying those, I am very happy with my current guns, thanks.
Can you show me any push-pull solenoid that is actually continuous duty? I don't believe that even exists, for a simple technical reason; solenoid ALWAYS heat when staying activated, no matter the power/type/size.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #34 on: October 28, 2019, 09:21:13 pm »
Thanks, @JayBee @Samco @Hifi and all others involved, you're awesome!
After retrofitting my old trusty sluh-00017 Konami Justifier with the JayBee 2 point software, i stumbled upon Hifi's software and actually started to make the same.
but now i found this, so i guess its not needed anymore.
Though i tried to implement the ir led offset from the screen, to make it 100% accurate.

If this is needed i do not know, as im currently waiting for a package of 100 940nm leds from china.
For those interested in the link:
https://www.aliexpress.com/item/32755919314.html?spm=a2g0s.9042311.0.0.21694c4dLn44LN

As for the gun itself, i didnt use the DFRobot IR positioning camera.
But rather the IR camera from a wiimote, which i found out you can actually take out of the metal/plastic housing, so you dont even need to desolder it from the wiimote, just pry it out of the holder, and you have 8 solderpads on the rear.
(I will provide pics for the next gun, i'm planning to build)
The reason for taking that route is that i thought that the DFRobot camera was pretty pricey, and i actually had a wiimote at my disposal.
The rest of the components was/is accessible free of charge at the local hackerspace in which i'm a member. (except for a 3.3v switchmode regulator that cost about 0.43$ incl. shipping)

If anyone is interested in going that route i could whip up a pcb in kicad and the components as a kit for a modest price (most certainly not the reason for making this post!)

I guess most of you have seen the old wiimote arduino guides?
Well they do level conversion of the i2c signal which is overly complicated and completely unnecessary!
I just powered the camera through the previously mentioned 3.3v regulator, pulled the SDA and SCL lines to that 3.3v through 2.7k resistors.
The 5V atmega32u4 reads those 3.3v i2c signals just fine.
Other than that its just a 20MHz crystal, 2 capacitors and a 33k (or lower) resistor to hold the reset pin on the camera HIGH.

@JayBee, i know it seems like a good idea to only release the hex file, though if you'd be willing to i'd very much like to have the sketch provided, i will ofcourse contribute if i come up with something good :D
I didn't know you could use the wiimote IR cam, that's really cool! Yeah if you can show us more about that, I would gladly test it too.
For the sketch, I should make it open source at some point in the future, but right now I have many reasons not to.
I know it's not so convenient, and I'm sorry for that, if there was a way to make it better I would  ;)

Mysli0210

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:June 11, 2020, 06:08:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #35 on: October 28, 2019, 09:45:53 pm »
I will most certainly do that! i would take pictures of what i have made, but it wouldnt be much use as i have hot-snotted everything together.
yeah, the DFRobot camera, is as far as im aware the exact same camera, but with the supporting components attached in a neat shell.

I totally get it! and im looking forward to testing it... but alas i have to either source the ir leds locally or wait that month or so for the ones from china.
but its okay, as i will then have time to get hands on another gun... or maybe make one from scratch in lasercut wood.

Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:November 30, 2021, 07:25:06 am
  • Arcade enthusiast !
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #36 on: October 29, 2019, 05:43:03 am »
Congratulations JayBee, great work  :applaud:

Will you update the source code at GitHub later on, or is the project closed source now?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 448
  • Last login:December 01, 2021, 01:27:36 am
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #37 on: October 29, 2019, 06:21:43 am »
I will most certainly do that! i would take pictures of what i have made, but it wouldnt be much use as i have hot-snotted everything together.
yeah, the DFRobot camera, is as far as im aware the exact same camera, but with the supporting components attached in a neat shell.

I totally get it! and im looking forward to testing it... but alas i have to either source the ir leds locally or wait that month or so for the ones from china.
but its okay, as i will then have time to get hands on another gun... or maybe make one from scratch in lasercut wood.
Ah yes, finding good IR LEDs for this kind of project is really a pain. Currently working with powerful LEDs but that have terrible viewing angle, and still waiting for the 120° LEDs I ordered from China 2 weeks ago, to see how they will perform (will post them in the first post if they work well.

Congratulations JayBee, great work  :applaud:

Will you update the source code at GitHub later on, or is the project closed source now?

Thanks :)
Yes it's closed source right now, but I will probably make it open source later.

hyo2012

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 58
  • Last login:June 18, 2021, 02:52:13 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #38 on: October 29, 2019, 08:27:46 am »
I just ordered IR camera and LED.

You did a good job :)

I can't wait how it works.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #39 on: October 29, 2019, 01:11:41 pm »
It's more like saying "regardless if you plan to use the car once per month or every day, you should get one with brakes that work". And, "if you can't afford a car with working brakes, it's better to get nothing at all".

I don't live in Japan or know the market there but I don't believe that it's not possible to buy a continuous duty solenoid. Especially as some of the solenoid brands I've seen are Japanese companies. Plus, there is a bunch of low cost arcade parts sellers that are based in Asia and ship internationally. And, there are plenty of ebay sellers who ship internationally. I order stuff from Japanese sellers all the time. I'm sure that if you kept an eye on ebay, you'll find a jolt gun from a seller who'll ship to Japan.

Also, Namco, a Japanese company, sell new Time Crisis 4 gun shells and recoil solenoids for $120 in America. I'm sure they will have a parts distributor for their home market and that it wouldn't be significantly more expensive which means, if you know where to look, there will be used parts selling for less.
The jolt gun I found + sending fees was more than 100$ in total.
Arcade parts here are actually more expensive and hard to come by than outside of Japan, thanks to the high demand of arcade centers that are everywhere here, that would pay any price to get their parts.
Plus none of those gun part shop is open to the public, only people with an arcade company can order. They are protective of their market and tech.
So getting official part would be very expensive for me AND extremely troublesome.
But if you can show me some model of continius duty solenoid you think are good and than can fit in my guns, I will gladly take a look at it.


It sucks to be in Japan (for light gun fans)....

You should be able to find one cheaper than that though. I can order a jolt gun right now off ebay for $35 delivered. For you, it's probably best to search for UK sellers. These guys will send me this PS1 recoil gun from the UK for less than $30 delivered:

https://www.ebay.com/itm/Playstation-2-SATURN-SILVER-AVENGER-PRO-LIGHT-GUN-CONTROLLER-PS2/333345578110?hash=item4d9cf1dc7e:g:120AAOSwnD1dkejz

There is usually a lot of jolt guns there. If you put an offer in for ones like this, I'm sure they'll take it:

https://www.ebay.com/itm/Pistola-Gun-per-Playstation-1-PS1-e-Sega-Saturn-con-pedale-Funzionante/303335038088?hash=item46a02d5c88:g:MKcAAOSw~KpcduNN

In terms of solenoid models, just add the word "continuous" to an ebay search for pull solenoid, or check the specs for Duty cycle: Continuous.
I think I already told you, jolt gun delivery fees to Japan are >50$, and for the last time, I am not interested in buying those, I am very happy with my current guns, thanks.
Can you show me any push-pull solenoid that is actually continuous duty? I don't believe that even exists, for a simple technical reason; solenoid ALWAYS heat when staying activated, no matter the power/type/size.

That's why I gave you a link to someone selling one with cheap international shipping. Just because you looked once and found one that was expensive, it doesn't mean they all are. But I get it, you can't afford one. No matter what the price.

On the continuous duty solenoid, as I said, search eBay for "pull solenoid continuous" and you'll see there are lots of options:

https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=Pull+solenoid+continuous&_sacat=0&LH_TitleDesc=0&_osacat=0&_odkw=Guncon

Or don't. Whatever.