The NEW Build Your Own Arcade Controls

Main => Lightguns => Topic started by: JayBee on September 30, 2019, 01:25:12 pm

Title: GUN4IR - The Ultimate 4 Points Lightgun System
Post by: JayBee on September 30, 2019, 01:25:12 pm
(https://i.imgur.com/xRuyD6N.png)

GUN4IR®
The Ultimate 4 Points Lightgun System



If you are just here to get a GUN4IR license, you can donate in the following link.
Leave me your name and email in the donation notes or by pm here or discord.
Also read this post for more information about the system.


(https://i.imgur.com/SgUVLmO.gif) (https://www.paypal.com/donate?hosted_button_id=KJLJB9KLTFEQA&source=url)


Copyright © and trademark ® Jean-Baptiste Bongrand 2019-2021, All Rights Reserved.
This system, including hardware and software, is Copyrighted© by Jean-Baptiste Bongrand.
Any unauthorised / commcerial use of the system or any part of it is strictly prohibited.
By requesting a license, you are agreeing with those terms.



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 1~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, even if you move around the room!
  Outstanding stability and playing range ! The system tracks up to 4 LEDs (for the best accuracy), but continues working down to one led! It allows far more stability and flexibility than any other IR systems!
  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.

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 donators only.
If you want a license, you will need to provide these information along with the donation or by private message to me (here or on discord):
Discord user name:  (optional, only if you want access to the vip channels on my server, remember to join my server before making the request)
Full name:  (required, but I will use your PayPal account full name if empty)
Email address:  (required, but I will use your PayPal account email if empty)
Notes: (optional)

Donations with fake/unverified paypal account or missing information will be automatically refuse and refund. And the decision is finale.


I am using those donations only for this system expenses.
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.



You will receive the files needed including the complete user guide to build and use this system in your email box after the donation.

Everything can also be also accessed from my discord server (recommended if you want to stay up to date and want help):
JB Discord Server (https://discord.gg/muCdu3b4hH)


A little preview of the gun system GUI;

(https://i.imgur.com/snOJSdO.png)

Some videos to show the system:

2 cool videos made by Foxhole on Point Blank and Sports Shooting USA, this guy has skills 8)
https://youtu.be/mcYRB-wIr9M
https://youtu.be/fi3TZm3PpPQ

2 other nice videos by hyo2012 that show my system really well;  ;D
https://youtu.be/7z0xmR6kQok
https://youtu.be/jZsT_Facpc8

A review video of the system by Ben:
https://youtu.be/O6zyrMOQLG4

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:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Ginsonic on October 01, 2019, 03:16:32 am
Great work JayBee, looking forward to more details  :applaud:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: ryoken on October 01, 2019, 03:41:38 am
Very impresive... nice for sharing
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Titchgamer on October 01, 2019, 04:36:52 am
Cool :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: samco 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: samco 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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  ;)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: SammyWI on October 03, 2019, 03:03:04 pm
Very cool.  Great to see more options coming out.  :applaud:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: lllll44 on October 12, 2019, 04:38:22 pm
cant wait to hear more! amazing.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Ginsonic 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:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto 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. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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!
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto 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. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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...

https://www.youtube.com/watch?v=DatfpMFmIcc

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?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto 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. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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.


Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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?

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: lightgungamer on October 26, 2019, 12:51:16 pm
This looks great. Can’t wait to get it built and try it out.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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 ;)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 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 (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
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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 (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  ;)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Ginsonic 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?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: hyo2012 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra 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.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on October 29, 2019, 01:55:25 pm
I don't have a dog in this fight, but I'm with Zebra on this one.... you can find cheap parts anywhere... in some areas of the globe it might take a lot of effort to do so, but Japan.... nah. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on October 29, 2019, 09:52:14 pm

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.
Oh I see! My bad, I guess I didn't search well enough  ::)
I will check that then and see what I can get.
Just in case, do you know what are those gun solenoids specs (voltage, current...)?

I don't have a dog in this fight, but I'm with Zebra on this one.... you can find cheap parts anywhere... in some areas of the globe it might take a lot of effort to do so, but Japan.... nah. 
If you know any shop (local or online) that sell this kind of part in Japan, I am very curious to know  ;)

Here are the info I could get after all the search I did in Japan, including asking to so many retro shops in Akihabara or other places, and asking the arcade centers themselves:
There were no consumer lightgun with recoil, or too rare to be found at a correct price.
For the real arcade stuff, there are no consumer shop selling lightgun parts (they only sell arcade sticks and machines).
From what the guys in the arcade centers told me, those guns are bought and maintained directly by the brand making them, and are not available to consumers.
But of course, again, it's possible that I missed something, if that's the case please correct me ;)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on October 30, 2019, 12:51:26 pm
I'm sure there are large arcades with machines that are owned by the brand but that won't be the case with a lot of smaller arcades running older games that Namco and Sega etc no longer support.

These old arcade cabs are getting thrown in dumpsters in Japan, just like they are here in the States and in Europe. Seeing stuff like this breaks my heart:

https://www.youtube.com/watch?v=SS9-T-KgmmM&t=1s

https://www.youtube.com/watch?v=Gmhc0i9co-s

They don't even attempt to find a home for all those candy cabs that we sell our kidneys to get here. The solenoids in those gun survivor 2 guns they were throwing away are excellent BTW.

They used to maintain a list of Japanese arcade PCB stores over on the shmups forum which shows there are plenty of places for consumers to buy old arcade parts there. My ability to search them was always limited by my lack of Japanese language skills though.

As a general point, all those 3rd party ps1 and PS2 recoil guns were made in Asia. A lot of the ones here were originally ordered online from stores in Hong Kong like Play Asia. I am positive that the same stores we buy from in HK and mainland China would also have shipped to Japan. I wouldn't assume there are none to be found locally.

People travel to Japan from all over the world to buy video games and peripherals. We think of it as a video game Mecca. You guys have lots of stuff we've never even seen (like the original Famicom recoil machine gun). I'd keep an eye on local video game stores who sell older used consoles.

Also, Suzo Happ, one of the two large arcade parts suppliers here, have a store in Hong Kong to support customers across Asia. There is also another store in HK called Happ that sells arcade parts but they have nothing to do with each other.

These guys (also in HK) can often get used arcade parts. Ask them if they can track you down a cheap Time Crisis solenoid replacement. The Chinese knock-off Time Crisis guns are usually a lot cheaper and have a stronger solenoid.

https://www.arcadespareparts.com/arcade_parts/shooting_parts.html


Solenoid specs like voltage and amps won't help. Most arcade solenoids use 12v or 24v PSUs but so do a bunch of momentary solenoids that are not suitable for continuous duty. I would use the largest continuous duty tubular solenoid you can fit in your shell. The power supply only matters in terms of matching it to the specific solenoids ratings.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on October 30, 2019, 02:25:23 pm
I'm sure there are large arcades with machines that are owned by the brand but that won't be the case with a lot of smaller arcades running older games that Namco and Sega etc no longer support.

These old arcade cabs are getting thrown in dumpsters in Japan, just like they are here in the States and in Europe. Seeing stuff like this breaks my heart:

https://www.youtube.com/watch?v=SS9-T-KgmmM&t=1s

https://www.youtube.com/watch?v=Gmhc0i9co-s

They don't even attempt to find a home for all those candy cabs that we sell our kidneys to get here. The solenoids in those gun survivor 2 guns they were throwing away are excellent BTW.

They used to maintain a list of Japanese arcade PCB stores over on the shmups forum which shows there are plenty of places for consumers to buy old arcade parts there. My ability to search them was always limited by my lack of Japanese language skills though.

As a general point, all those 3rd party ps1 and PS2 recoil guns were made in Asia. A lot of the ones here were originally ordered online from stores in Hong Kong like Play Asia. I am positive that the same stores we buy from in HK and mainland China would also have shipped to Japan. I wouldn't assume there are none to be found locally.

People travel to Japan from all over the world to buy video games and peripherals. We think of it as a video game Mecca. You guys have lots of stuff we've never even seen (like the original Famicom recoil machine gun). I'd keep an eye on local video game stores who sell older used consoles.

Also, Suzo Happ, one of the two large arcade parts suppliers here, have a store in Hong Kong to support customers across Asia. There is also another store in HK called Happ that sells arcade parts but they have nothing to do with each other.

These guys (also in HK) can often get used arcade parts. Ask them if they can track you down a cheap Time Crisis solenoid replacement. The Chinese knock-off Time Crisis guns are usually a lot cheaper and have a stronger solenoid.

https://www.arcadespareparts.com/arcade_parts/shooting_parts.html


Solenoid specs like voltage and amps won't help. Most arcade solenoids use 12v or 24v PSUs but so do a bunch of momentary solenoids that are not suitable for continuous duty. I would use the largest continuous duty tubular solenoid you can fit in your shell. The power supply only matters in terms of matching it to the specific solenoids ratings.
That's a lot of info, thanks! :D
Actually the problem in japan is that companies are overly protective of their own brand and products, even 20years old products, and don't allow other companies to sell part for their products. They still continue to support them, it's still a real business here. For arcade boards it's a little different because they use some standard like jamma supposed to make them compatible with everything, and so be used/bought and installed by anyone. Which is not the case for lightgun cabinet that are fully patented by the brand.
I'm working for big game companies, it always shock me to see how overprotective they are with their products and the way they make money with them.

That's why you have more chance to find stuff in China, were the laws on copyright and all are pretty much absent.

For the lightgun search, I spent two weeks searching in so many locals or more specialised shop everywhere, in the popular places as well as obscure places, I could only find the usual cheap guncon/Virtua gun. When I asked the seller, they told me to contact the brands directly.

So yeah maybe I will try check the Chinese route.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: pbj on October 30, 2019, 03:18:24 pm
http://www.youtube.com/watch?v=cvK-VGPocQU&t=0m22s (http://www.youtube.com/watch?v=cvK-VGPocQU&t=0m22s)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on October 30, 2019, 09:02:16 pm
There is no copyright laws protecting light guns or solenoids. A lot of arcade light gun cabs have the guns replaced with Happ or Betson light guns as the tech is generic. Any decent arcade owner would be capable of switching out the light guns to replace old expensive oem guns with new generic ones.

I am no expert on Japanese law but I would be very surprised if there was any law that prevented arcade owners selling old cabs and parts they no longer use to whoever they like.

There is also no reason why manufacturers would be protective of gun hardware but not their PCBs. I think you've been misinformed. If an arcade owner sells or breaks a pcb, they will part out the rest of the cab and sell parts to whoever. It's always been that way, even when arcades were at their peak in the 80's and 90's.

If I put a search in Google, in English, for "used arcade parts Tokyo Japan", I get multiple results for stores selling used arcade parts....

https://www.google.com/search?q=used%20arcade%20parts%20tokyo%20japan&rlz=1C1SQJL_enUS844US844&oq=used+arcade+parts+tokyo+japan&aqs=chrome..69i57.11966j0j7&sourceid=chrome&ie=UTF-8&safe=off&npsic=0&rflfq=1&rlha=0&rllag=35700934,139771333,185&tbm=lcl&rldimm=1791196374969552662&phdesc=8DEOZzsG28M&ved=2ahUKEwi457fwqMXlAhUFj1kKHR6ZDUIQvS4wAnoECAoQOQ&rldoc=1&tbs=lrf:!2m1!1e2!2m1!1e3!3sIAE,lf:1,lf_ui:10&rlst=f#rlfi=hd:;si:7617596130752392823,y,pC1rO5bV5SY;mv:[[35.713045099999995,139.776682],[35.5164013,139.68927209999998]]
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on October 30, 2019, 10:56:48 pm
There is no copyright laws protecting light guns or solenoids. A lot of arcade light gun cabs have the guns replaced with Happ or Betson light guns as the tech is generic. Any decent arcade owner would be capable of switching out the light guns to replace old expensive oem guns with new generic ones.

I am no expert on Japanese law but I would be very surprised if there was any law that prevented arcade owners selling old cabs and parts they no longer use to whoever they like.

There is also no reason why manufacturers would be protective of gun hardware but not their PCBs. I think you've been misinformed. If an arcade owner sells or breaks a pcb, they will part out the rest of the cab and sell parts to whoever. It's always been that way, even when arcades were at their peak in the 80's and 90's.

If I put a search in Google, in English, for "used arcade parts Tokyo Japan", I get multiple results for stores selling used arcade parts....

https://www.google.com/search?q=used%20arcade%20parts%20tokyo%20japan&rlz=1C1SQJL_enUS844US844&oq=used+arcade+parts+tokyo+japan&aqs=chrome..69i57.11966j0j7&sourceid=chrome&ie=UTF-8&safe=off&npsic=0&rflfq=1&rlha=0&rllag=35700934,139771333,185&tbm=lcl&rldimm=1791196374969552662&phdesc=8DEOZzsG28M&ved=2ahUKEwi457fwqMXlAhUFj1kKHR6ZDUIQvS4wAnoECAoQOQ&rldoc=1&tbs=lrf:!2m1!1e2!2m1!1e3!3sIAE,lf:1,lf_ui:10&rlst=f#rlfi=hd:;si:7617596130752392823,y,pC1rO5bV5SY;mv:[[35.713045099999995,139.776682],[35.5164013,139.68927209999998]]
I know those shops very well, I've been to each of them many times. Out of the shop your search shows, only one (BEEP) actually sells some arcade part (but very few), and of course no lightgun parts. They are all consumer retrogame shops, not arcade part shop (which are two different things).
For info, the 2 biggest arcade parts shop in town (for both consumers and professionals) are:
Mak Japan http://www.mak-jp.com/ (http://www.mak-jp.com/)
Tops https://www.tops-game.jp (https://www.tops-game.jp)
In those you might be able to buy full lightgun cabinets, but no parts.
You can also find most official store of each arcade parts brand in Rakuten online (Sanwa, Seimitsu...).

I've been living here for 10+ years, been to thousands of retrogame/arcade/electronic shops all over Tokyo. I even know the more obscure ones that sell chinese/US parts or cheaper used parts.
Believe me or not it's up to you, just saying in japan as a consumer you can't easily get any proprietary tech like lightgun gun parts. There are compatible tech made by other brands outside of japan. Not here.
The only reason you can get arcade motherboards is because it's not fully proprietary, most use and have to comply to the JAMMA standard. Same for arcade sticks, that use kind of standardized buttons, connectors and sticks.
No matter if it's a law or not, it's the general practice to support your own product as long as it sells and make money, even 20 years later. (just look at nintendo that only recently drop the support of their famicom) And when the support is still active, doing your own support for those products, especially with cheaper alternative, is a big no no. I've never ever seen a lightgun arcade machine with unofficial parts here.
And yes, all that applies only to japan.

But again, you are welcome to prove me wrong, and find a Japanese store that actually sell those parts. I would honestly prefer being wrong than struggling so much to find good parts.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on October 31, 2019, 01:51:03 pm
The existence of stores just shows that a consumer arcade market exists and that there is somewhere for those stores to buy parts for the cabs they refurbish. I.e. it’s not an impossible quest.

A lot of the old arcade companies aren’t even in business anymore or no longer make arcade games so they won’t be supporting their products, or any other. Owners of retro arcades must have somewhere to buy replacement parts and trade with each other. You are better placed to find it than me. There are plenty of arcades closing down in Japan too. I’d want to find out where all those cabs go to die and maybe make a trip to one of those arcade graveyards. Old Time Crisis cabs don’t evaporate and most are no longer in arcades, so they must be somewhere.

These are old products now from the crt era. I’m not sure I could find a retail store that sells light guns here either. When I want stuff like that, I search the internet, regularly check eBay for a deal and put wanted ads on Craigslist and sites like this. It sometimes takes a while but I usually find what I’m looking for eventually. It’s a global world and a global internet. Most of the resources available to me are available to you too.

Solenoids and light gun shells are small enough to ship at affordable prices from most countries. You’ll find one eventually. Did you look at that avenger pro recoil gun I sent you the link for? I haven’t used that particular model myself so I don’t know if the recoil mechanism uses a motor or solenoid but it looks the part in this video and is cheap enough to take a chance on maybe:

https://www.youtube.com/watch?v=vv_rQOI84Q8
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on October 31, 2019, 07:27:43 pm
Sooooo.... after doing a tiny bit of research... i found out that the nintendo Switch has got a pretty sweet ir camera.
It apparently outputs an actual image through SPI. and not i2c as the wiimote does.
https://www.techinsights.com/blog/nintendo-switch-teardown (https://www.techinsights.com/blog/nintendo-switch-teardown)
The reason i got entrigued, was the fact that you can buy the camera seperately for about half the price of the DFRobot cam.
https://www.aliexpress.com/item/32933494037.html (https://www.aliexpress.com/item/32933494037.html)

Surely i dont have the skill to program something to actually process the image data,
but i was thinking that you'd probably be able to track the heat of the screen itself.

Another way you could probably make some sweet lightguns would be from the switch joycon itself.
using Joy-con toolkit https://gbatemp.net/threads/tool-joy-con-toolkit.478560/ (https://gbatemp.net/threads/tool-joy-con-toolkit.478560/)
This could make it possible to have them running via bluetooth. I am aware that the wiimote does aswell,
though it certainly is larger.

BTW im not trying to make a point or anything, just sharing what i found interesting.

Also, i just bought another Konami hyper blaster in darkblue, so i have 2 for my homebuilt arcade. which i will design a pcb to mount the wiimote camera, will probably share it on github when im done.
This will be a replacement for the DFRobot camera as mentioned before.

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on October 31, 2019, 09:34:06 pm
The existence of stores just shows that a consumer arcade market exists and that there is somewhere for those stores to buy parts for the cabs they refurbish. I.e. it’s not an impossible quest.

A lot of the old arcade companies aren’t even in business anymore or no longer make arcade games so they won’t be supporting their products, or any other. Owners of retro arcades must have somewhere to buy replacement parts and trade with each other. You are better placed to find it than me. There are plenty of arcades closing down in Japan too. I’d want to find out where all those cabs go to die and maybe make a trip to one of those arcade graveyards. Old Time Crisis cabs don’t evaporate and most are no longer in arcades, so they must be somewhere.

These are old products now from the crt era. I’m not sure I could find a retail store that sells light guns here either. When I want stuff like that, I search the internet, regularly check eBay for a deal and put wanted ads on Craigslist and sites like this. It sometimes takes a while but I usually find what I’m looking for eventually. It’s a global world and a global internet. Most of the resources available to me are available to you too.

Solenoids and light gun shells are small enough to ship at affordable prices from most countries. You’ll find one eventually. Did you look at that avenger pro recoil gun I sent you the link for? I haven’t used that particular model myself so I don’t know if the recoil mechanism uses a motor or solenoid but it looks the part in this video and is cheap enough to take a chance on maybe:

https://www.youtube.com/watch?v=vv_rQOI84Q8
Not saying this market doesn't exist, far from it. Just saying that for different reasons they don't sell lightguns.
If you need a proof, just compare the result you get in eBay when searching for lightgun, and the results you get when searching (in Japanese) on Yahoo auction (equivalent to eBay here). eBay has waaaayyy more options and models available.
But whatever, let's not fight about that, I am grateful you showed me the eBay stuff and the right solenoids I should try  ;)
I just bought the silver avenger pro from the link you sent me earlier. It seems cool since it has both PSX and Saturn compatibility. I will tell you how it is once I receive it.

Sooooo.... after doing a tiny bit of research... i found out that the nintendo Switch has got a pretty sweet ir camera.
It apparently outputs an actual image through SPI. and not i2c as the wiimote does.
https://www.techinsights.com/blog/nintendo-switch-teardown (https://www.techinsights.com/blog/nintendo-switch-teardown)
The reason i got entrigued, was the fact that you can buy the camera seperately for about half the price of the DFRobot cam.
https://www.aliexpress.com/item/32933494037.html (https://www.aliexpress.com/item/32933494037.html)

Surely i dont have the skill to program something to actually process the image data,
but i was thinking that you'd probably be able to track the heat of the screen itself.

Another way you could probably make some sweet lightguns would be from the switch joycon itself.
using Joy-con toolkit https://gbatemp.net/threads/tool-joy-con-toolkit.478560/ (https://gbatemp.net/threads/tool-joy-con-toolkit.478560/)
This could make it possible to have them running via bluetooth. I am aware that the wiimote does aswell,
though it certainly is larger.

BTW im not trying to make a point or anything, just sharing what i found interesting.

Also, i just bought another Konami hyper blaster in darkblue, so i have 2 for my homebuilt arcade. which i will design a pcb to mount the wiimote camera, will probably share it on github when im done.
This will be a replacement for the DFRobot camera as mentioned before.


Dude that's very interesting research you are doing there  :lol
Do you know how long is the joycon IR cam range is?
I thought that it's only for close range use, but I don't know.
Actually the main reason why I stick with the DFRobot cam is that it's capable to keep track of the 4 points very well, meaning that as long as each of them stay in range, they keep the same position in the buffer.
It makes everything way easier, faster and stable to use, since I have to figure out which point they are only once each time they are detected.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on October 31, 2019, 10:31:13 pm

Dude that's very interesting research you are doing there  :lol
Do you know how long is the joycon IR cam range is?
I thought that it's only for close range use, but I don't know.
Actually the main reason why I stick with the DFRobot cam is that it's capable to keep track of the 4 points very well, meaning that as long as each of them stay in range, they keep the same position in the buffer.
It makes everything way easier, faster and stable to use, since I have to figure out which point they are only once each time they are detected.
[/quote]
Thanks  :cheers:
I dont have any clue, didnt go that deep into it, but my main idea from it was just track the hot square that is the monitor.
Ofcourse! and there's nothing wrong with that! :D
But if the wiimote cam is indeed the same. why not make it cheaper... for me its necessary as my wallet is pretty much empty atm...
Aaaaand i wanted to learn how to design a PCB as i actually have a crapton of requests for PCB and mechatronics designs.

I did design the board tonight, and will probably release it on github on tuesday, as i have to get my design checked at the hackerspace :D

Stay Tuned!
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on October 31, 2019, 11:01:57 pm
The IR functionality is nearly identical to the wiimote because they included it for backwards compatibility.  As for some of the IR heat detection functionality they've been using it for, I think that's fairly short range.  Also lcd/led tvs don't put off a great amount of heat so I doubt they'd show up anyway.   
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 01, 2019, 02:38:30 am

Thanks  :cheers:
I dont have any clue, didnt go that deep into it, but my main idea from it was just track the hot square that is the monitor.
Ofcourse! and there's nothing wrong with that! :D
But if the wiimote cam is indeed the same. why not make it cheaper... for me its necessary as my wallet is pretty much empty atm...
Aaaaand i wanted to learn how to design a PCB as i actually have a crapton of requests for PCB and mechatronics designs.

I did design the board tonight, and will probably release it on github on tuesday, as i have to get my design checked at the hackerspace :D

Stay Tuned!
Wait, you're telling me the Wiimote sensor can also be used with serial (SDA&SCL), and keeps track of the IR Points? I though it was only the DFRobot cam that had some extra components on their PCB for that :lol
It's interesting for me too since I do have some broken wiimote motherboards around, I could use them to do some extra stuff.
I also wonder how much it would cost to do a custom PCB for the wiimote sensor?

The IR functionality is nearly identical to the wiimote because they included it for backwards compatibility.  As for some of the IR heat detection functionality they've been using it for, I think that's fairly short range.  Also lcd/led tvs don't put off a great amount of heat so I doubt they'd show up anyway.   
Backwards compatibility, on the switch? Did I miss some info on that? ???
The IR sensor also has an IR led to light up objects and reflectors and measure distances (like in nintendo labo), but I didn't see any instance where it was used from long range.
If it works for detecting shapes, we could also put some reflective tape around the screen and add a good powerful IR led under the sensor in the lightgun cannon? Not sure it would work, it's just an idea  :P
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 01, 2019, 01:32:20 pm
It's very hard to judge cameras (of any sort) by the specs alone. Just like with displays, the specs of the most expensive ones can often look similar to the cheapest. One of the most important aspects of cameras in terms of both price and performance is the lens quality and size. It effects how much light can pass, the angles it can see and the level of detail it can capture. All things that really matter with an IR gun camera.

I've never used one these robot motion sense cameras but one of the biggest weaknesses with the Wii camera and sensor bar is the narrow sensing angles. It makes it so you have to stand unreasonably far back, even when using a smaller monitor. It would be interesting to see if that is any different with the robot cams. Being able to stand at arcade-like distances from the screen and aim with iron sights would be a huge step forward.








Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on November 01, 2019, 02:05:05 pm
You didn't miss anything.  You know where they have been porting a bunch of wii u stuff over to the switch?  The wii u supports wiimotes just like the wii did.  Thus far they haven't ported anything that requires a wiimote ir sensor, but you know Nintendo.... they cram as many sensors in as possible just in case. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 01, 2019, 05:24:40 pm
Wait, you're telling me the Wiimote sensor can also be used with serial (SDA&SCL), and keeps track of the IR Points? I though it was only the DFRobot cam that had some extra components on their PCB for that :lol
It's interesting for me too since I do have some broken wiimote motherboards around, I could use them to do some extra stuff.
I also wonder how much it would cost to do a custom PCB for the wiimote sensor?

Thats exactly what I'm telling you 8-)
The only needed components to get the wiimote camera to talk to the arduino is as follows:
A 3.3V regulator for the I2c pullup aswell as the Power.
A 20 to 25 MHz crystal oscillator (resonator wont do) for the camera clock
2 2.7k resistors
A 30 or 33k resistor to pull the camera #reset pin high
2 10nF capacitors for the crystal, which might not even be necessary
a 100uF capacitor for the 3.3v regulator
And a 4 pin connector if you dont fancy wires soldered directly to the pcb.

When my pcb design is confirmed to be correctly made i will order a bunch as you can get 5 50x50mm pcb's for 5$
In china however, they're smaller than that so by panelizing them i might be able to fit 3 or 4 boards within those 50x50mm.
So i will sell the ones i dont need for almost nothing if you're interested.


Also from judging the spec Sheet of the robot cam https://www.robotshop.com/en/ir-tracking-camera.html (https://www.robotshop.com/en/ir-tracking-camera.html)
And what people have found the wiimote camera to be, its pretty darn close.
http://www.robotreviews.com/chat/viewtopic.php?t=8255 (http://www.robotreviews.com/chat/viewtopic.php?t=8255)
keep in mind that some of them measure viewing angle from center to edge, whilst others do it from edge to edge.


Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 02, 2019, 02:37:56 pm
You didn't miss anything.  You know where they have been porting a bunch of wii u stuff over to the switch?  The wii u supports wiimotes just like the wii did.  Thus far they haven't ported anything that requires a wiimote ir sensor, but you know Nintendo.... they cram as many sensors in as possible just in case.
Yeah but the architecture of the switch, along with all the hardware, including controllers, is massively different. I've been working on one of the first big N "ports" of the switch for while, and the dev team had to pretty much rewrite all the engine to make it run on it.
I might be wrong on that, but I was pretty sure the IR sensor was just a proximity IR cam along with an IR diode (the same way as the Microsoft Kinect, you can even find a toolkit online to test the cam), and it's on the bottom of the controller, so using it with a sensor bar wouldn't make much sense to me.

Thats exactly what I'm telling you 8-)
The only needed components to get the wiimote camera to talk to the arduino is as follows:
A 3.3V regulator for the I2c pullup aswell as the Power.
A 20 to 25 MHz crystal oscillator (resonator wont do) for the camera clock
2 2.7k resistors
A 30 or 33k resistor to pull the camera #reset pin high
2 10nF capacitors for the crystal, which might not even be necessary
a 100uF capacitor for the 3.3v regulator
And a 4 pin connector if you dont fancy wires soldered directly to the pcb.

When my pcb design is confirmed to be correctly made i will order a bunch as you can get 5 50x50mm pcb's for 5$
In china however, they're smaller than that so by panelizing them i might be able to fit 3 or 4 boards within those 50x50mm.
So i will sell the ones i dont need for almost nothing if you're interested.


Also from judging the spec Sheet of the robot cam https://www.robotshop.com/en/ir-tracking-camera.html (https://www.robotshop.com/en/ir-tracking-camera.html)
And what people have found the wiimote camera to be, its pretty darn close.
http://www.robotreviews.com/chat/viewtopic.php?t=8255 (http://www.robotreviews.com/chat/viewtopic.php?t=8255)
keep in mind that some of them measure viewing angle from center to edge, whilst others do it from edge to edge.
That's really cool dude! Would you have a kind of schematics for that? Would love to test it :D
But you still have to analyse the signal, or it is sending you raw coordinates?
The thing with the DFRobot cam is that it's pretty much sending you the coordinates of the 4 detected IR point through serial, and it follows those points as long as they stay on range.
So for the sketches, it reduces greatly the arduino load and the sketch size, and in result reduces the latency.

For the sensor specs, on DFRobot website they basically link to the wii sensor wiki page, so I wouldn't be surprise if they are using the actual Wiimote sensor in it  :lol

Just in case, would you happen to know a bit about the Playstation 2 USB protocol? Since the sketch is quite stable now, I'm trying to add support to that :P
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 03, 2019, 03:17:26 pm
If the DF robot can really is the exact same part as found in a Wii remote then I wonder why Nintendo chose to only use one sensor bar with just one point of reference. The DF Robot cam states it can track 4.

I guess the obvious answer is that they didn't intend to design it to be a light gun.

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 03, 2019, 04:23:41 pm

That's really cool dude! Would you have a kind of schematics for that? Would love to test it :D
But you still have to analyse the signal, or it is sending you raw coordinates?
The thing with the DFRobot cam is that it's pretty much sending you the coordinates of the 4 detected IR point through serial, and it follows those points as long as they stay on range.
So for the sketches, it reduces greatly the arduino load and the sketch size, and in result reduces the latency.

For the sensor specs, on DFRobot website they basically link to the wii sensor wiki page, so I wouldn't be surprise if they are using the actual Wiimote sensor in it  :lol

Just in case, would you happen to know a bit about the Playstation 2 USB protocol? Since the sketch is quite stable now, I'm trying to add support to that :P

 :banghead: hit reset after writing a long reply...

But I did make a schematic which I will provide when I get back from my gf in a couple of days.
As for the camera it talks the same language as the robot camera.
I know cause I used your 2 point sketch, with minor changes as I couldn't get axis reverse to work properly, so I changed the for loop to have #ifdef instead of if statements, which should run faster and compile smaller.
I also changed a couple of the constant integers into #define.
But that doesn't interfere with the dfrobot library protocol.

As for the camera being the same didn't really surprise me during research.
The camera is apparently either developed and maybe made by a company called pixart, but it seems to be a pretty secretive company.

About the ps2 usb protocol I haven't got any clue.. But the documentation of the Linux ps2 devkit might be of use.?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 03, 2019, 04:53:22 pm
Is the PS2 USB protocol the sort of thing you can get from the EMS Topgun 3 drivers with it being another IR gun that works on the PS2 as a Guncon 2?

Also, the guy that wrote the Wingun drivers is a member here. Perhaps he has some insight into how the Guncon 2 hardware works.

One other place to look is the file labeled USB gun on PS2 guncon 2 game discs. I don't understand the code but my assumption is that this is the guncon 2 drivers that the PS2 uses.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 04, 2019, 02:05:25 am

 :banghead: hit reset after writing a long reply...

But I did make a schematic which I will provide when I get back from my gf in a couple of days.
As for the camera it talks the same language as the robot camera.
I know cause I used your 2 point sketch, with minor changes as I couldn't get axis reverse to work properly, so I changed the for loop to have #ifdef instead of if statements, which should run faster and compile smaller.
I also changed a couple of the constant integers into #define.
But that doesn't interfere with the dfrobot library protocol.

As for the camera being the same didn't really surprise me during research.
The camera is apparently either developed and maybe made by a company called pixart, but it seems to be a pretty secretive company.

About the ps2 usb protocol I haven't got any clue.. But the documentation of the Linux ps2 devkit might be of use.?
Awesome, can't wait to see your schematic ;)
It's cool we can use old wiimote sensor instead.

Oh and don't throw away the wiimote rumble motors of the wiimote you salvaged parts from, you can actually use it to get rumble feedback with my sketch, for instance when reloading or firing offscreen :D
But I still need to figure out what voltage they are using to not fry them (I guessed 3V, but not sure).

For the sensor inversion, the problem is that DFRobot cam has both axises swapped and one inversed, because of some mistake they did, so I pretty much have to turn them 90° clockwise to make them work.
So it might be a bit different if using real wiimote sensor.

Yeah my 2 point code wasn't so great, it was my very first Arduino sketch  :lol. In the new 4 points one I'm using mostly define and cons, it's winning a lot of memory.
But I'm curious to know how you are using the #ifdef, it would be useful in my new sketch too if it can make it faster.
By the way, if you want to do some modifications to my 2 points sketch, feel free to submit them to my GitHub, I will sure update it and credit you.

If the DF robot can really is the exact same part as found in a Wii remote then I wonder why Nintendo chose to only use one sensor bar with just one point of reference. The DF Robot cam states it can track 4.

I guess the obvious answer is that they didn't intend to design it to be a light gun.

I guess they wanted to keep it simple for everyone to use, even everyone's grandma, while keeping it low cost for them?   :lol

Is the PS2 USB protocol the sort of thing you can get from the EMS Topgun 3 drivers with it being another IR gun that works on the PS2 as a Guncon 2?

Also, the guy that wrote the Wingun drivers is a member here. Perhaps he has some insight into how the Guncon 2 hardware works.

One other place to look is the file labeled USB gun on PS2 guncon 2 game discs. I don't understand the code but my assumption is that this is the guncon 2 drivers that the PS2 uses.
Oh yes I will try contacting the guy who did the wingun driver, he will probably have a good idea on how things work  ;D
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 04, 2019, 05:13:10 am
Not really an answer to all of the above.. (quoting is hard on the phone)
BUT JUST GOT AN AWESOME IDEA!
What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such.
Got the idea from watching metal Jesus play with the gcon 2.
I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 04, 2019, 06:31:50 am
Not really an answer to all of the above.. (quoting is hard on the phone)
BUT JUST GOT AN AWESOME IDEA!
What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such.
Got the idea from watching metal Jesus play with the gcon 2.
I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D
Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol
And to be honest there aren't many games that support guns with dpad and all.
The most convenient thing about it is being to scroll games menu with it.
I guess we could also bypass the nunchuck board entirely and connect the buttons directly to the cable, but we would then need a way to read the joystick 2 axises too.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 04, 2019, 07:10:18 am
Well was gonna say that I would take a nunchuck apart. But then i found this https://create.arduino.cc/projecthub/infusion/using-a-wii-nunchuk-with-arduino-597254 (https://create.arduino.cc/projecthub/infusion/using-a-wii-nunchuk-with-arduino-597254)
So it speaks i2c at 3.3v just as the camera, which means that it can actually share the i/o pins as they have different adresses.
Which is probably how the wiimote talks to it.
So it'd be super easy to implement :-D

Edit: btw reading 2 joystick axes (axis in plural ;-)) is super easy, just do 2 analog reads, as they are almost always constructed as potentiometers :-)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 04, 2019, 10:27:55 am
Not really an answer to all of the above.. (quoting is hard on the phone)
BUT JUST GOT AN AWESOME IDEA!
What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such.
Got the idea from watching metal Jesus play with the gcon 2.
I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D
Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol
And to be honest there aren't many games that support guns with dpad and all.
The most convenient thing about it is being to scroll games menu with it.
I guess we could also bypass the nunchuck board entirely and connect the buttons directly to the cable, but we would then need a way to read the joystick 2 axises too.

That's what I thought when I made my Time Crisis arcade guns into Guncon 2's but it was a big mistake. It's true that only a few guncon 2 games use the D-pad but a good number use it to navigate through the options menu. It was really annoying to have to keep unplugging the gcon to switch between Virtua Cop 1 and 2 on the Elite edition disc and I couldn't even access the menu system on Guncom 2.

I put all my recoil hardware and the guncon 2 PCB in a wooden box. I ended up adding all the guncon buttons (beside the trigger) to the box and I put a joystick on the other side. My pedal also attached to the box. I suggest you do the same. You need every guncon 2 button and the d-pad unless you only want to play the Time Crisis games.

Also, while you're looking at how to make the gun work on the PS2, there is a good number of rail shooters on the PS2 that currently have no gun support at all. They only allow you to use the analog stick. I am working on hooking up my positional arcade guns but you might be able to add an analog stick mode to your gun to make it work on games like Silent Scope, Combat Queen, Ghost Vibration and Operation Wolf (on the Taito legends disc).
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 04, 2019, 11:20:56 am
Well was gonna say that I would take a nunchuck apart. But then i found this https://create.arduino.cc/projecthub/infusion/using-a-wii-nunchuk-with-arduino-597254 (https://create.arduino.cc/projecthub/infusion/using-a-wii-nunchuk-with-arduino-597254)
So it speaks i2c at 3.3v just as the camera, which means that it can actually share the i/o pins as they have different adresses.
Which is probably how the wiimote talks to it.
So it'd be super easy to implement :-D

Edit: btw reading 2 joystick axes (axis in plural ;-)) is super easy, just do 2 analog reads, as they are almost always constructed as potentiometers :-)
Wow that guys already did all the hard work, with that we can actually do it easily. I have an old after market nunchuck somewhere, I will give it a try when I have more time.
You look like you know way more than me in electronic, would you like if I share the 4 leds sketch and schematics with you in private? I would really use some help on making it better, especially on the electronic side of things 😅
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 04, 2019, 12:56:10 pm
This guy seems to have done a lot of the work with guncon protocols.

https://pyroesp.github.io/electronics/reverse%20engineering/playstation/2018/06/14/shooting-bad-guys-2.html

I found it while searching for a Guncon 3 pinout diagram. His project seems to be writing the code to use a wii remote as a guncon or guncon 2.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 04, 2019, 07:57:22 pm
Not really an answer to all of the above.. (quoting is hard on the phone)
BUT JUST GOT AN AWESOME IDEA!
What if we were to use the nunchuck for extra buttons for those controller which dont have a d-pad and such.
Got the idea from watching metal Jesus play with the gcon 2.
I think it would be possible to use the plug from the wiimote by desoldering it and making a custom pcb with ordinary pimheaders to attach to the pro-Micro... Or stm32 if i can get i2c working on it :-D
Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol
And to be honest there aren't many games that support guns with dpad and all.
The most convenient thing about it is being to scroll games menu with it.
I guess we could also bypass the nunchuck board entirely and connect the buttons directly to the cable, but we would then need a way to read the joystick 2 axises too.

That's what I thought when I made my Time Crisis arcade guns into Guncon 2's but it was a big mistake. It's true that only a few guncon 2 games use the D-pad but a good number use it to navigate through the options menu. It was really annoying to have to keep unplugging the gcon to switch between Virtua Cop 1 and 2 on the Elite edition disc and I couldn't even access the menu system on Guncom 2.

I put all my recoil hardware and the guncon 2 PCB in a wooden box. I ended up adding all the guncon buttons (beside the trigger) to the box and I put a joystick on the other side. My pedal also attached to the box. I suggest you do the same. You need every guncon 2 button and the d-pad unless you only want to play the Time Crisis games.

Also, while you're looking at how to make the gun work on the PS2, there is a good number of rail shooters on the PS2 that currently have no gun support at all. They only allow you to use the analog stick. I am working on hooking up my positional arcade guns but you might be able to add an analog stick mode to your gun to make it work on games like Silent Scope, Combat Queen, Ghost Vibration and Operation Wolf (on the Taito legends disc).
What I did a while ago was to use an extra atmega Arduino I had (I buy them in pack), and put it inside an old arcade stick, to simulate a bunch of keyboard keys, which work in pretty much any app/emulator.
It's perfect to put on the table in front of me, acting like an arcade panel.
But I'm planning to do something even cooler for that (something with light buttons and mamehooker).

Beside VCop elite edition, which game uses the dpad for menu? You can also use a psx/ps2 gamepad for those tho.

Also, my lightgun firmware already has a joystick mode (hold A button + push calibration button).
But it's not relative motion, it's absolute. It will work only with games that use absolute motion. There is no way around that sadly.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: hyo2012 on November 04, 2019, 10:14:30 pm
JayBee, Can you add analog input feature on firmware? 2 axis are ok.

I have fixed analog arcade gun. I use it playing Let's go island, Terminator 2 arcade... etc.

(https://ae01.alicdn.com/kf/HTB1uA64dA9WBuNjSspeq6yz5VXaH.jpg)

It has two potentiometer, x-axis and y-axis. No pcb inside.

If analog inputs are supported, I can play both rail-shooter game which support analog gun and only support mouse input.

And that gun has built in solenoid, your firmware has solenoid  automatic recoil output, that make easy to setup. How great.

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 05, 2019, 02:03:48 am
JayBee, Can you add analog input feature on firmware? 2 axis are ok.

I have fixed analog arcade gun. I use it playing Let's go island, Terminator 2 arcade... etc.

(https://ae01.alicdn.com/kf/HTB1uA64dA9WBuNjSspeq6yz5VXaH.jpg)

It has two potentiometer, x-axis and y-axis. No pcb inside.

If analog inputs are supported, I can play both rail-shooter game which support analog gun and only support mouse input.

And that gun has built in solenoid, your firmware has solenoid  automatic recoil output, that make easy to setup. How great.
This kind of fixed gun tech has nothing to do with the IR cam tech we are using here, it would require a totally different firmware.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 05, 2019, 01:12:37 pm

That's what I thought when I made my Time Crisis arcade guns into Guncon 2's but it was a big mistake. It's true that only a few guncon 2 games use the D-pad but a good number use it to navigate through the options menu. It was really annoying to have to keep unplugging the gcon to switch between Virtua Cop 1 and 2 on the Elite edition disc and I couldn't even access the menu system on Guncom 2.

I put all my recoil hardware and the guncon 2 PCB in a wooden box. I ended up adding all the guncon buttons (beside the trigger) to the box and I put a joystick on the other side. My pedal also attached to the box. I suggest you do the same. You need every guncon 2 button and the d-pad unless you only want to play the Time Crisis games.

Also, while you're looking at how to make the gun work on the PS2, there is a good number of rail shooters on the PS2 that currently have no gun support at all. They only allow you to use the analog stick. I am working on hooking up my positional arcade guns but you might be able to add an analog stick mode to your gun to make it work on games like Silent Scope, Combat Queen, Ghost Vibration and Operation Wolf (on the Taito legends disc).

Well i think seeing as it would be so easy to implement it and totally omittable during the specific build.
We might aswell add the feature.
Now, you are totally right about the small number of titles supporting it. But the more it supports the better IMHO.

Wow that guys already did all the hard work, with that we can actually do it easily. I have an old after market nunchuck somewhere, I will give it a try when I have more time.
You look like you know way more than me in electronic, would you like if I share the 4 leds sketch and schematics with you in private? I would really use some help on making it better, especially on the electronic side of things 😅
My electronic knowlegde is pretty low... but i do spend a lot of time at the local hacker/makerspace, where i learn a lot from other makers.
However, yes i'd like that.
I put the schematic up on github, so feel free to update it with your ideas. I scaled the pcb as such that it should fit 4 boards within 50x50mm to make them super cheap to order.
There's only 2 things i think it could use is pads for different sized crystal oscillators and 4 more pins to pass the i2c bus for the nunchuck and whatever we may want to add in the future.
https://github.com/Mysli0210/Liightgun (https://github.com/Mysli0210/Liightgun)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 05, 2019, 08:45:09 pm
Well i think seeing as it would be so easy to implement it and totally omittable during the specific build.
We might aswell add the feature.
Now, you are totally right about the small number of titles supporting it. But the more it supports the better IMHO.
If you're talking about the joystick support, it's already fully supported in my firmware (the joystick mode I'm talking about in my post ;) ). But of course it will only work with games that use absolute joystick motion (one stick position = one position on screen), sadly there is no way to get a precise aiming with games that use relative motion (moving the cursor by holding one direction) due to the way they work.

My electronic knowlegde is pretty low... but i do spend a lot of time at the local hacker/makerspace, where i learn a lot from other makers.
However, yes i'd like that.
I put the schematic up on github, so feel free to update it with your ideas. I scaled the pcb as such that it should fit 4 boards within 50x50mm to make them super cheap to order.
There's only 2 things i think it could use is pads for different sized crystal oscillators and 4 more pins to pass the i2c bus for the nunchuck and whatever we may want to add in the future.
https://github.com/Mysli0210/Liightgun (https://github.com/Mysli0210/Liightgun)
Doesn't look that bad to me, but might be because I am terrible at it  :lol
I was wondering if it would be a good idea to merge your pcb with my solenoid/rumble circuit, and add GND soldering points for the buttons (the few GND on the arduino board aren't enough), it would make a great all in one solution :D
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 05, 2019, 09:51:21 pm
If you're talking about the joystick support, it's already fully supported in my firmware (the joystick mode I'm talking about in my post ;) ). But of course it will only work with games that use absolute joystick motion (one stick position = one position on screen), sadly there is no way to get a precise aiming with games that use relative motion (moving the cursor by holding one direction) due to the way they work.
Not talking about the joystick mode, but rather making the joystick on the nunchuck, act as if were a d-pad like on the G-con2.
A few of the titles support it, but watch this instead to see what i mean https://youtu.be/dOSRxiLEVmI?t=226 (https://youtu.be/dOSRxiLEVmI?t=226)

Doesn't look that bad to me, but might be because I am terrible at it  :lol
I was wondering if it would be a good idea to merge your pcb with my solenoid/rumble circuit, and add GND soldering points for the buttons (the few GND on the arduino board aren't enough), it would make a great all in one solution :D
It could be added, but again i tried to keep it very small to make it super cheap to get made. but i could do a pcb for those functions.
I made the schematic for the board to hold the nunchuck connector, which in itself will be pretty small and only have an internal connector (optional), the nunchuck connector, 2 pullup resistors, a regulator and a cap.

Its not that i dislike your idea, but i think its better to have a few small pcb's rather than one big, seeing as it will then be easier to adapt to the specific gun.

Regarding the ground connections, you can scrape off some of the soldermask, both sides are grounded decently.
but a much more sane approach is daisychaining the ground from button to button. my konami gun was even wired that way from the factory.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 06, 2019, 01:33:28 am
Not talking about the joystick mode, but rather making the joystick on the nunchuck, act as if were a d-pad like on the G-con2.
A few of the titles support it, but watch this instead to see what i mean https://youtu.be/dOSRxiLEVmI?t=226 (https://youtu.be/dOSRxiLEVmI?t=226)
Ah yes, you're right, it seems fairly easy to connect the nunchuck with the i2c connection. We can even find some arduino libraries online. I will definitely try it when I have a bit more time.

It could be added, but again i tried to keep it very small to make it super cheap to get made. but i could do a pcb for those functions.
I made the schematic for the board to hold the nunchuck connector, which in itself will be pretty small and only have an internal connector (optional), the nunchuck connector, 2 pullup resistors, a regulator and a cap.

Its not that i dislike your idea, but i think its better to have a few small pcb's rather than one big, seeing as it will then be easier to adapt to the specific gun.

Regarding the ground connections, you can scrape off some of the soldermask, both sides are grounded decently.
but a much more sane approach is daisychaining the ground from button to button. my konami gun was even wired that way from the factory.
Having small pcbs instead of one big is actually what I am doing in my guns, but despite being perfectly functional it looks very messy :lol
But I guess there is no way around it if we want to fit it in any gun model.

Daisy chaining is good, but when each point needs to be soldered somewhere (beside the GCon2 I completely replaced the guns original pcb, and they aren't arcade guns, just cheap PS2/Saturn guns), every time I have to add a ground (button or other) it gets complicated. I preferred making a small board where each ground is attached, even if it's a bit dirty.

I will send you the schematics too once I make them clean. What software are you using for your schematics?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 06, 2019, 01:07:17 pm
JayBee, Can you add analog input feature on firmware? 2 axis are ok.

I have fixed analog arcade gun. I use it playing Let's go island, Terminator 2 arcade... etc.

(https://ae01.alicdn.com/kf/HTB1uA64dA9WBuNjSspeq6yz5VXaH.jpg)

It has two potentiometer, x-axis and y-axis. No pcb inside.

If analog inputs are supported, I can play both rail-shooter game which support analog gun and only support mouse input.

And that gun has built in solenoid, your firmware has solenoid  automatic recoil output, that make easy to setup. How great.


You can just use an Apac for fixed positional arcade guns. That's what I use. One Apac can hook up two guns (to one USB port) and all the buttons.

I use a relay plus an Ne555 board to hook up the solenoid for full auto recoil. It's the easiest method by far.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 06, 2019, 01:19:22 pm
JayBee, Can you add analog input feature on firmware? 2 axis are ok.

I have fixed analog arcade gun. I use it playing Let's go island, Terminator 2 arcade... etc.

(https://ae01.alicdn.com/kf/HTB1uA64dA9WBuNjSspeq6yz5VXaH.jpg)

It has two potentiometer, x-axis and y-axis. No pcb inside.

If analog inputs are supported, I can play both rail-shooter game which support analog gun and only support mouse input.

And that gun has built in solenoid, your firmware has solenoid  automatic recoil output, that make easy to setup. How great.
This kind of fixed gun tech has nothing to do with the IR cam tech we are using here, it would require a totally different firmware.

That's not 100% accurate. Most arcade IR gun I/O boards output as regular analog joysticks. In most cases you can use a positional gun instead of an IR gun with the same arcade PCB. The I/O boards just translate the positional data to the same 0-5v signal you would have got from a pot for the X and Y axis. The is a video on Youtube of some guy using a Taito positional gun in place of the IR gun on that Rambo arcade game.

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 06, 2019, 03:01:38 pm
Ah yes, you're right, it seems fairly easy to connect the nunchuck with the i2c connection. We can even find some arduino libraries online. I will definitely try it when I have a bit more time.

Cool!

Having small pcbs instead of one big is actually what I am doing in my guns, but despite being perfectly functional it looks very messy :lol
But I guess there is no way around it if we want to fit it in any gun model.

Daisy chaining is good, but when each point needs to be soldered somewhere (beside the GCon2 I completely replaced the guns original pcb, and they aren't arcade guns, just cheap PS2/Saturn guns), every time I have to add a ground (button or other) it gets complicated. I preferred making a small board where each ground is attached, even if it's a bit dirty.

I will send you the schematics too once I make them clean. What software are you using for your schematics?

I used KiCad to design the schematics.
yeah they need to be soldered somewhere, but most buttons do have 4 leads that are interconnected in pairs.
I really dont see how having a lot of ground wires going to one pcb and then to the arduino is less messy nor easier to deal with :)
(You should see the wiring of the joycons of my homebuilt arcade  ::))
But if its such a hassle for you, i would suggest using enamel wire (the type where you can melt the insulation) to just use one wire that is soldered to each button.

We could do something entirely else though.
To make a pcb for each guntype, which would be way more expensive, though super easy to install.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 06, 2019, 08:44:09 pm
This kind of fixed gun tech has nothing to do with the IR cam tech we are using here, it would require a totally different firmware.

That's not 100% accurate. Most arcade IR gun I/O boards output as regular analog joysticks. In most cases you can use a positional gun instead of an IR gun with the same arcade PCB. The I/O boards just translate the positional data to the same 0-5v signal you would have got from a pot for the X and Y axis. The is a video on Youtube of some guy using a Taito positional gun in place of the IR gun on that Rambo arcade game.
I'm not saying that's impossible, I'm just saying my setup isn't compatible with it nor will be, that's not the purpose of it at all.
It would require to do a special version that pretty much remove 90% or my code (IR detection and all), and change the rest significantly. So a brand new sketch...
And before you ask, no it's not possible to add it to this sketch, because 1. All the analog pins are already in use for something else and 2. The sketch is already taking more than 80% of the Arduino flash, and I want to add more functions in the future. ;)

Edit: By the way don't mix input and output. My sketch always had a joystick output, since the very first version  :lol
But it doesn't support joystick input that bypass the IR detection.
However anyone who want to have a special version for that is free to use my 2 IR points sketch, which should work fine after removing the IR detection code.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 06, 2019, 09:42:28 pm
I used KiCad to design the schematics.
yeah they need to be soldered somewhere, but most buttons do have 4 leads that are interconnected in pairs.
I really dont see how having a lot of ground wires going to one pcb and then to the arduino is less messy nor easier to deal with :)
(You should see the wiring of the joycons of my homebuilt arcade  ::))
But if its such a hassle for you, i would suggest using enamel wire (the type where you can melt the insulation) to just use one wire that is soldered to each button.

We could do something entirely else though.
To make a pcb for each guntype, which would be way more expensive, though super easy to install.
None of the buttons in my guns have 4 leads, they aren't arcade guns.
My solution is sure not the best recommend one, but I did it to avoid touching the button boards and wires too much (I have no replacement if I damage them) or messing up with the button themselves. If I chain solder them and one point in the chain breaks or do wrong contact, it will be such a pain to troubleshoot.
I also have grounds for other things than buttons, like solenoid and rumble.

You can see pics of the inside of my guns to understand what I mean:
http://forum.arcadecontrols.com/index.php/topic,161192.0.html
They changed a lot since I took those pics, but you get the global idea.

Yeah we could do a different pcb for each, but like you said, it would be expensive, and not sure if it's worth it ;)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 07, 2019, 07:24:09 pm
None of the buttons in my guns have 4 leads, they aren't arcade guns.
My solution is sure not the best recommend one, but I did it to avoid touching the button boards and wires too much (I have no replacement if I damage them) or messing up with the button themselves. If I chain solder them and one point in the chain breaks or do wrong contact, it will be such a pain to troubleshoot.
I also have grounds for other things than buttons, like solenoid and rumble.

You can see pics of the inside of my guns to understand what I mean:
http://forum.arcadecontrols.com/index.php/topic,161192.0.html
They changed a lot since I took those pics, but you get the global idea.

Yeah we could do a different pcb for each, but like you said, it would be expensive, and not sure if it's worth it ;)

Well i cant really see whats going on behind that hot-snot glue (which you can remove with rubbing alcohol, if need be ;))
But the microswitch (the one you call arcade) is super easy to solder several wires onto, as it has got a hole in the lead which you can hook the end of the wire around before soldering... heck even after if you heat the solder up before.
BTW they are easily obtained, they go by the name 1c25, there are other types such as DB1, DB2 & DB3 but they have a different size, just if need be :D
and the pcb with the red button(s)? should be pretty easy to wire up with a common ground wire aswell.

Here's a couple of pics of my gun, which surely could use some tidying up.
https://drive.google.com/open?id=1-2D4oAQEHhFUM4F9ROmfW6oOpiYpz_iA (https://drive.google.com/open?id=1-2D4oAQEHhFUM4F9ROmfW6oOpiYpz_iA)
Though there are 2 wires connected on one pin of the trigger pcb, the rest are daisychained from there. Just as it was from the factory.

Also should you need spare pcb's, provide me with a drawing with measurements and holesizes.
and i'll design a new one for ya ;)
I could even make one that extends rearward which can hold the arduino, mosfet and all the supporting components.

You wouldnt happen to have a scanner and a ruler would you?
Cause if you lay the gun, or even guns on their (in)side next to the ruler and send me the picture i'll design it to work for that gun.
You'd ofcourse have to make sure that it is clean against the glass, so that there's no warping or out of focus places.
and i'll make it so you have several through-holes where you can attach the ground wires :D


EDIT:
@JayBee, if you wanted to have me take a look at your code, make a user on github and make a private repository for it and share it with me :D

EDIT2:
I dont think you should have the camera board act as the ground for the  solenoid as that could actually deprive the camera of power on activation (read. inrush current)
what you'd ought to have is a beefy capacitor, maybe even a super capacitor to conserve space right next to the mosfet.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 15, 2019, 05:32:30 pm
This kind of fixed gun tech has nothing to do with the IR cam tech we are using here, it would require a totally different firmware.

That's not 100% accurate. Most arcade IR gun I/O boards output as regular analog joysticks. In most cases you can use a positional gun instead of an IR gun with the same arcade PCB. The I/O boards just translate the positional data to the same 0-5v signal you would have got from a pot for the X and Y axis. The is a video on Youtube of some guy using a Taito positional gun in place of the IR gun on that Rambo arcade game.
I'm not saying that's impossible, I'm just saying my setup isn't compatible with it nor will be, that's not the purpose of it at all.
It would require to do a special version that pretty much remove 90% or my code (IR detection and all), and change the rest significantly. So a brand new sketch...
And before you ask, no it's not possible to add it to this sketch, because 1. All the analog pins are already in use for something else and 2. The sketch is already taking more than 80% of the Arduino flash, and I want to add more functions in the future. ;)

Edit: By the way don't mix input and output. My sketch always had a joystick output, since the very first version  :lol
But it doesn't support joystick input that bypass the IR detection.
However anyone who want to have a special version for that is free to use my 2 IR points sketch, which should work fine after removing the IR detection code.

I'm not sure I understand what you're saying on input VS output. All the PC light guns and IR guns I have seen output as either a mouse or an analog joystick (or both) in Windows. Most arcade guns from PC-based arcades output as an analog joystick (including both real light guns and IR guns). It makes the most sense for arcade gun set-ups as the 10-12 led boards define the screen perimeter while each coordinate is expressed as voltage from 0 to 5v. I.e. 0v at one side, 5v at the other edge and 2.5v for the center of each axis (or something like that). It's simple and universally compatible.

What does this four sensor IR gun set-up output as? If it's seen as a mouse, how is it finding the coordinates of where you are aiming? My understanding of how a mouse works in Windows is limited but I assumed the mouse just tracks movement and not coordinates. Can Windows be fed coordinates to position a mouse cursor?

I have high hopes for the 4 sensor set-up as, in theory, one at each corner should be able to define the screen perimeter almost as well as arcade IR guns. I think the main weakness of the Aimtrak set-up is that nothing defines the screen edge so when you aim at the out edge of the screen, the crosshairs no longer lines up with your iron sights.

 I just spent a fortune on Sega arcade IR gun parts so I can play House of the Dead 4 and Rambo with the original arcade gun in Teknoparrot. It would be nice to sell it an get some money back once there is a viable cheaper alternative....
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on November 15, 2019, 09:16:07 pm
I'll throw some cents in here:

Mice in windows can be setup two ways.  Either as a relative position device, which works as you think it does (x number of ticks in a given direction) or absolute position... which I believe gives the x/y position in a 0 to 1024 value in both x and y.  Imho neither of these should be used as output to make a modern light gun.   Why?  Well windows handles mouse input surprisingly poorly.  One mouse read in relative position does just fine but absolute position or multiple mice aren't universally supported in games.  As a matter of fact, the reason troubleshooter, troubleshooter 2 and demulshooter exist is due to the poor mice support in the typical gun game released on the pc... even some emulators.  This is due to the fact that the various apis used to interface with multiple mice are outdated and/or cumbersome. 

On the other hand if your gun shows up as a joystick you are golden.  Most modern games can handle two gamepads just fine and as a quick kludge to support older games, it's pretty easy to use middle ware to move the mouse cursor with a joystick.   Multiple mice aren't officially supported in any commercially available games due to the api issues, so going forward, any gun games released on the pc are probably going to have gamepad support, with developers assuming you'll actually use a gamepad since true pc guns are dead atm.  That's just fine if you make a new light gun show up as a joystick, but it means more hacking if you have it show up as a mouse. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 16, 2019, 11:25:50 am
That explains why arcade developers almost always choose to have the gun I/O board output as an analog joystick, regardless of the gun tech. Modern arcades are PC's under the hood so they probably have to deal with all the same challenges

Also, if the plan is to make a gun work with older consoles on HD flat screens, most light gun games already have analog joystick support. A few of the PS2 rail shooters I have tried even offer a choice of relative or absolute positioning (they call it "regular" and "pro" mode). I am relying on this to add light gun support to the few PS2 rail shooters with no gun support once my Sega arcade IR gun is set up.

House of the Dead 4 on the PS3 even offers calibration and an option to turn off visible crosshairs when played with an analog joystick. I have high hopes for using my HOD4 arcade gun with it (with the I/O wired to a PS3 six axis pad).

Do you have any insight on which mouse mode the Aimtrak uses when set to work as a mouse? It kinds seems like it works in relative mode as it doesn't seem to have the capability of recording accurate coordinates.

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on November 17, 2019, 12:27:53 am
I don't have one but it's probably relative to maximize compatibility.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 17, 2019, 04:52:25 am
Well i cant really see whats going on behind that hot-snot glue (which you can remove with rubbing alcohol, if need be ;))
But the microswitch (the one you call arcade) is super easy to solder several wires onto, as it has got a hole in the lead which you can hook the end of the wire around before soldering... heck even after if you heat the solder up before.
BTW they are easily obtained, they go by the name 1c25, there are other types such as DB1, DB2 & DB3 but they have a different size, just if need be :D
and the pcb with the red button(s)? should be pretty easy to wire up with a common ground wire aswell.

Here's a couple of pics of my gun, which surely could use some tidying up.
https://drive.google.com/open?id=1-2D4oAQEHhFUM4F9ROmfW6oOpiYpz_iA (https://drive.google.com/open?id=1-2D4oAQEHhFUM4F9ROmfW6oOpiYpz_iA)
Though there are 2 wires connected on one pin of the trigger pcb, the rest are daisychained from there. Just as it was from the factory.

Also should you need spare pcb's, provide me with a drawing with measurements and holesizes.
and i'll design a new one for ya ;)
I could even make one that extends rearward which can hold the arduino, mosfet and all the supporting components.

You wouldnt happen to have a scanner and a ruler would you?
Cause if you lay the gun, or even guns on their (in)side next to the ruler and send me the picture i'll design it to work for that gun.
You'd ofcourse have to make sure that it is clean against the glass, so that there's no warping or out of focus places.
and i'll make it so you have several through-holes where you can attach the ground wires :D


EDIT:
@JayBee, if you wanted to have me take a look at your code, make a user on github and make a private repository for it and share it with me :D

EDIT2:
I dont think you should have the camera board act as the ground for the  solenoid as that could actually deprive the camera of power on activation (read. inrush current)
what you'd ought to have is a beefy capacitor, maybe even a super capacitor to conserve space right next to the mosfet.
Yeah despite what many people say, hot glue is so convenient when you don't have 3D printer or anything like that. Easy to put, easy to remove, and hold things very well.
There is simply a push button for calibration and other functions behind it.

Yeah I guess I could have soldered everything on the switch, but again it would have been a pain everytime I want to modify/add anything, and the placement in the gun is not the best to pull all grounds to it (not enough space).
This is not the original switch by the way (those kind of gun don't have microswitches), I added them along with a 3D printed supports I bought online  :laugh:
Nice to know the ref if I need to replace them, thanks ;)

Your gun is so tidy compared to mine, good idea to reuse the thick cable to bring all your wires to the board. I guess having a solenoid doesn't help  :lol
For the common ground with the cam don't worry, the solenoid circuit prevent any of those issues.

Sorry I don't have access to my computer lately, couldn't do the schematics or clean my code before sharing it with you yet, it might have to wait 2 more weeks for that  :-\
I will send you a PM as soon as it's ready ;)

I'll throw some cents in here:

Mice in windows can be setup two ways.  Either as a relative position device, which works as you think it does (x number of ticks in a given direction) or absolute position... which I believe gives the x/y position in a 0 to 1024 value in both x and y.  Imho neither of these should be used as output to make a modern light gun.   Why?  Well windows handles mouse input surprisingly poorly.  One mouse read in relative position does just fine but absolute position or multiple mice aren't universally supported in games.  As a matter of fact, the reason troubleshooter, troubleshooter 2 and demulshooter exist is due to the poor mice support in the typical gun game released on the pc... even some emulators.  This is due to the fact that the various apis used to interface with multiple mice are outdated and/or cumbersome. 

On the other hand if your gun shows up as a joystick you are golden.  Most modern games can handle two gamepads just fine and as a quick kludge to support older games, it's pretty easy to use middle ware to move the mouse cursor with a joystick.   Multiple mice aren't officially supported in any commercially available games due to the api issues, so going forward, any gun games released on the pc are probably going to have gamepad support, with developers assuming you'll actually use a gamepad since true pc guns are dead atm.  That's just fine if you make a new light gun show up as a joystick, but it means more hacking if you have it show up as a mouse. 

Thanks, you summed up things quite well.

2 mouses support is indeed a pain to work with, but at the same time there are also many games that don't support absolute coordinate joystick, only relative joystick.
When using only one gun, mouse mode it's a lot more simple, and you can use it natively in windows or with any devices that use a mouse. That's mainly why I left the mouse mode as default.
During my test, I felt like the joystick mode was also slightly less precise and had more input latency than the mouse, but that might depends on the app, and the library I am using.

That explains why arcade developers almost always choose to have the gun I/O board output as an analog joystick, regardless of the gun tech. Modern arcades are PC's under the hood so they probably have to deal with all the same challenges

Also, if the plan is to make a gun work with older consoles on HD flat screens, most light gun games already have analog joystick support. A few of the PS2 rail shooters I have tried even offer a choice of relative or absolute positioning (they call it "regular" and "pro" mode). I am relying on this to add light gun support to the few PS2 rail shooters with no gun support once my Sega arcade IR gun is set up.

House of the Dead 4 on the PS3 even offers calibration and an option to turn off visible crosshairs when played with an analog joystick. I have high hopes for using my HOD4 arcade gun with it (with the I/O wired to a PS3 six axis pad).

Do you have any insight on which mouse mode the Aimtrak uses when set to work as a mouse? It kinds seems like it works in relative mode as it doesn't seem to have the capability of recording accurate coordinates.

Why do people seems to think my firmware only work in mouse mode? Is my first post not clear?
It works as a mouse/keyboard, a joystick, or hybrid (mouse motion and joy buttons, useful for the MiSTer FPGA). All using absolute coordinates of course.
You can change the mode on the fly at any time with a button combo (see my first post).

For the input/output subject, I was speaking about it from the arduino board point of view.
So the input here are the IR cam and gun buttons, and the output are the USB port, solenoid & rumble motor.

The USB output can be change in any way I want, in this case it simulates a mouse, a keyboard and a joystick, all at the same time.

On the IR cam side, as you can imagine it doesn't provide any screen coordinates, but instead gives me up to 4 IR led 2D coordinate (which are placed in the middle of each TV side, which is way better than putting them in the corners).
So with those I have to do a lot of calculation (mostly trigonometry) to do the aspect ratio/angle correction and get the aiming coordinates, while keeping everything fast enough to not add input latency.
It was the main challenge and what took me countless hours, since keeping those calculation accurate in any situation with the limited arduino power is far from easy.

What hyo2012 was asking was to plug a real analog gun as input instead of the cam.
Doing that would require to completely bypass all the IR cam calculation, which is pretty much the core of my firmware.
It's doable of course, but then I would have to reserve 2 analog input (which I can't because of all the input the GCon 2 needs) for it and deeply modify my code. It would be faster to do a whole new firmware instead.

By the way, I received the lightgun I ordered from ebay (the one from the link you sent me), and it's actually using a motor instead of a solenoid to trigger to recoil.
It's awesome for auto mode, but not that great for one shot. Due to the way the motor has to turn to trigger it, it's slower to react and the impact backward is weaker than forward.
But overall it's a great gun to use with my CRT and PSX/Saturn, I think I will just use it like that instead of modding it :lol
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 18, 2019, 10:24:13 pm
We weren't talking about your firmware (I've never seen it). I was asking about how Aimtraks work in mouse mode.

On the light gun, maybe you could add a small solenoid inside the grip for semi auto recoil (like Happ recoil guns) and then just use the motor for full auto. Unlike full auto, you can use any solenoid for semi.

I actually prefer motors over solenoids for full auto only games but, it depends on the mechanism. With a decent motor and a brass knocker mechanism you can get a much better full auto effect. The recoil mechanism in the Konami Teraburst rifles is the best I have seen:

(https://i.postimg.cc/3WWDPWYG/IMG-4492.jpg) (https://postimg.cc/3WWDPWYG)


If you are handy and creative, adding a brass knocker and maybe a motor upgrade is not too difficult. It's the noise of metal hitting metal that really sells it.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on November 19, 2019, 12:59:33 am
Well how I'm going to build mine  (assuming I ever get around to it)  is to put all the electronics in a square tube with all the I/o connecting up vid a d-sub on the tube.  For handgun games I'll build a hand gun shell with a solenoid and for full auto I'll have a machine gun shell with a motor.  I think the wiimote method of different shells would help a lot in regards of trying to get one system to do it all.  That or build a second set of guns. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on November 20, 2019, 12:06:17 am
JayBee, Can you add analog input feature on firmware? 2 axis are ok.

I have fixed analog arcade gun. I use it playing Let's go island, Terminator 2 arcade... etc.

(https://ae01.alicdn.com/kf/HTB1uA64dA9WBuNjSspeq6yz5VXaH.jpg)

It has two potentiometer, x-axis and y-axis. No pcb inside.

If analog inputs are supported, I can play both rail-shooter game which support analog gun and only support mouse input.

And that gun has built in solenoid, your firmware has solenoid  automatic recoil output, that make easy to setup. How great.
This kind of fixed gun tech has nothing to do with the IR cam tech we are using here, it would require a totally different firmware.

That's not 100% accurate. Most arcade IR gun I/O boards output as regular analog joysticks. In most cases you can use a positional gun instead of an IR gun with the same arcade PCB. The I/O boards just translate the positional data to the same 0-5v signal you would have got from a pot for the X and Y axis. The is a video on Youtube of some guy using a Taito positional gun in place of the IR gun on that Rambo arcade game.

We weren't talking about your firmware (I've never seen it). I was asking about how Aimtraks work in mouse mode.

On the light gun, maybe you could add a small solenoid inside the grip for semi auto recoil (like Happ recoil guns) and then just use the motor for full auto. Unlike full auto, you can use any solenoid for semi.

I actually prefer motors over solenoids for full auto only games but, it depends on the mechanism. With a decent motor and a brass knocker mechanism you can get a much better full auto effect. The recoil mechanism in the Konami Teraburst rifles is the best I have seen:

(https://i.postimg.cc/3WWDPWYG/IMG-4492.jpg) (https://postimg.cc/3WWDPWYG)


If you are handy and creative, adding a brass knocker and maybe a motor upgrade is not too difficult. It's the noise of metal hitting metal that really sells it.
Yes we were. Where did we speak about the aimtrak?

No space on the motor driven lightgun to put anything else sadly, everything is so tightly packed I can't even add a cable in it. Will take pics of it if I have time. I think I will keep this one as it is to play on my CRT.
My other guns already have solenoid/rumble motors double feedback for semi auto and auto. It's not the same of course, but still feels quite good  ;D
The rifle looks very cool. But also way too big.

Well how I'm going to build mine  (assuming I ever get around to it)  is to put all the electronics in a square tube with all the I/o connecting up vid a d-sub on the tube.  For handgun games I'll build a hand gun shell with a solenoid and for full auto I'll have a machine gun shell with a motor.  I think the wiimote method of different shells would help a lot in regards of trying to get one system to do it all.  That or build a second set of guns. 
Sounds good, would love to see what you build.
You could sacrifice one or two digital inputs of the Arduino to automatically detect whatever shell is used.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on November 20, 2019, 01:56:20 pm
Well how I'm going to build mine  (assuming I ever get around to it)  is to put all the electronics in a square tube with all the I/o connecting up vid a d-sub on the tube.  For handgun games I'll build a hand gun shell with a solenoid and for full auto I'll have a machine gun shell with a motor.  I think the wiimote method of different shells would help a lot in regards of trying to get one system to do it all.  That or build a second set of guns.


I kind of do that with my light guns so I can use one recoil gun with multiple gun types and multiple gun shells with one I/O board. For example, Time Crisis arcade guns just have a sensor, trigger and solenoid inside. Instead of wiring them directly to a Guncon 2 pcb, I put a DB9 breakout board so I can hook the gun up to a Guncon 1 and Komami gun pcb too. I've learnt that all light gun sensors are universally compatible and it's just the I/O pcb that differs. Eventually I'll be able go use the TC gun with my Act Labs board and Dreamcast gun too.

You could do the same with your gun (use one pcb for multiple guns) if you don't mount the camera on the pcb. Most arcade recoil guns I have seen don't have much room inside to spare once you add a solenoid. Putting just the camera inside will give you more flexibility in terms of gun choice.

Personally, I wouldn't want removable cameras in a recoil gun. The solenoid or motor tends to shake things around so they are best if hot glued in place (somewhere they won't get hit with a solenoid plunger).

Depending on your budget, a Time Crisis 4 gun shell might suit this IR gun camera best as it's probably similar in size to the one Namco uses.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on November 28, 2019, 10:24:04 pm
@Jaybee, wont quote that long a post  :dunno

But its fine, ---steaming pile of meadow muffin--- happens :D
Meanwhile i did some work on a wii nunchuk breakout board, and i will likely order it soon!
probably together with the wiicam boards.

As for reselling the boards, i actually think it'd be cheaper to order them yourself. jlcpcb has a pretty good offer for your first order.
So i'll doublecheck everything and list the files you need for the order, and maybe even design pcb's for the solenoid :)

Sorry if i missed something, it has been a while since i wrote the last post.

But if you get the chance to put both the shells in a scanner with a ruler along the side. preferrably 1 shell per image.
I can design a pcb that just fits the gun.

That goes for any gun, so lets get some scans :D I'll do one for my 2nd hyper blaster.
Im in no rush however, as the ir leds have yet to arrive :(
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: lightgungamer on December 17, 2019, 06:22:13 am
I’ve been looking for some good leds for this project. It’s hard to find wide angle ones in the uk.

Does anyone know if these would be good?
They aren’t the same wavelength as recommended but I think the camera supports it.

https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F264301195521
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on December 24, 2019, 01:47:33 am
I’ve been looking for some good leds for this project. It’s hard to find wide angle ones in the uk.

Does anyone know if these would be good?
They aren’t the same wavelength as recommended but I think the camera supports it.

https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F264301195521

I guess those leds should be seen by the camera as well?
That's actually one the issues that slow down the development of my firmware, finding good working leds that work correctly from any angle. Since my system supports better angle/precision/distances than any 2 leds system, I need to find leds that work well enough for it from any place and distance. I tested many, with various success.
If this one works for you, please tell me  ;)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on December 24, 2019, 03:32:15 pm
Not sure if this helps but, on the Sega Type 2 /Namco arcade IR guns, the led boards are designed to allow users to bend individual LEDs to face the desired direction to deal with any issues related detection angles. You often see Led boards from games with larger screens with the corner LEDs bent to face inwards.

The Guncon 3 also has LEDs facing different directions so maybe this is a better way of dealing with detection angle issues than trying to source "wide angle LEDs".

The Extreme IR bar sold by ArcadeGuns claims to have wider angle LEDs  that let users play at more extreme angles or closer to the screen. One of the guys on this forum bought one and reported that it made no difference. Perhaps "wide angle LEDs" is just marketing bullsh*t....

Most people play light gun games in front of the screen anyway. It's probably best to just use any LEDs that work to get it up and running. Nobody is going to be able to tell you which LEDs work best for this as it's all new.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on December 29, 2019, 08:54:53 am
Not sure if this helps but, on the Sega Type 2 /Namco arcade IR guns, the led boards are designed to allow users to bend individual LEDs to face the desired direction to deal with any issues related detection angles. You often see Led boards from games with larger screens with the corner LEDs bent to face inwards.

The Guncon 3 also has LEDs facing different directions so maybe this is a better way of dealing with detection angle issues than trying to source "wide angle LEDs".

The Extreme IR bar sold by ArcadeGuns claims to have wider angle LEDs  that let users play at more extreme angles or closer to the screen. One of the guys on this forum bought one and reported that it made no difference. Perhaps "wide angle LEDs" is just marketing bullsh*t....

Most people play light gun games in front of the screen anyway. It's probably best to just use any LEDs that work to get it up and running. Nobody is going to be able to tell you which LEDs work best for this as it's all new.

You're right, turning the leds in a better angle does helps a bit.
The issue comes when we are doing 2 players games, if one is too much on the side, the IR cam starts to have problem picking up the leds.
For the leds, I found quite powerful one but with bad angles, and ones with good angles but pretty terrible distance.
In a way, wide angle leds isn't just marketing, different leds do have different angles (you can actually test them with a digital cam), but more angle means less concentrated light, so less power.
I tried to combine few high power leds with various angles in one spot, and they kind of work but tend to produce a lot of heat (and takes a lot of current as well).
Still, will continue to look into the combined led solution, as it seems one single wide angle led doesn't do the trick.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: thet0ast3r on December 29, 2019, 09:17:52 am
Have you tried with putting something infront of the led that makes it more wide-angle? like maybe just a thin sheet of paper or similar?

the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on December 29, 2019, 10:33:16 am
Have you tried with putting something infront of the led that makes it more wide-angle? like maybe just a thin sheet of paper or similar?

the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.
That's a good suggestion, I might try to see how it will react with a kind of half sphere filter.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on December 29, 2019, 01:42:59 pm
Have you tried with putting something infront of the led that makes it more wide-angle? like maybe just a thin sheet of paper or similar?

the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.
That's a good suggestion, I might try to see how it will react with a kind of half sphere filter.

That probably won't help (although it's worth trying). It's not possible to spread out a beam of light without reducing it's brightness. Diffusers waste a lot of light by sending it in all directions. The problem is somewhat solved in the projector screen business with dual micro-lens layers. A fresnel lens focuses light while a lenticular lens sends it left and right but not up or down (as nobody sits on the ceiling). Luckily, there are simpler solutions for IR guns...

When you bend LEDs to face the camera better, you don't have to bend all of them. You can place two or three in each position and face them in different directions (like on the Guncon 3). Then a slightly smokey plexiglass shield would stop the camera seeing three different LEDs (without over-diffusing).

Another option would be to place the LEDs closer together. The Guncon 3 seems to work just as well on my 77" TV where the LED cable isn't long enough to position them at the screen edge.

Or some kind of wide angle lens on the camera itself.

Personally, I think this issue is best solved by replacing the camera with an IR sensor like the Sega and Namco arcade guns. Having used their gun set-up at home for a few weeks now, I can see that it would make a far easier diy project than a camera solution. It's incredibly simple and effective. The LEDs mark the screen edge and the sensor measures proximity from that edge. Then it outputs 5v when facing one edge and goes down to 0v at the opposite edge. It may even be possible to hack a pair of 5 channel IR line follower sensors.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on December 29, 2019, 08:44:56 pm
I don't think an ir-sensor based solution is out of the question... the problem seems to be that nobody can find the sensors other than just buying the arcade guns.  If a robust avr, say a teensy, was used to build the kit it should be fairly trivial to blink some leds in sequence and read the values as they are turned on.  The thing is.. what kind of equation are they using to get the x/y?  I'm sure it's some kind of triangulation, but could any of us code something good enough to get a similar result?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on December 30, 2019, 04:10:26 am
I don't think an ir-sensor based solution is out of the question... the problem seems to be that nobody can find the sensors other than just buying the arcade guns.  If a robust avr, say a teensy, was used to build the kit it should be fairly trivial to blink some leds in sequence and read the values as they are turned on.  The thing is.. what kind of equation are they using to get the x/y?  I'm sure it's some kind of triangulation, but could any of us code something good enough to get a similar result?
I surely could code that, with the triangulation calculations I made for the 4 led system, adapting the logic to an IR sensor shouldn't be that hard.
But like what you said, I have no idea where to get those for cheap, neither how to interface them with a teensy.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on December 30, 2019, 01:03:07 pm
I don't think an ir-sensor based solution is out of the question... the problem seems to be that nobody can find the sensors other than just buying the arcade guns.  If a robust avr, say a teensy, was used to build the kit it should be fairly trivial to blink some leds in sequence and read the values as they are turned on.  The thing is.. what kind of equation are they using to get the x/y?  I'm sure it's some kind of triangulation, but could any of us code something good enough to get a similar result?

I'm fairly confident I understand how the Sega type 2 guns work now. The most important thing is that the BD gun sense board does not calculate coordinates or employ any sort of complex algorithm that is beyond our capabilities. Aside from the digital buttons, the only output is a variable voltage (0-5v).

If you connected the X or Y and ground output to a small light bulb, moving the gun's aim from the left to right of the screen would act like a dimmer switch. Matching that voltage to a screen position is all done in Windows (or the arcade PCB) and accuracy is dependent on how well you (manually) calibrate. All the work required to translate voltage to screen coordinates has already been done for us. Our challenge is how to make a device output 0v when you aim at one screen edge and gradually rise to 5v as you move your aim to the opposite edge.

The next part is understanding how the Sega and Namco gun sensor (AKA light receiving unit) works. You can see the original design and description on their website (use Google translation):

http://www.ohmic.co.jp/cat/zahyou-01.html

Note how the original design used just 4 IR led boards. Not sure why it became 12 and then 10.

If you remove the IR shield from the Sega and Namco guns you see this type of sensor:

(https://i.postimg.cc/R30DhQXs/ir-sensor-2-1.jpg) (https://postimg.cc/R30DhQXs)

I've been trying to identify what sensors like this actually do and as far as I can tell, they reflect the IR light from the LEDs and measure how long it takes for it to return so they can calculate distance, speed or proximity. Similar tech used by police to catch you speeding.

I can't pretend to understand how IR proximity or distance sensors work. I can just see that, with Sega and Namco guns, the X Y voltage reads 0v, 0v, when I aim towards LED board 5 (top left corner). When I move the gun's aim across to board 9 (top right), the needle on my analog volt meter rises to 5v. If I stop at board 7 or 2 (the center), it reads 2.5v.

I think a good place to start for research is the 5 channel IR Arduino line-followers with analog and digital output options (so they can work as an analog joystick or an optical mouse). Check out this video and imagine hacking that device to space the IR channels evenly across the screen and possibly having a second 5 channel array for the Y axis.

https://www.youtube.com/watch?v=KeXoS4568w0

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on December 30, 2019, 01:55:47 pm
I'm pretty sure the logic board is taking the 12 readings it gets from each led and processing with via calculations those readings into the analog signals you mentioned, so no, the calculations ARE necessary unless you know something I don't.  It actually says so in the first sentence of the page you linked to.  The reason that it does this is so that the gun operation is completely separate from the game pcb, so the gun tech can be swapped out as the years roll on and still be used as a replacement for older games.  The calculations might be rather complex considering they have a dedicated cpu just to do them.... then again those boards are pretty old and a beefy avr might be just as powerful.  I would think that in the gun would have four ir sensors so that the difference between both x (left and right sensors) and y (top and bottom sensors).  The thing is it looks like there are only two.  I'm lost on that one as I can't figure out how the vertical position could be detected that way.  The multiple led boards might have to do with the resolution.  It could be that the horizontal resolution of the sensor is rather poor, so it has to be checked a section of the screen at a time.  That would explain the 20ms response time and the leds turning on in sequence. 

We might be able to dumb it down... buy four light sensors, throw them in a gun and put four leds around a screen.  We really need someone that knows about these types of sensors. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on December 30, 2019, 02:57:12 pm
It's true that the system is stand-alone but what it outputs is no more complicated than an analog joystick. You can actually use an analog stick to control Sega type 2 gun games. All the work to translate voltage to coordinates is done on the other side. You need to physically tell windows which voltages = the screen edge.

It also relies heavily on the screen out feature (digital button 3 on my UHID) to know when to stop tracking. It loses all accuracy when I disconnect the screen-out cable.

The gun sense boards are big but most of the space is taken up with voltage regulators, pots and ports. The actual IC chip is fairly small and I am sure you are right that a modern AVR or Arduino could do the same and then some.

I'm wondering if the IC chip from the gun sense boards has already been dumped for one of the emulators. If it has, would someone with your programming knowledge be able to see how it works?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on December 30, 2019, 03:22:02 pm
It's true that the system is stand-alone but what it outputs is no more complicated than an analog joystick. You can actually use an analog stick to control Sega type 2 gun games. All the work to translate voltage to coordinates is done on the other side. You need to physically tell windows which voltages = the screen edge.

It also relies heavily on the screen out feature (digital button 3 on my UHID) to know when to stop tracking. It loses all accuracy when I disconnect the screen-out cable.

The gun sense boards are big but most of the space is taken up with voltage regulators, pots and ports. The actual IC chip is fairly small and I am sure you are right that a modern AVR or Arduino could do the same and then some.

I'm wondering if the IC chip from the gun sense boards has already been dumped for one of the emulators. If it has, would someone with your programming knowledge be able to see how it works?

Unfortunately I don't think the chip has been dumped.  Mame just reads the x/y values from the proper address and I always wondered how exactly they got x/y from a light gun game but now I know.  I need to check one of these nerdy sites that do Arduino projects and see if someone has fooled with light sensors to detect ir leds.  If doing it from scratch finding an appropriate sensor would be the first step. 
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: thet0ast3r on December 30, 2019, 03:35:19 pm
Ok, Zebra. Here we go again.

You removed the IR Shield from the 4 sensors on the tiny pcb that is in the nozzle of the gun. What you also removed, is a rectangular ( maybe/probably square ) iris ( some plastic cap with a square hole in it).
This plastic cap has its opening in the middle of these 4 sensors which are just 4 flat photodiodes. If you shine a light on these photodiodes with the cap on, depending on which angle you shine, the amount of light that hits each individual sensor varies. if you happen to point the light straight at it, all 4 sensors get the same amount of light. The sega ir II system uses this difference in measured brightness to calculate the ANGLE of ONE* light source. This is why the IR diodes mounted on the screen are connected to the pcb, and not just to some power source. The ic`s of the gun system are synced, so that the gun can read all angles of the ir lights ONE after another. With this information ( all angles of all light sources) (and the position of the light sources which is obviously known since they are fixed) the system calculates its 6 degrees of freedom in relation to the screen, and converts the screen coordinates to 2 analog outputs for x and y. It also knows (just like ems topguns) when it is pointed offscreen, and returns that aswell.

I am 99% confident this is the way the ir II system works.

* I do not know how exactly they deal with outside light sources. Maybe they just read the photodiodes while no light is active, and subtract the intensities.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on December 30, 2019, 05:22:10 pm
It's true that the system is stand-alone but what it outputs is no more complicated than an analog joystick. You can actually use an analog stick to control Sega type 2 gun games. All the work to translate voltage to coordinates is done on the other side. You need to physically tell windows which voltages = the screen edge.

It also relies heavily on the screen out feature (digital button 3 on my UHID) to know when to stop tracking. It loses all accuracy when I disconnect the screen-out cable.

The gun sense boards are big but most of the space is taken up with voltage regulators, pots and ports. The actual IC chip is fairly small and I am sure you are right that a modern AVR or Arduino could do the same and then some.

I'm wondering if the IC chip from the gun sense boards has already been dumped for one of the emulators. If it has, would someone with your programming knowledge be able to see how it works?

Unfortunately I don't think the chip has been dumped.  Mame just reads the x/y values from the proper address and I always wondered how exactly they got x/y from a light gun game but now I know.  I need to check one of these nerdy sites that do Arduino projects and see if someone has fooled with light sensors to detect ir leds.  If doing it from scratch finding an appropriate sensor would be the first step.

That's a shame although I guess it's not a surprise as one of the key points of emulators is that they allow you to use regular PC controllers for old games.

I'll ask the guys on the Arcade Projects forum. A lot of them have type 2 gun cabs and the means to dump chips. It's possible someone dumped them to make replacements.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Zebra on December 30, 2019, 05:43:20 pm
Ok, Zebra. Here we go again.

You removed the IR Shield from the 4 sensors on the tiny pcb that is in the nozzle of the gun. What you also removed, is a rectangular ( maybe/probably square ) iris ( some plastic cap with a square hole in it).
This plastic cap has its opening in the middle of these 4 sensors which are just 4 flat photodiodes. If you shine a light on these photodiodes with the cap on, depending on which angle you shine, the amount of light that hits each individual sensor varies. if you happen to point the light straight at it, all 4 sensors get the same amount of light. The sega ir II system uses this difference in measured brightness to calculate the ANGLE of ONE* light source. This is why the IR diodes mounted on the screen are connected to the pcb, and not just to some power source. The ic`s of the gun system are synced, so that the gun can read all angles of the ir lights ONE after another. With this information ( all angles of all light sources) (and the position of the light sources which is obviously known since they are fixed) the system calculates its 6 degrees of freedom in relation to the screen, and converts the screen coordinates to 2 analog outputs for x and y. It also knows (just like ems topguns) when it is pointed offscreen, and returns that aswell.

I am 99% confident this is the way the ir II system works.

* I do not know how exactly they deal with outside light sources. Maybe they just read the photodiodes while no light is active, and subtract the intensities.

Again? Nobody has done this before or we wouldn't be having this discussion.

The pic wasn't mine. I've never taken off my IR shields (the part you call "a plastic cap"). They're Twisted Symphony's pics:

http://solid-orange.com/1643

The exact workings of the system is what we're trying to establish but I'm 99.9% sure it doesn't work how you said. The LED angles are irrelevant to the set-up and the board has no idea of coordinates (or that a screen exists). It doesn't transmit any data at all. It's only output is 0-5v for X and 0-5v for Y. Just like an analog joystick pot. It does this even if it's not connected to a computer. It relies on the user to establish where 0v and 5v is on the screen.

The IR LEDs are used to mark the screen edge for the screen-out feature and as a reference point to track motion inside the perimeter (of LED boards).That is all.


Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Howard_Casto on December 30, 2019, 07:38:00 pm
I'll try one more time, you've had two separate people explain this to you.  The end output is created after processing.  What do you think the cpu on that board is for?  Yes it results in two analog values for x and y but that is just for ease of interface, it has nothing to do with how the sensors work.  If there are indeed 4 photodiodes/transistors on the gun pcb, then it's working as I described before.... it turns on a led (or group of leds), reads all four values to guestimate it's position based upon the differences between those values, then moves to the next led/group of leds.  Then all of the readings are compared and processed via some formula to give the screen position, then that position is converted back to an analog value so it can be interfaced out to the game pcb. Again, back to my original post, the trick is determining what formula they used and what combination of sensors and leds work similar enough for the rig to be replicated.  Someone good at trig (i.e.  not me) could probably put together a formula solution.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on December 31, 2019, 05:56:20 am
I'll try one more time, you've had two separate people explain this to you.  The end output is created after processing.  What do you think the cpu on that board is for?  Yes it results in two analog values for x and y but that is just for ease of interface, it has nothing to do with how the sensors work.  If there are indeed 4 photodiodes/transistors on the gun pcb, then it's working as I described before.... it turns on a led (or group of leds), reads all four values to guestimate it's position based upon the differences between those values, then moves to the next led/group of leds.  Then all of the readings are compared and processed via some formula to give the screen position, then that position is converted back to an analog value so it can be interfaced out to the game pcb. Again, back to my original post, the trick is determining what formula they used and what combination of sensors and leds work similar enough for the rig to be replicated.  Someone good at trig (i.e.  not me) could probably put together a formula solution.
If I understand correctly what has been explained here about this tech, the sensor is only measuring the distance with each led (light one by one in sync), and then calculates the aim with a trig calculation?
It's actually very similar to what I am doing in my arduino sketch, so I guess if someone can find a cheap way to get those sensor, we could maybe make it work?
But to be honest, my IR cam and 4 led system is already on the way to become very reliable and stable, so I'm not sure it's worth the trouble.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: thet0ast3r on December 31, 2019, 06:20:35 am
If I understand correctly what has been explained here about this tech, the sensor is only measuring the distance with each led (light one by one in sync), and then calculates the aim with a trig calculation?
It's actually very similar to what I am doing in my arduino sketch, so I guess if someone can find a cheap way to get those sensor, we could maybe make it work?
But to be honest, my IR cam and 4 led system is already on the way to become very reliable and stable, so I'm not sure it's worth the trouble.

Almost.
The gun does NOT calculate the distance to each single point. It actually calculates the angle/direction of each light relative to the gun, just like the ir camera does in your script. (every pixel of any camera represents just the intensity of light at that specific angle). So after the ir II got the angles (which are the coordinates in your script) it solves the Perspective-n-Point problem, just like the ems topgun and your script does.

I think no lightgun measures any distances to anything. Even if it did, the distance alone wouldn`t give any valuable information. if you only know the distances to 3 fixed points, you can only calculate where the gun is, not where the gun is pointing at, and we want the latter. Think about that, @Zebra.

Happy New year, till 2020 guys :)

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on December 31, 2019, 06:57:29 am
If I understand correctly what has been explained here about this tech, the sensor is only measuring the distance with each led (light one by one in sync), and then calculates the aim with a trig calculation?
It's actually very similar to what I am doing in my arduino sketch, so I guess if someone can find a cheap way to get those sensor, we could maybe make it work?
But to be honest, my IR cam and 4 led system is already on the way to become very reliable and stable, so I'm not sure it's worth the trouble.

Almost.
The gun does NOT calculate the distance to each single point. It actually calculates the angle/direction of each light relative to the gun, just like the ir camera does in your script. (every pixel of any camera represents just the intensity of light at that specific angle). So after the ir II got the angles (which are the coordinates in your script) it solves the Perspective-n-Point problem, just like the ems topgun and your script does.

I think no lightgun measures any distances to anything. Even if it did, the distance alone wouldn`t give any valuable information. if you only know the distances to 3 fixed points, you can only calculate where the gun is, not where the gun is pointing at, and we want the latter. Think about that, @Zebra.

Happy New year, till 2020 guys :)


Thanks for the info, makes more sense now!
Actually you can calculate an estimation of the aim with only 3 LEDs, but only if you already detected which one is which, but yeah it's not very precise.

Right now what I am solving is the gun tilting that don't work well for more than 30° tilt on my system (because of the lack of tilt sensor). I found a trick for that, so with this update this system should work in any situation, any angle, any tilt, and a very reduced distance from the screen. All that without needing any calibration of course  :lol

Happy New Year guys, hope this year will be as full as interesting dev as the last one  :cheers:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 07, 2020, 07:10:51 am
could someone post a tutorial with photos and links of the precise components to buy? In particular
4 powerful 940nm IR LEDs with angle wide enough (at least 30 °) and
resistors, are they the same as samco project? 4x 100 ohm Resistors ? 4x Super-bright 5mm IR LED - 940nm  20 or 30 degree beam width ?

thanks a lot guys :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 12, 2020, 05:10:27 am
Finally recieved my 5mm 940nm leds :D
And can confirm that they do work fine from at least 1 meter.
However this was with the old 2 point sketch, so i have yet to test the 4 point version.

I found by experimenting, that 3 leds in series, with a switching step-down regulator set at 3.8V works fine, even though their max rated voltage is 1.4v per led.
I 3D printed a small part to house the leds (first with 4 leds spaced too far from each other) which i will share on my github, which will be updated today with the model (stl and fusion360) along with my pcb designs.
https://github.com/Mysli0210/Liightgun (https://github.com/Mysli0210/Liightgun)


@Jaybee sent you a PM :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 13, 2020, 07:06:20 am
Finally recieved my 5mm 940nm leds :D
And can confirm that they do work fine from at least 1 meter.

@Mysli0210  can you post a link for buy your led ?
thanks :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on January 13, 2020, 08:44:21 am
Finally recieved my 5mm 940nm leds :D
And can confirm that they do work fine from at least 1 meter.
However this was with the old 2 point sketch, so i have yet to test the 4 point version.

I found by experimenting, that 3 leds in series, with a switching step-down regulator set at 3.8V works fine, even though their max rated voltage is 1.4v per led.
I 3D printed a small part to house the leds (first with 4 leds spaced too far from each other) which i will share on my github, which will be updated today with the model (stl and fusion360) along with my pcb designs.
https://github.com/Mysli0210/Liightgun (https://github.com/Mysli0210/Liightgun)


@Jaybee sent you a PM :)
Finally recieved my 5mm 940nm leds :D
And can confirm that they do work fine from at least 1 meter.

@Mysli0210  can you post a link for buy your led ?
thanks :)
could someone post a tutorial with photos and links of the precise components to buy? In particular
4 powerful 940nm IR LEDs with angle wide enough (at least 30 °) and
resistors, are they the same as samco project? 4x 100 ohm Resistors ? 4x Super-bright 5mm IR LED - 940nm  20 or 30 degree beam width ?

thanks a lot guys :)
Actually it's on the work right now, I've finally found a pretty good solution that works well in any situation.
I will post it soon, but here what you will need for a good setup:
- 8* SID1K10CM led or similar specs (they have an angle of only 30° but are very powerful)
- 4* 56ohms 1/4watts resistor
- 4* very small soldering boards or something similar
- 1* USB plug
- enough wire to connect each IR point to the next one

Basically the idea is that instead of getting a wide range angle led but having a pretty bad useful distance, I combine two led for each point, very slightly angled vertically to greatly improve angle.
If the LEDs are close enough from each other, the cam will see only one point, even from close distance without filter.
So each point consists in two LEDs and one resistor in series, which are then connected directly to the 5V USB power.
The total consumption of the whole 4 point system is around 200mA, so any USB power should work.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 13, 2020, 10:30:38 am
All of the above
I got these, actually nothing special.
https://www.aliexpress.com/item/32755919314.html (https://www.aliexpress.com/item/32755919314.html)
EDIT: i dont recommend this seller, due to more than 2 months delivery time (did receive several packages ordered after leds, before they arrived)

The most important things I can think of are as follows:
Correct wave lenght, being 940nm. (think of how far your tv remote reaches! )
ViewAngle ofcourse.
Correct ir pass through filter (probably the one on the df-robot cam is, the filter on the wiimote does a huge difference, without it it even tracks my lamps with 2 spots)
and last but not least the spotsize!

This is why I used 3 leds aimed slightly towards each other (it theoretically has a spread of 45 deg to either side)
I shared the fusion 360 file for my led mount on github.

As far as electronics goes, if you want low power consumption, ditch the resistors and finely adjust the voltage to be within spec of the led.
For example this:
https://aliexpress.com/item/32899665271.html (https://aliexpress.com/item/32899665271.html)
The reason being that the resistors just burn off the excess voltage to the point where the led won't pull too much current.

Took 2 pics of these after mounting them, will take more when I have printed some more of these led mounts (might add them to the telly)

JayBee if you could send me the sketch so I can change the pins to fit my gun as is, I'll test it thoroughly today  ;D
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 13, 2020, 11:30:44 am
Actually it's on the work right now, I've finally found a pretty good solution that works well in any situation.
I will post it soon, but here what you will need for a good setup:
- 8* SID1K10CM led or similar specs (they have an angle of only 30° but are very powerful)
- 4* 56ohms 1/4watts resistor
- 4* very small soldering boards or something similar
- 1* USB plug
- enough wire to connect each IR point to the next one

Basically the idea is that instead of getting a wide range angle led but having a pretty bad useful distance, I combine two led for each point, very slightly angled vertically to greatly improve angle.
If the LEDs are close enough from each other, the cam will see only one point, even from close distance without filter.
So each point consists in two LEDs and one resistor in series, which are then connected directly to the 5V USB power.
The total consumption of the whole 4 point system is around 200mA, so any USB power should work.

@JayBee thanks a lot, Great!
in the tutorial you will also put the diagram and components for the recoil circuit?
I will wait for it to start ;)

I forgot ... this card is ok for your project?

https://www.adafruit.com/product/3677
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on January 13, 2020, 12:13:46 pm
JayBee if you could send me the sketch so I can change the pins to fit my gun as is, I'll test it thoroughly today  ;D
For different reasons I decided I won't share the sketch, just the firmware for the Atmega32u4 5V/16MHz (the ItsyBitsy boards miss some functionalities needed for this system to work flawlessly).
@JayBee thanks a lot, Great!
in the tutorial you will also put the diagram and components for the recoil circuit?
I will wait for it to start ;)

I forgot ... this card is ok for your project?

https://www.adafruit.com/product/3677
I will share the diagrams later when I finally find the time to do them.
Only the Atmega32u4 5V/16MHz work with my firmware, the other boards miss some functionalities.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 13, 2020, 12:35:31 pm
Only the Atmega32u4 5V/16MHz work with my firmware, the other boards miss some functionalities.

yes, of course, this board is: The ItsyBitsy 32u4 5V 16MHz and this specifications is the same?

ATmega32u4 onboad chip in QFN package
5V power and logic, 16MHz clock rate, 2KB RAM and 28K FLASH
USB bootloader with a nice LED indicator, AVR109 compatible (same as Flora, Feather 32u4, Leonardo, etc)
Micro-USB jack for power, USB uploading and debugging, you can put it in a box or tape it up and use any Micro USB cable for when you want to reprogram.
Can act as a USB HID Keyboard, Mouse, MIDI or plain USB 'CDC' serial device (default)
On-board 5.0V power regulator with 150mA output capability and ultra-low dropout. Up to 16V input, reverse-polarity protection, thermal and current-limit protection.
Low current 3.3V regulator output from chip, for small sensors
Power with either USB or external output (such as a battery) into VBAT pin - it'll automatically switch over
On-board red pin #13 LED
23 GPIO total - 6 analog in, 1x SPI port, 1x I2C port, 1x Hardware Serial port and 10 more GPIO, 4 of which have PWM
Can drive NeoPixels, connect to sensors, servos, etc.
Reset button for entering the bootloader or restarting the program.

thanks :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 13, 2020, 01:18:37 pm
JayBee if you could send me the sketch so I can change the pins to fit my gun as is, I'll test it thoroughly today  ;D
For different reasons I decided I won't share the sketch, just the firmware for the Atmega32u4 5V/16MHz (the ItsyBitsy boards miss some functionalities needed for this system to work flawlessly).
Well, i was kind of waiting for you to share it with me, not the general public. As you told me you would earlier.
and I know about the itsy not being the same, I get that.
But I do have the atmega32u4 5v @16 MHz. And as we talked about I could help optimize the code and add functionality to it. Like having the option to add a nunchuck for the extra buttons. Even designed the pcb's for this exact purpose.

But I guess I'll have to rewire my entire gun due to this then  :banghead:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 13, 2020, 01:44:21 pm
Only the Atmega32u4 5V/16MHz work with my firmware, the other boards miss some functionalities.

yes, of course, this board is: The ItsyBitsy 32u4 5V 16MHz and this specifications is the same?

ATmega32u4 onboad chip in QFN package
5V power and logic, 16MHz clock rate, 2KB RAM and 28K FLASH
USB bootloader with a nice LED indicator, AVR109 compatible (same as Flora, Feather 32u4, Leonardo, etc)
Micro-USB jack for power, USB uploading and debugging, you can put it in a box or tape it up and use any Micro USB cable for when you want to reprogram.
Can act as a USB HID Keyboard, Mouse, MIDI or plain USB 'CDC' serial device (default)
On-board 5.0V power regulator with 150mA output capability and ultra-low dropout. Up to 16V input, reverse-polarity protection, thermal and current-limit protection.
Low current 3.3V regulator output from chip, for small sensors
Power with either USB or external output (such as a battery) into VBAT pin - it'll automatically switch over
On-board red pin #13 LED
23 GPIO total - 6 analog in, 1x SPI port, 1x I2C port, 1x Hardware Serial port and 10 more GPIO, 4 of which have PWM
Can drive NeoPixels, connect to sensors, servos, etc.
Reset button for entering the bootloader or restarting the program.

thanks :)

Well it's the same chip, so no magic difference there.
the only 2 things that might differ, but not matter is the bootloader might be different, though entirely not needed if you flash via an external programmer, as with any avr chip. And the physical location of the pins may differ on a different board.
But I reckon most people would get the pro micro clones as they're super cheap.
However i do believe that it would be entirely possible to use an stm32 at half the price , or even a esp32 when they release libraries to make it a Bluetooth hid joypad/mouse (keyboard is already possible)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: PL1 on January 13, 2020, 03:24:56 pm
Well it's the same chip, so no magic difference there.
the only 2 things that might differ, but not matter is the bootloader might be different, though entirely not needed if you flash via an external programmer, as with any avr chip. And the physical location of the pins may differ on a different board.
But I reckon most people would get the pro micro clones as they're super cheap.
Cheap is good, but an ItsyBitsy 32u4 might be a better choice for JayBee's firmware than a Pro Micro due to the number of 32u4 ports not connected.

  ItsyBitsy doesn't have connections for two ports (pins) -- B0 (8 ) and D5 (22).  Schematic here (https://cdn-learn.adafruit.com/assets/assets/000/049/818/large1024/development_boards_itsy5v.png?1514957571).
(https://images-na.ssl-images-amazon.com/images/I/51mf50BR-UL.jpg)

  Pro Micro doesn't have connections for seven ports (pins) -- B0 (8 ), D5 (22), B7 (12), C7 (32), D6 (26), F1 (40), and F0 (41).
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=149895.0;attach=360710;image)

the ItsyBitsy boards miss some functionalities needed for this system to work flawlessly
Does your firmware use any of the unconnected ports (pins) mentioned above, JayBee, or are the "functionalities" you mentioned something else?   :dunno


Scott
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 13, 2020, 05:04:25 pm
Cheap is good, but an ItsyBitsy 32u4 might be a better choice for JayBee's firmware than a Pro Micro due to the number of 32u4 ports not connected.

  ItsyBitsy doesn't have connections for two ports (pins) -- B0 (8 ) and D5 (22).  Schematic here (https://cdn-learn.adafruit.com/assets/assets/000/049/818/large1024/development_boards_itsy5v.png?1514957571).

  Pro Micro doesn't have connections for seven ports (pins) -- B0 (8 ), D5 (22), B7 (12), C7 (32), D6 (26), F1 (40), and F0 (41).

Does your firmware use any of the unconnected ports (pins) mentioned above, JayBee, or are the "functionalities" you mentioned something else?   :dunno


Scott

I just went through all the pins specified in the original post, they are all found on the pro micro.

The ones you mention that the pro micro is missing are used for the following (taken from the atmega32u4 spec sheet)
http://ww1.microchip.com/downloads/en/devicedoc/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf (http://ww1.microchip.com/downloads/en/devicedoc/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf)

PB0 Used for the RX led on the board.
PB7 Digital GPIO pin, found on arduino leonardo, skipped on pro micro due to the board being scaled down (no special functionality)
PC7 Digital GPIO pin, found on arduino leonardo, skipped on pro micro due to the board being scaled down has some Timer and high-speed PWM functionality (which is most likely not needed)
PD5 is used for the TX led on the board.
PD6 This is ADC9, it has some timer input functionality, but its probably not of much use. it is found on arduino leonardo, so again skipped.
PF0 This is ADC0, not a gpio pin, can only be used for reading analog voltages.
PF1 This is ADC1, not a gpio pin, can only be used for reading analog voltages.

Another thing is, this setup with one pin per button is an unneeded luxury.
I could easily design a breakoutboard for the cheap pro micros, which could be labeled for all the buttons and have up to 8 buttons per analog pin.

I also think its a slippery slope, not keeping it open-source, since guys like samco, did make his project open on github, which is neat, cause we'd then be able to develop it much further, should JayBee set aside the project at some point.

Look im all for having a pre-compiled image, that people can just flash on specific boards and follow a simple guide, but those of us whom are tinkerers, should be able to customize it to their needs, which in turn could become features on newer versions.

Heck i'd even be willing to send you some of the boards when i get around to ordering them (pay for shipping ofc).

Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 13, 2020, 06:07:35 pm
So I decided that I had nothing better to do than rewire the gun and can confirm that tracking works at at least 3 meters (that's how long a cable I have) that's with the 3 led spots I made. No interference from other lights like the buttons on my arcade.

But as you might remember I didn't use the df robot camera but the wiimote one instead.
So it does not have a housing that I can just rotate, mine is locked in with glue.
the problem is that the entire coordinate system is mirrored which is the same as being rotated 180 deg.
  :dizzy:
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: PL1 on January 13, 2020, 08:11:58 pm
I just went through all the pins specified in the original post, they are all found on the pro micro.
Sounds good.   ;D

The question still stands:  What are the missing "functionalities" that JayBee referenced that would prevent using his firmware on a different 32u4 board?   :dunno

I also think its a slippery slope, not keeping it open-source, since guys like samco, did make his project open on github, which is neat, cause we'd then be able to develop it much further, should JayBee set aside the project at some point.

Look im all for having a pre-compiled image, that people can just flash on specific boards and follow a simple guide, but those of us whom are tinkerers, should be able to customize it to their needs, which in turn could become features on newer versions.
I agree that open-sourcing the project would be great.

If open-source is not an option, having the pre-compiled firmware use port connections that are available on all of the commonly-available 32u4 boards (like this firmware appears to do) increases usability.   :cheers:

Here's a handy chart to translate Arduino markings into 32u4 pins and ports.   ;D
- You may want to do something similar, JayBee, since some of the "Pin number" markings (A6-A9, A10) in the OP don't appear on these common 32u4 Arduino boards.


Scott
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on January 13, 2020, 09:03:07 pm
So to answer to your questions:
The main compatibility problem is that most model of itsybitsy don't have NAND storage, which is needed to store important calibrations data. (Not sure about all model tho)
Beside that for optimization purpose most of the library I use are especially written to work on the Atmega32u4, and won't work on other ones (the joystick mode for instance).
Although I never tried on the ItsyBitsy 32u4 specifically, which seems to be a clone to the itsybitsy 32u4? If it's a clone it should work as is.
The main reasons I choose the Atmega32u4 is that it's dirt cheap, has more than enough power and pins for this use, and has way more resources available than any other models.

Now the reason why I decided to not share the code;
I was indeed thinking about sharing it too like Samco did.
I did it for my 2 points sketch that added many more functions than his.
But you have to know that my sketch is massively different, way bigger and more complex. It took me hundred of hours to pull off the complex math needed to accurately and smoothly triangulate the aim position no matter the number of points (1~4), while taking care of other functions like rumble or recoil, all without any added lag or slowdowns.
With all the numerous functionalities I added and am still adding, this solution is pretty much the most advanced in the market, sinden included, thanks to the auto calibration, the ultra low latency (5~7ms), and the plug and play aspect (no need to have a video processing device a special tool/driver or anything else).
But I've worked as a dev long enough to know that if I release the sketch in the wild, there will always be people using that code to improve their own product or sell new ones. I definitely don't want people to make money on it.
So unless you know a way for me to protect my code, I won't share it  :embarassed:

But if you guys want I can still make other firmwares compatible with different device or pinout.

So I decided that I had nothing better to do than rewire the gun and can confirm that tracking works at at least 3 meters (that's how long a cable I have) that's with the 3 led spots I made. No interference from other lights like the buttons on my arcade.

But as you might remember I didn't use the df robot camera but the wiimote one instead.
So it does not have a housing that I can just rotate, mine is locked in with glue.
the problem is that the entire coordinate system is mirrored which is the same as being rotated 180 deg.
  :dizzy:
You mean mirrored with my sketch? Or just as is? Did you test with samco's test sketch?
The DF Robot cams have a big tilts issue, they aren't correctly oriented.
But if you tell me how the axises are reversed I can make another firmware without the df robot inversion.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: PL1 on January 13, 2020, 10:41:37 pm
The main reasons I choose the Atmega32u4 is that it's dirt cheap, has more than enough power and pins for this use, and has way more resources available than any other models.
It certainly is a great little processor.   ;D

Now the reason why I decided to not share the code;
Your code, your choice.  Thanks for sharing the compiled firmware.   :cheers:

But if you guys want I can still make other firmwares compatible with different device or pinout.
Just wanted to check that:

1.) You had considered which ports your firmware used so the maximum number of 32u4 boards are compatible.

Mysli0210 mentioned above that it should work with the limited number of ports available on a Pro Micro, but I'm not able to positively confirm which ports/pins correspond to "A6" thru "A10" in the OP.

2.) You clarified the documentation so anyone using your firmware knows exactly which wire connects to which pin.

For example, according to the OP, "B button" connects to "A6".  Which pin on a Leonardo, Micro, or Pro Micro would that be?  None of the pins on those boards are labeled "A6".   :dizzy:


Scott
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on January 13, 2020, 11:02:20 pm
The pins are pretty much the ones written on the basic Atmega32u4 board, but you can find the corresponding pin numbers in the image attached ;)

Also, I considered using the analog inputs to increase the number of buttons, but it's not really needed, make it more complex, and most importantly if you use both rumble and recoil function, there is no more space to add another circuit inside most gun shells :lol
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: PL1 on January 13, 2020, 11:43:54 pm
That image is the Rosetta Stone for your OP.   :applaud:
- Shows which "pin numbers" go to which pin. (some don't match the marks on the PCB)
- Shows that you're using a Pro Micro. (the specific Arduino you are using is not mentioned in the OP)

Please consider adding that image to the OP so it isn't overlooked here on page 4.


Scott
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 14, 2020, 12:22:04 am
You mean mirrored with my sketch? Or just as is? Did you test with samco's test sketch?
The DF Robot cams have a big tilts issue, they aren't correctly oriented.
But if you tell me how the axises are reversed I can make another firmware without the df robot inversion.

I did try with his sketch way back when I built the gun.
Well both x and y axes, are inverse. Up is down, left is right.
that would be great if you could! As I plan to bring my arcade to the hackerspace today  ;D
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on January 14, 2020, 01:01:21 am
That image is the Rosetta Stone for your OP.   :applaud:
- Shows which "pin numbers" go to which pin. (some don't match the marks on the PCB)
- Shows that you're using a Pro Micro. (the specific Arduino you are using is not mentioned in the OP)

Please consider adding that image to the OP so it isn't overlooked here on page 4.


Scott
Yeah I should have joined it.
The model is actually written in the needed hardware list, "Atmega32u4 5V/16MHz".
This is indeed the pro micro, but there are different variations of it. Most clone of this specific one, no matter the name, will have the same pinout and specs.

Edit: ah I see, some specific boards have a different pinout.
Well I guess it's better to stick to the most common model.
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: PL1 on January 14, 2020, 02:35:47 am
The model is actually written in the needed hardware list, "Atmega32u4 5V/16MHz".
Yeah . . . that's not enough to identify which specific PCB you're using/recommending.   ::)

All of the AVRs in the chart above use that same processor/voltage/frequency combination -- with 5 different pinouts, markings, and board sizes.

Necessary info about the PCB, pinout, and markings is currently not in the OP.

"Arduino Pro Micro Atmega32u4 5V/16MHz" and adding the Rosetta Stone pic would convey that info.


Scott
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 14, 2020, 03:42:43 am
The model is actually written in the needed hardware list, "Atmega32u4 5V/16MHz".
Yeah . . . that's not enough to identify which specific PCB you're using/recommending.   ::)

All of the AVRs in the chart above use that same processor/voltage/frequency combination -- with 5 different pinouts, markings, and board sizes.

Necessary info about the PCB, pinout, and markings is currently not in the OP.

"Arduino Pro Micro Atmega32u4 5V/16MHz" and adding the Rosetta Stone pic would convey that info.


Scott

@PL1 therefore Pro Micro  and Itsy Bitsy 32u4 is the same board but with only different pinouts?
thanks
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 14, 2020, 07:18:38 am
- 8* SID1K10CM led or similar specs (they have an angle of only 30° but are very powerful)

SID1K10CM
I can not find them

the specs of led ir is: 5MM 940NM 200mw/sr 1.3-1.5v 30°  quite right?
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 14, 2020, 08:17:26 am
I do believe you won't need anything specific, except for the wavelength, as mentioned earlier.
I run mine at the lowest voltage that is specified and works at 3 meters distance.
I bet I could go even lower  ;D
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: PL1 on January 14, 2020, 12:39:50 pm
@PL1 therefore Pro Micro  and Itsy Bitsy 32u4 is the same board but with only different pinouts?
The boards are very similar because a 32u4 processor only needs a few supporting components, and none of those change the way that firmware code is handled.

If you look at the ItsyBitsy (https://cdn-learn.adafruit.com/assets/assets/000/049/818/large1024/development_boards_itsy5v.png?1514957571) or Pro Micro (https://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf) schematics, the two main components are an ATMega32u4 processor and a 16 MHz crystal oscillator, both running on 5v.
- The supporting components are a few capacitors, resistors, LEDs, a USB connector, a reset switch (ItsyBitsy), a fuse (Pro Micro), a Zener diode, and a power regulation chip.

The other possible difference between boards is the bootloader.
- It determines which program (AVRDude, FLIP, etc.) you can use to load the firmware into the 32u4, but it won't matter once the firmware is running.

The various 32u4 boards aren't exactly the same, but the firmware can't tell the difference.
- As long as the board fits into your gun shell and you connect the various inputs/outputs correctly, it should work.   ;D


Scott
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 14, 2020, 01:56:20 pm
Did a little testing tonight (rotated my camera 180)
I find that the accuracy is not sufficient to play with.
it seems smooth, but I find that the leds being offset outside the frame of the screen, makes it so that its not scaled 1:1

JayBee, you asked how you could prevent people from earning money off of it.
Well, you can release the project under creative commons CC BY-NC-SA  license
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: JayBee on January 15, 2020, 12:39:28 am
Did a little testing tonight (rotated my camera 180)
I find that the accuracy is not sufficient to play with.
it seems smooth, but I find that the leds being offset outside the frame of the screen, makes it so that its not scaled 1:1

JayBee, you asked how you could prevent people from earning money off of it.
Well, you can release the project under creative commons CC BY-NC-SA  license
Did you put the LEDs right in the border of the screen or on the outside border? For me it's extremely accurate, more than any solution I tested even real light guns on CRT  ;)
But I had to get LEDs good enough to avoid any flickering (and so loss of position).
Creative commons won't prevent anybody to use my code, since there is no way to check if they are using it unless they share it too  :lol
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 15, 2020, 05:30:54 am
I do believe you won't need anything specific, except for the wavelength, as mentioned earlier.
I run mine at the lowest voltage that is specified and works at 3 meters distance.
I bet I could go even lower  ;D

i found these OSRAM SFH 4546  : High Power Infrared Emitters 5mm 940nm 130 mW/sr 1.5 V 100mA  40° deg 12ns
will they work?
and what resistance should i use for these?
always 56 ohms 1/4w?

Thanks a lot guys for support :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: kill_one on January 15, 2020, 05:48:59 am
Did you put the LEDs right in the border of the screen or on the outside border? For me it's extremely accurate, more than any solution I tested even real light guns on CRT  ;)
But I had to get LEDs good enough to avoid any flickering (and so loss of position).

@JayBee on my cab i will have to put the leds on the sides of the crt monitor behind the bezel glass or in front of the sides of the glass? my cabinet is classic arcade cab with crt monitor 15khz hantarex polo slightly inclined, this inclination or
reflections of the glass they can create problems to precision of the gun?

thanks! :)
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 15, 2020, 09:06:55 am
Did a little testing tonight (rotated my camera 180)
I find that the accuracy is not sufficient to play with.
it seems smooth, but I find that the leds being offset outside the frame of the screen, makes it so that its not scaled 1:1

JayBee, you asked how you could prevent people from earning money off of it.
Well, you can release the project under creative commons CC BY-NC-SA  license
Did you put the LEDs right in the border of the screen or on the outside border? For me it's extremely accurate, more than any solution I tested even real light guns on CRT  ;)
But I had to get LEDs good enough to avoid any flickering (and so loss of position).
Creative commons won't prevent anybody to use my code, since there is no way to check if they are using it unless they share it too  :lol
Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.
As for the leds I do think these are perfect for the purpose, as it tracks them fine, but as I said, the scale is just wrong
No you can't, but if you have it licensed you can prove ownership. If you do see the code.

I do have an idea as to how to compensate for the offset.
if you initialize serial, which will respond to numbers which could be percentage of screen width.
With this offset you could just inset the mouse coordinates.

I do know its not easy to program something like this. And still think your work is awesome, even though I can't hit a damned thing  ;D
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: Mysli0210 on January 15, 2020, 09:32:18 am
I do believe you won't need anything specific, except for the wavelength, as mentioned earlier.
I run mine at the lowest voltage that is specified and works at 3 meters distance.
I bet I could go even lower  ;D

i found these OSRAM SFH 4546  : High Power Infrared Emitters 5mm 940nm 130 mW/sr 1.5 V 100mA  40° deg 12ns
will they work?
and what resistance should i use for these?
always 56 ohms 1/4w?

Thanks a lot guys for support :)

The resistance needed is a result of the input voltage and the current being drawn.
so if you got 3 leds of 1.5v each, in series. you can supply the chain with 4.5V raw
(consult the spec sheet of the led to find the right voltage and current)
with many multimeters you can measure what voltage the led starts to conduct current.

Now what the resistor is doing is just drop the voltage by passing current.
You can use calculators like this one
http://led.linear1.org/1led.wiz (http://led.linear1.org/1led.wiz)
However there's a difference between having a single led, having them in series and in parallel
Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
Post by: janderclander14 on January 15, 2020, 01:35:08 pm
    The 4 IR LEDs system is finally here!

    Instead of using the usual 2+ LEDs sensor bar, this system uses one LED in the middle of each side, which allows a far better aiming system overall.
    I also added tons of features, and will keep it updated whenever needed.

    Thanks a lot, JayBee. I was looking for something like this since I tested Hifi's code on a Wiimote.
    May I ask you some questions?
    - I understand the builds you refer are those you describe here: http://forum.arcadecontrols.com/index.php/topic,161192.0.html (http://forum.arcadecontrols.com/index.php/topic,161192.0.html), which use a Namco Guncon 1. But, do you have any experience with a Namco Guncon 2? Do you think the whole build (including the solenoid) could fit in a Guncon 2 considering also the additional buttons it has? I'm particularly interested in using the button under the handle instead of a separate pedal.
    - How do you feed the rumble motors? Do you use the VCC output of the Arduino? or the 5V line of the USB cable? Or do you use a similar driver as the solenoid and an external power supply?
    - Regarding leds, I saw at different places that the optimal led for the Wiimote camera is the Vishay tsal6400. It's a 100mA 25 angle led with UV coating. Since the DF Robot camera seems to be very similar to that of the Wiimote, they may also be adequate.

    Thanks![/list]
    Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
    Post by: Mysli0210 on January 15, 2020, 03:32:30 pm
    Did you put the LEDs right in the border of the screen or on the outside border? For me it's extremely accurate, more than any solution I tested even real light guns on CRT  ;)
    But I had to get LEDs good enough to avoid any flickering (and so loss of position).

    @JayBee on my cab i will have to put the leds on the sides of the crt monitor behind the bezel glass or in front of the sides of the glass? my cabinet is classic arcade cab with crt monitor 15khz hantarex polo slightly inclined, this inclination or
    reflections of the glass they can create problems to precision of the gun?

    thanks! :)
    Well reflections could make some interference. but remember, IR light does not pass through all glasstypes equally.
    my cab, also has a slight incline, which didnt seem to matter at all.
    Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
    Post by: JayBee on January 15, 2020, 08:14:26 pm
    Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.
    As for the leds I do think these are perfect for the purpose, as it tracks them fine, but as I said, the scale is just wrong
    No you can't, but if you have it licensed you can prove ownership. If you do see the code.

    I do have an idea as to how to compensate for the offset.
    if you initialize serial, which will respond to numbers which could be percentage of screen width.
    With this offset you could just inset the mouse coordinates.

    I do know its not easy to program something like this. And still think your work is awesome, even though I can't hit a damned thing  ;D
    Are your TV and games 16/9 or 4/3?
    If it's 16/9 TV with 4/3 content, you have to switch the screen ratio mode by briefly pressing the calibration button once.
    If it's a 4/3 TV, press the button one more time.
    It should magically correct the ratio, no need to manually calibrate or anything ;)
    It's all written in the first post, but I understand that it's confusing.
    For the screen mode you can actually change them automatically  with mamehooker through serial commands, but I haven't finished the tutorial for that.

    For the border even if the led isn't directly on border of the screen, it should still work fine, minus a slight offset on borders that isn't really a problem for old games. And only 10mm should definitely not matter.

    Tell me if it fixes the issue, I will help you until we manage to make it work properly.


    Thanks a lot, JayBee. I was looking for something like this since I tested Hifi's code on a Wiimote.
    May I ask you some questions?
    - I understand the builds you refer are those you describe here: http://forum.arcadecontrols.com/index.php/topic,161192.0.html (http://forum.arcadecontrols.com/index.php/topic,161192.0.html), which use a Namco Guncon 1. But, do you have any experience with a Namco Guncon 2? Do you think the whole build (including the solenoid) could fit in a Guncon 2 considering also the additional buttons it has? I'm particularly interested in using the button under the handle instead of a separate pedal.
    - How do you feed the rumble motors? Do you use the VCC output of the Arduino? or the 5V line of the USB cable? Or do you use a similar driver as the solenoid and an external power supply?
    - Regarding leds, I saw at different places that the optimal led for the Wiimote camera is the Vishay tsal6400. It's a 100mA 25 angle led with UV coating. Since the DF Robot camera seems to be very similar to that of the Wiimote, they may also be adequate.

    Thanks![/list]
    To answer to your questions:
    - one is the guncon 1, the other one is the saturn virtua gun. Of those two I actually prefer the saturn one, since it has far more space for a bigger stronger recoil, and for an Xbox controller rumble motor in the handle. But I am indeed also working on a guncon 2 right now, because like you said the handle button is so convenient. I managed to fit most of the main stuff inside, and all buttons work nicely (even the dpad), but right now I'm struggling to fit a mini solenoid in, which isn't easy to say the least  :banghead:
    - So far I only finished the Virtua Gun rumble, which uses an Xbox rumble motor, and it works amazingly well! It vibrates when reloading or when shooting out of the screen, but I also want to use it for many other feedbacks. I'm using a simple circuit (transistor, kickback diode, resistors...) to feed it with the VCC but control it with another pin. The VCC pin and the UCB VCC are virtually the same beside the VCC pin being limited in current. Reason why I use the Xbox rumble motor specifically since it doesn't take so much of it. Right now I'm still experimenting with it, in the end I want to be able to do different rumble effects. For the smaller shells like the GC1&2, I'm planning to use small wiimote rumble motors that I will stick inside the handle, but it's still too early to say how well it will work.
    - yeah it will probably work too  ;D The one I'm using is mainly because I'm standing a bit far from my TV and most less powerful leds were flickering so much on cam.

    In general the best way to test leds is using dfrobot or Samco's test app to see if the cam is picking up the led smoothly from where you are standing.
    Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
    Post by: janderclander14 on January 16, 2020, 05:33:00 am
    But I am indeed also working on a guncon 2 right now, because like you said the handle button is so convenient. I managed to fit most of the main stuff inside, and all buttons work nicely (even the dpad), but right now I'm struggling to fit a mini solenoid in, which isn't easy to say the least  :banghead:

    Thanks for the details!
    Regarding the mini solenoid, I have used this very tiny solenoid for another project: https://www.aliexpress.com/item/32987722435.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d (https://www.aliexpress.com/item/32987722435.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d)
    It has the convenient feature of working well with a 5V 2amp power supply, so it can be feed with a powered USB line.
    For the controller board, I've used this cheap pre-made one: https://www.aliexpress.com/item/33038728761.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d (https://www.aliexpress.com/item/33038728761.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d)
    It completely decouples the power and control lines, as you can se here: https://bogza.ro/index.php/FR120N_Isolated_MOSFET_MOS_Tube_FET_Relay_Module (https://bogza.ro/index.php/FR120N_Isolated_MOSFET_MOS_Tube_FET_Relay_Module)

    And, regarding the rumble motor, smaller alternatives to the xbox rumble motor could be the rumble modules of the xbox one controller triggers or of the ps3 move. On the contrary to the Wii motor, those have a mini unbalanced weigth and may produce a better effect. These can be found in ebay:

    https://www.ebay.es/itm/Vibration-Rumble-Motor-M10-Replacement-For-Microsoft-Xbox-One-Controller/132845524127?hash=item1eee35d49f:g:IesAAOSwoDlb4EZj (https://www.ebay.es/itm/Vibration-Rumble-Motor-M10-Replacement-For-Microsoft-Xbox-One-Controller/132845524127?hash=item1eee35d49f:g:IesAAOSwoDlb4EZj)
    https://www.ebay.es/itm/2-Units-Handle-Vibration-Rumble-Motor-Motors-Replacement-For-PS3-Move-Controller/122490167409?hash=item1c84fba071:g:d68AAOSwcB5ZFDxl (https://www.ebay.es/itm/2-Units-Handle-Vibration-Rumble-Motor-Motors-Replacement-For-PS3-Move-Controller/122490167409?hash=item1c84fba071:g:d68AAOSwcB5ZFDxl)
    Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
    Post by: Mysli0210 on January 16, 2020, 06:35:48 am
      Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.
      As for the leds I do think these are perfect for the purpose, as it tracks them fine, but as I said, the scale is just wrong
      No you can't, but if you have it licensed you can prove ownership. If you do see the code.

      I do have an idea as to how to compensate for the offset.
      if you initialize serial, which will respond to numbers which could be percentage of screen width.
      With this offset you could just inset the mouse coordinates.

      I do know its not easy to program something like this. And still think your work is awesome, even though I can't hit a damned thing  ;D
      Are your TV and games 16/9 or 4/3?
      If it's 16/9 TV with 4/3 content, you have to switch the screen ratio mode by briefly pressing the calibration button once.
      If it's a 4/3 TV, press the button one more time.
      It should magically correct the ratio, no need to manually calibrate or anything ;)
      It's all written in the first post, but I understand that it's confusing.
      For the screen mode you can actually change them automatically  with mamehooker through serial commands, but I haven't finished the tutorial for that.

      For the border even if the led isn't directly on border of the screen, it should still work fine, minus a slight offset on borders that isn't really a problem for old games. And only 10mm should definitely not matter.

      Tell me if it fixes the issue, I will help you until we manage to make it work properly.

      Well its not a tv, which you would have known if you looked at the pics I uploaded earlier in the thread.
      the screen is actually 5:4 but that's pretty close to 4:3
      It definitely doesn't seem like the aspect ratio is the problem, but rather that 10mm offset.
      On the center of the screen the offset is not felt, but it feels like a gradiently increasing offset the further you get to either edge. Which to me seems logical.

      However I do understand why you'd think 10mm shouldn't matter that much, cause on a large tv, it's a small percentage of the screen size.
      But my screen is only 19"
      Which in 5:4 format is 38cm wide, with an offset of 10cm on either side, this becomes 40cm
      40/38 is 1.05 so therefor there is a 5 percent error on the edges of the screen. In this particular case. [/list]

      EDIT:
      As for mamehooker, i dont use mame at all, i find it running very poorly in retropie, and super confusing to set up properly due to some versions running some games better than others.
      Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
      Post by: JayBee on January 16, 2020, 11:02:32 am
      But I am indeed also working on a guncon 2 right now, because like you said the handle button is so convenient. I managed to fit most of the main stuff inside, and all buttons work nicely (even the dpad), but right now I'm struggling to fit a mini solenoid in, which isn't easy to say the least  :banghead:

      Thanks for the details!
      Regarding the mini solenoid, I have used this very tiny solenoid for another project: https://www.aliexpress.com/item/32987722435.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d (https://www.aliexpress.com/item/32987722435.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d)
      It has the convenient feature of working well with a 5V 2amp power supply, so it can be feed with a powered USB line.
      For the controller board, I've used this cheap pre-made one: https://www.aliexpress.com/item/33038728761.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d (https://www.aliexpress.com/item/33038728761.html?spm=a2g0s.9042311.0.0.dc534c4doWaC1d)
      It completely decouples the power and control lines, as you can se here: https://bogza.ro/index.php/FR120N_Isolated_MOSFET_MOS_Tube_FET_Relay_Module (https://bogza.ro/index.php/FR120N_Isolated_MOSFET_MOS_Tube_FET_Relay_Module)

      And, regarding the rumble motor, smaller alternatives to the xbox rumble motor could be the rumble modules of the xbox one controller triggers or of the ps3 move. On the contrary to the Wii motor, those have a mini unbalanced weigth and may produce a better effect. These can be found in ebay:

      https://www.ebay.es/itm/Vibration-Rumble-Motor-M10-Replacement-For-Microsoft-Xbox-One-Controller/132845524127?hash=item1eee35d49f:g:IesAAOSwoDlb4EZj (https://www.ebay.es/itm/Vibration-Rumble-Motor-M10-Replacement-For-Microsoft-Xbox-One-Controller/132845524127?hash=item1eee35d49f:g:IesAAOSwoDlb4EZj)
      https://www.ebay.es/itm/2-Units-Handle-Vibration-Rumble-Motor-Motors-Replacement-For-PS3-Move-Controller/122490167409?hash=item1c84fba071:g:d68AAOSwcB5ZFDxl (https://www.ebay.es/itm/2-Units-Handle-Vibration-Rumble-Motor-Motors-Replacement-For-PS3-Move-Controller/122490167409?hash=item1c84fba071:g:d68AAOSwcB5ZFDxl)
      Very nice, you've been doing some good research too on the subject  ;D
      Yes my home made control circuit is very similar, however I've been using a n-channel mosfet (IRL540) because I've heard they work better for solenoids with the low current and voltage output of the Arduino. I also use stronger kickback diodes and additional resistors to protect everything.
      I'm not sure it would make a difference with this small low powered solenoid tho, my knowledge in electronic is far more limited than in programming.

      I would say it's worth trying your solution, with the cheap cost of those components.

      Using those small motors is a good idea, I might look into that too! Did you find the specs somewhere?
      I did a quick search but couldn't find any (Size, voltage, current)

      I attached a pic of the motherboard of the GCon2, after being stripped of all unsused components and with the Arduino wires soldered. I lost my paper where I wrote down which point is what, but pretty much the connector on the right contains the gun handle buttons (trigger, reload, d pad) and the common ground, while the other buttons can be taken from other points on the motherboard.
      Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
      Post by: JayBee on January 16, 2020, 11:42:58 am
        Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.
        As for the leds I do think these are perfect for the purpose, as it tracks them fine, but as I said, the scale is just wrong
        No you can't, but if you have it licensed you can prove ownership. If you do see the code.

        I do have an idea as to how to compensate for the offset.
        if you initialize serial, which will respond to numbers which could be percentage of screen width.
        With this offset you could just inset the mouse coordinates.

        I do know its not easy to program something like this. And still think your work is awesome, even though I can't hit a damned thing  ;D
        Are your TV and games 16/9 or 4/3?
        If it's 16/9 TV with 4/3 content, you have to switch the screen ratio mode by briefly pressing the calibration button once.
        If it's a 4/3 TV, press the button one more time.
        It should magically correct the ratio, no need to manually calibrate or anything ;)
        It's all written in the first post, but I understand that it's confusing.
        For the screen mode you can actually change them automatically  with mamehooker through serial commands, but I haven't finished the tutorial for that.

        For the border even if the led isn't directly on border of the screen, it should still work fine, minus a slight offset on borders that isn't really a problem for old games. And only 10mm should definitely not matter.

        Tell me if it fixes the issue, I will help you until we manage to make it work properly.

        Well its not a tv, which you would have known if you looked at the pics I uploaded earlier in the thread.
        the screen is actually 5:4 but that's pretty close to 4:3
        It definitely doesn't seem like the aspect ratio is the problem, but rather that 10mm offset.
        On the center of the screen the offset is not felt, but it feels like a gradiently increasing offset the further you get to either edge. Which to me seems logical.

        However I do understand why you'd think 10mm shouldn't matter that much, cause on a large tv, it's a small percentage of the screen size.
        But my screen is only 19"
        Which in 5:4 format is 38cm wide, with an offset of 10cm on either side, this becomes 40cm
        40/38 is 1.05 so therefor there is a 5 percent error on the edges of the screen. In this particular case. [/list]

        EDIT:
        As for mamehooker, i dont use mame at all, i find it running very poorly in retropie, and super confusing to set up properly due to some versions running some games better than others.
        Dude I did check your photo already, but 1. We can barely see anything in them, and 2. I used TV as a generic term, TV or simple screen doesn't matter on this system.

        What matters is the aspect ratio of the content vs the aspect ratio the screen.
        Since the mouse absolute position (or joystick axises in joystick mode) is relative to the content aspect ratio/resolution, but the aiming detection is relative to the aspect ratio detected with the 4 LEDs.
        So if your content isn't stretched fullscreen, my sketch won't be able to match aiming and cursor position.
        And the center is always in the center of the 4 LEDs no matter the screen or content.

        That's why I added a quick aspect ratio correction switch (with one calibration button push) to prevent this issue and still have accurate aiming without calibration, mainly for 4:3 contents displayed in 16:9 screens.

        Have you tried stretching your games fullscreen for test purpose?
        Send me pics or video of how it behaves in full screen mode.

        I've tested it with a 17" 4:3 screen with ~2cm border, and I had minimal offset on the sides.

        Mamehooker is a Windows app that works independently from Mame. But yes it won't work with retropie. And I agree libretro mame cores are bad, outdated, not optimized and have awful latency.

        I consider adding a forced calibration mode for anybody who has unusual screen ratio or larger borders. It might make it easier to fit any setup, but might also make it easier to mess things up if the calibration isn't done correctly.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: janderclander14 on January 16, 2020, 01:27:54 pm
        Using those small motors is a good idea, I might look into that too! Did you find the specs somewhere?
        I did a quick search but couldn't find any (Size, voltage, current)

        I attached a pic of the motherboard of the GCon2, after being stripped of all unsused components and with the Arduino wires soldered. I lost my paper where I wrote down which point is what, but pretty much the connector on the right contains the gun handle buttons (trigger, reload, d pad) and the common ground, while the other buttons can be taken from other points on the motherboard.

        The specs of the xbox triggers rumble motors can be found here:

        https://www.ebay.es/itm/2pcs-Microsoft-gamepad-Vibration-motor-Large-vibration-DC3V-5V-N10-motor-DIY/323696171526?hash=item4b5dcb9a06:g:yJ4AAOSwMoZcZt9o (https://www.ebay.es/itm/2pcs-Microsoft-gamepad-Vibration-motor-Large-vibration-DC3V-5V-N10-motor-DIY/323696171526?hash=item4b5dcb9a06:g:yJ4AAOSwMoZcZt9o)

        For the PS3 move, I'm not completely sure, but it should be similar to this:

        https://es.aliexpress.com/item/4000220703114.html?spm=a2g0o.productlist.0.0.4bfd4029g7X6tW&algo_pvid=100564c0-dd1c-493b-8f1c-717f4b18bc93&algo_expid=100564c0-dd1c-493b-8f1c-717f4b18bc93-24&btsid=eaeca679-c85d-46de-b2c7-4bade2229f95&ws_ab_test=searchweb0_0,searchweb201602_9,searchweb201603_53 (https://es.aliexpress.com/item/4000220703114.html?spm=a2g0o.productlist.0.0.4bfd4029g7X6tW&algo_pvid=100564c0-dd1c-493b-8f1c-717f4b18bc93&algo_expid=100564c0-dd1c-493b-8f1c-717f4b18bc93-24&btsid=eaeca679-c85d-46de-b2c7-4bade2229f95&ws_ab_test=searchweb0_0,searchweb201602_9,searchweb201603_53)

        In any case, knowing the maximum volume that can be fitted in the handle, it could be possible to find a suitable motor of the many third party ones available in ebay.

        And thanks for the photo of the guncon2! This saves a lot of work finding the pins to solder!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 16, 2020, 10:12:45 pm
        Using those small motors is a good idea, I might look into that too! Did you find the specs somewhere?
        I did a quick search but couldn't find any (Size, voltage, current)

        I attached a pic of the motherboard of the GCon2, after being stripped of all unsused components and with the Arduino wires soldered. I lost my paper where I wrote down which point is what, but pretty much the connector on the right contains the gun handle buttons (trigger, reload, d pad) and the common ground, while the other buttons can be taken from other points on the motherboard.

        The specs of the xbox triggers rumble motors can be found here:

        https://www.ebay.es/itm/2pcs-Microsoft-gamepad-Vibration-motor-Large-vibration-DC3V-5V-N10-motor-DIY/323696171526?hash=item4b5dcb9a06:g:yJ4AAOSwMoZcZt9o (https://www.ebay.es/itm/2pcs-Microsoft-gamepad-Vibration-motor-Large-vibration-DC3V-5V-N10-motor-DIY/323696171526?hash=item4b5dcb9a06:g:yJ4AAOSwMoZcZt9o)

        For the PS3 move, I'm not completely sure, but it should be similar to this:

        https://es.aliexpress.com/item/4000220703114.html?spm=a2g0o.productlist.0.0.4bfd4029g7X6tW&algo_pvid=100564c0-dd1c-493b-8f1c-717f4b18bc93&algo_expid=100564c0-dd1c-493b-8f1c-717f4b18bc93-24&btsid=eaeca679-c85d-46de-b2c7-4bade2229f95&ws_ab_test=searchweb0_0,searchweb201602_9,searchweb201603_53 (https://es.aliexpress.com/item/4000220703114.html?spm=a2g0o.productlist.0.0.4bfd4029g7X6tW&algo_pvid=100564c0-dd1c-493b-8f1c-717f4b18bc93&algo_expid=100564c0-dd1c-493b-8f1c-717f4b18bc93-24&btsid=eaeca679-c85d-46de-b2c7-4bade2229f95&ws_ab_test=searchweb0_0,searchweb201602_9,searchweb201603_53)

        In any case, knowing the maximum volume that can be fitted in the handle, it could be possible to find a suitable motor of the many third party ones available in ebay.

        And thanks for the photo of the guncon2! This saves a lot of work finding the pins to solder!
        The main issue I had with non controller vibration motor is that even if they take only 3~5v, they aren't power efficient enough to work with the Arduino and require an extra power supply to even start (bought few different to test out).
        The available space range from "very few" on the GCon1 to "almost non existent" on the GCon2 :lol
        Joke aside I will try measuring that soon and tell you.
        And yeah I will definitely buy some of those controller motors to test them out and see if they fit inside  ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 17, 2020, 03:54:05 am
        for led 940nm better 25 or 40 degrees?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 17, 2020, 04:25:27 am
        Yes my home made control circuit is very similar, however I've been using a n-channel mosfet (IRL540) because I've heard they work better for solenoids with the low current and voltage output of the Arduino. I also use stronger kickback diodes and additional resistors to protect everything.


        @JayBee pending your tutorial on how to build it, you can make a list of the rest of the components needed to create your homemade circuit?
        thanks a lot :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 17, 2020, 11:49:27 am
        Dude I did check your photo already, but 1. We can barely see anything in them, and 2. I used TV as a generic term, TV or simple screen doesn't matter on this system.

        What matters is the aspect ratio of the content vs the aspect ratio the screen.
        Since the mouse absolute position (or joystick axises in joystick mode) is relative to the content aspect ratio/resolution, but the aiming detection is relative to the aspect ratio detected with the 4 LEDs.
        So if your content isn't stretched fullscreen, my sketch won't be able to match aiming and cursor position.
        And the center is always in the center of the 4 LEDs no matter the screen or content.

        That's why I added a quick aspect ratio correction switch (with one calibration button push) to prevent this issue and still have accurate aiming without calibration, mainly for 4:3 contents displayed in 16:9 screens.

        Have you tried stretching your games fullscreen for test purpose?

        EDIT: As for forced calibration, the one from the 2 point sketch seemed to work perfectly fine, the only real problem i had with the 2 point sketch was that you'd have to be further away from the screen to aim at the opposite side of the screen, from the leds that is.
        Send me pics or video of how it behaves in full screen mode.

        I've tested it with a 17" 4:3 screen with ~2cm border, and I had minimal offset on the sides.

        Mamehooker is a Windows app that works independently from Mame. But yes it won't work with retropie. And I agree libretro mame cores are bad, outdated, not optimized and have awful latency.

        I consider adding a forced calibration mode for anybody who has unusual screen ratio or larger borders. It might make it easier to fit any setup, but might also make it easier to mess things up if the calibration isn't done correctly.

        Well sorry, it must have been misinterpreted, didnt mean any offense.
        As for the content, i tried with rescueshot for psx rendered in 1280x1024 ie. 5:4 in fullscreen.
        but to debug it i just tested it on the desktop of the machine so i could accurately tell what was wrong.
        I get that the mouse coordinates are defined in as absolute coordinates and that the center of the leds are always center of the coordinate system(therefor the individual axis is scaled according to the led position), except for the calibration offset, right?

        I'll get some pics/video taken shortly :D

        EDIT: I dont think forced calibration is a bad thing to have, i mean, what can it fook up?
        on the 2 point sketch, it worked perfectly, IMO the only thing that the 2 point did poorly was track beyond the cameras limits... durrh :D

        On these 4 pics i aim exacly at the border of the screen, as accurately as the ironsights on the gun allows for.


        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 17, 2020, 09:11:02 pm
        Well sorry, it must have been misinterpreted, didnt mean any offense.
        As for the content, i tried with rescueshot for psx rendered in 1280x1024 ie. 5:4 in fullscreen.
        but to debug it i just tested it on the desktop of the machine so i could accurately tell what was wrong.
        I get that the mouse coordinates are defined in as absolute coordinates and that the center of the leds are always center of the coordinate system(therefor the individual axis is scaled according to the led position), except for the calibration offset, right?

        I'll get some pics/video taken shortly :D

        EDIT: I dont think forced calibration is a bad thing to have, i mean, what can it fook up?
        on the 2 point sketch, it worked perfectly, IMO the only thing that the 2 point did poorly was track beyond the cameras limits... durrh :D

        On these 4 pics i aim exacly at the border of the screen, as accurately as the ironsights on the gun allows for.
        Thanks for the pics! And very nice cab by the way  :applaud:
        There is indeed a weird offset between the led and the border, which clearly shouldn't be that high. Do you get to the borders when you aim for the LEDs instead?  :P

        Anyway, I will take some time today to try adding a calibration system.
        But I have one question;
        There are two ways of keeping the calibration data;
        Just save it in the RAM, meaning you have to calibrate every time you plug the gun, like with samco system, or save it in the ROM, meaning it will auto reload every time you plug the gun, the same way as the sensor calibration does. It also means that if you mess up the calibration it will be unusable until you redo it correctly.

        I was thinking of making the screen calibration optional, just after the sensor calibration. And resetting it to zero when you start the calibration then cancel it. What do you think?

        Edit: I updated the firmware with a new screen calibration option that might be useful for you, check the op ;)
        I also updated the post itself to make it cleaner.
        More to come soon.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 18, 2020, 10:39:46 am
        Thanks, it has a few super neat secrets within, which you'll get pics of later  :)
        Yeah i get to border of the screen when I aim for the leds.

        Saving calibration to ROM don't seem like a bad idea, the only negative I can think of is ROM cell wear around 100-200K writes per byte. However I think you could justify getting another pro micro by then... Or we could make it use an external EEPROM via the i2c that the camera already uses and potentially the nunchuck.

        I'll check the new firmware out tonight  :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 18, 2020, 11:05:31 am
        Thanks, it has a few super neat secrets within, which you'll get pics of later  :)
        Yeah i get to border of the screen when I aim for the leds.

        Saving calibration to ROM don't seem like a bad idea, the only negative I can think of is ROM cell wear around 100-200K writes per byte. However I think you could justify getting another pro micro by then... Or we could make it use an external EEPROM via the i2c that the camera already uses and potentially the nunchuck.

        I'll check the new firmware out tonight  :D
        Yeah the eeprom wearing out was one of my concerns for this sketch.
        But I reduced the writing on it only when you successfully do a calibration. I doubt you would do 100k calibrations with your guns  :laugh2:
        That's also why I made a function that allows to switch between 16:9 and 4:3 in 16:9 (with pillarboxes) with one button press, and doesn't write anything in the eeprom.
        Tell me if you need a firmware that is able to work with 4:3 content on 5:3 screen, it's super easy for me to do (just one value to change).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on January 18, 2020, 01:21:26 pm
        This looks like a really awesome project, I'm definitely gonna build one.
        how close can you get to a 55 inch without sacrificing accuracy?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 18, 2020, 04:00:39 pm
        Thanks, it has a few super neat secrets within, which you'll get pics of later  :)
        Yeah i get to border of the screen when I aim for the leds.

        Saving calibration to ROM don't seem like a bad idea, the only negative I can think of is ROM cell wear around 100-200K writes per byte. However I think you could justify getting another pro micro by then... Or we could make it use an external EEPROM via the i2c that the camera already uses and potentially the nunchuck.

        I'll check the new firmware out tonight  :D
        Yeah the eeprom wearing out was one of my concerns for this sketch.
        But I reduced the writing on it only when you successfully do a calibration. I doubt you would do 100k calibrations with your guns  :laugh2:
        That's also why I made a function that allows to switch between 16:9 and 4:3 in 16:9 (with pillarboxes) with one button press, and doesn't write anything in the eeprom.
        Tell me if you need a firmware that is able to work with 4:3 content on 5:3 screen, it's super easy for me to do (just one value to change).

        What you did just works!
        however i do have one annoyance :( the fact that it enumerates as a joystick fooks up my retroarch setup.
        Would it be too much trouble to make a version that only enumerates as a mouse?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 18, 2020, 10:07:25 pm
        What you did just works!
        however i do have one annoyance :( the fact that it enumerates as a joystick fooks up my retroarch setup.
        Would it be too much trouble to make a version that only enumerates as a mouse?
        Glad it worked! ;D
        I see, it makes sense since I have to initialize it even if not using it.
        Can you switch to joystick mode to test if it works better? Joystick mode has the same functionalities as mouse mode, but might be more compatible.
        It seems a bit difficult to delay the initialization of the joystick, so I will either have to do a special version with mouse only or find another way  :P
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 18, 2020, 10:20:08 pm
        This looks like a really awesome project, I'm definitely gonna build one.
        how close can you get to a 55 inch without sacrificing accuracy?
        That's a good question, I definitely have to take some time measuring it  ;D
        The only distance limit for the sketch right now is being able to capture the 4 leds on cam once when pointing the middle of the screen, because it needs to see the 4 leds at least once to auto calibrate it.
        Once calibrated, it can track the aiming down to 1 led (very less accuracy of course, but still works).
        It might change in the future, I am searching a way to implement a rougher calibration with 2 or 3 leds when impossible to see the 4 leds at once.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 19, 2020, 07:39:02 am
        i'm installed arduino ide but in \AppData\Local\Arduino15\

        dir packages not present, 
        do I have to install anything else?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 19, 2020, 08:04:34 am
        Assuming that the dfrobot cam is the same as the wiimote camera (which I think I proved by building my gun with it)
        your 55" screen is around 121.62 cm wide, so according to https://www.wiimoteproject.com/wiimote-whiteboard/wiimote-camera-angles/ (https://www.wiimoteproject.com/wiimote-whiteboard/wiimote-camera-angles/)
        you'd need to be 167.07 cm away from the screen to see the leds on the sides, not accounting for the vertically placed leds.
        But as the vertical leds are placed at half that distance, you'd be able to divide the 167.07 by 2.
        However you're still limited by how far away you can see the vertical leds as the height of the 55" screen is 65.99cm
        which equals 123.13cm.

        So I'd say 1.2 meters would be around the minimum distance you could use it reliably, I might be wrong though 😊

        @kill_one later today i'll provide an alternative guide for flashing the pro micro with avr-dudess which is fewer steps but requires you to enter bootloader mode by shorting the rst (reset) pin to ground (can be done with any small metal object)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: PL1 on January 19, 2020, 11:00:07 am
        i'm installed arduino ide but in \AppData\Local\Arduino15\

        dir packages not present, 
        do I have to install anything else?

        Here are the avrdude install procedures from the miniArcade 2.0 User Guide. (pg 13)
        - Not sure where Bruno originally found the driver for step 2.
        - If you can't find it elsewhere, it is in the miniArcade 2.0 download files here (http://forum.arcadecontrols.com/index.php/topic,154126.msg1615622.html#msg1615622).
        Quote
        Arduino boards:
        1. Install the avrdude programmer.
        Windows:  Files are located in the "avrdude" folder.
        MAC OS:  The recommended way is to install brew as per single liner available from http://brew.sh/ (http://brew.sh/) then install avrdude with:
        brew install avrdude
        Linux:  sudo apt-get install avrdude
        2. Windows only:  Install the Arduino Leonardo/Mini bootloader driver located in the "avrdude\drivers" folder as per the instructions at https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc2 (https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc2)

        Here are the avrdude programming procedures from the miniArcade 2.0 User Guide. (pg 14)
        - Put a copy of JayBee's .hex file in the avrdude folder.  (used in place of "MINIARCADE2.hex")
        Quote
        6. Find the COM port/device assigned to the Arduino bootloader.
        Windows:  In Control Panel -- Devices and Printers, the bootloader port number is displayed in the device description when the board is put in bootloader mode by pressing the reset button (Micro) or double-click grounding RST 2x as described here (https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq). (Pro Micro)
        MAC:  ls /dev/tty.usbmodem*
        Linux:  Can be found via dmesg after pressing the Arduino reset button
        7. Create a "miniArcade2.txt" file in the avrdude directory and insert the text for your OS.
        Windows:  Change "COMX" to the Arduino bootloader port i.e. "COM7"
        Quote
        avrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
        MAC:  Change "tty.usbmodemXXXX" to the bootloader device used by your Arduino i.e. "tty.usbmodem1411"
        Quote
        #!/bin/sh
        avrdude -p atmega32u4 -P /dev/tty.usbmodemXXXX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
        Linux:  Change "ttyACMX" to the bootloader device used by your Arduino i.e. "ttyACM0"
        Quote
        #!/bin/sh
        avrdude -p atmega32u4 -P /dev/ttyACMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
        8. Rename "miniArcade2.txt" to "miniArcade2.bat" (Windows) or "miniArcade2.sh". (MAC or Linux)
        9. MAC or Linux:  "chmod 755 miniArcade2.sh" to set the execution permission bits.
        10. To program the Arduino, launch the .bat/.sh file immediately after pressing the reset button or double-click grounding RST to put the Arduino into programming mode. (the board only stays in programming mode for 8 seconds)

        (https://cdn.sparkfun.com/assets/6/d/3/4/a/523c8e23757b7fbe5f8b4584.png)

        For JayBee's firmware, you don't need to reprogram the EEPROM, so use this for the Windows text in step 7.
        - Change "COMX" to the Arduino bootloader port.
        - Change "MINIARCADE2.hex" to JayBee's .hex file.
        Quote
        avrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -C avrdude.conf


        Scott
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 19, 2020, 07:44:39 pm
        Assuming that the dfrobot cam is the same as the wiimote camera (which I think I proved by building my gun with it)
        your 55" screen is around 121.62 cm wide, so according to https://www.wiimoteproject.com/wiimote-whiteboard/wiimote-camera-angles/ (https://www.wiimoteproject.com/wiimote-whiteboard/wiimote-camera-angles/)
        you'd need to be 167.07 cm away from the screen to see the leds on the sides, not accounting for the vertically placed leds.
        But as the vertical leds are placed at half that distance, you'd be able to divide the 167.07 by 2.
        However you're still limited by how far away you can see the vertical leds as the height of the 55" screen is 65.99cm
        which equals 123.13cm.

        So I'd say 1.2 meters would be around the minimum distance you could use it reliably, I might be wrong though 😊

        @kill_one later today i'll provide an alternative guide for flashing the pro micro with avr-dudess which is fewer steps but requires you to enter bootloader mode by shorting the rst (reset) pin to ground (can be done with any small metal object)
        Your calculations look accurate, thanks  :applaud:
        i'm installed arduino ide but in \AppData\Local\Arduino15\

        dir packages not present, 
        do I have to install anything else?

        Here are the avrdude install procedures from the miniArcade 2.0 User Guide. (pg 13)
        - Not sure where Bruno originally found the driver for step 2.
        - If you can't find it elsewhere, it is in the miniArcade 2.0 download files here (http://forum.arcadecontrols.com/index.php/topic,154126.msg1615622.html#msg1615622).
        Quote
        Arduino boards:
        1. Install the avrdude programmer.
        Windows:  Files are located in the "avrdude" folder.
        MAC OS:  The recommended way is to install brew as per single liner available from http://brew.sh/ (http://brew.sh/) then install avrdude with:
        brew install avrdude
        Linux:  sudo apt-get install avrdude
        2. Windows only:  Install the Arduino Leonardo/Mini bootloader driver located in the "avrdude\drivers" folder as per the instructions at https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc2 (https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc2)

        Here are the avrdude programming procedures from the miniArcade 2.0 User Guide. (pg 14)
        - Put a copy of JayBee's .hex file in the avrdude folder.  (used in place of "MINIARCADE2.hex")
        Quote
        6. Find the COM port/device assigned to the Arduino bootloader.
        Windows:  In Control Panel -- Devices and Printers, the bootloader port number is displayed in the device description when the board is put in bootloader mode by pressing the reset button (Micro) or double-click grounding RST 2x as described here (https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq). (Pro Micro)
        MAC:  ls /dev/tty.usbmodem*
        Linux:  Can be found via dmesg after pressing the Arduino reset button
        7. Create a "miniArcade2.txt" file in the avrdude directory and insert the text for your OS.
        Windows:  Change "COMX" to the Arduino bootloader port i.e. "COM7"
        Quote
        avrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
        MAC:  Change "tty.usbmodemXXXX" to the bootloader device used by your Arduino i.e. "tty.usbmodem1411"
        Quote
        #!/bin/sh
        avrdude -p atmega32u4 -P /dev/tty.usbmodemXXXX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
        Linux:  Change "ttyACMX" to the bootloader device used by your Arduino i.e. "ttyACM0"
        Quote
        #!/bin/sh
        avrdude -p atmega32u4 -P /dev/ttyACMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
        8. Rename "miniArcade2.txt" to "miniArcade2.bat" (Windows) or "miniArcade2.sh". (MAC or Linux)
        9. MAC or Linux:  "chmod 755 miniArcade2.sh" to set the execution permission bits.
        10. To program the Arduino, launch the .bat/.sh file immediately after pressing the reset button or double-click grounding RST to put the Arduino into programming mode. (the board only stays in programming mode for 8 seconds)

        (https://cdn.sparkfun.com/assets/6/d/3/4/a/523c8e23757b7fbe5f8b4584.png)

        For JayBee's firmware, you don't need to reprogram the EEPROM, so use this for the Windows text in step 7.
        - Change "COMX" to the Arduino bootloader port.
        - Change "MINIARCADE2.hex" to JayBee's .hex file.
        Quote
        avrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -C avrdude.conf


        Scott
        Yeah I have to improve the explanation for that in my post, to make it more clear and convenient.
        Also if you don't want or can't use the reset pin, with any program able to access the Arduino com port just open a connection at 1200baud then close it.
        It will automatically trigger a reboot in bootloader mode, same as the rst pin would.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: PL1 on January 19, 2020, 10:20:04 pm
        Yeah I have to improve the explanation for that in my post, to make it more clear and convenient.
        Feel free to use/remix anything I've posted.   :cheers:

        Also if you don't want or can't use the reset pin, with any program able to access the Arduino com port just open a connection at 1200baud then close it.
        It will automatically trigger a reboot in bootloader mode, same as the rst pin would.
        That might be handy for boards like the Pro Micro that don't have an onboard reset button.   ;D

        Maybe it's possible to write a single .bat file that opens a 1200 baud port, pauses long enough to ensure it is open, closes the port, momentarily pauses again, and runs avrdude to program the board.


        Scott
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 20, 2020, 05:01:28 am
        That might be handy for boards like the Pro Micro that don't have an onboard reset button.   ;D

        Maybe it's possible to write a single .bat file that opens a 1200 baud port, pauses long enough to ensure it is open, closes the port, momentarily pauses again, and runs avrdude to program the board.


        Scott
        That's exactly what I was thinking of doing, and include it inside the zip file along with the hex file. Would make it so much more simple, including for me :lol

        Edit3: Ok I managed to do a bat tool to automatically update the arduino!
        Of course it works only if you have just one arduino connected when updating it.
        I will post it right away.

        Edit4: DONE! Now flashing the firmware is as simple as running the bat file  ;D
        That's be great if you guys could test it to see if it works properly for you ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 20, 2020, 01:46:57 pm
        Guess i dont have to create that avr-dudess guide anyways :P

        However, i have a slight problem. and a weird one at that!
        I couldn't use the B button of my pistol in games, as it did the same as the A button. (B set up as start button in retroarch)
        figured it was just the game, but tested in desktop, the startbutton didnt middleclick, it rightclicks.
        the same applies when i try to map the keys in retroarch, it says mouse 2 whatever button i press  :o
        hooked it up to my pc, and fired up an online mousetest, every button is registered as mouse 2.
        which is weird cause when i play rescue shot i can shoot and use the A button for grenade. but cant pause it just selects grenade just as the A button does.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 20, 2020, 07:45:24 pm
        Guess i dont have to create that avr-dudess guide anyways :P

        However, i have a slight problem. and a weird one at that!
        I couldn't use the B button of my pistol in games, as it did the same as the A button. (B set up as start button in retroarch)
        figured it was just the game, but tested in desktop, the startbutton didnt middleclick, it rightclicks.
        the same applies when i try to map the keys in retroarch, it says mouse 2 whatever button i press  :o
        hooked it up to my pc, and fired up an online mousetest, every button is registered as mouse 2.
        which is weird cause when i play rescue shot i can shoot and use the A button for grenade. but cant pause it just selects grenade just as the A button does.
        I just tested my gun with the last firmware, it still has the B button as middle click.
        Which pin is connected to the B button on your gun?
        Be careful, the pedal button pin does have the same function as A button for compatibility purpose.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 20, 2020, 07:53:20 pm
        I've connected the buttons according to your diagram.
        I didnt connect the pedal pin to anything.
        just needed left, right and middle mouse button.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 20, 2020, 11:48:47 pm
        I've connected the buttons according to your diagram.
        I didnt connect the pedal pin to anything.
        just needed left, right and middle mouse button.
        It's weird, I tested my GCon 1&2 with the same diagram, they both work perfectly with middle button.
        Did you check the pins again just to be sure?
        Be careful, pin A6 is pin 4 and pin A7 is pin 6 (I really have to make it more clear in my first post).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 21, 2020, 04:53:14 am
        Edit4: DONE! Now flashing the firmware is as simple as running the bat file  ;D
        That's be great if you guys could test it to see if it works properly for you ;)

        Thanks!!! Working perfectly :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 21, 2020, 05:31:36 am
        I've connected the buttons according to your diagram.
        I didnt connect the pedal pin to anything.
        just needed left, right and middle mouse button.
        It's weird, I tested my GCon 1&2 with the same diagram, they both work perfectly with middle button.
        Did you check the pins again just to be sure?
        Be careful, pin A6 is pin 4 and pin A7 is pin 6 (I really have to make it more clear in my first post).

        I'll check just to be sure... Again d'oh

        Edit: that fixed the middle mouse button. but the trigger still right clicks for some reason.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 21, 2020, 07:28:26 am
        I've connected the buttons according to your diagram.
        I didnt connect the pedal pin to anything.
        just needed left, right and middle mouse button.
        It's weird, I tested my GCon 1&2 with the same diagram, they both work perfectly with middle button.
        Did you check the pins again just to be sure?
        Be careful, pin A6 is pin 4 and pin A7 is pin 6 (I really have to make it more clear in my first post).

        I'll check just to be sure... Again d'oh

        Edit: that fixed the middle mouse button. but the trigger still right clicks for some reason.
        The trigger is activating the right click when pointing outside of the screen (for games with off screen reload), is that doing the right click on screen too?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Mysli0210 on January 21, 2020, 09:26:31 am
        sure seems like it is, but the trigger works fine ingame, its just registered as mouse 2 in mousetest aswell as in the keybind on retroarch.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 21, 2020, 10:10:47 am
        sure seems like it is, but the trigger works fine ingame, its just registered as mouse 2 in mousetest aswell as in the keybind on retroarch.
        If aiming onscreen, it should always register as mouse 1, if offscreen, always as mouse 2. If only some softwares see it another way it's probably a software issue ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 21, 2020, 12:24:42 pm
        @jaybee please where can I buy the same LEDs that you used? ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 21, 2020, 09:23:09 pm
        @jaybee please where can I buy the same LEDs that you used? ;D
        Actually I bough mine in a local shop here in Tokyo, and I think this model is japanese only.
        But any LED with similar or close enough specs will work ;)
        However don't buy them on aliexpress or similar chinese website, the ones they are selling are usually very bad quality and won't work as well.
        If someone can tell us what's the best model they found in US or online...  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 22, 2020, 01:58:25 am
        I added a poll to decide the way the input mode should be in this firmware  ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 22, 2020, 12:43:18 pm
        @jaybee please where can I buy the same LEDs that you used? ;D
        Actually I bough mine in a local shop here in Tokyo, and I think this model is japanese only.
        But any LED with similar or close enough specs will work ;)
        However don't buy them on aliexpress or similar chinese website, the ones they are selling are usually very bad quality and won't work as well.
        If someone can tell us what's the best model they found in US or online...  :cheers:

        i find in local shop in Italy this: http://pdf.icpdf.com/pdf4/LIGITEK/LIR33_datasheet_733433/119516/LIR33_datasheet.pdf

        they should work but which resistance should I use for this?
        thanks a lot JayBee
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 22, 2020, 08:39:58 pm
        @jaybee please where can I buy the same LEDs that you used? ;D
        Actually I bough mine in a local shop here in Tokyo, and I think this model is japanese only.
        But any LED with similar or close enough specs will work ;)
        However don't buy them on aliexpress or similar chinese website, the ones they are selling are usually very bad quality and won't work as well.
        If someone can tell us what's the best model they found in US or online...  :cheers:

        i find in local shop in Italy this: http://pdf.icpdf.com/pdf4/LIGITEK/LIR33_datasheet_733433/119516/LIR33_datasheet.pdf

        they should work but which resistance should I use for this?
        thanks a lot JayBee
        Not bad, they look like they'd work nicely!
        Here is the info I can get from the website I mentioned in the OP ;)
        Since the specs are almost the same as mine, 56ohms resistors should also work, but you will get less brightness.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 23, 2020, 10:49:08 am
        Not bad, they look like they'd work nicely!
        Here is the info I can get from the website I mentioned in the OP ;)
        Since the specs are almost the same as mine, 56ohms resistors should also work, but you will get less brightness.
        thanks JayBee!!! Can you post other images on how you connected the LEDs to each other and to USB power for beginners like me? : D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 23, 2020, 11:06:25 am

        this the gun I'm working on is a Bio Gun for the first XBOX inside there is a rumble motor connected to an on off switch,
         
        (http://killone.myqnapcloud.com/sp/biogun.jpg)

        can i use this by connecting it to the rumble and gnd pin of the pro micro or do i have to change it with one for xbox360?

        (http://killone.myqnapcloud.com/sp/rumble.jpg)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 23, 2020, 09:26:12 pm
        Not bad, they look like they'd work nicely!
        Here is the info I can get from the website I mentioned in the OP ;)
        Since the specs are almost the same as mine, 56ohms resistors should also work, but you will get less brightness.
        thanks JayBee!!! Can you post other images on how you connected the LEDs to each other and to USB power for beginners like me? : D
        It might be hard to show anything more than the pics in the OP  :P
        Basically for each IR point, you have one resistor and 2 LEDs in series. Each of those components group are directly connected to the common USB vcc and gnd.
        To make it easier, what I did was to solder each point vcc and gnd to the next point vcc and gnd. It reduces the length of cables.

        this the gun I'm working on is a Bio Gun for the first XBOX inside there is a rumble motor connected to an on off switch,

        can i use this by connecting it to the rumble and gnd pin of the pro micro or do i have to change it with one for xbox360?
        The Arduino digital and analog pins don't provide enough power for rumble, so you will need a transistor or a mosfet to trigger the rumble from the Arduino, and have a separate motor power source.
        I personally power my Xbox 360 rumble motor with the Arduino vcc, because it's 5 volts and doesn't take so much current. but it's not really a recommended solution, especially if you don't have the motor specs (voltage, current, resistance...).
        But in the case your motor is powered only by the Xbox USB power, it should be fine too I guess.
        I will post the list of components you need for the control circuit later when I go home ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 24, 2020, 04:51:23 am
        The Arduino digital and analog pins don't provide enough power for rumble, so you will need a transistor or a mosfet to trigger the rumble from the Arduino, and have a separate motor power source.
        I personally power my Xbox 360 rumble motor with the Arduino vcc, because it's 5 volts and doesn't take so much current. but it's not really a recommended solution, especially if you don't have the motor specs (voltage, current, resistance...).
        But in the case your motor is powered only by the Xbox USB power, it should be fine too I guess.
        I will post the list of components you need for the control circuit later when I go home ;)

        so if I understand correctly, I connect solenoid and rumble or just one of the two to your circuit (still to be created) and feed it at 5v better with a second separate usb cable and then from this circuit the Rumble and Recoil pins on the arduino right?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 24, 2020, 11:13:43 am
        The Arduino digital and analog pins don't provide enough power for rumble, so you will need a transistor or a mosfet to trigger the rumble from the Arduino, and have a separate motor power source.
        I personally power my Xbox 360 rumble motor with the Arduino vcc, because it's 5 volts and doesn't take so much current. but it's not really a recommended solution, especially if you don't have the motor specs (voltage, current, resistance...).
        But in the case your motor is powered only by the Xbox USB power, it should be fine too I guess.
        I will post the list of components you need for the control circuit later when I go home ;)

        so if I understand correctly, I connect solenoid and rumble or just one of the two to your circuit (still to be created) and feed it at 5v better with a second separate usb cable and then from this circuit the Rumble and Recoil pins on the arduino right?
        Yes you understand correctly, each circuit has its own power and is connected to the corresponding arduino pin.
        And they all have a common ground.
        There are actually 2 kind of control circuits I made, one for the rumble with the simple transistor, and a bigger one for the solenoid with a mosfet, because solenoids circuits need to be stronger than motor circuits usually.
        Which circuit/components you will use will depend of the specs of your rumble and solenoid.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 24, 2020, 11:56:50 am
        There are actually 2 kind of control circuits I made, one for the rumble with the simple transistor, and a bigger one for the solenoid with a mosfet, because solenoids circuits need to be stronger than motor circuits usually.
        Which circuit/components you will use will depend of the specs of your rumble and solenoid.

        OK thanks! Then I am waiting for you to place the two circuits and the list of components to create them...as soon as you are ready ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 28, 2020, 12:37:03 pm
        Hello JayBee news ?  ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 28, 2020, 08:45:46 pm
        Hello JayBee news ?  ;D
        I've been quite busy in my personal life lately, and also trying to pull a huge update for my firmware to address the last flaws of this system (minimum distance and maximum tilt), so it might take a while before I can do the schematics and components list  :-\
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on January 29, 2020, 12:31:05 am
        Hello JayBee news ?  ;D
        I've been quite busy in my personal life lately, and also trying to pull a huge update for my firmware to address the last flaws of this system (minimum distance and maximum tilt), so it might take a while before I can do the schematics and components list  :-\
        That's awesome, man. I'm still waiting for the parts.
        Looking forward to building this gun. Any tips about mounting everything in a guncon 1 or guncon 2?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 29, 2020, 02:51:48 am
        That's awesome, man. I'm still waiting for the parts.
        Looking forward to building this gun. Any tips about mounting everything in a guncon 1 or guncon 2?
        Well I'm not super good for the hardware side of things, so my way might not be the best nor the cleanest, but if you want to check anyway you can see my other thread, where I show the inside of the first 2 guns I made (saturn gun and guncon 1).
        You can also check the way I soldered everything on the GC2 motherboard at post #146 of this thread.

        A bit more details:
        The Saturn Gun is the largest of all, I was able to fit everything inside with ease. It has a big and loud solenoid. But it also has only 2 buttons.
        In the GC1 I could fit a smaller solenoid, but no rumble (yet).
        For the GC2 I didn't had time to try fitting a mini solenoid nor rumble yet, and it's way harder to fit anything inside due to the slim form factor and all the buttons.

        More details will come with the schematics when I finally have time for it.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 29, 2020, 05:09:07 am
        Hello JayBee news ?  ;D
        I've been quite busy in my personal life lately, and also trying to pull a huge update for my firmware to address the last flaws of this system (minimum distance and maximum tilt), so it might take a while before I can do the schematics and components list  :-\

        Of course JayBee the family first of all! : D I look forward to the new release then;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: SpatzST on January 29, 2020, 10:05:10 am
        Does using this system make it track faster/better? Or is it more for 'no calibration'?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 29, 2020, 12:35:41 pm
        Does using this system make it track faster/better? Or is it more for 'no calibration'?
        Yeah, beside the no calibration it does work faster and better to some extend; it minimizes input latency, works from a wider angle, tracks a largers area, adds a good off screen tracking, and reduces greatly the minimum distance the player has to be from the screen.
        Beside that it also adds numerous other functionalities, the full list is in the first post  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on January 31, 2020, 05:24:37 am
        https://photos.app.goo.gl/AcDxtFS8RYcwP36XA

        https://photos.app.goo.gl/gWf5H3t17kysawLd8

        this is my first attempt, with the LEDs that I have taken I can stay at a maximum distance of one meter from the monitor, but considering that it is a 25" is okay! If I tilt the gun too much, the cursor goes crazy and is off-center, but it is a known problem, the trigger does not take the shot every now and then but maybe I have to better check the welded wire, the button B associated with the Middle mouse button if I try to configure it in MAME it does not insert anything and in mame it is seen the gun as GUNXX and the button A me it marks it the same as the trigger, in windows it works as a right mouse button.. apart from that it works great pointing very precisely and there is no flicker of the cursor! You are a great JayBee !!!;)

        I can't do the calibration reset procedure, to overwrite the old calibration with new, how should I proceed?

        now I just have to connect the rumble ... :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on January 31, 2020, 10:15:34 am
        https://photos.app.goo.gl/AcDxtFS8RYcwP36XA

        https://photos.app.goo.gl/gWf5H3t17kysawLd8

        this is my first attempt, with the LEDs that I have taken I can stay at a maximum distance of one meter from the monitor, but considering that it is a 25" is okay! If I tilt the gun too much, the cursor goes crazy and is off-center, but it is a known problem, the trigger does not take the shot every now and then but maybe I have to better check the welded wire, the button B associated with the Middle mouse button if I try to configure it in MAME it does not insert anything and in mame it is seen the gun as GUNXX and the button A me it marks it the same as the trigger, in windows it works as a right mouse button.. apart from that it works great pointing very precisely and there is no flicker of the cursor! You are a great JayBee !!!;)

        I can't do the calibration reset procedure, to overwrite the old calibration with new, how should I proceed?

        now I just have to connect the rumble ... :)
        Really nice setup, good job!  :applaud:
        You probably know that already, but just in case; your screen is not vertical but the leds have to be facing the gun as much as possible if you want the gun to see them correctly ;)

        Yeah the issue with the tilt is that this system doesn't have gravity sensor to know how it's tilted, so when you turn the gun more than 45 degrees it doesn't know where the up is anymore.
        But that's one of the things I am working on for the big upcoming update I'm busy preparing, so that should be fixed soon if everything goes well ;D

        For the A and B buttons not behaving correctly, can you tell me for each of them how they are behaving in windows? (try them on a basic webpage, convenient to test the right and middle clicks)
        Also, I just realized your gun has A B X Y start buttons and a dpad, that's very unusual, I'm curious to know on which pins you wired them all.
        Looks really annoying to find good soldering points on the motherboard.

        In Mame I'm not sure what's happening, but it looks like the gun axises aren't mapped correctly in the input menu?
        If you can see the mouse cursor behaving correctly in the mame menu (outside of the game), it means it's indeed not mapped correctly.

        For the calibration process it's very simple: hold the calibration button for few seconds (until the cursor goes to the middle of the screen), aim the middle of the screen, shoot, aim the top left corner of the screen, shoot again, aim the bottom right of the screen, shoot one last time. If the calibration process went well it should be calibrated and you shouldn't have to calibrate it ever again ;)

        Tell me how it goes  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 01, 2020, 07:25:47 pm
        Really nice setup, good job!  :applaud:
        You probably know that already, but just in case; your screen is not vertical but the leds have to be facing the gun as much as possible if you want the gun to see them correctly ;)

        yes the screen is tilted and I put the pairs of LEDs exactly on the central sides of the monitor, but I don't know if the second LEDs on the right and left are seen because they are covered by the internal wood of the cab, If I put them vertically could it improve detection?

        Yeah the issue with the tilt is that this system doesn't have gravity sensor to know how it's tilted, so when you turn the gun more than 45 degrees it doesn't know where the up is anymore.
        But that's one of the things I am working on for the big upcoming update I'm busy preparing, so that should be fixed soon if everything goes well ;D

        if you can solve this you have created the perfect solution to use lightguns on Arcade games :)

        For the A and B buttons not behaving correctly, can you tell me for each of them how they are behaving in windows? (try them on a basic webpage, convenient to test the right and middle clicks)
        Also, I just realized your gun has A B X Y start buttons and a dpad, that's very unusual, I'm curious to know on which pins you wired them all.
        Looks really annoying to find good soldering points on the motherboard.

        Yes...i identified the pins of the buttons with the tester and soldered the wires that go from the arduino and I used the following combination of keys:

        DPAD = DPAD Button
        AUTO = CALIBRATION Button
        START = START Button
        BACK = A Button
        X = SELECT Button
        B = B Button

        In Mame I'm not sure what's happening, but it looks like the gun axises aren't mapped correctly in the input menu?
        If you can see the mouse cursor behaving correctly in the mame menu (outside of the game), it means it's indeed not mapped correctly.

        I have reviewed the links and I think I have found and partially solved the problem...A and B Button work perfectly, Trigger button has a problem...

        For the calibration process it's very simple: hold the calibration button for few seconds (until the cursor goes to the middle of the screen), aim the middle of the screen, shoot, aim the top left corner of the screen, shoot again, aim the bottom right of the screen, shoot one last time. If the calibration process went well it should be calibrated and you shouldn't have to calibrate it ever again ;)

        where having used this calibration procedure I was no longer able to have a certain precision, I had to reinstall the firmware and do the automatic calibration

        Tell me how it goes  :cheers:

        I think I found a bug perhaps in the last fw that you released 1.4, in practice it is the problem I had on the mame and on the calibration, in practice after various trigger pressures, the trigger Button becomes A Button...I did various tests, and I can tell you that both in mouse and joypad mode it does the same, Joy Button 1 becomes Joy Button 2 and then returns to normal when he wants...if I connect the trigger button to arduino pin B button it works well, Joy Button 3 always remains for example.

        so I guess it's either a firmware bug or the defective arduino,so seen that at the moment I don't have another arduino to try, if you can verify this anomalous behavior please? :)

        links to photos and videos of the problem:

        https://photos.app.goo.gl/iDWw3YxooWMLZWHS8
         (https://photos.app.goo.gl/iDWw3YxooWMLZWHS8)

        Thanks a lot!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 02, 2020, 12:40:24 am
        yes the screen is tilted and I put the pairs of LEDs exactly on the central sides of the monitor, but I don't know if the second LEDs on the right and left are seen because they are covered by the internal wood of the cab, If I put them vertically could it improve detection?
        You indeed have to place each leds point at the center of each side of course, but the leds have to be facing the gun camera because their angle is very limited. So if the leds are aligned with your screen they are facing upward and won't work correctly. And of course nothing should block their light. I checked your led specs again, and clearly if it's working at only one meter it's not normal, it should work from afar too if the leds angle is correct.

        where having used this calibration procedure I was no longer able to have a certain precision, I had to reinstall the firmware and do the automatic calibration
        Reinstalling the firmware shouldn't change anything nor erase your calibration. The manual calibration is not overwriting the automatic calibration, but offsetting it to match your screen setup.
        But if something goes wrong with your calibration (for instance if the leds can't be seen correctly when doing it), you can reset it by reentering the calibration mode then leaving it without performing the calibration.
        (more details in the original post)

        I think I found a bug perhaps in the last fw that you released 1.4, in practice it is the problem I had on the mame and on the calibration, in practice after various trigger pressures, the trigger Button becomes A Button...I did various tests, and I can tell you that both in mouse and joypad mode it does the same, Joy Button 1 becomes Joy Button 2 and then returns to normal when he wants...if I connect the trigger button to arduino pin B button it works well, Joy Button 3 always remains for example.

        so I guess it's either a firmware bug or the defective arduino,so seen that at the moment I don't have another arduino to try, if you can verify this anomalous behavior please? :)
        It's not a bug it's a feature (see the "out of screen firing mode" in my original post). When firing offscreen it triggers the right trigger/button 2. It's used for the games that do reload by firing offscreen.
        If it's still firing the button 2 when aiming onscreen, it means the gun can't see your leds correctly.

        On your second screen screenshot, the axises are mapped wrong, each axis has both gun axises mapped on it  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 02, 2020, 04:39:16 am
        You indeed have to place each leds point at the center of each side of course, but the leds have to be facing the gun camera because their angle is very limited. So if the leds are aligned with your screen they are facing upward and won't work correctly. And of course nothing should block their light. I checked your led specs again, and clearly if it's working at only one meter it's not normal, it should work from afar too if the leds angle is correct.

        Ok! Thanks! I put a little thickness on the top of the side LEDs to make them stand straight and now it is much better and the gun works even more than a meter, even if the cursor is less stable it starts to wobble a little ...

        If it's still firing the button 2 when aiming onscreen, it means the gun can't see your leds correctly.
        On your second screen screenshot, the axises are mapped wrong, each axis has both gun axises mapped on it 

        As you can see from the video below, in windows now works correctly the trigger always corresponds to the left mouse button while in mame it is always seen with Gunxx B0 both the trigger and A button, but is it normal that it is seen as a GUN and not as a mouse? Forces is this the problem

        https://photos.app.goo.gl/ChUJJa1RvkU63Gwf9 (https://photos.app.goo.gl/ChUJJa1RvkU63Gwf9)

        Inviato dal mio Redmi Note 5 utilizzando Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 02, 2020, 09:28:26 am
        Ok! Thanks! I put a little thickness on the top of the side LEDs to make them stand straight and now it is much better and the gun works even more than a meter, even if the cursor is less stable it starts to wobble a little ...
        Did you do the same for the top and bottom leds too?  ;D

        As you can see from the video below, in windows now works correctly the trigger always corresponds to the left mouse button while in mame it is always seen with Gunxx B0 both the trigger and A button, but is it normal that it is seen as a GUN and not as a mouse? Forces is this the problem

        https://photos.app.goo.gl/ChUJJa1RvkU63Gwf9 (https://photos.app.goo.gl/ChUJJa1RvkU63Gwf9)

        Inviato dal mio Redmi Note 5 utilizzando Tapatalk
        I see, it's indeed not normal, it might have something to do with the way Mame is configured.
        What do you have in "device mapping" in the Mame config menu? are you using any app for mame that might interfere with the inputs?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Howard_Casto on February 02, 2020, 02:30:04 pm
        Regarding this led shallow angle issue.... why don't you guys just sand the LEDS?  That'll diffuse the light and they'll be viewable at any angle. 
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 02, 2020, 02:54:44 pm
        Regarding this led shallow angle issue.... why don't you guys just sand the LEDS?  That'll diffuse the light and they'll be viewable at any angle.
        We already discussed about that, but diffusing the light will also make it weaker and harder for the cam to see. The more the light spread, the dimmer it becomes, even with high powered higher angle LEDs ;)
        There might be some special model somewhere with higher angle and powerful enough for it, but I haven't found any so far.

        So the only solution that works well and doesn't require special hardware is using 2 or more LEDs for each points, with slightly different angles.
        And no need to add any filter or lens to it, since the IR cam will only see one point if the LEDs are close enough  :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Howard_Casto on February 02, 2020, 03:08:33 pm
        Well ages ago before there were third party sensor bars available for the wii I made one for use on the pc... had the exact same issue with the leds… then I sanded them and they worked great.  I'd suggest you try it before deciding it's impossible. 
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 03, 2020, 02:37:46 am
        Did you do the same for the top and bottom leds too?  ;D
        Only on top :D
        I see, it's indeed not normal, it might have something to do with the way Mame is configured.
        What do you have in "device mapping" in the Mame config menu? are you using any app for mame that might interfere with the inputs?
        I use a groovymame 64bit version and device mapping for lightguns set to lightgun if set mouse not work, can you post your mame.ini configuration
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 03, 2020, 02:56:19 am
        Well ages ago before there were third party sensor bars available for the wii I made one for use on the pc... had the exact same issue with the leds… then I sanded them and they worked great.  I'd suggest you try it before deciding it's impossible.
        I never said it's impossible, I said it reduces the leds brightness therefore might reduce the maximal distance of use  ;)
        I'm not making it up, it's basic optical stuff.
        https://www.instructables.com/id/how-to-defuse-an-LED/ (https://www.instructables.com/id/how-to-defuse-an-LED/)
        You can see at the beginning "Diffusing makes the LED appear dimmer, but gives a wider viewing angle of the light."

        You're right still, I never tested it, I only tested very wide angle powerful LEDs and the result was awful.
        I just didn't see how sanding a LED with the around the same specs (beside the angle) would get better result.
        But I'm willing to try it out, to see how it compares.
        I would be happy to be wrong on this one, it would solve the main IR LEDs issue nicely  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 03, 2020, 10:22:28 am
        Only on top :D
        You means the bottom leds are not facing the gun either? ;D
        I use a groovymame 64bit version and device mapping for lightguns set to lightgun if set mouse not work, can you post your mame.ini configuration
        Ok so let me test my groovymame machine once I finished setting it up again, I will send you the file.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 03, 2020, 10:32:17 am
        Any thoughts about these leds:
        https://www.arrow.com/en/products/l1i0-0940060000000/lumileds (https://www.arrow.com/en/products/l1i0-0940060000000/lumileds)
        ?
        It's a surface mount, so might be annoying to install, but look at the specs.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 03, 2020, 10:39:30 am
        You means the bottom leds are not facing the gun either? ;D

        I mean that the lower LEDs are already straight and turned towards the gun because the screen is slightly inclined starting from the bottom and coming upwards therefore obviously the LEDs placed on the sides in the middle of the screen are slightly inclined and the upper ones even more stupid I who had not thought of that ... :)

        Ok so let me test my groovymame machine once I finished setting it up again, I will send you the file.

        thanks, but setting mouse as device for the lightgun should be seen as axes and mouse buttons right?
        I don't understand why he doesn't read it like this
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 03, 2020, 12:11:44 pm
        Any thoughts about these leds:
        https://www.arrow.com/en/products/l1i0-0940060000000/lumileds (https://www.arrow.com/en/products/l1i0-0940060000000/lumileds)
        ?
        It's a surface mount, so might be annoying to install, but look at the specs.
        Wait, 1190mW/sr?? That's insane  :lol
        But it makes sense, it's also 3.4v and 1A, very high power consumption, I wouldn't even know how to power those monsters  :o
        I even wonder if it won't be too powerful for the IR cam.
        But if someone here could help us on how to make them work, I would sure want to try it out, powerful SMD LEDs would be really nice.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 03, 2020, 12:22:50 pm
        maybe connect ten of those in series and use a 34V 1Amp ac adapter?
        I'd also like to know if there's any danger associated with these leds.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 04, 2020, 07:57:03 am
        maybe connect ten of those in series and use a 34V 1Amp ac adapter?
        I'd also like to know if there's any danger associated with these leds.
        Why would you want to use 10 of them?  :lol
        My concerns are more about the led being too strong for the IR Cam sensor. I wonder if it wouldn't blind it or making the points too big on cam to track accurately?
        Still, making small pcbs for this kind of LEDs would be a lot cleaner and easier to set up.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 04, 2020, 10:03:49 am
        Well, I've just finished building everything, i used the same leds you use, jaybee, SID1K10CM, 8 of them, connected everything, turned out the DFRobot camera needed to be rotated.
        In my case i had to manually calibrate the gun since the screen i'm trying this on is 16:10, i haven't connected it to the big screen yet since it was easier to try it on the 24 inch.
        It seems to work but i'm not sure it works optimally, since i find myself having to sit as far as my old Topgun 2 lcd gun and still get some inconsistencies. If i try to get closer it does work but with more inconsistencies.
        Is it supposed to be like this? I mean, did you also get accuracy issues from time to time? I've tried messing with the leds, changing their angles and so on, though can't say there's any improvement.
        Will appreciate any suggestions.
        Edit: two things that i've done that seem to help, i changed the usb cable from 5m to 1.8m and changed the resolution to 1920x1080 and set the screen to stretch so as not to have black bars since the native res is 1920x1200, and this time i didn't use manual calibration, since it's set to 16:9 res.
        Not sure which of these two have helped the most but the gun seems to be more consistent now.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 04, 2020, 08:08:52 pm
        Well, I've just finished building everything, i used the same leds you use, jaybee, SID1K10CM, 8 of them, connected everything, turned out the DFRobot camera needed to be rotated.
        In my case i had to manually calibrate the gun since the screen i'm trying this on is 16:10, i haven't connected it to the big screen yet since it was easier to try it on the 24 inch.
        It seems to work but i'm not sure it works optimally, since i find myself having to sit as far as my old Topgun 2 lcd gun and still get some inconsistencies. If i try to get closer it does work but with more inconsistencies.
        Is it supposed to be like this? I mean, did you also get accuracy issues from time to time? I've tried messing with the leds, changing their angles and so on, though can't say there's any improvement.
        Will appreciate any suggestions.
        Edit: two things that i've done that seem to help, i changed the usb cable from 5m to 1.8m and changed the resolution to 1920x1080 and set the screen to stretch so as not to have black bars since the native res is 1920x1200, and this time i didn't use manual calibration, since it's set to 16:9 res.
        Not sure which of these two have helped the most but the gun seems to be more consistent now.
        I'm glad you manage to build it!  :cheers:
        So are you living in Japan too?  :lol
        Yes the sensor is often tilted (it's a factory issue), as I wrote down in the first post  :dizzy:
        So for any aspects ratio other than 16:9 or 4:3, the resolution shouldn't matter as long as you keep your content in full screen.
        I'm currently doing a tool to change the default options of the gun, like the aspect ratio of the screen and many others.
        Just in case, you might also want to check how the camera is seeing the led by using the testing tool by Samco in this forum or or the one dfrobot provided. If you see the points blinking or changing color often, it means there is something wrong with them (USB port not powerful enough, connection problem...).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 05, 2020, 01:37:31 am
        I mean that the lower LEDs are already straight and turned towards the gun because the screen is slightly inclined starting from the bottom and coming upwards therefore obviously the LEDs placed on the sides in the middle of the screen are slightly inclined and the upper ones even more stupid I who had not thought of that ... :)
        Oh I see, makes sense :P
        Well I hope you got it fixed now  :lol
        thanks, but setting mouse as device for the lightgun should be seen as axes and mouse buttons right?
        I don't understand why he doesn't read it like this
        I don't understand either, Mame is a bit obscure for me too sometime.
        Which input mode are you using inside mame?
        Because I saw you were testing buttons in the windows controller panel in joystick mode.
        You have to be careful, there are 3 input modes with my firmware; mouse+kb, joystick, and mouse+joystick
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 05, 2020, 01:53:19 am
        Mame treats this gun as a lightgun, and that's how it's supposed to be, as far as I'm aware this has always been the case.
        This was the same case when i connected my guncon and other mouse based lightguns.
        By the way, you should disable offscreen_reload for games that don't need it, so you can use the reload button for other things.
        I think you can get around the offscreen_reload option by directly sending a 0,0 left button instead of sending a right button click as offscreen shot. Though I'm not sure if that will work with all games.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 05, 2020, 04:14:08 am
        Yes the sensor is often tilted (it's a factory issue), as I wrote down in the first post  :dizzy:
        Yeah, i've read the first post many times, just thought to point that out to share my experience with building it.
        So for any aspects ratio other than 16:9 or 4:3, the resolution shouldn't matter as long as you keep your content in full screen.
        That explains it, why i was having issues with 1920x1200.
        Just in case, you might also want to check how the camera is seeing the led by using the testing tool by Samco in this forum or or the one dfrobot provided. If you see the points blinking or changing color often, it means there is something wrong with them (USB port not powerful enough, connection problem...).
        For someone who has no experience whatsoever with arduino, how would i go around doing that?
        I've tried uploading the samco test sketch but it fails every time in the verification phase, complaining that "DFRobotIRPosition.h: No such file or directory".
        Tried adding that file to the same folder as the sketch, didn't do anything. In his video he didn't add anything or changed anything, so i'm not sure what's up.
        I tried uploading the official dfrobot sketch, which did get uploaded to the arduino from what i could see, but the processing sketch doesn't show anything but a blank screen.
        I'm sure it's just my inexperience with arduino. any tips?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 05, 2020, 08:11:14 pm
        Mame treats this gun as a lightgun, and that's how it's supposed to be, as far as I'm aware this has always been the case.
        This was the same case when i connected my guncon and other mouse based lightguns.
        By the way, you should disable offscreen_reload for games that don't need it, so you can use the reload button for other things.
        I think you can get around the offscreen_reload option by directly sending a 0,0 left button instead of sending a right button click as offscreen shot. Though I'm not sure if that will work with all games.
        I wondered for a while what's the best practice for the off screen shot functionality, and I ended up leaving it always on for few reasons;
        I couldn't find any game that requires you to shot outside or on the borders of the screen beside the off screen reload, so it shouldn't cause any issue with normal games, and will avoid unattended shot in the screen border when you shot outside (many games aren't triggering shot at all when shooting outside of the screen).
        With the way I coded it, you can assign the normal reload button to any function you want, it shouldn't cause any conflict.
        But the main reason is because most emulators and games don't have a proper off screen detection, shooting in 0,0 just shot in the corner, which is quite annoying for most games. They also rarely allow to map 2 buttons at once, or remapping buttons at all, so even if shooting outside of the screen was on another button we wouldn't be able to use it.

        But don't worry, in my upcoming configuration tool for this firmware you will be able to configure it the way you want ;)

        And if you have any improvement suggestions, feel free to share.

        Yeah for the samco and dfrobot sketch you have to add the dfrobot libraries first (both cpp and h files) , and then change the com Port to whatever port is currently used by your Arduino (you can check it in the Arduino IDE). I know it's not very easy to use, I might also do a user friendly tool for that too in the future.

        Got tons of things to add and work on  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 03:42:16 am
        I don't understand either, Mame is a bit obscure for me too sometime.
        Which input mode are you using inside mame?
        Because I saw you were testing buttons in the windows controller panel in joystick mode.
        You have to be careful, there are 3 input modes with my firmware; mouse+kb, joystick, and mouse+joystick

        yes I think mouse + keyboard since when I press Start or Select I press the keys 1 and 5 but mame set Trigger and A button always to GUNX B0 and B button GUNX B2 Pedal button GUNX B0...
        in the mame you use, does the trigger see it as MOUSE B1 or GUNX B1?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 05:11:06 am
        I made other gun and is the same in mame GUNXX B0...I deduce that it is not a problem of defective arduino, no one else has my same problem?

        This time i used a wireless compatible guncon2 Logic3

        (http://killone.myqnapcloud.com/GUN/gunlogic3.jpg)
        (http://killone.myqnapcloud.com/GUN/gunmod.jpg)
        (http://killone.myqnapcloud.com/GUN/sidea.jpg)
        (http://killone.myqnapcloud.com/GUN/sideb.jpg)

        I connected the calibration button to the OPEN button used to remove the battery container :D

        @JayBee will the utility you are preparing also indicate the various active modes?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 06, 2020, 06:09:14 am
        I made other gun and is the same in mame GUNXX B0...I deduce that it is not a problem of defective arduino, no one else has my same problem?


        This time i used a wireless compatible guncon2 Logic3

        (http://killone.myqnapcloud.com/GUN/gunlogic3.jpg)
        (http://killone.myqnapcloud.com/GUN/gunmod.jpg)
        (http://killone.myqnapcloud.com/GUN/sidea.jpg)
        (http://killone.myqnapcloud.com/GUN/sideb.jpg)

        I connected the calibration button to the OPEN button used to remove the battery container :D

        @JayBee will the utility you are preparing also indicate the various active modes?
        Try setting offscreen_reload to 0 in mame.ini and check.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 09:19:22 am
        Try setting offscreen_reload to 0 in mame.ini and check.
        Yes! It was that! So should never be used offscreen_reload?
        Foxhole thanks a lot :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 06, 2020, 09:42:44 am

        yes I think mouse + keyboard since when I press Start or Select I press the keys 1 and 5 but mame set Trigger and A button always to GUNX B0 and B button GUNX B2 Pedal button GUNX B0...
        in the mame you use, does the trigger see it as MOUSE B1 or GUNX B1?
        I just checked, mine shows GUN 5 B0 (5 is the mouse number detected by mame) when shooting on screen, and GUN 5 B1 for off screen, button A and pedal button (which is the expected behavior).
        So I really have no idea why your guns are detecting B0 on button A and pedal, it should be B1  :dizzy:
        Unless there are still some traces on the Guns PCB that connect the buttons together somehow? do you have a continuity tester or a multimeter to test them out?
        where is the buttons common ground connected?

        I made other gun and is the same in mame GUNXX B0...I deduce that it is not a problem of defective arduino, no one else has my same problem?
        Definitely not a defective arduino, you would have other issues I think.

        @JayBee will the utility you are preparing also indicate the various active modes?
        With the current firmware, beside the calibration the gun should reset to the default configuration at each power cycle.
        But yes, it will show the active modes 8)
        The tool will be a all in one toolbox that also allow to update the firmware, configure each button, change the default settings, and add tons of functionalities to the system.
        But since it will take some time for me to make it, I might do a basic testing tool before that, to easily check the inputs, sensors and feedback  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 06, 2020, 09:45:46 am
        Try setting offscreen_reload to 0 in mame.ini and check.
        Yes! It was that! So should never be used offscreen_reload?
        Foxhole thanks a lot :)
        Oh so Foxhole's solution did work? nice, thanks! :D
        Indeed in my ini file offscreen_reload was 0 by default too, I should add that to the FAQ ;)

        Edit: @Foxhole I added the offscreen reload enable/disable option to the upcoming 1.4 version of the firmware, it will be easy to change it with a buttons combo.

        Edit2:
        Indeed it seems like this mame offscreen_reload options is a common issue:
        http://forum.arcadecontrols.com/index.php?topic=75196.0
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 10:41:03 am
        Oh so Foxhole's solution did work? nice, thanks! :D
        Indeed in my ini file offscreen_reload was 0 by default too, I should add that to the FAQ ;)

        Edit: @Foxhole I added the offscreen reload enable/disable option to the upcoming 1.4 version of the firmware, it will be easy to change it with a buttons combo.


        Yes, it works perfectly now

        Trigger = GUNXX B0
        A Button = GUNXX B1
        B Button = GUNXX B2
        C Button or Pedal = GUNXX B1

        :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 10:49:58 am
        I look forward to completing with the rumble and solenoid, I hope you will publish soon :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 12:29:36 pm
        Got tons of things to add and work on  :lol
        could you implement the possibility of various key combinations? I'm trying to edit a biogun for dreamcast and I realized that it has only two buttons besides the trigger and the DPAD, Start and A button

        example: DPAD down + Start = Select button, DPAD up + A = B button, etc etc

        thanks :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 06, 2020, 02:34:47 pm
        Try setting offscreen_reload to 0 in mame.ini and check.
        Yes! It was that! So should never be used offscreen_reload?
        Foxhole thanks a lot :)
        Use it only on games that require it, like lethal enforcers for example.
        JayBee, i've included a video showing the issues i'm having.
        https://drive.google.com/open?id=14N6tEnCCD_Psx24A7DaRW4N3R8QNZn80 (https://drive.google.com/open?id=14N6tEnCCD_Psx24A7DaRW4N3R8QNZn80)
        kill_one, how's the gun working for you? Do you have issues from time to time? Can you also look at the video and tell me if you get these issues, too?
        most of the issues start on the second half of the video.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 06, 2020, 03:32:07 pm
        kill_one, how's the gun working for you? Do you have issues from time to time? Can you also look at the video and tell me if you get these issues, too?
        most of the issues start on the second half of the video.
        Yes, but it rarely happens, in the troubleshooting there is written how to solve, I point out the screen at the bottom and shoot and then I raster the screen, I believe that with the next update the problem will be solved by fixing the inclination of the gun
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 06, 2020, 08:26:35 pm
        Got tons of things to add and work on  :lol
        could you implement the possibility of various key combinations? I'm trying to edit a biogun for dreamcast and I realized that it has only two buttons besides the trigger and the DPAD, Start and A button

        example: DPAD down + Start = Select button, DPAD up + A = B button, etc etc

        thanks :)
        Yeah that's actually a good idea of features.
        So far the only combo you can do are with the calibration button, to change various modes.
        Might be a little more complex to add programmable buttons, but I will sure look into it  ;)

        Try setting offscreen_reload to 0 in mame.ini and check.
        Yes! It was that! So should never be used offscreen_reload?
        Foxhole thanks a lot :)
        Use it only on games that require it, like lethal enforcers for example.
        JayBee, i've included a video showing the issues i'm having.
        https://drive.google.com/open?id=14N6tEnCCD_Psx24A7DaRW4N3R8QNZn80 (https://drive.google.com/open?id=14N6tEnCCD_Psx24A7DaRW4N3R8QNZn80)
        kill_one, how's the gun working for you? Do you have issues from time to time? Can you also look at the video and tell me if you get these issues, too?
        most of the issues start on the second half of the video.
        Oh I see what's happening!
        It's not a problem with the tilt but with a misdetection of the LEDs, I used to have that all the time when my gun had trouble seeing the LEDs. It still happens once in a while when the cam is glitching somehow.
        But that's also something I'm trying to improve, I'm currently working a function that will reset the detection when something is misdetected, fixing it instantly.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 07, 2020, 10:53:42 pm
        Well ages ago before there were third party sensor bars available for the wii I made one for use on the pc... had the exact same issue with the leds… then I sanded them and they worked great.  I'd suggest you try it before deciding it's impossible.
        So I gave it a try, and sanded one of my leds.
        It seems like the sanding barely improved the angle, but made the light too dim to work correctly at more than 1.5 meters.
        So overall it made it worse sadly  :-\
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 08, 2020, 09:00:04 am
        Well ages ago before there were third party sensor bars available for the wii I made one for use on the pc... had the exact same issue with the leds… then I sanded them and they worked great.  I'd suggest you try it before deciding it's impossible.
        So I gave it a try, and sanded one of my leds.
        It seems like the sanding barely improved the angle, but made the light too dim to work correctly at more than 1.5 meters.
        So overall it made it worse sadly  :-\
        Tried that too, sanded the all 4 of them, made things worse in my case. The improvement in the angle is barely noticeable, but the power of the ir has been reduced quite a lot, reducing the range.
        JayBee, according to the specs of the dfrobot ir cam it can detect up to 3 meter, have you managed to go beyond that?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 08, 2020, 12:58:58 pm
        Well ages ago before there were third party sensor bars available for the wii I made one for use on the pc... had the exact same issue with the leds… then I sanded them and they worked great.  I'd suggest you try it before deciding it's impossible.
        So I gave it a try, and sanded one of my leds.
        It seems like the sanding barely improved the angle, but made the light too dim to work correctly at more than 1.5 meters.
        So overall it made it worse sadly  :-\
        Tried that too, sanded the all 4 of them, made things worse in my case. The improvement in the angle is barely noticeable, but the power of the ir has been reduced quite a lot, reducing the range.
        JayBee, according to the specs of the dfrobot ir cam it can detect up to 3 meter, have you managed to go beyond that?
        My room is only 3 meter large, so I can't really go beyond :lol

        Right now I'm doing lot of testing (and coding) to optimize everything, and the more I think about it the more I want to find a better LEDs solution.
        I realized something that might help, and I think the guys behind the Amtrak gun also realized it:
        The IR points need to be big enough to be recognized well, even if the LEDs are powerful.
        So adding more LEDs on each points or putting a bit more space between them should be a good idea I guess.
        I will do more experiments tomorrow.

        And for the next firmware, since I changed many things I will release it in beta, for everyone to test out.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 09, 2020, 07:31:22 am
        New firmware update as promised! ;D

        changelog:
        * 2020/02/09 - 1.55 beta
        - Rewrote a big part of the aiming calculation, it should be far more stable.
        - Added a better tilt/twist detection, now the gun should still work fine when tilting it, it increases the maximum tilt to 89 degrees on each side.
        - Added a function to disable the press of secondary button when shooting offscreen.
          + You can disable it by holding trigger button and pressing the calibration button briefly.
          + Enable it back the same way.
          + For now this parameter isn't saved in the EEPROM, it will reset on power cycle.

        @foxhole & @kill_one
        Since there are a lot of changes in my code, I leave it as beta version for now, until I'm sure it works.
        If you can test it and give me your feedback that'd be great  :cheers:

        Next update should be the diagrams for the rumble and solenoid.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 09, 2020, 10:03:41 am
        New firmware update as promised! ;D

        @foxhole & @kill_one
        Since there are a lot of changes in my code, I leave it as beta version for now, until I'm sure it works.
        If you can test it and give me your feedback that'd be great  :cheers:

        Next update should be the diagrams for the rumble and solenoid.

        Great @JayBee!!! 
        tonight if I can try it ... a question but once updated should the calibration be redone or the data is not deleted?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 09, 2020, 10:08:26 am
        New firmware update as promised! ;D

        @foxhole & @kill_one
        Since there are a lot of changes in my code, I leave it as beta version for now, until I'm sure it works.
        If you can test it and give me your feedback that'd be great  :cheers:

        Next update should be the diagrams for the rumble and solenoid.

        Great @JayBee!!! 
        tonight if I can try it ... a question but once updated should the calibration be redone or the data is not deleted?
        The calibration data should still be there after update  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 09, 2020, 10:19:22 am
        New firmware update as promised! ;D

        @foxhole & @kill_one
        Since there are a lot of changes in my code, I leave it as beta version for now, until I'm sure it works.
        If you can test it and give me your feedback that'd be great  :cheers:

        Next update should be the diagrams for the rumble and solenoid.

        Great @JayBee!!! 
        tonight if I can try it ... a question but once updated should the calibration be redone or the data is not deleted?
        The calibration data should still be there after update  ;)

        Perfect!!! :D

        @JayBee Could you begin to interrupt us only the list of components to be taken to make the 2 circuits of the rumble and solenoid? So we already order them to be ready when you publish the schematics? :)
        From one of the photos you put in the other thread I seem to understand that for the solenoid it takes: 1 Mosfet IRL540 - 1 kickback diode (1N4001 or equivalent can it be fine?) - 2 resistances (from what value?) And for the rumble which transistor to take?

        Thanks a lot! :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 09, 2020, 11:42:36 am
        Perfect!!! :D

        @JayBee Could you begin to interrupt us only the list of components to be taken to make the 2 circuits of the rumble and solenoid? So we already order them to be ready when you publish the schematics? :)
        From one of the photos you put in the other thread I seem to understand that for the solenoid it takes: 1 Mosfet IRL540 - 1 kickback diode (1N4001 or equivalent can it be fine?) - 2 resistances (from what value?) And for the rumble which transistor to take?

        Thanks a lot! :D
        Yes, your guess was very good  ;D

        For the solenoid:
        - IRL540 Mosfet
        - 1N4001 diode
        - 10k resistor
        - 1k resistor

        For the rumble:
        - np2222 transistor
        - 1N4001 diode
        - 270ohms resistor

        For the schematics, I attached some I just found online that are very similar.
        They are fairly basic and should be easy to follow  :cheers:

        However I'm still not sure on how good an reliable those circuits are, electronic isn't my specialty so you're free to suggest any improvement  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 09, 2020, 08:33:58 pm
        However I'm still not sure on how good an reliable those circuits are, electronic isn't my specialty so you're free to suggest any improvement  ;)
        I'm not even a great expert in this field ...: D As far as rumble motor and solenoid are concerned, what specifications must they have besides being 5v?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 09, 2020, 09:22:33 pm
        I encountered two problems in this version ... the first one when I start flash.bat the firmware flash doesn't start, I had to rename the file and use the old one flash.bat. The second problem concerns the aiming, 'tilt now works but often when I aim at a point the cursor moves by itself making it impossible to hit the target, and sometimes the cursor is seen repeated on different points of the screen, ultimately it seems less precise than the version previous one. I hope I have been clear and helpful.

        Here the video where at the end you see the duplicate cursor
        https://photos.app.goo.gl/vjxYt4Wt9gqoVFi18 (https://photos.app.goo.gl/vjxYt4Wt9gqoVFi18)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 09, 2020, 11:00:16 pm
        I'm not even a great expert in this field ...: D As far as rumble motor and solenoid are concerned, what specifications must they have besides being 5v?
        The rumble can be anything up to 40v with an external power supply as long as it's not using too much power (just check the npn2222 specs)
        If you want to use a 5V rumble motor connected to the arduino vcc, the motor has to have a very low power consumption, or else it won't work on the arduino power pin and might even fry it. That's why I use xbox 360 rumbles. But any USB powered rumble motor should work fine I guess?
        For the solenoid, it has to be powered by a separate power supply, it can't be connected to the arduino.
        The power will depend on your what your solenoid is rated for.
        I use a 24v power supply since my solenoid are all 24v, but again, the IRL540 has quite a large working range (100V max).
        Just don't forget to separate the power lines, and attach all grounds together.

        I encountered two problems in this version ... the first one when I start flash.bat the firmware flash doesn't start, I had to rename the file and use the old one flash.bat. The second problem concerns the aiming, 'tilt now works but often when I aim at a point the cursor moves by itself making it impossible to hit the target, and sometimes the cursor is seen repeated on different points of the screen, ultimately it seems less precise than the version previous one. I hope I have been clear and helpful.

        Here the video where at the end you see the duplicate cursor
        https://photos.app.goo.gl/vjxYt4Wt9gqoVFi18 (https://photos.app.goo.gl/vjxYt4Wt9gqoVFi18)
        that's weird, the flashing worked perfectly for me with the new flash.bat. I didn't change anything to it beside the name of the file  :dizzy:

        The cursor duplication/jumping around (thanks for the video by the way) is clearly an issue with the cam seeing your leds "blicking" meaning it has trouble picking them up steadily :-\
        On the old firmware that's the thing that would mess up the tracking and make your cursor move the wrong way.
        On this one, it recalibrates and fixes the problem in real time, preventing the cursor to move in wrong directions, but making it blink sometime when doing so.
        I just modified dfrobot led visualization tool to display/checks the leds and buttons, I will do a special firmware soon to go with it and share it with you ;)

        For the aim moving on its own, you mean it's shaking?
        For this new firmware because I'm reaching the limit of the arduino's memory, I tried to use integers instead of floats for the coordinates calculation, so it lost a little bit of precision. It didn't have much impact on my setup, but that probably depends on the size of the screen, distance and all. I might be able to do something about that if needed.

        Could you please test this firmware and the previous one from the exact same distance/angle and hold the gun still to see how much it differs?  :laugh:
        Thanks for your help :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 10, 2020, 06:48:49 am
        The rumble can be anything up to 40v with an external power supply as long as it's not using too much power (just check the npn2222 specs)
        If you want to use a 5V rumble motor connected to the arduino vcc, the motor has to have a very low power consumption, or else it won't work on the arduino power pin and might even fry it. That's why I use xbox 360 rumbles. But any USB powered rumble motor should work fine I guess?
        The Biogun Xbox port is 5v
        The Biogun DC port is 5v
         
        since these two guns already have a rumble motor to use them, connect them directly to the circuit made and feed them to 5v externally? Even if the console ports are 5v, I doubt that the rumble goes to 5v is there a way to check the voltage without blowing them up? In that of DC there are soldered components, perhaps they serve to reduce the voltage? If so, should I leave them and feed at 5v?

        (http://killone.myqnapcloud.com/sp/motor.jpg)

        The one for xbox that looks the same as the DC one instead had only two wires one connected to the onoff switch and the other went on the main board of the gun

        I don't know how to proceed now: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 10, 2020, 06:56:22 am
        For the solenoid, it has to be powered by a separate power supply, it can't be connected to the arduino.
        The power will depend on your what your solenoid is rated for.
        I use a 24v power supply since my solenoid are all 24v, but again, the IRL540 has quite a large working range (100V max).
        Just don't forget to separate the power lines, and attach all grounds together.

        i took these

        (http://killone.myqnapcloud.com/sp/solenoid.jpg)

        do you think they are fine? the space left is very little with these I should be able to insert them...

        can I power 2 solenoids with a single 24v power supply?

        The cursor duplication/jumping around (thanks for the video by the way) is clearly an issue with the cam seeing your leds "blicking" meaning it has trouble picking them up steadily :-\
        On the old firmware that's the thing that would mess up the tracking and make your cursor move the wrong way.
        On this one, it recalibrates and fixes the problem in real time, preventing the cursor to move in wrong directions, but making it blink sometime when doing so.
        I just modified dfrobot led visualization tool to display/checks the leds and buttons, I will do a special firmware soon to go with it and share it with you ;)

        For the aim moving on its own, you mean it's shaking?
        For this new firmware because I'm reaching the limit of the arduino's memory, I tried to use integers instead of floats for the coordinates calculation, so it lost a little bit of precision. It didn't have much impact on my setup, but that probably depends on the size of the screen, distance and all. I might be able to do something about that if needed.

        Could you please test this firmware and the previous one from the exact same distance/angle and hold the gun still to see how much it differs?  :laugh:
        Thanks for your help :cheers:

        today I will do other tests and let you know :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 10, 2020, 08:11:04 am
        Well, the leds that i have at the moment are sanded so they are less powerful than what they used to be but i've tried them anyway with the new firmware,
        and unfortunately it still suffers from the same issues, but this could very well be due to the leds themselves.

        I need to get new ones and try, i thought about installing 12 leds, 3 on each point and run them to their max specs, meaning 100ma each led.
        What are your thoughts about that, JayBee? Would that cause issues? A testing tool for the leds would help tremendously, so looking forward to that.
        Also, I didn't get the issues kill_one got, just the same ones as before, sometimes moving the gun vertically makes it go horizontal and so forth.
        Again, before jumping into conclusions i think testing with new leds is mandatory.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 10, 2020, 09:05:31 am
        The Biogun Xbox port is 5v
        The Biogun DC port is 5v
         
        since these two guns already have a rumble motor to use them, connect them directly to the circuit made and feed them to 5v externally? Even if the console ports are 5v, I doubt that the rumble goes to 5v is there a way to check the voltage without blowing them up? In that of DC there are soldered components, perhaps they serve to reduce the voltage? If so, should I leave them and feed at 5v?

        The one for xbox that looks the same as the DC one instead had only two wires one connected to the onoff switch and the other went on the main board of the gun

        I don't know how to proceed now: D
        If they are truly powered in 5v and don't use so much current you can use the Arduino vcc.
        But without knowing the current they are using it's a risk to take. I think the max current the vcc can provide is 500mA.

        I'm not sure how to check the max voltage either, I wish I knew how to.
        The best way I found so far is the follow the traces on the original pcb, from the rumble to the power supply, to see which components are used.
        Sometime it's easy to see if the motor is fed directly from the vcc or not.


        i took these

        do you think they are fine? the space left is very little with these I should be able to insert them...

        can I power 2 solenoids with a single 24v power supply?
        I do use a very similar solenoid, so yeah it should work fine!
        For the fitting I had to do so many measure and search for while before finding one that fits, and I still had to trim a little bit of plastic  :lol
        Just remember that you need space both in the front and the back of the solenoid for the recoil to move without damaging anything.

        Yeah a power supply can easily power both solenoid at the same time if it's powerful enough. At least that's what I am doing and it works great :D
        Here are what I am using for the cables and power;
        - 3m microUSB -> USB cable to connect the arduino
        - 3m 2.1mm x 5.5mm connector power cable, male <-> female
        - 3m plastic corrugated tube to hold both cables together and protect them
        - a 24v 4A power supply with 2.1mm x 5.5mm connector (you probably don't need a power supply that strong, I took it large just in case I needed to power more solenoids at a time)
        - 2.1mm x 5.5mm Y adapter to power 2 guns solenoid at a time

        So I just cut the connector of the power cable I don't need, and solder it to the solenoid driver pcb.
        I attached some images of those parts if you need.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 10, 2020, 09:34:35 am
        Well, the leds that i have at the moment are sanded so they are less powerful than what they used to be but i've tried them anyway with the new firmware,
        and unfortunately it still suffers from the same issues, but this could very well be due to the leds themselves.

        I need to get new ones and try, i thought about installing 12 leds, 3 on each point and run them to their max specs, meaning 100ma each led.
        What are your thoughts about that, JayBee? Would that cause issues? A testing tool for the leds would help tremendously, so looking forward to that.
        Also, I didn't get the issues kill_one got, just the same ones as before, sometimes moving the gun vertically makes it go horizontal and so forth.
        Again, before jumping into conclusions i think testing with new leds is mandatory.
        I will see if I can finish the tool tomorrow, I definetely want to check how the led detection behave on your system, to be sure to know where the issue is coming from.
        This new firmware should be correcting those kind of detection problems in real time, but it might need some more work and testing.

        Having 3 leds on each point is actually the solution I was going to try, it seems like the solution used in many IR systems (the wii sensor bar for instance).
        But then I saw those:
        https://www.aliexpress.com/item/32862219437.html
        1W power, 120 degrees, looks easy to use on any surface...
        I have no idea how well it would work on our system, nor how to power them, but I still ordered some of them just to try :lol
        Might take a while to come from china, but I will keep you guys updated once I got to test them.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 10, 2020, 04:25:48 pm
        - 10k resistor
        Doubt...10k or 100k ? Because in the scheme there is a 100k resistance
         Which one to use? :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 10, 2020, 09:49:25 pm
        Doubt...10k or 100k ? Because in the scheme there is a 100k resistance
         Which one to use? :D
        I'm using 10k, but 100k should be fine too, it doesn't matter so much as long the resistor value is high enough to not short the data pin ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 02:35:37 am
        I'm using 10k, but 100k should be fine too, it doesn't matter so much as long the resistor value is high enough to not short the data pin ;)

        Ok since I had the 10k ones I will use those... Thanks

        Recalibrating the gun with the new firmware is much better it has come back to be precise, but it still happens that pointing to the center of the screen the cursor moves to the right and remains blocked on the right side or off-center on the right, then I have to tilt the gun several times on one side to make it return to normal and then also the cursor duplicated every now and then, I don't know if it can depend on the LEDs on the right, I will wait for the tool to check them :)

        Link to video
        https://photos.app.goo.gl/RVx1jzdREEV9iEfA7 (https://photos.app.goo.gl/RVx1jzdREEV9iEfA7)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 04:13:15 am
        * 2020/02/11 - IR cam testing tool
        - I uploaded the Processing sketch for testing the IR points, and the firmware that works with it.

        Read in the main post to see how it works  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 04:26:17 am

        Recalibrating the gun with the new firmware is much better it has come back to be precise, but it still happens that pointing to the center of the screen the cursor moves to the right and remains blocked on the right side or off-center on the right, then I have to tilt the gun several times on one side to make it return to normal and then also the cursor duplicated every now and then, I don't know if it can depend on the LEDs on the right, I will wait for the tool to check them :)

        Link to video
        https://photos.app.goo.gl/RVx1jzdREEV9iEfA7 (https://photos.app.goo.gl/RVx1jzdREEV9iEfA7)
        Thanks for your testing and videos  :cheers:
        I can see there is clearly a detection issue there, I'm interested to see how it react with the testing tool I just posted ;)


        I think I actually found what's making the detection go crazy when there is a misdetection of IR points, I'm quite confident that can be fixed/improved with a software update, so it might come in the next update!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 04:30:48 am
        This is the circuit that I created, I used IRF540 which is equivalent to IRL540 then 1N4001 Res 1k 10k transistor 2222 and res 270ohm.
        can you tell me if the connections are all correct or did i do something wrong? It only remains to be seen whether the motors I have are powered by 5v or 3.7v. :D
        (http://killone.myqnapcloud.com/sp/circuit.jpg)
        (http://killone.myqnapcloud.com/sp/circuit3.jpg)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 04:35:00 am
        I can see there is clearly a detection issue there, I'm interested to see how it react with the testing tool I just posted ;)

        Great! thanks! I will test it after lunch! :D

        so should the firmware be replaced to test it?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 05:14:44 am
        This is the circuit that I created, I used IRF540 which is equivalent to IRL540 then 1N4001 Res 1k 10k transistor 2222 and res 270ohm.
        can you tell me if the connections are all correct or did i do something wrong? It only remains to be seen whether the motors I have are powered by 5v or 3.7v. :D
        Sadly the IRF540 isn't the same, it's a power gate instead of a logic level gate.
        The IRL540 will either fully open or fully close its gate when receiving a signal from the arduino, no matter the voltage.
        The IRF540 will open the gate depending of the voltage it receives, with a maximum of 10v, meaning at 5v it will open half, your solenoid will be underpowered  :-\

        The rumble circuit seems fine, but there are few mistakes in your solenoid circuit:
        The 10k resistor should not be between the mosfet and the ground, but between the Gate pin and the Source pin of the mosfet.
        And I think you reversed the gate pin and the drain pin of the Mosfet. I know it's confusing but the mosfet schematic pin order isn't the same as the real pin order.

        I attached a pinout image for the mosfet.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 05:35:07 am
        * 2020/02/11 - 1.60 beta
        - I updated both the beta firmware and the test tool firmware to reduce the detection issues.

        @kill_one & @Foxhole this version should improve the detection problems, I updated both the normal firmware and the test tool firmware.
        Tell me if it works better for you ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 06:19:23 am
        Sadly the IRF540 isn't the same, it's a power gate instead of a logic level gate.
        The IRL540 will either fully open or fully close its gate when receiving a signal from the arduino, no matter the voltage.
        The IRF540 will open the gate depending of the voltage it receives, with a maximum of 10v, meaning at 5v it will open half, your solenoid will be underpowered  :-\
        ahhhhhhhrgghhhhh! At the shop they told me it was the same ...: D oh well but the solenoid works the same even if underpowered?

        The 10k resistor should not be between the mosfet and the ground, but between the Gate pin and the Source pin of the mosfet.
        And I think you reversed the gate pin and the drain pin of the Mosfet. I know it's confusing but the mosfet schematic pin order isn't the same as the real pin order.
        I attached a pinout image for the mosfet.
        ah ok, thanks! As soon as IRL540 mosfets arrive that I ordered today I change the connections
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 07:51:50 am
        JayBee, I'm trying your test firmware with the pde file but i get the exact same issues.
        I flashed the test firmware, started JB_ircam_test.pde, pressed run, and i get a gray screen, just like with the dfrobot ir cam code.
        I believe it doesn't open the right COM port, the com port is 13 but i don't see any manual way to choose it.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 08:12:19 am
        Also, i installed the 12 leds, 3 in each point, with 100ma current going through them, they are brighter than before.
        Unfortunately, there are still issues, same ones as in my video, with all the firmwares, including the new 1.60, it tends to happen more often when coming from offscreen reload,
        though i gotta say that with the new setup with the leds it's more stable than before, though not sure if it's because there are 3 on each point or because it's running on 100ma.
        It's more playable now from about 1.3 meter, but trying to get closer results in more detection issues making it unplayable in games like point blank which require fast response.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 08:17:52 am
        JayBee, I'm trying your test firmware with the pde file but i get the exact same issues.
        I flashed the test firmware, started JB_ircam_test.pde, pressed run, and i get a gray screen, just like with the dfrobot ir cam code.
        I believe it doesn't open the right COM port, the com port is 13 but i don't see any manual way to choose it.
        You don't have any other device connected that might be using a serial port?
        The pde file is coded to connect on the first available port, but your arduino might not be the first one somehow  :dizzy:
        To manually force the serial port, in the pde file, replace this line:
        Code: [Select]
        myPort = new Serial(this, Serial.list()[0], 9600);By this line (if 13 is your arduino serial port):
        Code: [Select]
        myPort = new Serial(this, "COM13", 9600);
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 08:36:45 am
        That fixed it, it's working now.
        From what i can see it seems to detect each point twice(?)
        gonna post a video soon.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 08:39:45 am
        That fixed it, it's working now.
        From what i can see it seems to detect each point twice(?)
        gonna post a video soon.
        No it detects them only once, the second ones (slightly grayed ones) are with the tilt correction, it makes thing easier to check.
        Just tilt the gun a bit you will see what I mean  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 08:42:15 am
        * 2020/02/11 - 1.65 beta
        - I updated both the firmware once again to fix some bugs and reduce the detection issues even more.

        Also, i installed the 12 leds, 3 in each point, with 100ma current going through them, they are brighter than before.
        Unfortunately, there are still issues, same ones as in my video, with all the firmwares, including the new 1.60, it tends to happen more often when coming from offscreen reload,
        though i gotta say that with the new setup with the leds it's more stable than before, though not sure if it's because there are 3 on each point or because it's running on 100ma.
        It's more playable now from about 1.3 meter, but trying to get closer results in more detection issues making it unplayable in games like point blank which require fast response.
        I made another update, managed to find other causes of issues and fix them, it should work a lot better and more stable now.
        Tell me if that makes any difference for you  ;D

        Also in this testing firmware I left the mouse control on, to check how the cursor is moving at the same time as testing with the tool.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 08:53:52 am
        I've uploaded a video of me testing the IR Test, this is with the first IR Test you uploaded, I'll also try the new one.
        https://drive.google.com/open?id=15bZ7yGlOgKJ37o0zE1ZBFgGQ65oOLFps (https://drive.google.com/open?id=15bZ7yGlOgKJ37o0zE1ZBFgGQ65oOLFps)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 09:10:35 am
        I've uploaded a video of me testing the IR Test, this is with the first IR Test you uploaded, I'll also try the new one.
        https://drive.google.com/open?id=15bZ7yGlOgKJ37o0zE1ZBFgGQ65oOLFps (https://drive.google.com/open?id=15bZ7yGlOgKJ37o0zE1ZBFgGQ65oOLFps)
        Thanks for your video, I can see more clearly what's happening now :cheers:
        Both issues you had should actually be fixed in the last test firmware.
        If you still get the first issue (axises flipped 90degrees), tell me, we might try something else if needed ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 09:22:40 am
        You don't have any other device connected that might be using a serial port?
        The pde file is coded to connect on the first available port, but your arduino might not be the first one somehow  :dizzy:
        To manually force the serial port, in the pde file, replace this line:
        Code: [Select]
        myPort = new Serial(this, Serial.list()[0], 9600);By this line (if 13 is your arduino serial port):
        Code: [Select]
        myPort = new Serial(this, "COM13", 9600);

        ah that's why it wasn't going ... I will try the test tonight, instead the firmware 1.60 was much better but every now and then the cursor would be thrown the same I will also try 1.65 tonight :)

        The rumble engines of the xbox 360 that you used feed directly to the 5v? could you insert photos of the ones you made? Thank you
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 09:22:57 am
        Two more videos with the new IR Test firmware, I specifically wanted to show the difference between close and far, close = 70~85cm, far = 1.2M~1.3M
        You can see the issues when coming back from offscreen, much worse when being close.
        Close: https://drive.google.com/open?id=1wqlxqMSKPuO2LOhYP1SfgMXWLFWhHr8F (https://drive.google.com/open?id=1wqlxqMSKPuO2LOhYP1SfgMXWLFWhHr8F)
        Far: https://drive.google.com/open?id=1rdHbK-zS34g7Wl8AhOxh29Gxw4LC-e-x (https://drive.google.com/open?id=1rdHbK-zS34g7Wl8AhOxh29Gxw4LC-e-x)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 09:41:42 am
        Two more videos with the new IR Test firmware, I specifically wanted to show the difference between close and far, close = 70~85cm, far = 1.2M~1.3M
        You can see the issues when coming back from offscreen, much worse when being close.
        Close: https://drive.google.com/open?id=1wqlxqMSKPuO2LOhYP1SfgMXWLFWhHr8F (https://drive.google.com/open?id=1wqlxqMSKPuO2LOhYP1SfgMXWLFWhHr8F)
        Far: https://drive.google.com/open?id=1rdHbK-zS34g7Wl8AhOxh29Gxw4LC-e-x (https://drive.google.com/open?id=1rdHbK-zS34g7Wl8AhOxh29Gxw4LC-e-x)
        Wait, I don't see any issues in your videos :lol
        The leds are all moving and rotating correctly on the test tool.
        Can you tell me what is the issue?

        If it's the led staying black color when going back on screen after being out of range it's actually normal.
        When losing track of all the leds (going off range), the system needs to see at least 3 leds again to know which is which.

        It should actually need only 2 leds, but I disabled the 2 leds detection function on the last beta firmware to fix the 4 and 3 leds detection first.
        I'm enabling it back right now, I will upload the next test firmware in few minutes if everything goes well ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 09:53:53 am
        Two more videos with the new IR Test firmware, I specifically wanted to show the difference between close and far, close = 70~85cm, far = 1.2M~1.3M
        You can see the issues when coming back from offscreen, much worse when being close.
        Close: https://drive.google.com/open?id=1wqlxqMSKPuO2LOhYP1SfgMXWLFWhHr8F (https://drive.google.com/open?id=1wqlxqMSKPuO2LOhYP1SfgMXWLFWhHr8F)
        Far: https://drive.google.com/open?id=1rdHbK-zS34g7Wl8AhOxh29Gxw4LC-e-x (https://drive.google.com/open?id=1rdHbK-zS34g7Wl8AhOxh29Gxw4LC-e-x)
        Wait, I don't see any issues in your videos :lol
        The leds are all moving and rotating correctly on the test tool.
        Can you tell me what is the issue?

        If it's the led staying black color when going back on screen after being out of range it's actually normal.
        When losing track of all the leds (going off range), the system needs to see at least 3 leds again to know which is which.

        It should actually need only 2 leds, but I disabled the 2 leds detection function on the last beta firmware to fix the 4 and 3 leds detection first.
        I'm enabling it back right now, I will upload the next test firmware in few minutes if everything goes well ;)
        Thing is, when trying to play close this causes issues.
        Let me give you a scenario, you start a game of point blank, you're resting your hand, game starts and you need to shoot on the lower left of the screen, the gun will not fire, because you need to aim towards the center first. If playing from 1.2M it's not that big of a deal actually, but when close it's pretty much a deal breaker.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 10:04:06 am
        Thing is, when trying to play close this causes issues.
        Let me give you a scenario, you start a game of point blank, you're resting your hand, game starts and you need to shoot on the lower left of the screen, the gun will not fire, because you need to aim towards the center first. If playing from 1.2M it's not that big of a deal actually, but when close it's pretty much a deal breaker.
        Yes I know, that's why I'm putting back the 2 leds detection function now.
        I just removed it for the beta version (hence the beta title ;) ), just to fix the bugs one by one.
        2 leds is enough to shoot in corners. If the cam is just close enough to see the 4 leds, it will catch 2 leds right away in corners/borders ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 10:06:03 am
        Great, i'll try the new firmware and report.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 10:24:58 am
        Great, i'll try the new firmware and report.
        The re-implementation of the 2 points detection is taking me a bit more time than expected, I need to change the way it work to fit my new code.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 10:46:19 am
        The re-implementation of the 2 points detection is taking me a bit more time than expected, I need to change the way it work to fit my new code.

        so I who have 2 LEDs per point, shouldn't I use the latest firmware?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 10:48:14 am
        but is it normal that this happens in the test tool?

        https://photos.app.goo.gl/pjzWq4PuFxzNEPZr7 (https://photos.app.goo.gl/pjzWq4PuFxzNEPZr7)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 10:49:31 am
        so I who have 2 LEDs per point, shouldn't I use the latest firmware?
        Sorry for the confusion, I was talking about 2 points detection when going back onscreen, not 2 leds.
        You can have as much leds as you want on each points it should be fine  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 10:51:43 am
        but is it normal that this happens in the test tool?

        https://photos.app.goo.gl/pjzWq4PuFxzNEPZr7 (https://photos.app.goo.gl/pjzWq4PuFxzNEPZr7)
        Not normal at all... what's your screen resolution/refresh rate?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 11:14:21 am
        Not normal at all... what's your screen resolution/refresh rate?
        Windows 1024x240  60hz  and Mame resolution is 2560x240 60hz  :D
        it is a 15khz arcade monitor...
        can the test window be set to fullscreen?

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 11:29:22 am
        * 2020/02/12 - 1.66
        - fixed some bugs and re implemented the 2 points detection

        Great, i'll try the new firmware and report.
        Done! 2 points detection is back ;D
        I hope this time it's working fine  :cheers:

        Windows 1024x240  60hz  and Mame resolution is 2560x240 60hz  :D
        it is a 15khz arcade monitor...
        can the test window be set to fullscreen?
        Oh, that explains the issue :laugh2:
        yeah this app is supposed to be running in 1024x768, the native resolution of the IR cam sensor.
        Can you run the desktop at 480i instead just for testing?
        I will try to make the app fit in 640x480 :P

        Edit: I just modified it to fit 640x480, and while I was at it I did another version for 1024x240  :lol
        You will find them in the zip attached to this post
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 12:07:41 pm
        Unfortunately, with the new firmware, it still has issues when trying to play close.
        Included another short video.
        Sometimes, even after detecting 2 leds they still stay black and the cursor is stuck.
        Happens often while gaming.
        https://drive.google.com/open?id=1qg0YXbC96wi5R3u6-aUxk0tMmtPkCWKj (https://drive.google.com/open?id=1qg0YXbC96wi5R3u6-aUxk0tMmtPkCWKj)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 12:14:38 pm
        Edit: I just modified it to fit 640x480, and while I was at it I did another version for 1024x240  :lol
        You will find them in the zip attached to this post

        you are great! :D
        I will try tonight... ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 12:56:54 pm
        (http://killone.myqnapcloud.com/sp/rumbl.jpg)

        i found and removed these from an old broken usb joypad for pc, what happens if i power externally at 5v and i am not at 5v? They explode ??? : D

        I think those of bioguns xbox e DC are 3v or 3.7v even if I don't find much info about it... how can I reuse them?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 01:21:31 pm
        Unfortunately, with the new firmware, it still has issues when trying to play close.
        Included another short video.
        Sometimes, even after detecting 2 leds they still stay black and the cursor is stuck.
        Happens often while gaming.
        https://drive.google.com/open?id=1qg0YXbC96wi5R3u6-aUxk0tMmtPkCWKj (https://drive.google.com/open?id=1qg0YXbC96wi5R3u6-aUxk0tMmtPkCWKj)
        I see what's happening; from the way the corrected points (gray points) are oriented, the gun was tilted on the side when the cam went off range of the leds, and was in a different angle when back.
        Without gravity sensor tracking the twist out of the leds range is impossible, so for the 2/3 points recognition to work, the twist when going off range and the twist when going back on has to be around the same (it has around 35 degrees tolerance).
        But it should always come back instantly when seeing the 4 leds again anyway, no matter the angle.

        It's weird tho, during the many hours I tested the gun, I never had a case where 3 points where not recognized. Sometime it wasn't recognized correctly with an older firmware, but never not recognized at all.

        I made a small fix that might help with the issue, can you test the firmware attached to this post and tell me if you see any difference? (replace the one in the test folder)

        I also have some other ideas if this fix doesn't work well, but it will have to wait tomorrow  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 01:29:07 pm

        i found and removed these from an old broken usb joypad for pc, what happens if i power externally at 5v and i am not at 5v? They explode ??? : D

        I think those of bioguns xbox e DC are 3v or 3.7v even if I don't find much info about it... how can I reuse them?
        I'm still not an electronic specialist, but if I was you I would start powering them with a couple of AA batteries (so a total of 3~3.3V) to check how well they turn.
        And then try with a 5V power to see if they seem to turn faster/too fast.
        Motors have quite a good tolerance for over voltage usually, so it shouldn't blow up or anything.
        If it's USB there is a big chance it's 5V tho, 3V ones are more likely to be smaller than that and be in wireless controllers.
        There are even motors that work with 7~9V in the PS2 Dual shock controllers, but they are turning a bit slow and weak with the arduino :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 01:49:55 pm
        To be honest, when i had the issues i didn't intentionally cause them, it just happened during gaming.
        As for the new IR test, any chance of having a regular firmware to try while gaming?
        As with murphy's law, in the ir test things seem to be ok, but i can't know for sure until i can challenge the gun with actual gaming.
        Edit: Scratch that, still having issues.
        Gonna post a video soon.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 02:07:16 pm
        Unfortunately i kinda messed up with the phone's camera but the important part is near the end, and you'll be able to see the cursor messing up.
        Video: https://drive.google.com/open?id=1zWEkAIouOJjYLIhZeE1PaEPkSsSMsr9- (https://drive.google.com/open?id=1zWEkAIouOJjYLIhZeE1PaEPkSsSMsr9-)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 02:17:55 pm
        To be honest, when i had the issues i didn't intentionally cause them, it just happened during gaming.
        As for the new IR test, any chance of having a regular firmware to try while gaming?
        As with murphy's law, in the ir test things seem to be ok, but i can't know for sure until i can challenge the gun with actual gaming.
        Edit: Scratch that, still having issues.
        Gonna post a video soon.
        Damn, sad you still have issues... but don't lose hope, it's a work in progress but I'm sure with your guys help we will make it work in the end  :lol :cheers:
        I appreciate that you take time to do those test, it's useful to figure out the causes of the issues.
        What are the issues you're having now? still the same?
        I attached the non test firmware, you will have to rename it.
        The small fix I did on it is a small fix like putting tape an a leak, so don't expect much.
        I already found another way I can improve greatly the 2 points detection and fixing the 3 points one, but I will have to do that tomorrow!

        --------------
        By the way guys, I was thinking that since I spend pretty much all my free time in this project, would it seems to you like a clever idea to do a patreon?
        Leave the firmware and basic tools for free, and give to my patreon sub access to my upcoming configuration/customize and testing tool for the lightgun, and my other custom arduino arcade projects (Arcade stick and leds controller with arduino).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 02:24:13 pm
        Unfortunately i kinda messed up with the phone's camera but the important part is near the end, and you'll be able to see the cursor messing up.
        Video: https://drive.google.com/open?id=1zWEkAIouOJjYLIhZeE1PaEPkSsSMsr9- (https://drive.google.com/open?id=1zWEkAIouOJjYLIhZeE1PaEPkSsSMsr9-)
        Yeah that's what I was talking about, the 2 points detection got messed up, then messed up the rest.
        Will correct that tomorrow and hope for the best!  :afro:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 02:30:35 pm
        Thank you.
        As for the patreon, to be honest never used it but others may be on board.
        Personally, i just prefer donating without any middleman.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 02:36:20 pm
        Thank you.
        As for the patreon, to be honest never used it but others may be on board.
        Personally, i just prefer donating without any middleman.
        That's interesting, do you know any good way to make donations?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 11, 2020, 02:38:13 pm
        Well, just plain old paypal.
        That's how i donated throughout the years.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 02:39:54 pm
        Haha yeah I forgot you could donate with PayPal!
        I will try that.  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 03:05:17 pm
        Edit: I just modified it to fit 640x480, and while I was at it I did another version for 1024x240  :lol
        You will find them in the zip attached to this post

        Sorry I forgot that the windows resolution is not 1024x240 but 1024x480: D

        the 2 LEDs are seen almost superimposed and I think that's how it should be, by tilting the gun, however, they divide and widen if point downwards there is a black point that moves and then the movements are reversed, that is, if point in top the LEDs move downwards etc. and the central white point seems to be decentralized on the right and the colored LEDs too far from the sides
        https://photos.app.goo.gl/jFTm9qQSpsoyB2Xb6 (https://photos.app.goo.gl/jFTm9qQSpsoyB2Xb6)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 03:48:29 pm
         https://photos.app.goo.gl/bUEDRdhdgwJJy2rT9 (https://photos.app.goo.gl/bUEDRdhdgwJJy2rT9)


        but the black dots indicate that there is a problem with the detection of the leds?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 04:08:41 pm
        I'm still not an electronic specialist, but if I was you I would start powering them with a couple of AA batteries (so a total of 3~3.3V) to check how well they turn.
        And then try with a 5V power to see if they seem to turn faster/too fast.
        Motors have quite a good tolerance for over voltage usually, so it shouldn't blow up or anything.
        If it's USB there is a big chance it's 5V tho, 3V ones are more likely to be smaller than that and be in wireless controllers.
        There are even motors that work with 7~9V in the PS2 Dual shock controllers, but they are turning a bit slow and weak with the arduino :lol

        you are certainly more experienced than me ...: D

        3v
        https://photos.app.goo.gl/JJTsMyCCysG7KhtG6 (https://photos.app.goo.gl/JJTsMyCCysG7KhtG6)

        5v
        https://photos.app.goo.gl/PH7Vb4YhUWR5b7jbA (https://photos.app.goo.gl/PH7Vb4YhUWR5b7jbA)

        it seems that at 5v it is much faster ... does this mean that it must go to 5v or that it is in overvoltage and therefore it turns faster?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 08:21:14 pm
        Sorry I forgot that the windows resolution is not 1024x240 but 1024x480: D

        the 2 LEDs are seen almost superimposed and I think that's how it should be, by tilting the gun, however, they divide and widen if point downwards there is a black point that moves and then the movements are reversed, that is, if point in top the LEDs move downwards etc. and the central white point seems to be decentralized on the right and the colored LEDs too far from the sides
        https://photos.app.goo.gl/jFTm9qQSpsoyB2Xb6 (https://photos.app.goo.gl/jFTm9qQSpsoyB2Xb6)
        It's a normal behavior, it doesn't see 2 LEDs for each of the 4 points(the maximum LEDs this cam can pick up is 4)
        The duplicated slightly grayish ones you can see are not real LED points, they are only there to show the result of the tilt correction made by the firmware.
        So they should always stay horizontal.
        It's just a way of checking if everything is working normally;
        Their position doesn't matter, but if those start being twisted of flipped, then is something wrong.
        https://photos.app.goo.gl/bUEDRdhdgwJJy2rT9 (https://photos.app.goo.gl/bUEDRdhdgwJJy2rT9)


        but the black dots indicate that there is a problem with the detection of the leds?
        Not necessarily, it just means the system can see it, but doesn't know which of the 4 LEDs it is yet (Top, bottom, left, right).
        It's normal when seeing only one led after aiming offrange.

        But I just realized something funny: your gun is clearly picking up the scrolling light under your cab, and it messes with it  :laugh2:
        I'm still not an electronic specialist, but if I was you I would start powering them with a couple of AA batteries (so a total of 3~3.3V) to check how well they turn.
        And then try with a 5V power to see if they seem to turn faster/too fast.
        Motors have quite a good tolerance for over voltage usually, so it shouldn't blow up or anything.
        If it's USB there is a big chance it's 5V tho, 3V ones are more likely to be smaller than that and be in wireless controllers.
        There are even motors that work with 7~9V in the PS2 Dual shock controllers, but they are turning a bit slow and weak with the arduino :lol

        you are certainly more experienced than me ...: D

        3v
        https://photos.app.goo.gl/JJTsMyCCysG7KhtG6 (https://photos.app.goo.gl/JJTsMyCCysG7KhtG6)

        5v
        https://photos.app.goo.gl/PH7Vb4YhUWR5b7jbA (https://photos.app.goo.gl/PH7Vb4YhUWR5b7jbA)

        it seems that at 5v it is much faster ... does this mean that it must go to 5v or that it is in overvoltage and therefore it turns faster?

        Yeah the 5v looks correct for me.
        Well I think the worse that can happen is frying the motor, nothing much worse (I guess  :lol)
        But again, if someone better than me at electronics can confirm that to you that would be better ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 08:56:43 pm
        Yeah the 5v looks correct for me.
        Well I think the worse that can happen is frying the motor, nothing much worse (I guess  :lol)
        But again, if someone better than me at electronics can confirm that to you that would be better ;)

        In the biogun xbox I identified an LM3940IT ic which from what I read is a Low Dropout Regulator for 5V to 3.3V Conversion so I believe that the motors in these guns are 3v can I use this between the 5v of the arduino and the rumble to reduce the voltage?



        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 11, 2020, 09:02:03 pm
        But I just realized something funny: your gun is clearly picking up the scrolling light under your cab, and it messes with it  :laugh2:

        I tested the 1.66 firmware and I must say that it is almost perfect for me apart that sometimes the cursor now ends and remains hooked to the bottom side of the screen ... Could it be the lights that drive the cam ir crazy ???
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 11, 2020, 09:17:56 pm
        In the biogun xbox I identified an LM3940IT ic which from what I read is a Low Dropout Regulator for 5V to 3.3V Conversion so I believe that the motors in these guns are 3v can I use this between the 5v of the arduino and the rumble to reduce the voltage?
        If it looks like it's rated for 3V, you could use a small 5v->3v converter and connect it to the arduino 5v vcc, it should work fine.
        Do you have a breadboard to do the tests?
        I tested the 1.66 firmware and I must say that it is almost perfect for me apart that sometimes the cursor now ends and remains hooked to the bottom side of the screen ... Could it be the lights that drive the cam ir crazy ???
        It most likely is from what I could see in your last video  :lol
        Try testing the gun with the light off, or something blocking it completely.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 03:38:37 am
        If it looks like it's rated for 3V, you could use a small 5v->3v converter and connect it to the arduino 5v vcc, it should work fine.
        Do you have a breadboard to do the tests?

        breadboard no but i'm have veroboard base, however in practice it would be enough for me to connect:

        (http://killone.myqnapcloud.com/sp/circuitm.jpg)
        (http://killone.myqnapcloud.com/sp/LM3.jpg)

        rumble + to pin1
        rumble - to pin2
        Motor- to pin 2
        Motor + to pin 3

        to reduce the voltage to 3.3v, is it correct?

        And regarding the solenoid, I have two only two blue cables, since it is not specified it has a positive and negative pole or is it indifferent how do I connect them to the circuit? Can I power the solenoid directly to 24v to test it without the circuit?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 03:48:05 am
        rumble + to pin1
        rumble - to pin2
        Motor- to pin 2
        Motor + to pin 3

        to reduce the voltage to 3.3v, is it correct?
        Sorry I have no idea, I don't know this type of component so much  :P
        And regarding the solenoid, I have two only two blue cables, since it is not specified it has a positive and negative pole or is it indifferent how do I connect them to the circuit? Can I power the solenoid directly to 24v to test it without the circuit?
        I have one with 2 blue cables too, and it looks like there are no polarity, it probably contains a diode bridge of some sort.
        For the test yeah you can power it directly, but be very careful tho, don't shock yourself, and don't leave the solenoid activated more than 1 or 2 second (it will most likely start overheating after few seconds of leaving it hold). do you have a push button of something similar to test it?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 05:34:21 am
        I have one with 2 blue cables too, and it looks like there are no polarity, it probably contains a diode bridge of some sort.
        For the test yeah you can power it directly, but be very careful tho, don't shock yourself, and don't leave the solenoid activated more than 1 or 2 second (it will most likely start overheating after few seconds of leaving it hold). do you have a push button of something similar to test it?

        You mean an onoff button? I can get it but how should I connect it then?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 05:40:59 am
        You mean an onoff button? I can get it but how should I connect it then?
        Definitely not an onoff button, you don't want your solenoid to be powered too long.
        I meant a push switch, only closing the circuit when you push.
        Like the buttons in arcade controls.
        Be careful that it's strong enough to not get damaged by the 24v tho.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 05:47:06 am
        I meant a push switch, only closing the circuit when you push.
        Like the buttons in arcade controls.
        Be careful that it's strong enough to not get damaged by the 24v tho.
        I have arcade ones, but how is it connected to the power supply and the solenoid? :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 06:15:35 am
        I meant a push switch, only closing the circuit when you push.
        Like the buttons in arcade controls.
        Be careful that it's strong enough to not get damaged by the 24v tho.
        I have arcade ones, but how is it connected to the power supply and the solenoid? :D
        There are many ways of doing it, but in my case I just use an adapter to connect the power supply to normal wires (see attached pic), a breadboard, few wires and an old push button I use mainly for testing.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 06:30:23 am
        There are many ways of doing it, but in my case I just use an adapter to connect the power supply to normal wires (see attached pic), a breadboard, few wires and an old push button I use mainly for testing.

        yes ok  +24v e gnd of power supply to male connector and two pin blu to female connector right ? and push button where should it be placed?

        sorry but I told you that I am even less experienced than you in this field ...; D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 07:15:58 am
        There are many ways of doing it, but in my case I just use an adapter to connect the power supply to normal wires (see attached pic), a breadboard, few wires and an old push button I use mainly for testing.

        yes ok  +24v e gnd of power supply to male connector and two pin blu to female connector right ? and push button where should it be placed?

        sorry but I told you that I am even less experienced than you in this field ...; D
        I use only the left one on the picture, because my power supply already has connector like on the right.
        If your power supply only have raw wires you can just connect them directly.
        The switch should be put between the 24v and the solenoid OR the GND and the solenoid, either wire is fine, it's just to close the circuit only when you push the button ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 07:20:01 am
        I use only the left one on the picture, because my power supply already has connector like on the right.
        If your power supply only have raw wires you can just connect them directly.
        The switch should be put between the 24v and the solenoid OR the GND and the solenoid, either wire is fine, it's just to close the circuit only when you push the button ;)

        There! Now I understand: D ... By the way today try to cover the lights and see if the fall at the bottom of the cursor depends on that ... but which firmware should I use 1.67 or 1.66?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 07:23:46 am
        * 2020/02/12 - 1.68
        - Improved the 2 points detection and optimized the other functions

        There! Now I understand: D ... By the way today try to cover the lights and see if the fall at the bottom of the cursor depends on that ... but which firmware should I use 1.67 or 1.66?
        The one I just posted  :lol

        @Foxhole
        I improved the 2 points detection, now it should pick them up more easily.
        But it might need some more testing to see if the increased tolerance didn't increase the problems with twisting offscreen ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 07:38:58 am
        Thank you, i'm gonna give it a good challenge  :cheers:
        Is the IR Test also updated?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 07:48:25 am
        Thank you, i'm gonna give it a good challenge  :cheers:
        Is the IR Test also updated?
        Yes both are updated.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 08:00:04 am
        Yes both are updated.

        If you have time, could you make a 1024x480 version of the tool to test the LEDs? Thanks :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 08:06:25 am
        It's almost perfect now, i'm still having abnormalities now and then and since they are becoming more rare it's hard capturing it in video.
        I was playing Point Blank, everything seemed fine for 3 minutes or so, and then all of a sudden when i was aiming a bit to the lower left of the center the gun was shooting on the upper right, i think it somehow flipped the axis, though i wasn't coming from offscreen or anything, i was aiming to the lower right just a second ago and when moving to the lower left it somehow fired to the upper right. I can't seem to capture this in the IR Test, it's becoming much harder to reproduce these issues now since there are basically almost none now.
        I'm gonna try a game like lethal enforcers 2 now, to test offscreen, will let you know the results.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 08:11:24 am
        The same issue happened more often in Lethal enforcers 2, i was aiming to the right edge of the screen and it fired just a tiny bit left to center, this leads me to believe it was detecting the Left LEDS and not the right LEDS.
        By the way, i think firmware 1.65 was perhaps the best for playing from afar (Over 1M), there were basically almost no issues.
        The problems occur only when trying to get closer.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 08:27:04 am
        It's almost perfect now, i'm still having abnormalities now and then and since they are becoming more rare it's hard capturing it in video.
        I was playing Point Blank, everything seemed fine for 3 minutes or so, and then all of a sudden when i was aiming a bit to the lower left of the center the gun was shooting on the upper right, i think it somehow flipped the axis, though i wasn't coming from offscreen or anything, i was aiming to the lower right just a second ago and when moving to the lower left it somehow fired to the upper right. I can't seem to capture this in the IR Test, it's becoming much harder to reproduce these issues now since there are basically almost none now.
        I'm gonna try a game like lethal enforcers 2 now, to test offscreen, will let you know the results.
        Glad it's becoming better!  :cheers:
        Thanks for your testing, I think I know what might have happened when you had the issue.
        There might have been a small tracking error, then it tried to recalibrate and failed.
        This kind of errors are prone to happen the closer you get from the screen, but I guess it's also a good way to test the reliability of the system  :lol
        I really which we had better cam/sensor to work with haha


        If you have time, could you make a 1024x480 version of the tool to test the LEDs? Thanks :)
        I'm actually doing another version that can work with pretty much any resolution/COM port ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 08:28:52 am
        The same issue happened more often in Lethal enforcers 2, i was aiming to the right edge of the screen and it fired just a tiny bit left to center, this leads me to believe it was detecting the Left LEDS and not the right LEDS.
        By the way, i think firmware 1.65 was perhaps the best for playing from afar (Over 1M), there were basically almost no issues.
        The problems occur only when trying to get closer.
        Gotcha. So is this issue the same as before or kind of new with the last firmware?
        The 1.65 was better from afar?

        Edit: what mainly changed from the 1.65 version is that now the detection resets if there are tracking errors, and the 2 leds detection is far more forgiving (but a bit less precise).
        So both of those fixes are correcting misdetection issues but might also lead to some other misdetection.
        At this point it's mainly trying to find the balance between tolerance and risks of errors  ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 08:32:53 am
        The same issue happened more often in Lethal enforcers 2, i was aiming to the right edge of the screen and it fired just a tiny bit left to center, this leads me to believe it was detecting the Left LEDS and not the right LEDS.
        By the way, i think firmware 1.65 was perhaps the best for playing from afar (Over 1M), there were basically almost no issues.
        The problems occur only when trying to get closer.
        Gotcha. So is this issue the same as before or kind of new with the last firmware?
        The 1.65 was better from afar?
        I think it was also in the older firmwares but we didn't pay too much attention to it because we believed it to be due to the offscreen.
        1.65 was pretty stable because 2 point detection was off, so there were less mistakes when playing from afar.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 08:34:34 am
        If you'd like i can test firmware 1.65 more extensively from afar to see how it holds up in long gaming sessions.
        I think i'll try it on House of the dead 3.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 08:35:37 am
        I think it was also in the older firmwares but we didn't pay too much attention to it because we believed it to be due to the offscreen.
        1.65 was pretty stable because 2 point detection was off, so there were less mistakes when playing from afar.
        Indeed, the 2 points detection is great to aim in corners but obviously more prone to errors if there are any tracking issues :banghead:
        If you'd like i can test firmware 1.65 more extensively from afar to see how it holds up in long gaming sessions.
        I think i'll try it on House of the dead 3.
        Ah, house of the dead 3, a very nice one to test ;D
        If you don't mind I will give you a test version of the last 1.68 firmware, but with the detection reset trigger a bit less sensitive, to see if it works better :P
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 08:36:27 am
        Do you think making this system an 8 point system would allow better stability when playing close?
        What i mean about 8 point is to add leds on the corners of the screen.
        Never mind, just remembered that the dfrobot can only track 4 points.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 08:41:43 am
        If you don't mind I will give you a test version of the last 1.68 firmware, but with the detection reset trigger a bit less sensitive, to see if it works better :P
        No problem, let me know when it's up and i'll try it.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 08:50:20 am
        Do you think making this system an 8 point system would allow better stability when playing close?
        What i mean about 8 point is to add leds on the corners of the screen.
        Never mind, just remembered that the dfrobot can only track 4 points.
        Yeah I really wish this cam could see more than 4 points at a time, it would be far better.
        I'm actually also working on another solution with the same hardware to use 8 or more leds.
        But it would require to have a sync wire going from the led system to the gun, and another external arduino to pilot the leds.
        I gave up on it for now, but it might be a possible update to this 4 led system (you can reuse the same hardware with small modifications).

        Anyway, here is the test firmware, I included both firmwares in the zip file (don't mind about the version number):
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 09:08:35 am
        Will try this firmware.
        Would also like to mention that i played HOD3 almost to the finish with the 1.65 firmware and it was extremely good.
        There was only one occasion when the cursor got stuck on the upper edge of the screen for no reason, but it fixed itself once i waved the gun,
        but so far, in my opinion, firmware 1.65 is probably the best for playing afar.
        gonna try the test firmware now.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 09:16:45 am
        That cool this firmware ...: D
        I only noticed that the cursor seems to wobble more than before and in 10 minutes of the mame game (I always use Time crisis as a test) I also had the problem after 3-4 min that the cursor pointing to a point has moved in my case on the left but it happened only once and then it happens but now rarely see the duplicate cursor but for a moment and only if you point to the various sides of the screen, and it never happened to me during the action but only by moving the gun during the interludes ... We are close to perfection! :) Great JayBee!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 09:21:52 am
        Will try this firmware.
        Would also like to mention that i played HOD3 almost to the finish with the 1.65 firmware and it was extremely good.
        There was only one occasion when the cursor got stuck on the upper edge of the screen for no reason, but it fixed itself once i waved the gun,
        but so far, in my opinion, firmware 1.65 is probably the best for playing afar.
        gonna try the test firmware now.
        That's good to know! I wonder if I should disable the 2 points detection automatically when playing from afar.
        I'm joking, but that would be a solution worth considering if it's really better :lol
        But still, without the 2 points solution, even from afar it might not be so great aiming in corners after aiming offscreen.

        That cool this firmware ...: D
        I only noticed that the cursor seems to wobble more than before and in 10 minutes of the mame game (I always use Time crisis as a test) I also had the problem after 3-4 min that the cursor pointing to a point has moved in my case on the left but it happened only once and then it happens but now rarely see the duplicate cursor but for a moment and only if you point to the various sides of the screen, and it never happened to me during the action but only by moving the gun during the interludes ... We are close to perfection! :) Great JayBee!
        Awesome! We are almost there! ;D
        Yeah now that it's more stable I will correct the wobble a little bit.
        If still too much wobble I might also add a cursor smoothing option, but disable by default since it will add some latency.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 09:37:31 am
        If you have time, could you make a 1024x480 version of the tool to test the LEDs? Thanks :)
        I updated the pde file inside the test zip file, now you can edit 3 parameters at the beginning to setup your own com port and resolution ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 10:16:25 am
        Ok, i tested the new firmware from close distance, and i edited the video to highlight the issues.
        https://drive.google.com/open?id=1LijcW2NvTcthuvfSOxIeua8TS7CV4YIv (https://drive.google.com/open?id=1LijcW2NvTcthuvfSOxIeua8TS7CV4YIv)
        In the first part, you will see the gun firing to the left while aiming right.
        Second part, you will see the gun shooting offscreen when trying to shoot the cannonball.
        In the third part, in the ir test, you will see the cursor getting stuck.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 11:21:19 am
        Ok, i tested the new firmware from close distance, and i edited the video to highlight the issues.
        https://drive.google.com/open?id=1LijcW2NvTcthuvfSOxIeua8TS7CV4YIv (https://drive.google.com/open?id=1LijcW2NvTcthuvfSOxIeua8TS7CV4YIv)
        In the first part, you will see the gun firing to the left while aiming right.
        Second part, you will see the gun shooting offscreen when trying to shoot the cannonball.
        In the third part, in the ir test, you will see the cursor getting stuck.
        Very interesting to watch the video frame by frame to see what's going on!  :cheers:
        So the first two are caused by this damn 2 leds detection that don't like so much being so close to the screen either, I can clearly see how it's misdetecting them :banghead:

        For the last part, I just noticed something, during just one frame you see the bottom IR point jumping on the right, which causes the detection error (the test tool has 2 frames delay more than the cursor, so you can see it happening 2 frames after the cursor stops).
        It looks like the IR cam picked up something else, like a reflection of the leds on something?
        I guess the tolerance on this kind of wrong detection is a bit too low, I made a test firmware, it seems a bit better with it now?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 11:50:21 am
        For the last part, I just noticed something, during just one frame you see the bottom IR point jumping on the right, which causes the detection error (the test tool has 2 frames delay more than the cursor, so you can see it happening 2 frames after the cursor stops).
        It looks like the IR cam picked up something else, like a reflection of the leds on something?
        Hmm, reflection... the monitor is on a glass table.
        that might be it.
        I'm gonna cover the area of the monitor with something to cover the glass, and i'll try the new firmware.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 12:00:39 pm
        For the last part, I just noticed something, during just one frame you see the bottom IR point jumping on the right, which causes the detection error (the test tool has 2 frames delay more than the cursor, so you can see it happening 2 frames after the cursor stops).
        It looks like the IR cam picked up something else, like a reflection of the leds on something?
        Hmm, reflection... the monitor is on a glass table.
        that might be it.
        I'm gonna cover the area of the monitor with something to cover the glass, and i'll try the new firmware.
        Oh I see!
        Yeah, now that we get a quite stable system is mostly tweaking and improvement.
        To be honest I'm already quite happy with the result, whereas I have been told few time that doing a 4 leds system like that was impossible  :blah:
        Funny thing that's the "impossible" that made me want to do it  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 01:04:02 pm
        Well, bad news  :-\
        covered the area up, but still issues.
        Do you need a video, or at this point there's no use?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 01:10:39 pm
        I updated the pde file inside the test zip file, now you can edit 3 parameters at the beginning to setup your own com port and resolution ;)
        the one on the front page?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 01:13:24 pm
        Yeah now that it's more stable I will correct the wobble a little bit.
        If still too much wobble I might also add a cursor smoothing option, but disable by default since it will add some latency.

        the oscillation is minimal so if you correct only a little it will be fine: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 01:14:34 pm
        Kill_one, what is the distance between your gun and the LEDS?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 01:20:40 pm
        Kill_one, what is the distance between your gun and the LEDS?


        about 1mt, something more something less, having a 25 "arcade monitor it's okay I don't need to move away or get closer :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 01:26:47 pm
        https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA (https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA)


        because the leds top and right are not as bright as the others ?

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 01:50:43 pm
        Firmware 1.68 works AMAZING from afar. (1~1.2M)
        I was actually able to finish expert mode on point blank with the firmware.
        I was able to do that only with a CRT Lightgun, never with an aimtrak or topgun, and i was actually playing closer when i was using the CRT Lightgun (Guncon).
        I'm referring to the 1.68 firmware that is on the first page, not the test version.
        As far as playing closer, i guess it's just not possible with this hardware, but you have accomplished an amazing work nonetheless.
        though there's one thing i didn't test, and that is a larger screen.
        Up until now i was using a 24" pc monitor, how far would i have to be for a 55" Oled? And will it work as reliably as the 24" monitor?
        Hmm, definitely requires more testing.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 12, 2020, 07:22:07 pm
        Tested the gun on a 42" inch 16:9 plasma.
        In order to get a solid gaming session the gun had to be distanced at 2.3~2.4 meter, that means i was at about 3M away from the screen. To be honest, i stretched the game to 16:9, otherwise it would be very hard to play.
        If i try to get closer and rely on 2 point detection, then the aame issues i had at the videos start to happen.
        All in all, it's definitely better than a topgun or an aimtrak, no doubt.
        If i was building a cabinet i would definitely go with this solution or maybe the sinden, though the sinden hasn't been tested yet by the community, so who knows what problems it may have.
        JayBee, what are your plans, now? You said you are working on a software for the gun?
        By the way, what's your paypal? I'd like to donate.
        If you don't feel comfortable writing it on the forums feel free to pm me.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 08:31:10 pm
        Tested the gun on a 42" inch 16:9 plasma.
        In order to get a solid gaming session the gun had to be distanced at 2.3~2.4 meter, that means i was at about 3M away from the screen. To be honest, i stretched the game to 16:9, otherwise it would be very hard to play.
        If i try to get closer and rely on 2 point detection, then the aame issues i had at the videos start to happen.
        All in all, it's definitely better than a topgun or an aimtrak, no doubt.
        If i was building a cabinet i would definitely go with this solution or maybe the sinden, though the sinden hasn't been tested yet by the community, so who knows what problems it may have.
        JayBee, what are your plans, now? You said you are working on a software for the gun?
        By the way, what's your paypal? I'd like to donate.
        If you don't feel comfortable writing it on the forums feel free to pm me.
        I'm glad we got it working the way it is, thanks for your careful testing it really helped  :cheers:
        Yeah the distance sounds about right, on my 42" screen the minimum working distance is 1.2 meter, but indeed the best working distance is more far.
        I had an idea to improve that tho, I made my firmware to support mamehooker integration, allowing me to change the gun settings on a game basis.
        Some games don't require to shot in angles, or don't have offscreen reload (always aiming onscreen).
        So with those games I could add an option to automatically disable the 2 leds detection, which would then decrease the errors a lot. Or disable the 2 leds detection by default and enable it only for games that need it.
        Or enable it only if the distance is far enough from the IR leds... So far without MameHooker that would be the easiest solution.
        I will think about it  :lol

        Next in my roadmap:
        - add a bit more of aim precision back to reduce wobble
        - add a user define screen aspect ratio. It should help with the whole detection process and simplify usage.
        - design rumble and solenoid schematics for the first post
        - add a cursor smoothing option for people who want a very stable cursor (it will be disabled by default, because it adds some latency)
        - improve the button management function for more optimization/customization
        - finally add the support for temperature sensor, to regulate the solenoid speed and keep it cool
        - improve the MameHooker integration, for feedback triggered by the games themselves, and various other options
        - add an option to always hold the secondary button when aiming onscreen, activated only when playing a game with cover system like Time Crisis (to play without pedal)
        - create a user friendly tool with a nice UI to change all of the gun parameters (default modes, options, mapping, screen ratio...)
        - add various other options and polish all the system until it's the best consumer lightgun system ever  8)
        - go to the next projects (Kaimana arcade button light system custom firmware, Arduino light system...)

        Still many things and fun ahead, right? :D

        https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA (https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA)
        because the leds top and right are not as bright as the others ?
        Wait, I still see your cab scrolling light under the stick, the one that messes up with the gun. You didn't hide/switched it off?  :lol
        Also yeah, on cam the right and upper leds and very dim, maybe still not good angle?

        Edit: I added a donate link in the first post and my signature  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 12, 2020, 09:34:09 pm
        Wait, I still see your cab scrolling light under the stick, the one that messes up with the gun. You didn't hide/switched it off?  :lol
        Also yeah, on cam the right and upper leds and very dim, maybe still not good angle?
        Then covered or did not do the same problem and that is it moves down but rarely with the latest firmware: D

        How can I go about arranging those LEDs better?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 12, 2020, 10:11:28 pm
        Then covered or did not do the same problem and that is it moves down but rarely with the latest firmware: D

        How can I go about arranging those LEDs better?
        You mean it doesn't change when covered? It has to be fully covered (no light should pass through) or switched off anyway, the IR cam is clearly still picking up this scrolling light ;)

        If you can add one more led by point like Foxhole did (don't forget to change the resistor), and be sure the led are all pointing forward, it should work better.

        Edit: by the way I made a fullscreen version of the led test tool, I will upload it later ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 03:46:17 am
        You mean it doesn't change when covered? It has to be fully covered (no light should pass through) or switched off anyway, the IR cam is clearly still picking up this scrolling light ;)
        yes, works the same way covered the leds or not...

        If you can add one more led by point like Foxhole did (don't forget to change the resistor), and be sure the led are all pointing forward, it should work better.

        what resistance would it take then? and would the 5v 1a power supply suffice?

        could the fact of the dim light of the upper and right LEDs be that sometimes the cursor duplicates or moves?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 05:25:03 am
        yes, works the same way covered the leds or not...
        I see. Well you have to cover them anyway since the IR cam is picking them up, it will never work correctly if the cam is seeing more than the needed 4 led points :lol
        You don't have a switch to simply turn it off?

        what resistance would it take then? and would the 5v 1a power supply suffice?

        could the fact of the dim light of the upper and right LEDs be that sometimes the cursor duplicates or moves?
        Wait, before building more hardware let's do a bit more testing with your current setup to be sure of what to do.
        Can you cover the bottom scrolling lights, launch the test tool, and slowly move from one screen angle to the other with your gun?
        I will post the fullscreen tool soon, it will be more convenient for you.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 05:59:04 am
        @kill_one
        I added the fullscreen test tool in the main post ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 06:08:10 am
        @kill_one
        I added the fullscreen test tool in the main post ;)

        Great! I'll try it as soon as I get home, you don't have to set the resolution right?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 06:32:27 am
        Great! I'll try it as soon as I get home, you don't have to set the resolution right?
        Yes, it should work no matter the resolution ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 09:21:23 am
        Yes, it should work no matter the resolution ;)
        Last firmware test not work... It's normal
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 09:31:23 am
        Yes, it should work no matter the resolution ;)
        Last firmware test not work... It's normal
        What do you mean by not working?
        I just tested both the last firmware with the last fullscreen tool, it works perfectly.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 10:11:25 am
        Yes, it should work no matter the resolution ;)
        Last firmware test not work... It's normal
        What do you mean by not working?
        I just tested both the last firmware with the last fullscreen tool, it works perfectly.
        flashing the attached test firmware does not show the LEDs but only the mouse cursor, I attach the link to the video
        https://photos.app.goo.gl/L5QZzyAWVCAgy99b7 (https://photos.app.goo.gl/L5QZzyAWVCAgy99b7)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 10:16:16 am
        Yes, it should work no matter the resolution ;)
        Last firmware test not work... It's normal
        What do you mean by not working?
        I just tested both the last firmware with the last fullscreen tool, it works perfectly.
        flashing the attached test firmware does not show the LEDs but only the mouse cursor, I attach the link to the video
        https://photos.app.goo.gl/L5QZzyAWVCAgy99b7 (https://photos.app.goo.gl/L5QZzyAWVCAgy99b7)
        Did you change the com port to match yours? (It changes alone sometime)
        And by the way why do you have a crosshair ? Is that a Windows cursor? :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 10:22:15 am
        Did you change the com port to match yours? (It changes alone sometime)
        you're right I forgot to edit port com port in the pde file ... try again tonight! : D
        And by the way why do you have a crosshair ? Is that a Windows cursor? :lol
        yes... :D i use this https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995 (https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 10:25:25 am
        Did you change the com port to match yours? (It changes alone sometime)
        you're right I forgot to edit port com port in the pde file ... try again tonight! : D
        And by the way why do you have a crosshair ? Is that a Windows cursor? :lol
        yes... :D i use this https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995 (https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995)
        That's a really cool cursor pack! I'm going to try it on my arcade PC :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 10:27:03 am
        I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't work
        In my opinion you should put a note on this on the first page ...: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 13, 2020, 10:35:36 am
        I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't work
        In my opinion you should put a note on this on the first page ...: D
        No no, you just have a value to modify at the beginning of the pde file now, there is even an explanation written in it ;)
        The "comPort" value. Replace the 0 by whatever your port number is.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 10:38:13 am
        I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't work
        In my opinion you should put a note on this on the first page ...: D
        No no, you just have a value to modify at the beginning of the pde file now, there is even an explanation written in it ;)
        The "comPort" value. Replace the 0 by whatever your port number is.
        ah ok! thanks
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 13, 2020, 10:48:52 am
        Did you change the com port to match yours? (It changes alone sometime)
        you're right I forgot to edit port com port in the pde file ... try again tonight! : D
        And by the way why do you have a crosshair ? Is that a Windows cursor?
        yes... :D i use this https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995 (https://www.deviantart.com/zarpex/art/Weapon-Crosshair-Cursor-Pack-299011995)
        That's a really cool cursor pack! I'm going to try it on my arcade PC :D
        Yep, is very cool! I love it ;)

        Inviato dal mio Redmi Note 5 utilizzando Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 14, 2020, 04:26:56 am
        https://photos.app.goo.gl/24YUJ6pBf3WQqWne6 (https://photos.app.goo.gl/24YUJ6pBf3WQqWne6)

        here you find various tests that I did yesterday, I have not yet figured out whether the points should be there or not, however in the game it works very well apart from time to time a duplicate cursor comes out for a second but it does it mainly in the interludes almost never during the game action, and I noticed that it does even if the gun points to the center of the screen, I think it may depend on the side and top LEDs that are less bright than the lower ones, it can center that the direct current reaches them and the others are connected to these in cascade?
        Or could it be that the resistance is not working properly?

        even if in the test the points see them all 4 so I have no idea why they are so dim
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 14, 2020, 05:29:07 am
        https://photos.app.goo.gl/24YUJ6pBf3WQqWne6 (https://photos.app.goo.gl/24YUJ6pBf3WQqWne6)

        here you find various tests that I did yesterday, I have not yet figured out whether the points should be there or not, however in the game it works very well apart from time to time a duplicate cursor comes out for a second but it does it mainly in the interludes almost never during the game action, and I noticed that it does even if the gun points to the center of the screen, I think it may depend on the side and top LEDs that are less bright than the lower ones, it can center that the direct current reaches them and the others are connected to these in cascade?
        Or could it be that the resistance is not working properly?

        even if in the test the points see them all 4 so I have no idea why they are so dim
        I think the dim leds are more because of the angle, on your tests it seems to be picking them up ok.
        But I can see a bit more what's happening now; the camera is picking up points that aren't there, on the left and right side.
        I suspect that the LEDs are being reflected on the inner sides of your cabinet.
        Can you try orient the left and right LEDs a bit more towards the center? Or maybe for testing purposes you can put some tape on them on the outer side (or put some clothes to avoid reflection). and see if it's any better.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 14, 2020, 11:56:31 am
        I think the dim leds are more because of the angle, on your tests it seems to be picking them up ok.
        But I can see a bit more what's happening now; the camera is picking up points that aren't there, on the left and right side.
        I suspect that the LEDs are being reflected on the inner sides of your cabinet.
        Can you try orient the left and right LEDs a bit more towards the center? Or maybe for testing purposes you can put some tape on them on the outer side (or put some clothes to avoid reflection). and see if it's any better.
        tonight i try.. ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 14, 2020, 01:11:39 pm
        OK! IRL540 mosfets have arrived, I have changed the connections, can you tell me if everything is ok? thank you very much :) rather arigato gozaimasu!!! :D
        (http://killone.myqnapcloud.com/sp/soleno.jpg)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 15, 2020, 09:07:46 am
        * 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.


        OK! IRL540 mosfets have arrived, I have changed the connections, can you tell me if everything is ok? thank you very much :) rather arigato gozaimasu!!! :D
        Yes, it looks ok!  :applaud:
        In the version 1.7 I restored the cursor accuracy, now it should be as smooth as before ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 15, 2020, 09:49:20 am
        I don't know if this is happening only to me or if it's an issue with the code or the arduino itself but i have noticed some issues.
        The first one isn't a big deal but i think i should mention, sometimes after flashing a firmware the gun barely works, basically messing up with the detection and just works very strangely.
        A simple unplug and replug of the usb cable fixes it. Is that happening only to me? This isn't consistent though, sometimes it works just fine.
        The second issue, which is a bigger deal, is that sometimes when trying to change modes with the gun, basically pressing the calibration button or disabling off screen button 2, it will sometimes cause the gun to get completely stuck, forcing either to unplug and replug the gun or sometimes it's just enough to get the gun to its former state, for example if the gun was set to 16:9 mode and then i try and change to 4:3 in 16:9 the gun will get stuck, pressing the calibration button once again doesn't help since it's now changing to 4:3 mode, but if i press twice, bringing me back to 16:9 mode, it then starts working again, but of course i still have to replug the gun if i want to get to 4:3 in 16:9 mode.
        The same issue happens when disabling offscreen reload (Mouse Button 2).
        I haven't tested changing the settings with mamehooker, i'm only using the buttons for now.
        Have you had this issue, JayBee? Any ideas what's causing this? The arduino perhaps? i'm using sparkfun brand arduino.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 15, 2020, 11:45:19 am
        I don't know if this is happening only to me or if it's an issue with the code or the arduino itself but i have noticed some issues.
        The first one isn't a big deal but i think i should mention, sometimes after flashing a firmware the gun barely works, basically messing up with the detection and just works very strangely.
        A simple unplug and replug of the usb cable fixes it. Is that happening only to me? This isn't consistent though, sometimes it works just fine.
        The second issue, which is a bigger deal, is that sometimes when trying to change modes with the gun, basically pressing the calibration button or disabling off screen button 2, it will sometimes cause the gun to get completely stuck, forcing either to unplug and replug the gun or sometimes it's just enough to get the gun to its former state, for example if the gun was set to 16:9 mode and then i try and change to 4:3 in 16:9 the gun will get stuck, pressing the calibration button once again doesn't help since it's now changing to 4:3 mode, but if i press twice, bringing me back to 16:9 mode, it then starts working again, but of course i still have to replug the gun if i want to get to 4:3 in 16:9 mode.
        The same issue happens when disabling offscreen reload (Mouse Button 2).
        I haven't tested changing the settings with mamehooker, i'm only using the buttons for now.
        Have you had this issue, JayBee? Any ideas what's causing this? The arduino perhaps? i'm using sparkfun brand arduino.

        The first issue is a bit weird, but I think I did have the same thing sometimes.
        I will try to search where it's coming from, if anybody has the same thing with other arduino sketches.

        For the second one, I just realized what's happening, I added the offscreen mode switch a bit fast earlier, and it might be conflicting with the other calibration button functions.
        Short version: when switch the offscreen mode without pointing the screen, it might change the input mode as well ::)

        Long version if you are interested:
        The calibration button has 5 different functions:
        Single push => change screen mode
        Hold for few seconds => do calibration
        Hold Trigger button then single push => change the offscreen shot mode
        Hold A button then single push => change the input mode
        But if you press the trigger offscreen, it sees it as the A button, so the firmware sees it has A + calibration button, and changes the input mode instead ::)
        I definitely have to fix that :P

        But it's strange if it's also happening when you do a single push, I never had that.
        Reworking the button management is actually what I am doing right now, to make it more robust/bug free, and prepare it for future customization.
        So it should solve this kind of bugs.

        There 2 upcoming feature that might help with this kind of issues too;
        - being able to input your own screen aspect ratio in the arduino eeprom, then you would have only 2 modes, fullscreen content, and 4:3 content. Easier to switch.
        - adding support for a RGB led, that will be used for both seeing the status of the gun (blinking led with different colors for each mode and settings) and also feedback (fire, reload blink and more with mamehooker).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 16, 2020, 03:03:25 am
        * 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.

        @FoxHole
        This update should fix the second issue you've been having ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 16, 2020, 05:45:18 am
        * 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.

        @FoxHole
        This update should fix the second issue you've been having ;)
        Thanks, JayBee, i haven't fully tested this firmware yet but i did run into two issues that i haven't faced before.
        First one is that i tried to recalibrate the sensor and after recalibrating, it didn't show the new value until i unplugged and replugged the usb.
        Second one is related to the first one, after the calibration process, the trigger button is stuck, forcing unplugging and replugging of the usb.
        Just to be clear, i used the same steps as on the first page to calibrate, Hold Cal Button -> shoot the cursor when it's on the middle -> press cal button again for brief moment.
        I'll let you know about other issues if there are any.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 16, 2020, 06:15:05 am
        Thanks, JayBee, i haven't fully tested this firmware yet but i did run into two issues that i haven't faced before.
        First one is that i tried to recalibrate the sensor and after recalibrating, it didn't show the new value until i unplugged and replugged the usb.
        Second one is related to the first one, after the calibration process, the trigger button is stuck, forcing unplugging and replugging of the usb.
        Just to be clear, i used the same steps as on the first page to calibrate, Hold Cal Button -> shoot the cursor when it's on the middle -> press cal button again for brief moment.
        I'll let you know about other issues if there are any.
        Thanks for the bug report!  :cheers:
        Yes you are right, seems like the new button management is having some bugs with the calibration process.
        Gonna fix that tonight!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 16, 2020, 08:10:36 am
        Your idea with the RGB Led got me thinking. Do you think you could program the LED to blink when the gun is too close to the screen or too far?
        That way when using it you won't need to mess around with the distance too much and make it easier to know where's the perfect distance.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 16, 2020, 09:16:55 am
        Your idea with the RGB Led got me thinking. Do you think you could program the LED to blink when the gun is too close to the screen or too far?
        That way when using it you won't need to mess around with the distance too much and make it easier to know where's the perfect distance.
        That would totally be possible once implemented!
        And actually a great idea, I can make the led blink red when it has trouble picking up the leds correctly and when too far/too close.
        I also want to use it in the test firmware, for instance to display a different color depending on the number of leds detected.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 16, 2020, 09:21:03 am
        Yes, it looks ok!  :applaud:
        In the version 1.7 I restored the cursor accuracy, now it should be as smooth as before ;)
        After covering the side walls of the cabinet in correspondence with the LEDs and moving them more towards the center including the upper ones (finally they have the same brightness) with the test firmware I have not encountered more recognition errors, no black or gray point . : D It works very well, with firmware 1.70 I finished Time Crisis without any error or false detection of the cursor ...: D Even with the Bezel glass, obviously I have to cover all the bright LEDs because if the gun points any light it detects a point black ... Would it be possible to implement something that stops ir detection when it goes directly below the lower leds? Another problem I have and has been doing since the first version is that sometimes pressing the A key causes the mame to switch to window mode.

        https://photos.app.goo.gl/6uXxnmVPUGW2mBTW8 (https://photos.app.goo.gl/6uXxnmVPUGW2mBTW8)

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 16, 2020, 07:36:08 pm
        OK! IRL540 mosfets have arrived, I have changed the connections, can you tell me if everything is ok? thank you very much :) rather arigato gozaimasu!!! :D
        (http://killone.myqnapcloud.com/sp/soleno.jpg)
        The circuit for the rumble works perfectly, this for the solenoid does not give me signs of life ... I have already verified that the 24v arrive at the circuit and I also changed the resistance of 10k with that of 100k thinking that was the problem ... does the solenoid work correctly if i connect it directly to the 24v power supply where am i wrong or what is missing? : D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 16, 2020, 07:49:41 pm
        Yes, it looks ok!  :applaud:
        In the version 1.7 I restored the cursor accuracy, now it should be as smooth as before ;)
        After covering the side walls of the cabinet in correspondence with the LEDs and moving them more towards the center including the upper ones (finally they have the same brightness) with the test firmware I have not encountered more recognition errors, no black or gray point . : D It works very well, with firmware 1.70 I finished Time Crisis without any error or false detection of the cursor ...: D Even with the Bezel glass, obviously I have to cover all the bright LEDs because if the gun points any light it detects a point black ... Would it be possible to implement something that stops ir detection when it goes directly below the lower leds? Another problem I have and has been doing since the first version is that sometimes pressing the A key causes the mame to switch to window mode.

        https://photos.app.goo.gl/6uXxnmVPUGW2mBTW8 (https://photos.app.goo.gl/6uXxnmVPUGW2mBTW8)
        Glad it's finally working for you!
        Sadly there are no way of detecting unusual IR Points, the camera only detects 4 points at a time and doesn't know which is which.
        The recognition is fully done in the Arduino.
        Right now the Arduino resets the recognition every time is sees a led where it shouldn't see one, which helps correcting lot of errors.
        But seeing those errors will still cause instability of the whole tracking system.

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 16, 2020, 07:52:38 pm
        OK! IRL540 mosfets have arrived, I have changed the connections, can you tell me if everything is ok? thank you very much :) rather arigato gozaimasu!!! :D
        (http://killone.myqnapcloud.com/sp/soleno.jpg)
        The circuit for the rumble works perfectly, this for the solenoid does not give me signs of life ... I have already verified that the 24v arrive at the circuit and I also changed the resistance of 10k with that of 100k thinking that was the problem ... does the solenoid work correctly if i connect it directly to the 24v power supply where am i wrong or what is missing? : D
        Do you have a continuity tester or a multimeter to test every connection?
        And did you try swapping the solenoid polarity?
        If nothing works, I would recommend you to start fresh, on a new pcb, this one looks in pretty bad shape.

        Envoyé de mon Pixel 3 en utilisant Tapatalk
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 02:30:38 am
        Do you have a continuity tester or a multimeter to test every connection?
        And did you try swapping the solenoid polarity?
        If nothing works, I would recommend you to start fresh, on a new pcb, this one looks in pretty bad shape.
        Yes, i have multimeter, how test every connection? I tested if the 24v came and ok, swapping the polarity too, and I redone the pcb with new components and using another solenoid, same problem, could you post some photos of the circuit you made? And tell me how to test the various connections? Thanks
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 04:36:46 am
        (http://killone.myqnapcloud.com/sp/sole.jpg)

        where's the error? It all seems correct to me as connections ... could it be the arduino pin that is not working at this point?
        the solenoid directed to the power supply works..
        I have no idea of ​​the problem otherwise... :dunno  :banghead:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 05:12:40 am
        (http://killone.myqnapcloud.com/sp/sole.jpg)

        where's the error? It all seems correct to me as connections ... could it be the arduino pin that is not working at this point?
        the solenoid directed to the power supply works..
        I have no idea of ​​the problem otherwise... :dunno  :banghead:
        Where did you connect the solenoid power supply ground?

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 06:09:40 am
        Where did you connect the solenoid power supply ground?

        between pin 2 of the mosfet and the diode

        (http://killone.myqnapcloud.com/sp/sole-.jpg)

        even if the solenoid pins have no polarity since as if I invert them it works
        equally



        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 06:25:02 am
        wait...should i also add gnd to the solenoid- wire?

        in this way?

        (http://killone.myqnapcloud.com/sp/soleground.JPG)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 07:11:33 am
        No no, the solenoid connection is ok. I mean the 24v power supply ground ;)
        Where is it connected?

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 07:29:23 am
        No no, the solenoid connection is ok. I mean the 24v power supply ground ;)
        Where is it connected?

        ah ok, the gnd of powersupply 24v it is connected to pin 3 of the mosfet and to the pin of the 100k resistor
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 08:05:18 am
        Arduino & Solenoid Power Supply gnd does it mean that you also need to connect an arduino gnd to the power supply 24v gnd ?
         
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 10:17:54 am
        Yes of course you need to connect both ground together, without the Arduino ground there can't be any flow of current triggering the mosfet.

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 10:43:51 am
        Yes of course you need to connect both ground together, without the Arduino ground there can't be any flow of current triggering the mosfet.

        so I have to take any Arduino gnd pin and connect it together to the 24v power supply gnd?

        in this way:

        (http://killone.myqnapcloud.com/sp/sole-1.jpg)

        it's correct ?

        are the same also for the motor circuit?

        because now it only works if I connect it to a USB port on the PC, if I connect it to an external power supply it doesn't work ... maybe because the PC works because it is also connected to another USB port?: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 11:29:09 am



        so I have to take any Arduino gnd pin and connect it together to the 24v power supply gnd?

        in this way:

        it's correct ?

        are the same also for the motor circuit?

        because now it only works if I connect it to a USB port on the PC, if I connect it to an external power supply it doesn't work ... maybe because the PC works because it is also connected to another USB port?: D
        Yes it looks correct.
        Also yes, the Arduino ground always has to be connected, or else the current can't flow from the pin to the Arduino ground.
        Since all USB ports usually share a common ground, that the Arduino is using, it indeed explains why it works when connecting both on the same pc.
        But it's less than ideal as you can imagine ;)
        So I guess if you fix this ground it should work.

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 11:52:04 am
        Yes it looks correct.
        Also yes, the Arduino ground always has to be connected, or else the current can't flow from the pin to the Arduino ground.
        Since all USB ports usually share a common ground, that the Arduino is using, it indeed explains why it works when connecting both on the same pc.
        But it's less than ideal as you can imagine ;)
        So I guess if you fix this ground it should work.

        surely that will be the mistake then, tonight I will try ...: D

        Will you also implement the ability to turn off the next vibration or recoil? It would be useful if used at night, because the solenoid makes a nice noise and the vibration in the long run could be annoying : D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 12:01:28 pm


        Yes it looks correct.
        Also yes, the Arduino ground always has to be connected, or else the current can't flow from the pin to the Arduino ground.
        Since all USB ports usually share a common ground, that the Arduino is using, it indeed explains why it works when connecting both on the same pc.
        But it's less than ideal as you can imagine ;)
        So I guess if you fix this ground it should work.

        surely that will be the mistake then, tonight I will try ...: D

        Will you also implement the ability to turn off the next vibration or recoil? It would be useful if used at night, because the solenoid makes a nice noise and the vibration in the long run could be annoying : D

        Yeah it will be implemented too when I make a tool to configure the gun.
        But right now you can still do it by using mamehooker and starting the serial mode, it bypasses any feedback as long as it's active.
        Or like I do, you can just unplug the solenoid/motor power source if you have an easy to connect plug ;D
        Didn't you have some switches on one of your guns? You could even use that.

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 12:49:52 pm
        Yeah it will be implemented too when I make a tool to configure the gun.
        But right now you can still do it by using mamehooker and starting the serial mode, it bypasses any feedback as long as it's active.
        Or like I do, you can just unplug the solenoid/motor power source if you have an easy to connect plug ;D
        Didn't you have some switches on one of your guns? You could even use that.
        yes there is an onoff switch but how should i connect it? : D
        For mamehooker when will you release your configuration files? ;-)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 03:18:49 pm
        Ok! Now works! : D Even the motor now goes with USB power supply, is it normal for the Arduino to connect to the PC that the motor vibrates? And then I found this if you can check it too, when the gun is connected a single shot works correctly if I press once and it blows if I keep it pressed, if instead I disable the offscreen reload if I hold the trigger the engine starts. I attach the video for clarity :)
        https://photos.app.goo.gl/GG1dY26B5tY9SB1f6 (https://photos.app.goo.gl/GG1dY26B5tY9SB1f6)

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lightgungamer on February 17, 2020, 04:32:41 pm
        HI Jaybee,

        I finally got around to building this. I have the gun ready but I am having trouble flashing it.

        At first I had an error when I ran the flashing program - "libusb0.dll" is missing from your computer".
         
        I got round that by downloading libusb0.dll and puttng it in the dir with the bat file.
        Then I got an error just saying:
        avrdude application unable to start

        So I downloaded and installed avrdude directly.

        Now it runs but the batch file doesn't seem to work correclty as I get errors

        ---
        Flash Normal or Test firmware (N: Normal/T: Test)?t
        FIND: COM: No such file or directory
        Invalid parameter - BAUD=1200

        Waiting for 0 seconds, press CTRL+C to quit ...
        FIND: COM: No such file or directory
        No Instance(s) Available.

        avrdude: Version 6.3-20190619
                 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                 Copyright (c) 2007-2014 Joerg Wunsch

                 System wide configuration file is "avrdude.conf"

                 Using Port                    : -b57600
                 Using Programmer              : avr109
        avrdude: ser_open(): can't open device "-b57600": The system cannot find the file specified.


        avrdude done.  Thank you.

        Press any key to continue . . .
        ---

        DO you have any ideas about what I might be doing wrong , or is ther another way of doing this?

        Thanks
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 17, 2020, 06:31:05 pm
        lightgungamer, make sure to have the drivers installed for your Arduino, and check in device manager - ports (COM & LPT) for the name of the Arduino. In the flash.bat it determines the com port by searching for the string 'Arduino' twice (the second one is for the bootloader), you need to change both to at least part of the name of your Arduino.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 07:49:08 pm


        Ok! Now works! : D Even the motor now goes with USB power supply, is it normal for the Arduino to connect to the PC that the motor vibrates? And then I found this if you can check it too, when the gun is connected a single shot works correctly if I press once and it blows if I keep it pressed, if instead I disable the offscreen reload if I hold the trigger the engine starts. I attach the video for clarity :)
        https://photos.app.goo.gl/GG1dY26B5tY9SB1f6 (https://photos.app.goo.gl/GG1dY26B5tY9SB1f6)


        Yes the motor vibrating once when plugged is normal, it's made to know it's plugged and started correctly ;)
        Indeed for the fullauto mode I didn't change it even with the offscreen mode off, so it rumbles instead of using the solenoid.
        I wonder what's the best tho when firing offscreen. Normally it rumbles to make you understand you're aiming off screen or reloading. Should it use the solenoid offscreen too when offscreen mode is disabled?

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 07:58:03 pm
        DO you have any ideas about what I might be doing wrong , or is ther another way of doing this?

        Thanks
        Software needed:
        • Arduino IDE (this will just be needed to flash the firmware)
        Don't install avrdude nor some dll, and don't change the installation files inside the zip file, just install Arduino IDE ;)

        Edit: oh and you might also need to install the drivers for the pro micro Arduino inside the IDE, I don't remember if necessary or not.
        I will add that to the main post.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 17, 2020, 08:22:41 pm
        JayBee, from my own experience with the promicro from sparkfun i had to install the drivers, and also had to change the %%arduino%% string to %%sparkfun%% otherwise it won't get detected at all.
        After flashing your firmware the Arduino gets detected as Arduino leonardo but the boot loader is still named sparkfun, so after the flash i had to change only the second %%arduino%% string to %%bootloader%%
        Furthermore i also had to change the timeout to 6 seconds instead of 3 otherwise it tries to flash too soon.
        Of course, this will change per setup.
        But i thought i should let you know because i had the same issues as lightgungamer, though in my case i had arduino ide installed and the drivers.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 08:34:52 pm
        JayBee, from my own experience with the promicro from sparkfun i had to install the drivers, and also had to change the %%arduino%% string to %%sparkfun%% otherwise it won't get detected at all.
        After flashing your firmware the Arduino gets detected as Arduino leonardo but the boot loader is still named sparkfun, so after the flash i had to change only the second %%arduino%% string to %%bootloader%%
        Furthermore i also had to change the timeout to 6 seconds instead of 3 otherwise it tries to flash too soon.
        Of course, this will change per setup.
        But i thought i should let you know because i had the same issues as lightgungamer, though in my case i had arduino ide installed and the drivers.
        Oh I see!
        Yeah I think the bootloader on your model isn't the standard one, it's the one flashed by sparkfun.
        I wonder if there is a risk in flashing a standard leonardo bootloader in it? Have you tried flashing anything from the arduino IDE?
        I could give you my firmware with the bootloader included, but I don't want to risk frying your arduino :lol

        Edit: Note that in the last flash bat file, I added %%bootloader%% too, but also left the %%arduino%% part in it.
        I guess I should only leave %%bootloader%%.
        So each bootloader takes a different timing to restart? I will try if mine works too with 6 seconds, if it works 6 second would then be more universally compatible.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 17, 2020, 08:36:16 pm
        No need, everything is working perfectly, no point risking damaging it.
        As for Arduino ide, i think i only uploaded a sketch once or twice.
        The sparkfun pro micro is very small and easy to fit in most gun shells, so it's a good choice, but i wish i could find something similar that has holes for mounting with screws, i don't like using hot glue or double sided tape.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 08:57:57 pm
        No need, everything is working perfectly, no point risking damaging it.
        As for Arduino ide, i think i only uploaded a sketch once or twice.
        The sparkfun pro micro is very small and easy to fit in most gun shells, so it's a good choice, but i wish i could find something similar that has holes for mounting with screws, i don't like using hot glue or double sided tape.
        Yeah the sparkfun model is actually the same as the generic ones I use, but 3~4 times more expensive somehow :lol
        Lately I've been considering using this model instead, for guns with limited space in them:
        (https://images-na.ssl-images-amazon.com/images/I/81GtjXMih1L._AC_SL1500_.jpg)
        It should work as well as the big one.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 17, 2020, 09:17:43 pm


        Ok! Now works! : D Even the motor now goes with USB power supply, is it normal for the Arduino to connect to the PC that the motor vibrates? And then I found this if you can check it too, when the gun is connected a single shot works correctly if I press once and it blows if I keep it pressed, if instead I disable the offscreen reload if I hold the trigger the engine starts. I attach the video for clarity :)
        https://photos.app.goo.gl/GG1dY26B5tY9SB1f6 (https://photos.app.goo.gl/GG1dY26B5tY9SB1f6)


        Yes the motor vibrating once when plugged is normal, it's made to know it's plugged and started correctly ;)
        Indeed for the fullauto mode I didn't change it even with the offscreen mode off, so it rumbles instead of using the solenoid.
        I wonder what's the best tho when firing offscreen. Normally it rumbles to make you understand you're aiming off screen or reloading. Should it use the solenoid offscreen too when offscreen mode is disabled?

        Envoyé de mon Pixel 3 en utilisant Tapatalk
        Ok for offscreen function but it behaves in the same way by pointing on the screen, if the offscreen_reload function is uninhabited, holding the trigger uses vibration instead of the solenoid also pointing to the center of the screen, I don't think that's right too?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 17, 2020, 09:20:32 pm
        Ok for offscreen function but it behaves in the same way by pointing on the screen, if the offscreen_reload function is uninhabited, holding the trigger uses vibration instead of the solenoid also pointing to the center of the screen, I don't think that's right too?
        indeed it's not normal, I will test tonight.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lightgungamer on February 18, 2020, 06:35:32 am
        DO you have any ideas about what I might be doing wrong , or is ther another way of doing this?

        Thanks
        Software needed:
        • Arduino IDE (this will just be needed to flash the firmware)
        Don't install avrdude nor some dll, and don't change the installation files inside the zip file, just install Arduino IDE ;)

        Edit: oh and you might also need to install the drivers for the pro micro Arduino inside the IDE, I don't remember if necessary or not.
        I will add that to the main post.

        Hi Jaybee,

        I did already have the Audrino IDE installed and have used it on other audrinos so it is working as well.
        I will try those other suggestions out and report back.
        Thanks
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 18, 2020, 07:11:27 am
        Hi Jaybee,

        I did already have the Audrino IDE installed and have used it on other audrinos so it is working as well.
        I will try those other suggestions out and report back.
        Thanks
        Yeah you probably have to install the drivers that Foxhole suggested for your model ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lightgungamer on February 18, 2020, 09:12:20 am
        I removed the installation of avrduse, removed the audrino ide and reinstalled it.

        I have put the drivers for the pro micro which is the board I have on.
        The batch file appears to find it at first but then after it starts, I just get the error "Unable to start Program"
        Screen shot attached

        Here is the output from the batch file:
        ---
        Flash Normal or Test firmware (N: Normal/T: Test)?n

        Status for device COM11:
        ------------------------
            Baud:            1200
            Parity:          None
            Data Bits:       8
            Stop Bits:       1
            Timeout:         OFF
            XON/XOFF:        OFF
            CTS handshaking: OFF
            DSR handshaking: OFF
            DSR sensitivity: OFF
            DTR circuit:     OFF
            RTS circuit:     ON


        Waiting for 0 seconds, press CTRL+C to quit ...
        Press any key to continue . . .
        ---
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 18, 2020, 09:31:07 am
        * 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)

        I removed the installation of avrduse, removed the audrino ide and reinstalled it.

        I have put the drivers for the pro micro which is the board I have on.
        The batch file appears to find it at first but then after it starts, I just get the error "Unable to start Program"
        Screen shot attached

        Here is the output from the batch file:
        ---
        Flash Normal or Test firmware (N: Normal/T: Test)?n

        Status for device COM11:
        ------------------------
            Baud:            1200
            Parity:          None
            Data Bits:       8
            Stop Bits:       1
            Timeout:         OFF
            XON/XOFF:        OFF
            CTS handshaking: OFF
            DSR handshaking: OFF
            DSR sensitivity: OFF
            DTR circuit:     OFF
            RTS circuit:     ON


        Waiting for 0 seconds, press CTRL+C to quit ...
        Press any key to continue . . .
        ---
        Which version of windows and arduino IDE do you have?
        You don't have any other arduino device plugged at the same time?
        What happens if you try to flash an empty sketch in arduino IDE?
        If flashing an empty sketch works, try replacing the avrdude.exe and avrdude.conf of my package by the ones in your own arduino folders:
        Code: [Select]
        C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17Inside the bin and etc subfolders (replace the <User folder> by your own folder name)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 18, 2020, 10:21:18 am
        JayBee, do you have any idea how much current the arduino takes from the usb?
        I have a rumble motor that works on 5V 100ma, and i'd like it to use the same usb as the arduino as a power source, meaning i don't want it to use the arduino itself as the power source but tap to the existing usb wire.
        If the arduino itself uses less than 400ma then it should be doable, question is, how?
        edit: now that i think about it, using a usb3 port will allow it to work anyway, since the arduino won't use more than 500ma max.
        So, the question is, how do i wire it all.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 18, 2020, 10:44:29 am
        JayBee, do you have any idea how much current the arduino takes from the usb?
        I have a rumble motor that works on 5V 100ma, and i'd like it to use the same usb as the arduino as a power source, meaning i don't want it to use the arduino itself as the power source but tap to the existing usb wire.
        If the arduino itself uses less than 400ma then it should be doable, question is, how?
        I don't have a USB measurement tool, but from what I saw online and from my own experience, the power consumption of the Arduino itself is very low, only few mA.
        For the 5V rumble motor, I power mine from the Arduino VCC pin, since the motor doesn't use too much current (the VCC seems to be connected directly to the USB VCC anyway).
        Not sure it's 100% safe, since I haven't been able to find the max load the VCC pin can take, but it's way more convenient than splitting the usb cable.

        edit: but if you want to power it from the USB directly, you have 2 solutions that should work equally well:
        1. remove some of the USB cable plastic close from the micro usb plug, and hijack the VCC wire in it
        2. buy or make a Y cable with 2 usb ports (more clean but take more space)

        Edit2: oh, if by "how" you also means the circuit to control it from the Arduino pin, I made a schematic for it in the first post recently (with the list of components needed). For the rumble it's fairly easy to do   :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 18, 2020, 01:12:17 pm
        * 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)
        Yeah!!! Top!!! :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 18, 2020, 02:34:01 pm
        I have this problem flashing new firmware:

        Flash Normal or Test firmware (N: Normal/T: Test)?n

        Stato del dispositivo COM6:
        ---------------------------
            Baud:                 1200
            Parità:               None
            Bit di dati:          8
            Bit di stop:          1
            Timeout:              OFF
            XON/XOFF:             OFF
            Sincronizzazione CTS: OFF
            Sincronizzazione DSR: OFF
            Sensibilità DSR:      OFF
            Circuito DTR:         OFF
            Circuito RTS:         ON


        In attesa da 0 secondi. Per uscire, premere CTRL+C...

        avrdude: Version 6.3-20190619
                 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                 Copyright (c) 2007-2014 Joerg Wunsch

                 System wide configuration file is "avrdude.conf"

                 Using Port                    : COM4
                 Using Programmer              : avr109
                 Overriding Baud Rate          : 57600
        avrdude: ser_open(): can't open device "\\.\COM4": Impossibile trovare il file specificato.

        avrdude done.  Thank you.

        with 1.75 flasher renaming file hex:


        Flash Normal or Test firmware (N: Normal/T: Test)?n

        Stato del dispositivo COM6:
        ---------------------------
            Baud:                 1200
            Parità:               None
            Bit di dati:          8
            Bit di stop:          1
            Timeout:              OFF
            XON/XOFF:             OFF
            Sincronizzazione CTS: OFF
            Sincronizzazione DSR: OFF
            Sensibilità DSR:      OFF
            Circuito DTR:         OFF
            Circuito RTS:         ON


        In attesa da 0 secondi. Per uscire, premere CTRL+C...

        avrdude: Version 6.3-20190619
                 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                 Copyright (c) 2007-2014 Joerg Wunsch

                 System wide configuration file is "avrdude.conf"

                 Using Port                    : COM4
                 Using Programmer              : avr109
                 Overriding Baud Rate          : 57600
                 AVR Part                      : ATmega32U4
                 Chip Erase delay              : 9000 us
                 PAGEL                         : PD7
                 BS2                           : PA0
                 RESET disposition             : dedicated
                 RETRY pulse                   : SCK
                 serial program mode           : yes
                 parallel program mode         : yes
                 Timeout                       : 200
                 StabDelay                     : 100
                 CmdexeDelay                   : 25
                 SyncLoops                     : 32
                 ByteDelay                     : 0
                 PollIndex                     : 3
                 PollValue                     : 0x53
                 Memory Detail                 :

                                          Block Poll               Page                       Polled
                   Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                   ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                   eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
                   flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
                   lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                   hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                   efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                   lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                   calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                   signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

                 Programmer Type : butterfly
                 Description     : Atmel AppNote AVR109 Boot Loader

        Connecting to programmer: .
        Found programmer: Id = "CATERIN"; type = S
            Software Version = 1.0; No Hardware Version given.
        Programmer supports auto addr increment.
        Programmer supports buffered memory access with buffersize=128 bytes.

        Programmer supports the following devices:
            Device code: 0x44

        avrdude: devcode selected: 0x44
        avrdude: ser_drain(): read error: Operazione di I/O terminata a causa dell'uscita dal thread oppure della richiesta di un'applicazione.

        avrdude: AVR device initialized and ready to accept instructions

        Reading |                                                    | 0% 0.00savrdude: ser_send(): write error: sorry no info avail
        avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

        avrdude: butterfly_recv(): programmer is not responding
        Reading | ################################################## | 100% 0.18s

        avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

        Reading |                                                    | 0% 0.00savrdude: ser_send(): write error: sorry no info avail
        avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

        avrdude: butterfly_recv(): programmer is not responding
        Reading | ################################################## | 100% 0.10s

        avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

        Reading |                                                    | 0% 0.00savrdude: ser_send(): write error: sorry no info avail
        avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

        avrdude: butterfly_recv(): programmer is not responding
        Reading | ################################################## | 100% 1.14s

        avrdude: Device signature = 0xffffff (probably .avr8x_mega)
        avrdude: Yikes!  Invalid device signature.
                 Double check connections and try again, or use -F to override
                 this check.

        avrdude: ser_send(): write error: sorry no info avail
        avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

        avrdude: butterfly_recv(): programmer is not responding
        avrdude: error: programmer did not respond to command: leave prog mode
        avrdude: ser_send(): write error: sorry no info avail
        avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

        avrdude: butterfly_recv(): programmer is not responding
        avrdude: error: programmer did not respond to command: exit bootloader

        avrdude done.  Thank you.


        Helpmeeeeee please... :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 18, 2020, 02:46:39 pm
        Kill_one, the timeout has changed to 6 seconds, and it looks like it's a problem with your setup.
        Change the timeout to 3 seconds in the bat file.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 18, 2020, 03:00:57 pm
        The rumble motor i'm using functions like a solenoid, when it rumbles it moves three gears which in turn pull the gun shell back to simulate the recoil.
        Since i am only using rumble, then i should use the solenoid pin instead of the rumble pin, right?
        Otherwise it won't work when shooting on screen?
        I'd test this myself but i'm still waiting for the parts to arrive, so i'd like to make sure i'm doing this right.
        Btw, the transistor isn't available at the moment, i can get the mosfet instead, do you think that would be an issue?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 18, 2020, 04:10:30 pm
        Kill_one, the timeout has changed to 6 seconds, and it looks like it's a problem with your setup.
        Change the timeout to 3 seconds in the bat file.

        It gave me error even with the version 1.75 set to 3s, I solved it using the flasher 1.70 on the second attempt ...I have no idea why :)

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 18, 2020, 04:24:09 pm
        The rumble motor i'm using functions like a solenoid, when it rumbles it moves three gears which in turn pull the gun shell back to simulate the recoil.
        Since i am only using rumble, then i should use the solenoid pin instead of the rumble pin, right?
        Otherwise it won't work when shooting on screen?
        I'd test this myself but i'm still waiting for the parts to arrive, so i'd like to make sure i'm doing this right.
        Btw, the transistor isn't available at the moment, i can get the mosfet instead, do you think that would be an issue?
        @Foxhole
        I too have one like this but I gave it up for reasons of space ... it is because the engine must be powered by 9v being guncon2 compatible for ps2, instead which lightgun do you have?
        Were you able to insert the IR camera into the barrel?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 18, 2020, 04:48:22 pm
        This is a ems topgun2, the motor works with 5V 100ma.
        As for the barrel, i will have to do some drilling to make it fit.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 18, 2020, 07:50:47 pm
        Kill_one, the timeout has changed to 6 seconds, and it looks like it's a problem with your setup.
        Change the timeout to 3 seconds in the bat file.

        It gave me error even with the version 1.75 set to 3s, I solved it using the flasher 1.70 on the second attempt ...I have no idea why :)
        Foxhole is right, your board doesn't seem to like the 6 seconds timing.
        Mine is quite tolerant and works with both 3 and 6 seconds, but it seems like it's a bit random.
        I will modify my code to do a test at 3, and if nothing found, another one at 6.

        @Foxhole no problems to connect to the solenoid pin, it works the same as the rumble pin only the timings are different (but can be modified to fit your setup).
        You can of course use the mosfet for the motor too, but it's a bit overkill xD


        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 05:47:44 am
        but to use the burst (autofire) holding the trigger in the games you have to use only mamehooker?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 07:23:48 am
        but to use the burst (autofire) holding the trigger in the games you have to use only mamehooker?
        You don't need mamehooker, fullauto mode is activated when holding the trigger more than 450ms.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 07:26:39 am
        You don't need mamehooker, fullauto mode is activated when holding the trigger more than 450ms.

        So maybe it depends on the type of game? Because I had tried with Time Crisis but when I kept the trigger pressed only the solenoid was activated and in the game it didn't fire
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 19, 2020, 07:29:43 am
        Time crisis doesn't have burst shots.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 19, 2020, 07:30:50 am
        I think he means that the solenoid doesn't react to the game itself. for that he will need mamehooker.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 07:41:50 am
        So maybe it depends on the type of game? Because I had tried with Time Crisis but when I kept the trigger pressed only the solenoid was activated and in the game it didn't fire
        Ah I see what you meant.
        So by default the feedback is coming from the gun itself, and it won't care about what is happening in game.
        You indeed need to use mamehooker to make the recoil react only when the game tells it to.
        And it will depends of the game, some games originally don't have any feedback commands.
        I haven't got time yet to prepare all the files for mamehooker yet, but I already got the one for Time Crisis, I can upload it once you got mamehooker setup and running.

        Time crisis doesn't have burst shots.
        Yes you're right. Good thing tho is that mamehooker works great with it, it makes it react exactly like the real arcade machine  ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 07:48:47 am
        By the way guys, are you interested in a auto reload function?
        I saw some guns often have like a 6 shots autoreload, would that be something you would be using?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 19, 2020, 07:51:30 am
        Personally, I'm more of a purist, if it wasn't in the game then i don't use it, but i think this deserves a poll, in case there are more people interested.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 07:57:58 am
        Personally, I'm more of a purist, if it wasn't in the game then i don't use it, but i think this deserves a poll, in case there are more people interested.
        Agreed. Will add it to my list of polls for the upcoming features :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 09:12:15 am
        By the way guys, are you interested in a auto reload function?
        I saw some guns often have like a 6 shots autoreload, would that be something you would be using?


        Automatic recharge as an option that can be activated and deactivated like the other functions would not be bad to have it ...: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 09:15:24 am
        I haven't got time yet to prepare all the files for mamehooker yet, but I already got the one for Time Crisis, I can upload it once you got mamehooker setup and running.
        so does it take a configuration file for each game? tonight try to configure it following the guide of the official website, if you start posting the files for Time crisis or the games you have already ready it wouldn't be bad :)
        thanks a lot!!!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 09:39:14 am
        so does it take a configuration file for each game? tonight try to configure it following the guide of the official website, if you start posting the files for Time crisis or the games you have already ready it wouldn't be bad :)
        thanks a lot!!!
        I have only 2 ini files fully setup so far, the 2 I have been testing mamehooker with; Time Crisis and Terminator 2 8)
        Time crisis uses the solenoid recoil when firing.
        Terminator 2 is using a constant fullauto mode with variable speed, which doesn't play well with the solenoid (and might burn it pretty fast).
        So it uses the rumble motor instead, which works great.

        I attached the files to this post, put both ini files in the ini\MAME subfolder of mamehooker (but check if it's working with mame first)
        Don't forget to make your arduino port COM1 for gun1 and COM2 for gun2 (in the device manager), or else it won't work.

        Note that it's an unfinished experimental feature, it works good as it is but might change in a future update.
        I will provide new files when needed.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 10:19:02 am
        I added a poll about the upcoming RGB led support if you are interested  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 11:09:17 am
        I added a poll about the upcoming RGB led support if you are interested  ;)

        Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: janderclander14 on February 19, 2020, 12:13:49 pm
        I added a poll about the upcoming RGB led support if you are interested  ;)

        An alternative to a standard RGB, which requires 3 PWM outputs, is to use a single Neopixel led, which only requires one digital output because it has an internal controller that interprets the digital data into colors and levels. They also operate on 5V. You may use SMD format leds or also through hole leds:

        https://www.adafruit.com/product/1938 (https://www.adafruit.com/product/1938)
        https://www.adafruit.com/product/1655 (https://www.adafruit.com/product/1655)

        You can easly program them by using standard Arduino libraries, such as Adafruit's neopixel.

        And, by the way, if you run out of pins, there is the possibility of desoldering the two RX and TX leds of the Arduino Micro board and repurpose them as digital outputs:

        https://golem.hu/article/pro-micro-pinout/ (https://golem.hu/article/pro-micro-pinout/)
        https://golem.hu/guide/pro-micro-upgrade/ (https://golem.hu/guide/pro-micro-upgrade/)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 12:20:02 pm



        Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
        It means you can't have both, since they are using the same pins.
        If you need those buttons you won't be able to use the led at all. Or not use those buttons at all.
        The question is more about which button/pins should we sacrifice or move when using the LED.


        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 12:31:41 pm


        I added a poll about the upcoming RGB led support if you are interested  ;)

        An alternative to a standard RGB, which requires 3 PWM outputs, is to use a single Neopixel led, which only requires one digital output because it has an internal controller that interprets the digital data into colors and levels. They also operate on 5V. You may use SMD format leds or also through hole leds:

        https://www.adafruit.com/product/1938 (https://www.adafruit.com/product/1938)
        https://www.adafruit.com/product/1655 (https://www.adafruit.com/product/1655)

        You can easly program them by using standard Arduino libraries, such as Adafruit's neopixel.

        And, by the way, if you run out of pins, there is the possibility of desoldering the two RX and TX leds of the Arduino Micro board and repurpose them as digital outputs:

        https://golem.hu/article/pro-micro-pinout/ (https://golem.hu/article/pro-micro-pinout/)
        https://golem.hu/guide/pro-micro-upgrade/ (https://golem.hu/guide/pro-micro-upgrade/)

        Yeah I thought about the addressed RGB led too, it would be very convenient, but there is a problem with this option I couldn't find a solution to; I won't have space to add another library to my sketch, even with heavy optimization I'm already using 90% of the very limited Arduino space ;)

        The other solution of hacking new pins is very nice too, but definitely not user friendly

        Envoyé de mon Pixel 3 en utilisant Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 12:45:25 pm



        Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
        It means you can't have both, since they are using the same pins.
        If you need those buttons you won't be able to use the led at all. Or not use those buttons at all.
        The question is more about which button/pins should we sacrifice or move when using the LED.
        From what I understand the only pro micro PWM pins are 3-5-6-9-10,
        the only pin that can be sacrificed without losing features is only the start button since most games start by shooting, you could consider using a single-pin LED and maybe add the A + Select combo for the Start button: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 12:48:02 pm
        Yeah I thought about the addressed RGB led too, it would be very convenient, but there is a problem with this option I couldn't find a solution to; I won't have space to add another library to my sketch, even with heavy optimization I'm already using 90% of the very limited Arduino space ;)
        AAAAAHHHHHH...rgggghhhh!!! :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 01:37:30 pm
        The other solution of hacking new pins is very nice too, but definitely not user friendly

        also solder the wires to the buttons on the guncon board is not user friendly... :)

        in my opinion you should evaluate if it is feasible to use the 2 additional pins of the led resistances and the Start button! : D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 08:13:26 pm
        Thanks for your suggestions ;D
        You didn't have enough space to use Dupont wires for your Arduino?
        I agree that resolder the buttons might be a pain.

        But let me explain the reason why I want to do 2 different firmwares;
        The GCon2 or similar guns with DPad use pretty much all the pins, so it will have a specific firmware that don't remove any button, but will not have led support.
        The other more simple models of gun rarely have more than 3~4 buttons (GCon1, Virtua gun...), but still might use the pedal button, so for them I will do another firmware that has led support, and uses a different pin for the pedal.

        Now for why I made this poll;
        Is there any guns out there that don't have dpad but still have start/select buttons?
        If so, for the second firmware I will have to change more of the pinout.
        In that case the pinout for both firmwares will be quite different, which might lead to confusion/errors, and to damaged Arduino.

        But if some people already fully wired a GCon2 like gun and can't change it easily, I might have to leave the pinout untouched for the 11 buttons firmware anyway
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 19, 2020, 08:55:04 pm
        Regarding the automatic reload function, would it be possible to add an autofire function when the trigger is kept pressed? Maybe holding down unloaded the whole magazine and then the automatic reloading starts while if you do not keep it pressed it fires one shot at a time and you have to reload manually? : D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 19, 2020, 09:23:42 pm
        Regarding the automatic reload function, would it be possible to add an autofire function when the trigger is kept pressed? Maybe holding down unloaded the whole magazine and then the automatic reloading starts while if you do not keep it pressed it fires one shot at a time and you have to reload manually? : D
        It could be possible, but not as a default option, since it would prevent games that need trigger holding to work correctly.
        But I guess I can add this to mamehooker if needed at some point?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 20, 2020, 02:45:08 am
        But I guess I can add this to mamehooker if needed at some point?

        I have installed mamehooker, configuring arduino com1 port, insert ini file to mamehooker ini mame directory and setting of tutorial mamehooker website, but in supported device no device is detected
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 20, 2020, 03:14:07 am
        I have installed mamehooker, configuring arduino com1 port, insert ini file to mamehooker ini mame directory and setting of tutorial mamehooker website, but in supported device no device is detected
        It's normal, Mamehooker doesn't "recognize" anything on serial ports.
        With my ini files it just sends raw data to COM1 and doesn't care about what the device is  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 20, 2020, 03:27:38 am
        It's normal, Mamehooker doesn't "recognize" anything on serial ports.
        With my ini files it just sends raw data to COM1 and doesn't care about what the device is  ;)

        so should it work already? which command should be entered to test if it works?

        should something be set in mame.ini?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 20, 2020, 03:54:26 am
        It's normal, Mamehooker doesn't "recognize" anything on serial ports.
        With my ini files it just sends raw data to COM1 and doesn't care about what the device is  ;)

        so should it work already? which command should be entered to test if it works?

        should something be set in mame.ini?
        Yeah if you configured mamehooker and mame correctly, it should work.
        I would recommend you to test it without ini files first, to see if mamehooker is reacting to mame and creates ini files from it.
        If it doesn't, you missed something.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 20, 2020, 04:01:50 am
        Yeah if you configured mamehooker and mame correctly, it should work.
        I would recommend you to test it without ini files first, to see if mamehooker is reacting to mame and creates ini files from it.
        If it doesn't, you missed something.

        so i run mame hooker and i run mame then i launch a game and should i create an ini of the game in mame ini dir in mame hooker?

        in groovymame 0.211 I have not set anything related to the outputs is it already configured for this?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 20, 2020, 04:04:53 am
        Yeah if you configured mamehooker and mame correctly, it should work.
        I would recommend you to test it without ini files first, to see if mamehooker is reacting to mame and creates ini files from it.
        If it doesn't, you missed something.

        so i run mame hooker and i run mame then i launch a game and should i create an ini of the game in mame ini dir in mame hooker?

        in groovymame 0.211 I have not set anything related to the outputs is it already configured for this?
        Yeah it should work.
        If not please check mamehooker and mame help.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lightgungamer on February 20, 2020, 05:41:47 am
        * 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)

        I removed the installation of avrduse, removed the audrino ide and reinstalled it.

        I have put the drivers for the pro micro which is the board I have on.
        The batch file appears to find it at first but then after it starts, I just get the error "Unable to start Program"
        Screen shot attached

        Here is the output from the batch file:
        ---
        Flash Normal or Test firmware (N: Normal/T: Test)?n

        Status for device COM11:
        ------------------------
            Baud:            1200
            Parity:          None
            Data Bits:       8
            Stop Bits:       1
            Timeout:         OFF
            XON/XOFF:        OFF
            CTS handshaking: OFF
            DSR handshaking: OFF
            DSR sensitivity: OFF
            DTR circuit:     OFF
            RTS circuit:     ON


        Waiting for 0 seconds, press CTRL+C to quit ...
        Press any key to continue . . .
        ---
        Which version of windows and arduino IDE do you have?
        You don't have any other arduino device plugged at the same time?
        What happens if you try to flash an empty sketch in arduino IDE?
        If flashing an empty sketch works, try replacing the avrdude.exe and avrdude.conf of my package by the ones in your own arduino folders:
        Code: [Select]
        C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17Inside the bin and etc subfolders (replace the <User folder> by your own folder name)

        I m using Windows 10 pro and the latest version of the Audrino IDE which is 1.8.12
        This is the only Audrino plugged in.
        Flashing an empty sketch works fine.
        There is no avr folder under the C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\ directlry (i replaced the <user folder>) the dir structure is ther and there are other folders under that level but no avrdude folder.

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 20, 2020, 10:28:32 am
        I m using Windows 10 pro and the latest version of the Audrino IDE which is 1.8.12
        This is the only Audrino plugged in.
        Flashing an empty sketch works fine.
        There is no avr folder under the C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\ directlry (i replaced the <user folder>) the dir structure is ther and there are other folders under that level but no avrdude folder.

        In this folder there should be 2 subfolders (bin and etc), one containing avrdude.exe, and the other one containing avrdude.conf
        You don't have those subfolders?
        Is your windows 32 or 64bits?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lightgungamer on February 20, 2020, 10:45:50 am
        * 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)

        I removed the installation of avrduse, removed the audrino ide and reinstalled it.

        I have put the drivers for the pro micro which is the board I have on.
        The batch file appears to find it at first but then after it starts, I just get the error "Unable to start Program"
        Screen shot attached

        Here is the output from the batch file:
        ---
        Flash Normal or Test firmware (N: Normal/T: Test)?n

        Status for device COM11:
        ------------------------
            Baud:            1200
            Parity:          None
            Data Bits:       8
            Stop Bits:       1
            Timeout:         OFF
            XON/XOFF:        OFF
            CTS handshaking: OFF
            DSR handshaking: OFF
            DSR sensitivity: OFF
            DTR circuit:     OFF
            RTS circuit:     ON


        Waiting for 0 seconds, press CTRL+C to quit ...
        Press any key to continue . . .
        ---
        Which version of windows and arduino IDE do you have?
        You don't have any other arduino device plugged at the same time?
        What happens if you try to flash an empty sketch in arduino IDE?
        If flashing an empty sketch works, try replacing the avrdude.exe and avrdude.conf of my package by the ones in your own arduino folders:
        Code: [Select]
        C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17Inside the bin and etc subfolders (replace the <User folder> by your own folder name)

        I m using Windows 10 pro and the latest version of the Audrino IDE which is 1.8.12
        This is the only Audrino plugged in.
        Flashing an empty sketch works fine.
        There is no avr folder under the C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\ directlry (i replaced the <user folder>) the dir structure is ther and there are other folders under that level but no avrdude folder.

        In this folder there should be 2 subfolders (bin and etc), one containing avrdude.exe, and the other one containing avrdude.conf
        You don't have those subfolders?
        Is your windows 32 or 64bits?
        I don’t have the avrdude folder. It’s windows 10 64 bit.


        Sent from my iPhone using Tapatalk
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 20, 2020, 10:48:03 am

        I don’t have the avrdude folder. It’s windows 10 64 bit.


        Sent from my iPhone using Tapatalk

        I never talked about any avrdude folder, but bin and etc folders. You don't have them?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 21, 2020, 01:23:23 pm
        I set it up like this my mamehooker default.ini

        [General]
        MameHookerStart=
        MameHookerStop=
        MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S, cmw 2 S, cmw 1 A2, cmw 2 A2, cmw 1 J0, cmw 2 J0
        MameStop= cmw 1 s0, cmw 1 r0, cmw 1 E, cmw 2 E, cmc 1, cmc 2
        StateChange=
        OnPause=
        OnRotate=
        [KeyStates]
        RefreshTime=33

        [Output]

        but in the debug window I don't receive any messages from the games, I can't understand what else I need to set ... :(
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 21, 2020, 08:04:55 pm
        I set it up like this my mamehooker default.ini

        [General]
        MameHookerStart=
        MameHookerStop=
        MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S, cmw 2 S, cmw 1 A2, cmw 2 A2, cmw 1 J0, cmw 2 J0
        MameStop= cmw 1 s0, cmw 1 r0, cmw 1 E, cmw 2 E, cmc 1, cmc 2
        StateChange=
        OnPause=
        OnRotate=
        [KeyStates]
        RefreshTime=33

        [Output]

        but in the debug window I don't receive any messages from the games, I can't understand what else I need to set ... :(
        you shouldn't change the default file, or else it will overwrite the game settings  ;)
        I think I know the problem; in your mame.ini (in your mame directory) you need to change the output setting from whatever it is now to windows.
        Like this:
        Code: [Select]

        #
        # OSD OUTPUT OPTIONS
        #
        output                    windows

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 24, 2020, 03:37:46 am
        I think I know the problem; in your mame.ini (in your mame directory) you need to change the output setting from whatever it is now to windows.
        Like this:
        Code: [Select]

        #
        # OSD OUTPUT OPTIONS
        #
        output                    windows

        Yes!
        it was this! Now works...

        however, there are games where nothing comes out, such as Point Blank 1 while the JAP Gunbarl version does and Point Blank 2 as well

        this is output of Gunbarl.ini and Ptblank2.ini
        Code: [Select]
        [Output]
        Player1_Gun_Recoil=
        Player2_Gun_Recoil=
        P2_Start_lamp=
        the ini file it must be so ?
        Code: [Select]
        [General]
        MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S, cmw 2 S, cmw 1 A0, cmw 2 A0
        MameStop=cmw 1 E, cmw 2 E, cmc 1, cmc 2
        StateChange=
        OnRotate=
        OnPause=
        [KeyStates]
        RefreshTime=
        [Output]
        Player1_Gun_Recoil=cmw 1 s0|cmw 1 s1
        Player2_Gun_Recoil=cmw 2 s0|cmw 2 s1
        P2_Start_lamp=

        r0 e r1
        if I want to use the rumble?

        A0 in my case because I have the 4: 3 monitor

        these settings are correct?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 24, 2020, 04:10:56 am
        however, there are games where nothing comes out, such as Point Blank 1 while the JAP Gunbarl version does and Point Blank 2 as well
        Point Blank 1 don't have feedback on Mame, no matter the version, you can't make it work even by doing a manual ini file.
        If MameHooker doesn't create a new ini file when you starting new games, it's not supported.
        You can of course manually create a ini file if you want to change some settings, but you won't get any feedback.

        r0 e r1
        if I want to use the rumble?

        A0 in my case because I have the 4: 3 monitor

        these settings are correct?
        Yes those are correct  ;)
        But for games that support gun feedback of course :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 24, 2020, 04:30:22 am
        Point Blank 1 don't have feedback on Mame, no matter the version, you can't make it work even by doing a manual ini file.
        If MameHooker doesn't create a new ini file when you starting new games, it's not supported.
        You can of course manually create a ini file if you want to change some settings, but you won't get any feedback.

        Ah ok! now I understand...
        is there a list of supported games?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 25, 2020, 02:39:44 am
        Ah ok! now I understand...
        is there a list of supported games?
        I haven't found any  :(
        However it's pretty simple if you activate the Mamehooker notifications, you will hear it telling you the first time you use a game that has support ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 26, 2020, 03:52:17 am
        After changing the com port of one of the guns to com1 (it was written in use) the gun when I connect it to the usb port and it is detected on com1 the ir pointing no longer works, I tried to restart shut down but nothing, changing the port while the USB is detected and installed, the pointing works and then again it no longer works, even changing the com port does not work, I also tried to reinstall the firmware and recalibrate the gun nothing to do, the other gun instead always works regardless of the change of port com ... Is there a way to reset all the settings or remove and reinstall the drivers to restart from scratch?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 26, 2020, 04:55:05 am
        After changing the com port of one of the guns to com1 (it was written in use) the gun when I connect it to the usb port and it is detected on com1 the ir pointing no longer works, I tried to restart shut down but nothing, changing the port while the USB is detected and installed, the pointing works and then again it no longer works, even changing the com port does not work, I also tried to reinstall the firmware and recalibrate the gun nothing to do, the other gun instead always works regardless of the change of port com ... Is there a way to reset all the settings or remove and reinstall the drivers to restart from scratch?
        You assigned the COM port to one already in use, so the arduino stopped working.
        Before changing any port, remove/change the ones that are using them.
        To display all devices go in View menu => Show Hidden Devices
        Reinstalling the drivers or the firmware won't do anything in that case, you need to unplug everything, delete every devices using a COM port, and replug your arduino.
        To be sure your calibration is not the cause, don't redo a calibration, just enter calibration mode and then press the calibration button briefly, it should reset it to default.
        You shouldn't reinstall the firmware every time there is an issue by the way, the firmware stays in the arduino memory no matter what ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 26, 2020, 10:12:56 am
        I removed all the devices that use the com ports, checked the hidden ones, uninstalled arduino ide and usb drivers and reinstalled, when the gun is connected, arduino lenoardo com 8 is detected and while it does it works perfectly then stops after a while and no longer works, I don't think at this point that it's a COM port problem the LEDs in the ir camera and the Arduino are on so I don't think the USB cable broke ... I don't understand, the other two guns I made work regularly.


        if I keep the calibration button pressed the cursor moves to the center correctly but the calibration reset procedure does not seem to work because when the usb cable is reconnected it is the same as before
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 26, 2020, 10:41:11 am


        I removed all the devices that use the com ports, checked the hidden ones, uninstalled arduino ide and usb drivers and reinstalled, when the gun is connected, arduino lenoardo com 8 is detected and while it does it works perfectly then stops after a while and no longer works, I don't think at this point that it's a COM port problem the LEDs in the ir camera and the Arduino are on so I don't think the USB cable broke ... I don't understand, the other two guns I made work regularly.


        if I keep the calibration button pressed the cursor moves to the center correctly but the calibration reset procedure does not seem to work because when the usb cable is reconnected it is the same as before

        Reinstalling the drivers or IDE won't change anything if your other guns are working.
        If it works for a while when you plug it, then stop working suddenly it's not a firmware nor calibration issue (calibration is only for aiming correction anyway, it doesn't change the way the gun works).
        When the gun stops working, are the buttons and feedbacks still working?
        If yes, you probably have a weak connection with the cam.
        If no, it's another hardware issue, you should check everything, like short circuits or anything that might cause the Arduino to freeze.
        You can also leave your gun open to test if the Arduino led is blinking when you trigger buttons.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 26, 2020, 11:01:58 am
        When the gun stops working, are the buttons and feedbacks still working?
        If yes, you probably have a weak connection with the cam.
        If no, it's another hardware issue, you should check everything, like short circuits or anything that might cause the Arduino to freeze.
        You can also leave your gun open to test if the Arduino led is blinking when you trigger buttons.


        tonight I'll check ... but what do you mean by  a weak connection with the cam?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 26, 2020, 11:08:44 am
        When the gun stops working, are the buttons and feedbacks still working?
        If yes, you probably have a weak connection with the cam.
        If no, it's another hardware issue, you should check everything, like short circuits or anything that might cause the Arduino to freeze.
        You can also leave your gun open to test if the Arduino led is blinking when you trigger buttons.


        tonight I'll check ... but what do you mean by  a weak connection with the cam?
        I meant a lose connection of the camera wires.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 26, 2020, 01:34:32 pm
        I meant a lose connection of the camera wires.
        you mean SDA and SCL? Because the red led of the cam is always on
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 26, 2020, 09:04:34 pm
        I meant a lose connection of the camera wires.
        you mean SDA and SCL? Because the red led of the cam is always on
        I mean any of the wires.
        If it loses connection even for one micro second at a bad timing it can cause it to stop working.
        But first, check if your buttons are still working when the tracking stops, if they aren't it's probably not coming from the cam!
        Always check by steps, it's important.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 26, 2020, 09:38:31 pm
        The flashing red LED of the keys when it stops pointing remains fixed and no key works anymore, I tried to reflect the firmware but it gives me an error, I changed the USB cable and it still blocks that the Arduino has skipped?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 26, 2020, 10:08:41 pm


        The flashing red LED of the keys when it stops pointing remains fixed and no key works anymore, I tried to reflect the firmware but it gives me an error, I changed the USB cable and it still blocks that the Arduino has skipped?

        Don't try to reflash my firmware, I told you it's going to do more harm than anything else if the Arduino isn't working correctly.
        Unless there is a firmware update, flash it only once. If anything wrong happens during the flash it can easily brick your Arduino!

        There is obviously something wrong in your wiring that makes the Arduino freeze, the input LEDs should always blink when pressing keys no matter what, even if my firmware crashes.

        Please check all the electronic/wiring again.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 27, 2020, 03:56:51 am
        Don't try to reflash my firmware, I told you it's going to do more harm than anything else if the Arduino isn't working correctly.
        Unless there is a firmware update, flash it only once. If anything wrong happens during the flash it can easily brick your Arduino!

        There is obviously something wrong in your wiring that makes the Arduino freeze, the input LEDs should always blink when pressing keys no matter what, even if my firmware crashes.

        Please check all the electronic/wiring again.

        I had tried to flash the test firmware but without results, the problem does it even with arduino and the 4 pins of the camera dfrobot only, i bricked arduino or ir camera defect? Although I don't understand why as soon as it connects to the USB port it works  :dunno  :banghead:   :laugh2:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 27, 2020, 04:45:09 am
        Don't try to reflash my firmware, I told you it's going to do more harm than anything else if the Arduino isn't working correctly.
        Unless there is a firmware update, flash it only once. If anything wrong happens during the flash it can easily brick your Arduino!

        There is obviously something wrong in your wiring that makes the Arduino freeze, the input LEDs should always blink when pressing keys no matter what, even if my firmware crashes.

        Please check all the electronic/wiring again.

        I had tried to flash the test firmware but without results, the problem does it even with arduino and the 4 pins of the camera dfrobot only, i bricked arduino or ir camera defect? Although I don't understand why as soon as it connects to the USB port it works  :dunno  :banghead:   :laugh2:
        Are you sure the Arduino isn't on the same com port as another device anymore?
        If and only if it's on a unique com port, remove everything connected to the Arduino and try flashing an empty sketch with the Arduino IDE, after selecting the right com port.
        If it doesn't work, check what error it gives you.
        If it's a problem resetting the arduino, use a wire on the reset pin to flash an empty sketch (you will find the process online).
        Try on another computer too just in case.
        If after all those tests it still doesn't work, it means your arduino is fried.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 27, 2020, 07:58:57 am
        Sorry for reporting this only now but i had a lot going on.
        i installed firmware 1.76 when you released it but i didn't get to use the gun since i was busy working on upgrading my cabinet.
        I plugged the gun today to play some mame games and i immediatly noticed that the gun has developed some offset to the left, meaning i have to point beyond the right border of the screen for the cursor to reach the border.
        The cursor is not centered when i'm aiming at the center, it's a bit to the left.
        At first i thought it was the ir camera messing up so i tried recalibrating but that didn't help so i opened the gun and reseated the camera, still didn't help.
        Checked resolution, aspect ratio and etc, and nothing helped and then i remembered that i installed the 1.76 and didn't test it, so i returned to firmware 1.75 and it's now working well.
        Any idea what's going on with the 1.76 firmware?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 27, 2020, 08:21:47 am
        Sorry for reporting this only now but i had a lot going on.
        i installed firmware 1.76 when you released it but i didn't get to use the gun since i was busy working on upgrading my cabinet.
        I plugged the gun today to play some mame games and i immediatly noticed that the gun has developed some offset to the left, meaning i have to point beyond the right border of the screen for the cursor to reach the border.
        The cursor is not centered when i'm aiming at the center, it's a bit to the left.
        At first i thought it was the ir camera messing up so i tried recalibrating but that didn't help so i opened the gun and reseated the camera, still didn't help.
        Checked resolution, aspect ratio and etc, and nothing helped and then i remembered that i installed the 1.76 and didn't test it, so i returned to firmware 1.75 and it's now working well.
        Any idea what's going on with the 1.76 firmware?
        Thanks for reporting the bug  :cheers:
        You're right there is an issue with the 1.76 calibration, it will be corrected in the next firmware (coming very soon).

        a small teaser for one of the new firmware big functionalities:
        https://youtu.be/xesX264urXI
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 27, 2020, 10:41:09 am
        Here is the new update, the biggest update so far since the very first release!
        I added a ton of functionalities and made it ready for the future companion app I want to make.
        As usual, feel free to tell me how it works for you  :cheers:



        * 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. Obviously changing this option will have no effect if you have a 4:3 screen.
        - 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)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 27, 2020, 08:54:06 pm
        Updated to the latest firmware, cleared the eeprom, and now the gun doesn't respond to anything.
        It's effectively dead.
        Should i go back to firmware 1.75? Something i can try?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 27, 2020, 09:01:24 pm
        Correction: The ir test does work, it's like the gun is somehow stuck in test mode, it doesn't move the cursor or respond to buttons at all.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 27, 2020, 09:14:27 pm
        Correction: The ir test does work, it's like the gun is somehow stuck in test mode, it doesn't move the cursor or respond to buttons at all.
        Ah it just means the EEPROM clear didn't work for some reasons.
        I think I know why, the timings of my batch tool still need some adjustments.
        Can you go back to the batch file and redo an EEPROM clear (for the clear EEPROM menu, not the firmware flash).

        Edit:
        Uploaded a new version of the batch with a timing change to trigger the EEPROM memory clear correctly.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 28, 2020, 12:51:08 am
        Still the same.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 28, 2020, 01:24:13 am
        Still the same.
        That's weird, I tested my 4 guns and they all worked fine :dunno
        Which version of the firmware did you flash?
        Can you go in the Arduino IDE with the gun plugged, go into the serial command, type the capital letter D and press send?
        It should give you some of the EEPROM data.
        If it gives you numbers other than -1, it means the memory clear isn't working on your arduino from my batch for some reasons.
        If that's the case, entering "ZC" (without the quote marks) in the serial command prompt should solve it.
        Try that even if you don't get any numbers when typing D, just in case.

        Edit: by the way, I made a discord server for support and news, it should be more convenient:
        https://discord.gg/HJyfYja (https://discord.gg/HJyfYja)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 28, 2020, 01:33:56 am
        Still the same.
        That's weird, I tested my 4 guns and they all worked fine :dunno
        Which version of the firmware did you flash?
        Can you go in the Arduino IDE with the gun plugged, go into the serial command, type the capital letter D and press send?
        It should give you some of the EEPROM data.
        If it gives you numbers other than -1, it means the memory clear isn't working on your arduino from my batch for some reasons.
        If that's the case, entering "ZC" (without the quote marks) in the serial command prompt should solve it.
        Try that even if you don't get any numbers when typing D, just in case.

        Edit: by the way, I made a discord server for support and news, it should be more convenient:
        https://discord.gg/HJyfYja (https://discord.gg/HJyfYja)
        I'm using the dpad firmware.
        Typing D or ZC on the serial monitor brings no results whatsoever.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 28, 2020, 01:38:40 am
        OK, it seems it's working again, i've tried the eeprom clear and the ZC Again, after reconnecting the gun it started working again.
        But, Aiming is off again, this time to the right of the screen and not the left, and the calibration button doesn't work.
        Also, on the serial monitor i didn't get any reply whatsoever no matter what i typed.
        I made sure that it's the correct com port.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 28, 2020, 01:39:38 am
        I'm using the dpad firmware.
        Typing D or ZC on the serial monitor brings no results whatsoever.
        It's even more strange, since the test app is working those serial commands should work as well (the test app is sending some serial commands too).
        Did you do a power cycle after doing the ZC command?

        Edit:
        OK, it seems it's working again, i've tried the eeprom clear and the ZC Again, after reconnecting the gun it started working again.
        But, Aiming is off again, this time to the right of the screen and not the left, and the calibration button doesn't work.
        Also, on the serial monitor i didn't get any reply whatsoever no matter what i typed.
        I made sure that it's the correct com port.
        Yeah the serial should answer something only to the D command, but it's ok as long as the clear did work.
        So since the EEPROM is cleared it's resetting the calibration to 0, it's normal that you get an offset again.
        But the calibration not working is another issue indeed, I will check that later today and give you a fixed version.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on February 28, 2020, 01:55:52 am
        I have a feeling it's because i'm new to arduino, i'm probably missing a library or something like that.
        Maybe it's because i use a sparkfun pro micro.
        Anyway, i'm on the discord.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 28, 2020, 03:21:52 am
        Here is the new update, the biggest update so far since the very first release!
        I added a ton of functionalities and made it ready for the future companion app I want to make.
        As usual, feel free to tell me how it works for you  :cheers:



        * 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. Obviously changing this option will have no effect if you have a 4:3 screen.
        - 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)

        Great JayBee, I will try it this weekend, in the meantime I have already ordered the sensors and the RGB LEDs ...: D is there any need for other additional components such as capacitors or resistors? I read that rgb pins should be put resistors, if so which ones? and for the TMP36 is a 0.1uf capacitor correct?
        is the connection of the TMP is simply this: Pin1 + 5v Pin2 (central) pin arduino Pin3 gnd (and capacitor possibly)?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 28, 2020, 03:25:48 am


        Here is the new update, the biggest update so far since the very first release!
        I added a ton of functionalities and made it ready for the future companion app I want to make.
        As usual, feel free to tell me how it works for you  :cheers:



        * 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. Obviously changing this option will have no effect if you have a 4:3 screen.
        - 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)

        Great JayBee, I will try it this weekend, in the meantime I have already ordered the sensors and the RGB LEDs ...: D is there any need for other additional components such as capacitors or resistors? I read that rgb pins should be put resistors, if so which ones? and for the TMP36 is a 0.1uf capacitor correct?
        is the connection of the TMP is simply this: Pin1 + 5v Pin2 (central) pin arduino Pin3 gnd (and capacitor possibly)?

        Yeah you need one resistor per pin for the led, but the value depends of the specs of your led (check its datasheet).
        The tmp don't need any other components, it should work as is, and yes your connection is right ;)

        Be careful tho, you can't connect both dpad and rgb LEDs at the same time
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 28, 2020, 03:33:13 am
        Are you sure the Arduino isn't on the same com port as another device anymore?
        Yes
        If and only if it's on a unique com port, remove everything connected to the Arduino and try flashing an empty sketch with the Arduino IDE, after selecting the right com port.
        If it doesn't work, check what error it gives you.
        gives me an error in the compilation, collect.exe -1 while reading the card no problem
        If it's a problem resetting the arduino, use a wire on the reset pin to flash an empty sketch (you will find the process online).
        Try on another computer too just in case.
        the same on another pc, i managed to install the new D-PAD 1.85 firmware by deleting the eprom data, in fact the cursor is now off-center again, but the pointing always stops after a few seconds, on the other hand I too can no longer do the calibration, if I keep the calibration button pressed, the cursor does not move to the center of the screen
        If after all those tests it still doesn't work, it means your arduino is fried.
        I really hope the arduino is fried and not the cam ...: D today another pro micro should arrive, hopefully well, I better flash the firmware 1.75 or 1.85 to be sure of the operation?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 28, 2020, 03:36:56 am
        Are you sure the Arduino isn't on the same com port as another device anymore?
        Yes
        If and only if it's on a unique com port, remove everything connected to the Arduino and try flashing an empty sketch with the Arduino IDE, after selecting the right com port.
        If it doesn't work, check what error it gives you.
        gives me an error in the compilation, collect.exe -1 while reading the card no problem
        If it's a problem resetting the arduino, use a wire on the reset pin to flash an empty sketch (you will find the process online).
        Try on another computer too just in case.
        the same on another pc, i managed to install the new D-PAD 1.85 firmware by deleting the eprom data, in fact the cursor is now off-center again, but the pointing always stops after a few seconds, on the other hand I too can no longer do the calibration, if I keep the calibration button pressed, the cursor does not move to the center of the screen
        If after all those tests it still doesn't work, it means your arduino is fried.
        I really hope the arduino is fried and not the cam ...: D today another pro micro should arrive, hopefully well, I better flash the firmware 1.75 or 1.85 to be sure of the operation?
        Yeah it's most likely the Arduino.
        Flash the 1.75, the 1.85 needs some fixes
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on February 28, 2020, 03:54:17 am
        You could also review the 7-button version, because there are guns like mine that only have the trigger, 2 buttons and D-PAD, it would be more convenient to use the following buttons: TRIGGER, START, A BUTTON, D-PAD or at least in the my case :)
        (http://killone.myqnapcloud.com/GUN/frontgun.jpg)
        (http://killone.myqnapcloud.com/GUN/reargun.jpg)
        Could the button associated with the Pedal still be used by connecting it to the A button or am I wrong?
        Thanks so much :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 28, 2020, 09:40:18 am
        * 2020/02/28 - 1.86
        - fixed calibration issues
        - fixed aiming issues
        - fixed the flash/clear tool

        You could also review the 7-button version, because there are guns like mine that only have the trigger, 2 buttons and D-PAD, it would be more convenient to use the following buttons: TRIGGER, START, A BUTTON, D-PAD or at least in the my case :)
        Could the button associated with the Pedal still be used by connecting it to the A button or am I wrong?
        Thanks so much :)
        With the dpad 4 direction this gun has 7 buttons (8 with the pedal). It will also need a 9th button for calibration.
        So it's possible to support it with the led if you sacrifice one button for calibration, and the pedal (of if you connect the pedal and B on the same pin).
        But it would require changing the pinout again, reason why I asked about it in the last poll  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 28, 2020, 11:50:56 am
        * 2020/02/28 - 1.87
        - 2 points detection is now inactive if too close from the screen, to avoid misdetection
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 29, 2020, 09:24:22 am
        * 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.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on February 29, 2020, 09:29:14 am
        @kill_one just to be sure, the issue you had of the gun which stops working after a while, did it stop working when you use the test app?
        If yes it's totally normal since the test app switches the firmware in test mode, and you have to replug the gun to switch back to normal.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on March 01, 2020, 01:46:02 am
        I've been doing experiments with some 1W 120 degrees leds from china.

        The good news;
        They work extremely well, from any angle, even from more than 45degrees on the side.
        The good news;
        They use a lot of energy, and produce a LOT of heat. Like way too much to use without a heat dissipating system or something.

        I will try changing the resistors to see if I can reduce the heat, and add small metal frames to dissipate it.
        If it works I think we can safely say that I found the perfect leds for this system :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on March 01, 2020, 07:09:19 am
        * 2020/02/29 - 1.93
        - reworked the aiming and detection, to make it faster and better
        - fixed some bugs
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on March 02, 2020, 04:36:41 am
        @kill_one just to be sure, the issue you had of the gun which stops working after a while, did it stop working when you use the test app?
        If yes it's totally normal since the test app switches the firmware in test mode, and you have to replug the gun to switch back to normal.

        no, no test app, it doesn't work if launch processing doesn't move anything, I tried with the new arduino, put 1.75, 1.91, 1.93 same problem, I redid all the wire connections and I'm ok, I noticed that when I point with the room and it works the red led lights up which usually flashes when I press the keys, as long as it works it stays on and if I go off the screen it goes off, it comes back on when I am on the screen again, when the pointing is blocked or stops the pointing remains steadily lit and does not turn off anymore.I don't know what else to do, the flashes of the 1.91 and 1.93 went well without errors and I also tried to clear the memory, everything went smoothly but the problem persists ...
        I put the link to a video that I made, it's not very clear but you should see the problem of the fixed LED

        https://photos.app.goo.gl/SWdDmG55x3nQ5oGcA (https://photos.app.goo.gl/SWdDmG55x3nQ5oGcA)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on March 03, 2020, 03:17:22 am
        I took courage and disassembled one of the two finished guns again and tried both the old arduino with the ir chamber of this working and the ir chamber of the gun that does not work with the arduino of the working one, the final result of the same problem. pointing and the old arduino with the other camera is back to work regularly, so the ir camera is the problem! :) I don't know what happened but it is so. Changing the camera now the gun is back to work, I put the firmware 1.93 and cleared the memory and set the monitor to 4: 3 and now it works perfectly, even it was not necessary to calibrate it and it seems much more precise..Now there is is it way to open the dfrobot room to understand if it can be fixed? Maybe rotating the wires of cam has created a false contact internally? Otherwise I have to order another cam !!! : D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on March 03, 2020, 03:27:06 am
        now that I have found the gun problem, we come to another doubt that I have ... the connection of the TMP36 sensor

        (http://killone.myqnapcloud.com/GUN/sensor.png)

        connections:

        PIN1 e PIN3 should they be connected to + 5v and gnd of the arduino or are those that feed the rumble also fine?
        PIN2 to arduino A0 pin

        thanks :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on March 03, 2020, 03:29:12 am
        With the dpad 4 direction this gun has 7 buttons (8 with the pedal). It will also need a 9th button for calibration.
        So it's possible to support it with the led if you sacrifice one button for calibration, and the pedal (of if you connect the pedal and B on the same pin).
        But it would require changing the pinout again, reason why I asked about it in the last poll  :lol

        in fact I replied Other and I'm in the 50% of the survey ... ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on March 03, 2020, 03:56:40 am
        @Foxhole if you can find a way to modify the lightgun LOGIC 3 P99 LASER I would be grateful if you post some photos of how you did it, I did not succeed there is too little space ...: D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on March 03, 2020, 07:39:19 am
        now that I have found the gun problem, we come to another doubt that I have ... the connection of the TMP36 sensor

        (http://killone.myqnapcloud.com/GUN/sensor.png)

        connections:

        PIN1 e PIN3 should they be connected to + 5v and gnd of the arduino or are those that feed the rumble also fine?
        PIN2 to arduino A0 pin

        thanks :)
        Yes exactly, +5V and GND of the arduino power the sensor
        It doesn't use much power so it shouldn't be a problem.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: kill_one on March 08, 2020, 01:04:59 pm
        I mounted the temperature sensor to the two guns that I have working, I enabled them in both, and tried, on one if I hold down at a certain point it stops and does not work anymore after a while it starts again and I think it is normal and it means that the sensor is working right? If I use the other instead nothing happens the solenoid is always active, is there a way to understand if the tool has activated the sensor or not? Because when I put the E the procedure lasts a few seconds but nothing tells me if it was successful or not ...
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lemmingDev on March 25, 2020, 04:53:30 pm
        Hi

        Am wanting to make a wireless Bluetooth version of this with an ESP32.

        I'm almost at the stage where I've got the same functionality as the SAMCO 2.0 working via Bluetooth LE keyboard and absolute mouse, along with classic BT serial that could be used for mamehooker and solenoid/rumble goodness.

        Benefit of ESP32 is that there's plenty of processing power plus space for additional libraries like neopixel for RGB LED. Only downside to it is that is doesn't have USB HID support, however as it has BLE HID support, everything can be done wirelessly ;)

        I see you're a bit hesitant with providing the code, but have said a few times you're happy to compile variations for other users.

        Just wondering if I were to provide you the code with working composite BLE HID absolute position mouse (I hacked a library together based on absmouse library) / keyboard (and possibly gamepad - I made a working one already) and classic BT serial for makehooker all together in a working sketch, if you would consider adding your magic 4 LED code etc and compiling it for me to test out.

        I do have a few of Pro Micros so can do it wired, but can't help thinking a wireless version would be fantastic too.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on March 27, 2020, 10:35:18 am
        Hi

        Am wanting to make a wireless Bluetooth version of this with an ESP32.

        I'm almost at the stage where I've got the same functionality as the SAMCO 2.0 working via Bluetooth LE keyboard and absolute mouse, along with classic BT serial that could be used for mamehooker and solenoid/rumble goodness.

        Benefit of ESP32 is that there's plenty of processing power plus space for additional libraries like neopixel for RGB LED. Only downside to it is that is doesn't have USB HID support, however as it has BLE HID support, everything can be done wirelessly ;)

        I see you're a bit hesitant with providing the code, but have said a few times you're happy to compile variations for other users.

        Just wondering if I were to provide you the code with working composite BLE HID absolute position mouse (I hacked a library together based on absmouse library) / keyboard (and possibly gamepad - I made a working one already) and classic BT serial for makehooker all together in a working sketch, if you would consider adding your magic 4 LED code etc and compiling it for me to test out.

        I do have a few of Pro Micros so can do it wired, but can't help thinking a wireless version would be fantastic too.
        Yeah no problem, I could try to make that work ;)
        Which ESP32 board model where you thinking of using?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lemmingDev on March 28, 2020, 01:32:34 am
        Thanks!

        They're all basically the same, but this is the one i have on hand
        https://www.aliexpress.com/item/32991132248.html
        which is a clone of this
        https://img.staticbg.com/images/oaupload/banggood/images/33/EE/51a8d415-7b17-4ae3-8274-b8317b03465f.jpg

        but here is the generic pinout
        https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on March 30, 2020, 10:24:33 am
        So I’ve really got the itch to try and build this thing as I’ve been wanting a nice lightgun forever now. The problem is I’m very green at electronics and such and programming and feel like I would order everything put it all together, something wouldn’t work right and I’d be lost on how to troubleshoot. How easy for a novice like myself is this project in all honesty? Am I sweating myself up for failure? Should I wait till the project is more complete?
        Also, is the Guncon2 recommended over the Guncon1? The 2 has more buttons and I would feel is more practical, but to me the 1 is that quintessential arcade gun form factor.
        Lastly, if building I would start simple and just do the basic stuff first, if I got that working properly, can I add a solenoid later?

        Long story short, should I wait for the Sinden that I know will be ready to go out of the box? Curious what the sunk cost difference would be, knowing I have to get like a solder gun and stuff for this project

        Really enjoy reading your updates! Exciting to see how it progresses
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on March 30, 2020, 10:45:29 am
        Thanks!

        They're all basically the same, but this is the one i have on hand
        https://www.aliexpress.com/item/32991132248.html
        which is a clone of this
        https://img.staticbg.com/images/oaupload/banggood/images/33/EE/51a8d415-7b17-4ae3-8274-b8317b03465f.jpg

        but here is the generic pinout
        https://randomnerdtutorials.com/esp32-pinout-reference-gpios/
        Ok, I will look into it when I have a bit more time  ;)

        So I’ve really got the itch to try and build this thing as I’ve been wanting a nice lightgun forever now. The problem is I’m very green at electronics and such and programming and feel like I would order everything put it all together, something wouldn’t work right and I’d be lost on how to troubleshoot. How easy for a novice like myself is this project in all honesty? Am I sweating myself up for failure? Should I wait till the project is more complete?
        Also, is the Guncon2 recommended over the Guncon1? The 2 has more buttons and I would feel is more practical, but to me the 1 is that quintessential arcade gun form factor.
        Lastly, if building I would start simple and just do the basic stuff first, if I got that working properly, can I add a solenoid later?

        Long story short, should I wait for the Sinden that I know will be ready to go out of the box? Curious what the sunk cost difference would be, knowing I have to get like a solder gun and stuff for this project

        Really enjoy reading your updates! Exciting to see how it progresses
        No problem, we all started somewhere  ;)
        I would say the project while not being that hard, isn't easy either.
        The Guncon 1 only has 3 buttons so without solenoid it's fairly easy. But the led system is more complex to do.
        The basic price isn't as high as the sinden gun for sure, but indeed if you need to buy all soldering materials it might not be so cheap.
        Overall I would advice you to do this project only if you have time (and some money) to invest in it. Otherwise it might be preferable to get a plug and play solution.
        I might also consider building and selling prebuilt guns one day, but it's probably not before long :P
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on March 30, 2020, 01:39:48 pm
        For me, I do enjoy the tinkering aspect so I don’t mind doing some building of the gun, and the guns are relatively easy to find locally but if you had sold a kit of everything else somewhat assembled and the Arduino fully programmed and ready to go, that would something I’d be interested in. I’d feel much better know at least that aspect was ready to go and I wouldn’t have to troubleshoot that. I could then assemble it all in a gun and play around with the software in MAME, etc.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on March 30, 2020, 02:26:17 pm
        For me, I do enjoy the tinkering aspect so I don’t mind doing some building of the gun, and the guns are relatively easy to find locally but if you had sold a kit of everything else somewhat assembled and the Arduino fully programmed and ready to go, that would something I’d be interested in. I’d feel much better know at least that aspect was ready to go and I wouldn’t have to troubleshoot that. I could then assemble it all in a gun and play around with the software in MAME, etc.
        Actually I was considering making some pcb for this setup, but realized that it wouldn't fit well with all the things I am putting in the guns, like solenoid, rumble... :lol
        I might rethink about it if enough people are interested actually.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on April 01, 2020, 08:05:15 pm
        Just curious, I picked up a Guncon 1 at a local shop yesterday and he had a Guncon 3 for cheap so I picked it up too. Just curious if since the 3 was designed to work on lcd screens with a similar type of design, could the original camera be used with the Arduino? Would save me a few bucks!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 02, 2020, 08:11:53 am
        Just curious, I picked up a Guncon 1 at a local shop yesterday and he had a Guncon 3 for cheap so I picked it up too. Just curious if since the 3 was designed to work on lcd screens with a similar type of design, could the original camera be used with the Arduino? Would save me a few bucks!
        good question.
        Probably if it's a i2c standard like the wiimote, but it's hard to know for sure :P
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on April 02, 2020, 10:00:50 am
        Let’s say it did in fact work, would it somehow be inferior to what you’re using? Superior? No difference? Would it be more work and more complicated for little or no benefit over the other one?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 02, 2020, 10:38:59 am
        Let’s say it did in fact work, would it somehow be inferior to what you’re using? Superior? No difference? Would it be more work and more complicated for little or no benefit over the other one?
        There is no way we can answer to any of those questions without knowing the specs of the cam  :lol
        Maybe it's good and usable, maybe it's not.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on April 02, 2020, 12:41:56 pm
        Would it be beneficial to take mine apart and take some pictures? Anything in particular I should look for?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 02, 2020, 11:41:15 pm
        Would it be beneficial to take mine apart and take some pictures? Anything in particular I should look for?
        It probably won't help much, we need the datasheets of the components.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on April 03, 2020, 11:18:10 am
        This seems to be the cheapest Pro Micro I can find in Canada including shipping. Can you confirm this should work?

        https://www.universal-solder.ca/product/arduino-pro-micro-atmega32u4-5v-sparkfun/
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 03, 2020, 11:32:13 am
        This seems to be the cheapest Pro Micro I can find in Canada including shipping. Can you confirm this should work?

        https://www.universal-solder.ca/product/arduino-pro-micro-atmega32u4-5v-sparkfun/
        Yes it should :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lemmingDev on April 04, 2020, 07:53:30 pm
        The rumble motor i'm using functions like a solenoid, when it rumbles it moves three gears which in turn pull the gun shell back to simulate the recoil.
        Since i am only using rumble, then i should use the solenoid pin instead of the rumble pin, right?
        Otherwise it won't work when shooting on screen?
        I'd test this myself but i'm still waiting for the parts to arrive, so i'd like to make sure i'm doing this right.
        Btw, the transistor isn't available at the moment, i can get the mosfet instead, do you think that would be an issue?

        Hey - is that the EMS Topgun II

        I have 2 of them but when i opened it up everything looked so integrated and I wasn't sure I'd be able to mod it.

        Could you let me know how you did it and perhaps post a few pics?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on April 06, 2020, 07:24:53 am
        The rumble motor i'm using functions like a solenoid, when it rumbles it moves three gears which in turn pull the gun shell back to simulate the recoil.
        Since i am only using rumble, then i should use the solenoid pin instead of the rumble pin, right?
        Otherwise it won't work when shooting on screen?
        I'd test this myself but i'm still waiting for the parts to arrive, so i'd like to make sure i'm doing this right.
        Btw, the transistor isn't available at the moment, i can get the mosfet instead, do you think that would be an issue?

        Hey - is that the EMS Topgun II

        I have 2 of them but when i opened it up everything looked so integrated and I wasn't sure I'd be able to mod it.

        Could you let me know how you did it and perhaps post a few pics?
        To be honest, i tried fitting everything but space was too tight and i kinda gave up on it, i might get back to it later on, though i'm probably gonna have to dremel the original pcb.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 06, 2020, 11:23:09 am
        I have two aimtracks in namco point blank guns.

        Now I'm not 100 percent satisfied.

        Will this be an update that is worth the huge effort of rebuilding everything?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 06, 2020, 12:37:28 pm
        I have two aimtracks in namco point blank guns.

        Now I'm not 100 percent satisfied.

        Will this be an update that is worth the huge effort of rebuilding everything?
        Short answer: yes. and no  :lol

        Long answer:

        Yes, because I made this system for the exact same reason; I wasn't happy with other led systems. I though the IR led based gun techs we have now are overly expensive, under-exploited and lack several things that I addressed with my system. So in its current state my system is already the best non CRT lightgun system you can build. By far. And is always improving.

        No, because this system is far from plug and play, it's totally DIY, and always evolving, so it requires lot of time and effort. There is this forum and a discord server tho if you need help with that  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ryoken on April 06, 2020, 01:50:54 pm
        I love that answer
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 07, 2020, 03:17:52 am
        I have two aimtracks in namco point blank guns.

        Now I'm not 100 percent satisfied.

        Will this be an update that is worth the huge effort of rebuilding everything?
        Short answer: yes. and no  :lol

        Long answer:

        Yes, because I made this system for the exact same reason; I wasn't happy with other led systems. I though the IR led based gun techs we have now are overly expensive, under-exploited and lack several things that I addressed with my system. So in its current state my system is already the best non CRT lightgun system you can build. By far. And is always improving.

        No, because this system is far from plug and play, it's totally DIY, and always evolving, so it requires lot of time and effort. There is this forum and a discord server tho if you need help with that  ;)

        Good answer. I'm a total diy guy and love building stuff. Just want to make sure that it will be an improvement.

        Have you thought of making a mode for the recoil that works like the one from aimtracks? That would make it possible to play games with recoil that do not Output via mamehooker.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 07, 2020, 04:23:42 am
        Good answer. I'm a total diy guy and love building stuff. Just want to make sure that it will be an improvement.
        Yeah it def a huge improvement. The only thing missing now is a tool with a proper UI to configure the guns.
        But that will come too one day.

        Have you thought of making a mode for the recoil that works like the one from aimtracks? That would make it possible to play games with recoil that do not Output via mamehooker.
        You mean triggering the solenoid once when using normal fire mode and autofire when holding? That's already the default mode, mamehooker is optional  ;)

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ryoken on April 07, 2020, 05:22:36 am
        Anyone knows if we can use the ir camera from aimtrack diy kit, for this
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 07, 2020, 07:45:56 am
        Good answer. I'm a total diy guy and love building stuff. Just want to make sure that it will be an improvement.
        Yeah it def a huge improvement. The only thing missing now is a tool with a proper UI to configure the guns.
        But that will come too one day.

        Have you thought of making a mode for the recoil that works like the one from aimtracks? That would make it possible to play games with recoil that do not Output via mamehooker.
        You mean triggering the solenoid once when using normal fire mode and autofire when holding? That's already the default mode, mamehooker is optional  ;)

        Ah.
        No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 07, 2020, 07:54:12 am
        Ah.
        No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
        I meant fullauto when holding trigger, not autofire.
        But yeah it's already doing that, including the offscreen shoot that don't trigger the solenoid.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 07, 2020, 08:34:59 am
        Ah.
        No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
        I meant fullauto when holding trigger, not autofire.
        But yeah it's already doing that, including the offscreen shoot that don't trigger the solenoid.

        Ah, perfect. Everything sounds fantastic. I'm thinking of getting two more "namco" guns from ali express, let's see about the quality, but the "named" ones are sturdier than the originals.

        What has been your experience with Mame and two guns? While I use the controler remap tool, my aimtracks can get lost sometimes and everything needs to be setup again. Super annoying.

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on April 07, 2020, 09:34:19 am
        Ah.
        No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
        I meant fullauto when holding trigger, not autofire.
        But yeah it's already doing that, including the offscreen shoot that don't trigger the solenoid.

        Ah, perfect. Everything sounds fantastic. I'm thinking of getting two more "namco" guns from ali express, let's see about the quality, but the "named" ones are sturdier than the originals.

        What has been your experience with Mame and two guns? While I use the controler remap tool, my aimtracks can get lost sometimes and everything needs to be setup again. Super annoying.
        You don't need the controller remap utility nowadays, you can use ctrlr file to remap your guns and make them stable.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 07, 2020, 10:05:17 am
        Ah.
        No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
        I meant fullauto when holding trigger, not autofire.
        But yeah it's already doing that, including the offscreen shoot that don't trigger the solenoid.

        Ah, perfect. Everything sounds fantastic. I'm thinking of getting two more "namco" guns from ali express, let's see about the quality, but the "named" ones are sturdier than the originals.

        What has been your experience with Mame and two guns? While I use the controler remap tool, my aimtracks can get lost sometimes and everything needs to be setup again. Super annoying.
        You don't need the controller remap utility nowadays, you can use ctrlr file to remap your guns and make them stable.

        say whaaaaat. you have a direction where it is documented?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on April 07, 2020, 10:51:00 am
        You can find the info right in the setup guide of the aimtrak.
        If you still need more assistance, come to the discord channel.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 07, 2020, 11:37:56 am
        Thank you very much. Before annoying anyone I'll read into it!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 08, 2020, 07:46:03 am
        Gathering parts.

        https://m.ebay.de/itm/DFRobot-Positioning-IR-Camera-SEN0158-/263112056230?ul_ref=https://rover.ebay.com/rover/1/707-53477-19255-0/1?type=2&pub=5575403537&campid=5338338751&toolid=10 (https://m.ebay.de/itm/DFRobot-Positioning-IR-Camera-SEN0158-/263112056230?ul_ref=https://rover.ebay.com/rover/1/707-53477-19255-0/1?type=2&pub=5575403537&campid=5338338751&toolid=10)

        Is this the one? Price seems a bit high but I can't find them much cheaper.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on April 08, 2020, 07:49:11 am
        Yeah, that's the IR camera.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 08, 2020, 10:20:25 am
        Ordered two. Getting excited over here.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 08, 2020, 12:08:06 pm
        I've been doing experiments with some 1W 120 degrees leds from china.

        The good news;
        They work extremely well, from any angle, even from more than 45degrees on the side.
        The good news;
        They use a lot of energy, and produce a LOT of heat. Like way too much to use without a heat dissipating system or something.

        I will try changing the resistors to see if I can reduce the heat, and add small metal frames to dissipate it.
        If it works I think we can safely say that I found the perfect leds for this system :D

        Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 09, 2020, 06:43:40 am

        Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
        I did, but haven't found a way yet to use them in an efficient and harmless way.
        During my tests, one of the led became so hot it melted a hole in my TV screen border  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 09, 2020, 07:33:45 am
        * 2020/04/09 - 2.05 - unified firmware
        - added rgb led autodetection, no need for 2 firmware now it should automatically detect if you have a rgb led or not, also avoiding a wrong flashing
        - changed the offscreen/auto reload function to take less memory and run faster
        - temporized the temperature sensor reading, it's checking only once every 2 seconds now
        - fixed an issue with the 4:3 mode not working correctly on screen ratio lower than 4:3 (5:4 screens for instance)
        - changed the IR led detection algorithm to detect each IR "blob" size, improving the way we can detect/filter the IR sources
        - fixed the issue with the feedback still behaving the same when offscreen shoot mode is on
        - fixed a wrong behavior of the solenoid in serial mode
        - made some change on the serial commands to make them more universal and future-proof. please see the updated note on it
        - updated the batch tool to fit the new firmware
        - added an option in the batch tool to change the temperature sensor thresholds
        - various fixes and optimizations
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 09, 2020, 03:00:00 pm

        Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
        I did, but haven't found a way yet to use them in an efficient and harmless way.
        During my tests, one of the led became so hot it melted a hole in my TV screen border  :lol

        LOL oh boy! That's unfortunate. Yeah,

        so I'm trying to find something equivalent to your specs, not so easy in Germany as it seems. At least 200mW I cannot find.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 09, 2020, 03:08:38 pm

        Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
        I did, but haven't found a way yet to use them in an efficient and harmless way.
        During my tests, one of the led became so hot it melted a hole in my TV screen border  :lol

        LOL oh boy! That's unfortunate. Yeah,

        so I'm trying to find something equivalent to your specs, not so easy in Germany as it seems. At least 200mW I cannot find.
        My screen bravely suffered for the sake of science  :laugh2:
        Yeah I know finding good IR LEDs is such a struggle.
        What size of screen will you use? From what distance?
        I might be able to give you more advices on finding the LEDs that suits your setup.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 09, 2020, 03:30:27 pm

        Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
        I did, but haven't found a way yet to use them in an efficient and harmless way.
        During my tests, one of the led became so hot it melted a hole in my TV screen border  :lol

        LOL oh boy! That's unfortunate. Yeah,

        so I'm trying to find something equivalent to your specs, not so easy in Germany as it seems. At least 200mW I cannot find.
        My screen bravely suffered for the sake of science  :laugh2:
        Yeah I know finding good IR LEDs is such a struggle.
        What size of screen will you use? From what distance?
        I might be able to give you more advices on finding the LEDs that suits your setup.

        Thanks for all the effort Mate!

        Okay so I'm using a 25" Hantarex CRT (4:3). I'd say distance is like 3 feet or a bit more?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: CanadianRyGuy on April 09, 2020, 06:44:17 pm
        Hey Jaybee
        Would you recommend any particular LEDs that are available on DigiKey.ca? I’m trying to source as much from one source to save on multiple shipping and hopefully get it to free shipping

        These?
        https://www.digikey.ca/product-detail/en/lumex-opto-components-inc/OED-EL-8L/67-1000-ND/270796
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Spenser on April 10, 2020, 11:56:12 am
        Hey Jaybee
        Would you recommend any particular LEDs that are available on DigiKey.ca? I’m trying to source as much from one source to save on multiple shipping and hopefully get it to free shipping

        These?
        https://www.digikey.ca/product-detail/en/lumex-opto-components-inc/OED-EL-8L/67-1000-ND/270796

        These may be a better option:
        https://www.digikey.ca/product-detail/en/osram-opto-semiconductors-inc/SFH-4546/475-2870-ND/2205956
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 11, 2020, 01:05:31 am
        *2020/04/11 - 2.06
        - fixed the rgb led detection that wasn't working properly. please update to this one especially if you have an rgb led or if you have a gun with dpad and/or start button.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 11, 2020, 01:08:49 am
        Hey Jaybee
        Would you recommend any particular LEDs that are available on DigiKey.ca? I’m trying to source as much from one source to save on multiple shipping and hopefully get it to free shipping

        These?
        https://www.digikey.ca/product-detail/en/lumex-opto-components-inc/OED-EL-8L/67-1000-ND/270796
        4mW/sr is way too weak

        These may be a better option:
        https://www.digikey.ca/product-detail/en/osram-opto-semiconductors-inc/SFH-4546/475-2870-ND/2205956
        better  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 13, 2020, 03:02:30 am
        * 2020/04/13 - 2.07
        - add the right click offscreen shot mode back, now there are 3 modes we can cycle; lower left corner offscreen shot (default), right click offscreen shot, and disabled
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 15, 2020, 04:54:39 pm
        Just took the plunge on ordering two Time Crisis 4 type Lightguns with kickback from Ali. They don't come with the laser as they are made as replacement parts for the arcade, so no slaughtering will be going on.

        I still couldn't find suitable LED's though. Meh.

        Btw: TIP 102 to drive the solenoid should be fine I suppose? I use them with the aimtrak and they work for years.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ryoken on April 17, 2020, 01:02:38 am
        I just get the  ir camera today, and the first thing i see is orientation sticker says TOP, well i just run a tes on the pc to see the ir LEDs , and looks to me this df robotic  camera the wider angle at the vertical axis,  is possible to rotate the camera 90 degrees?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 17, 2020, 01:44:52 am
        I just get the  ir camera today, and the first thing i see is orientation sticker says TOP, well i just run a tes on the pc to see the ir LEDs , and looks to me this df robotic  camera the wider angle at the vertical axis,  is possible to rotate the camera 90 degrees?
        It's a well known issue that most df robot camera are tilted (top should be turned 90 degrees on the right side).
        it's easy to see if it's tilted or not with the test app, if you move horizontally and the leds move vertically onscreen for instance.

        Just took the plunge on ordering two Time Crisis 4 type Lightguns with kickback from Ali. They don't come with the laser as they are made as replacement parts for the arcade, so no slaughtering will be going on.

        I still couldn't find suitable LED's though. Meh.

        Btw: TIP 102 to drive the solenoid should be fine I suppose? I use them with the aimtrak and they work for years.
        from which seller did you buy it? I ordered one too but it came without the solenoid (so totally useless), had to do a claim and they sent me the solenoid assembly (still waiting for it)
        the TIP102 seems fine indeed  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Endprodukt on April 17, 2020, 08:50:02 am
        SQ Arcade. About 90 bucks for one. How's the quality of the shell? Did you find a good part for the microswitch?

        If you could link me to any AliExpress ir LEDs that should work I'd be super thankful.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 17, 2020, 09:11:29 am
        SQ Arcade. About 90 bucks for one. How's the quality of the shell? Did you find a good part for the microswitch?

        If you could link me to any AliExpress ir LEDs that should work I'd be super thankful.
        Not the same seller as mine, that's good!

        I actually received the solenoid today, and mounted it to check.
        The quality is decent, you can feel a bit it's not the original but it still seems sturdy enough.
        And the solenoid is very strong, way stronger than any of the ones I tried so far, which isn't really surprising.
        For the trigger microswitch, the reference I found is the Omron SS-01GL2T, which I ordered, but I guess any switch with a similar specs would work?
        I will post pics of it once I installed it on the discord server.

        For the IR leds reference (and the installation tutorial, I put everything on the discord server too ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 18, 2020, 07:49:25 am
        * 2020/04/18 - 2.09
        *note: from now on the firmware updates will be in my github
        https://github.com/JayBee-git/IR_Light_Gun/tree/master/JayBee_4leds_Light_Gun
        - add nunchuck support, you can now connect a wiimote nunchuck on the i2c port (with a logic level converter board, since it works in 3.3v)
        - split the firmware in normal and test versions again, to get enough space for wiimote support
        - improved both test firmware and test pde to show the buttons state, and trigger the solenoid and rumble with trigger and A button respectively
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on April 30, 2020, 12:09:17 pm
        *2020/04/30 - 2.16
        - fixed a small bug that prevented the temperature sensor to be read

        * 2020/04/30 - 2.15
        - big rewriting/update of the detection process, now it's lighter, faster and more stable
        - better perspective correction, now it should be more accurate on the screen sides
        - code cleanup and optimization
        - fixed a bug in the camera calibration, it should now work better
        - merged the test and normal firmware again, thanks to the optimization
        - added various update to make it compatible with the upcoming UI
        - updated the IR cam test pde to match the changes
        - to win space and make it more stable, I had to reduce the tilt support to around 45°. It should however not impact it too much since the tilt more than 45° wasn't completely stable anyway

        https://github.com/JayBee-git/IR_Light_Gun/releases/tag/2.16 (https://github.com/JayBee-git/IR_Light_Gun/releases/tag/2.16)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ryoken on May 02, 2020, 05:39:55 am
        Very nice, thanks for  sharing  bro
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 04, 2020, 12:31:11 pm
        New big update, I made a GUI for the gun!
        (https://i.imgur.com/K9xq6BC.jpg)
        Since both the firmware and this GUI required countless of work to make, the GUI is for donators only.
        Of course you can also still use the firmware alone if you prefer, it's up to you  :cheers:

        Here are some of its functions:
        - Offset/calibration wizard or manual setting
        - Button remap
        - IR sensor, buttons and feedback testing
        - Change any gun settings
        - Save/Load gun profiles
        - Firmware flashing
        - Many more...

        Firmware changes in v2.22 to go along with the GUI:
        - The firmware now comes in 4 flavors, each with its own PID, to be able to keep each device assigned to the correct player
        - Calibration and test modes now interact with the UI
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 06, 2020, 03:08:50 am
        *2020/05/06 - GUI v0.86 beta
        - added support for the Arduino Micro model
        - added Arduino Micro firmware (so we now have 8 different ids)
        -updated drivers for Arduino Micro

        And that's the specific model you would need, with 3v3 and A8 pins (they don't always have it)
        (https://images-na.ssl-images-amazon.com/images/I/81Jh89t%2BiNL._AC_SL1500_.jpg)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Xavilend on May 06, 2020, 11:24:23 am
        Been diving into all this information and I'm loving what I see. Me and the kids are looking forward to building our own gun for the arcade. Would a Namco PS1 NPC-103 be a good starting point for this setup? Thanks in advance
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 06, 2020, 03:39:49 pm
        Been diving into all this information and I'm loving what I see. Me and the kids are looking forward to building our own gun for the arcade. Would a Namco PS1 NPC-103 be a good starting point for this setup? Thanks in advance
        Yes, I built one of my gun out of a Guncon too, it's very nice since the camera we are using fits perfectly inside the barrel.
        Come and join the discord server if you need more details  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Xavilend on May 07, 2020, 10:59:53 am
        That's perfect, thank you. I'm taking my time. Ordered that gun from eBay and found someone who can 3Dprint me a trigger/switch mod, will order the electronics tomorrow. So far so good!

        It's amazing work that you're doing. We built an arcade machine and it's killing me that we can't play the classic gun games. All in good time I guess!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: manhunt on May 08, 2020, 11:21:53 pm
        The project is very good and has been studying and researching, PS1 Namco guncon is very suitable
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 11, 2020, 12:32:48 am
        Update: in light of some recent events, and after a lot of thinking, I decided to limit licenses to my software to people that donate at least 10$ and have a clear history in this forum.
        I won't be giving any more license to people who just arrive here and people who donate less.
        Please remember that I invested so much money and time in this project, that even if all users give me 10$ I still won't make any money out of it, this measure is mostly for security purposes, and fairness.

        Also I'm always here to help users that are building this system, but because I don't have much free time anymore, I won't be giving any more personal technical support to anyone who doesn't match the said criteria.

        If you are new or don't want to give any money, remember that the base firmware without the app is still totally free, and share with other users  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 13, 2020, 12:31:13 am
        *2020/05/13 - GUI v0.88 beta
        - added a better error handling system to get error codes I can decode if something happens in the app. It will help a lot with troubleshooting.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Ratafia82 on May 18, 2020, 09:23:03 am
        Thank you very much for this great work!!  :applaud: :applaud: :applaud:

        I'm doing my own lihtgun and I began to implement my sketch for Arduino using your old code for 2 IR Leds to calculate the relative position of the mouse in a Adafruit nRF528 board with bluetooth. However, I have a lot of problems to get a stable position of the mouse in the screen. I can give you my sketch if you have curiosity.

        I wonder if you will deliver the new code for 4 leds in any moment. I'm interested in it to implement parts of your code in my own lightgun. Would it be possible that you can give me part of this code to implement it in my project? I will donate some dollars if you need.

        It is a personal work and I would never give this code to anyone.

        Is it possible to achieve this??

        You can send me a private message if you want!

        Thank you very much again!

        Amazing work! 
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 19, 2020, 07:37:08 am
        Thank you very much for this great work!!  :applaud: :applaud: :applaud:

        I'm doing my own lihtgun and I began to implement my sketch for Arduino using your old code for 2 IR Leds to calculate the relative position of the mouse in a Adafruit nRF528 board with bluetooth. However, I have a lot of problems to get a stable position of the mouse in the screen. I can give you my sketch if you have curiosity.

        I wonder if you will deliver the new code for 4 leds in any moment. I'm interested in it to implement parts of your code in my own lightgun. Would it be possible that you can give me part of this code to implement it in my project? I will donate some dollars if you need.

        It is a personal work and I would never give this code to anyone.

        Is it possible to achieve this??

        You can send me a private message if you want!

        Thank you very much again!

        Amazing work!
        Thanks  ;)

        Why would you want to calculate the relative coordinates of the mouse instead of absolute? Why inflicting that to yourself?  :lol
        To be honest there is currently no way to have a reliable relative mouse calculation for something with absolute coordinates like lightguns. Not unless you want to have to recalibrate it every time you plug it in.

        To answer to your question, I'm not planning to open my code anytime soon, nor share it to anyone.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Ratafia82 on May 19, 2020, 11:58:06 am
        Thank you very much for this great work!!  :applaud: :applaud: :applaud:

        I'm doing my own lihtgun and I began to implement my sketch for Arduino using your old code for 2 IR Leds to calculate the relative position of the mouse in a Adafruit nRF528 board with bluetooth. However, I have a lot of problems to get a stable position of the mouse in the screen. I can give you my sketch if you have curiosity.

        I wonder if you will deliver the new code for 4 leds in any moment. I'm interested in it to implement parts of your code in my own lightgun. Would it be possible that you can give me part of this code to implement it in my project? I will donate some dollars if you need.

        It is a personal work and I would never give this code to anyone.

        Is it possible to achieve this??

        You can send me a private message if you want!

        Thank you very much again!

        Amazing work!
        Thanks  ;)

        Why would you want to calculate the relative coordinates of the mouse instead of absolute? Why inflicting that to yourself?  :lol
        To be honest there is currently no way to have a reliable relative mouse calculation for something with absolute coordinates like lightguns. Not unless you want to have to recalibrate it every time you plug it in.

        To answer to your question, I'm not planning to open my code anytime soon, nor share it to anyone.


        Thank you for your reply!

        I think I was confused in my previous post. I see this comment in your old code and I sure misunderstood the meaning. You are right! It is essential to use absolute positioning of mouse. I use it like this. My really question was about the math formula to calculate the new position of the leds when the gun is moving, something like these:

         finalX = (int)(512.0 + cos(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneX - twoX) / 2.0 + twoX) - 512.0) - sin(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneY - twoY) / 2.0 + twoY) - 384.0) + 0.5);
              finalY = (int)(384.0 + sin(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneX - twoX) / 2.0 + twoX) - 512.0) + cos(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneY - twoY) / 2.0 + twoY) - 384.0) + 0.5);

        As you know these are to calculate the position when IR camera detects 2 leds. My wish was to obtain the formula to detect 4 leds, 3 leds, etc.

        I had to try it!! But I really understand your position of not sharing.

        I think that I will back to the samco system with the two wii bars. I will take less pain!  :dizzy:  :lol

        Despite all, thank you very much for your great contributions!! And Good luck with your project!!  ;) ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 20, 2020, 12:05:05 am
        Thank you for your reply!

        I think I was confused in my previous post. I see this comment in your old code and I sure misunderstood the meaning. You are right! It is essential to use absolute positioning of mouse. I use it like this. My really question was about the math formula to calculate the new position of the leds when the gun is moving, something like these:

         finalX = (int)(512.0 + cos(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneX - twoX) / 2.0 + twoX) - 512.0) - sin(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneY - twoY) / 2.0 + twoY) - 384.0) + 0.5);
              finalY = (int)(384.0 + sin(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneX - twoX) / 2.0 + twoX) - 512.0) + cos(atan2(twoY - oneY, twoX - oneX) * -1.0) * (((oneY - twoY) / 2.0 + twoY) - 384.0) + 0.5);

        As you know these are to calculate the position when IR camera detects 2 leds. My wish was to obtain the formula to detect 4 leds, 3 leds, etc.
        Yeah this calculation is very old, unoptimized and doesn't work well, even for the 2 points calculation.
        For the 2+ points calculation, there is far more to it than just formula. It's a mix of codes and very advanced algebra.

        I had to try it!! But I really understand your position of not sharing.

        I think that I will back to the samco system with the two wii bars. I will take less pain!  :dizzy:  :lol

        Despite all, thank you very much for your great contributions!! And Good luck with your project!!  ;) ;)

        No problem, whatever suits you best  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on June 20, 2020, 12:24:16 pm
        A cool video made by Foxhole on Point Blank, to show the system accuracy  8)
        https://youtu.be/mcYRB-wIr9M
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on June 21, 2020, 03:38:05 am
        Another video I just made in pov to show the pinpoint accuracy of this system:
        https://youtu.be/u64Fsu6oNQk
        Note that the latency in the video is mainly caused by my test app and my screen, the latency in-game is lower.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: BadMouth on June 21, 2020, 06:25:03 am
        Another video I just made in pov to show the pinpoint accuracy of this system:
        https://youtu.be/u64Fsu6oNQk
        Note that the latency in the video is mainly caused by my test app and my screen, the latency in-game is lower.
        I commend you sir on a properly done lightgun accuracy demonstration.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on June 21, 2020, 06:59:28 am
        I commend you sir on a properly done lightgun accuracy demonstration.
        Thanks  ;D

        Here is another small demo ingame this time, in the house of the dead 3 windows version. I left the crosshair for precision demo only.
        https://youtu.be/0CG7UOSP9iQ
        The quality isn't the best nor the easiest to capture from my phone cam, but it works  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ryoken on June 22, 2020, 03:26:21 am
        My favorite lightgun is the one you make, JB infinity  thanks for sharing,  i have  a blast with my JB lightgun  since i built my own
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on June 22, 2020, 04:26:55 am
        My favorite lightgun is the one you make, JB infinity  thanks for sharing,  i have  a blast with my JB lightgun  since i built my own
        Thanks a lot Ryoken, I'm very happy to hear that  :cheers:
        Show us your setup if you can sometime ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: cybermat on June 29, 2020, 04:46:25 am
        Hello, i'm gonna buy these IR LEDS

        https://www.everlight.com/file/ProductFile/IR333-A.pdf

        Could you please tell me if they are good for 1/1.5 meter distance and what kind of resistence should i put ? I don't know how to populate the voices provided in the specs into this site http://led.linear1.org/led.wiz sorry :(

        Thanks
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: PL1 on June 29, 2020, 06:29:45 am
        Hello, i'm gonna buy these IR LEDS

        https://www.everlight.com/file/ProductFile/IR333-A.pdf

        Could you please tell me if they are good for 1/1.5 meter distance and what kind of resistence should i put ? I don't know how to populate the voices provided in the specs into this site http://led.linear1.org/led.wiz
        Looks like that datasheet has some conflicting info on pg 3.   :dizzy:
        Absolute Maximum Ratings table:
          "Continuous Forward Current  IF  100 mA" -- no restrictions noted for 100 mA continuous use.

        Electro-Optical Characteristics table:
          Voltage forward "IF=100mAPulse Width≦100μs ,Duty≦1%" -- major restrictions on pulse width (how long it is on) and duty cycle (% of total time it is on) for 100 mA operation.
        ------------------
        Here are some safe values to enter in the LED calculator.

        Source voltage:  5
        - I assume you'll be running these with 5v.  Enter "12" for 12v.

        Diode forward voltage:  1.2
        - The table on pg 3 lists several possible VF values.
        -- 1.2v will give you a continuous 20mA current draw with no restrictions on pulse width or duty cycle so this is a safe value to use.
        -- The other values have major restrictions on pulse width and duty cycle.

        Diode Forward Current (mA):  20
        - The other values have major restrictions on pulse width and duty cycle.

        Number of LEDs in your array:   :dunno
        - Not sure how many LEDs you will want/need.

        View output as: Wiring diagram


        Scott
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: cybermat on June 29, 2020, 07:26:47 am
        I will use 8 LEDS. 2 for each point.

        If i fill according to specs https://www.everlight.com/file/ProductFile/IR333-A.pdf

        5
        1.5
        50
        8



        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: cybermat on June 29, 2020, 11:02:22 am
        If i would like to buy these https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C.html

        Is it correct entering the following ?

         Source voltage 5
        diode forward voltage 1.5
        diode forward current (mA) 50
        number of LEDs in your array 8

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: PL1 on June 29, 2020, 05:12:33 pm
        If i would like to buy these https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C.html
        That datasheet covers eight different LEDs with different ratings.   :dunno

        Is it correct entering the following ?

         Source voltage 5
        diode forward voltage 1.5
        diode forward current (mA) 50
        number of LEDs in your array 8
        Looking at the L-53F3C datasheet at https://datasheet.octopart.com/L-53F3C-Kingbright-datasheet-13425907.pdf (https://datasheet.octopart.com/L-53F3C-Kingbright-datasheet-13425907.pdf)

        Page 2, Absolute Maximum Ratings table -- DC Forward Current -- IF -- 50mA.

        It's usually not a good idea to run LEDs at the max rating.
        - They will burn out faster.

        -------------------
        If you want the calculator to return the resistor value for 2 LEDs and a resistor per row x 4 rows:
        - Enter #LEDs = 2
        - The calculator will return 2 LEDs and a resistor in one row.
        - Four rows like that wired in parallel will draw four times the current of a single row.

        or

        If the calculator returns 4 LEDs and a resistor per row, you can add a long wire between the 2nd and 3rd LED to break it into 2 groups. i.e. mount 1st and 2nd LEDs at the first point then run a wire to the 3rd and 4th LEDs and resistor mounted at the second point.


        Scott
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: cybermat on June 30, 2020, 04:30:25 am
        I cannot find any link where i can purchase easily these leds SID1K10CM , so i'm looking for leds with the same specs but SID1K10CM are high powerful leds as per what i understood.

        So for this model https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C.html according to the specs and your suggestions i will put these data

        Source voltage 5
        diode forward voltage 1.5
        diode forward current (mA) 20
        number of LEDs in your array 8

        Are they powerful enough for 1/1.5 meter distance ?


        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: PL1 on June 30, 2020, 06:18:08 am
        So for this model https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C.html according to the specs and your suggestions i will put these data
        Once again, that datasheet is for a series of eight different LEDs with four different sets of specs.   :banghead:

        Specify EXACTLY which P/N of the eight on page 1 you are asking about or find a datasheet that covers just the one P/N you want.   :bat

        diode forward voltage 1.5
        diode forward current (mA) 20
        Look at the four "Forward Current vs. Forward Voltage" charts on pages 3-5.

        None of those charts show the curve passing through the point at the intersection of 1.5v on the X-axis and 20mA on the Y-axis.
        - The values you plug into the calculator must describe a point on the curve or you'll get worthless, incorrect info -- garbage in, garbage out.
        - The current draw depends on the voltage drop across that specific LED P/N.
        - The curve describes the relationship between those values for that specific LED P/N.
        - If you want a specific current draw, trace that value horizontally until it meets the curve, then go straight down to find the associated voltage.
        -- Chart on page 3, start at 20 mA on the Y-axis, go right until you reach the curve then go straight down to 1.2v or
        -- Chart on page 3, start at 40 mA on the Y-axis, go right until you reach the curve then go straight down to about 1.26v.
        - If you want a specific voltage, trace that value vertically until it meets the curve, then go straight left to find the associated current draw.

        Are they powerful enough for 1/1.5 meter distance ?
        I'll let JayBee answer this question since he has hands-on experience designing/building these and should be able to compare the datasheet for his LEDs to the datasheet for your LEDs once you clarify exactly which LED P/N you are asking about.


        Scott
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: cybermat on June 30, 2020, 08:44:18 am
        The link of L-53F3C was right...but the site has a kind of protection

        https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C/+5JW55UhGLGwyKIlZfSHEDP.O+/datasheet.pdf

        PART number is L-53F3C , according to your suggestions and datasheet

        Source voltage 5
        diode forward voltage 1.26
        diode forward current (mA) 40
        number of LEDs in your array 8

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on June 30, 2020, 09:05:19 am
        I'll let JayBee answer this question since he has hands-on experience designing/building these and should be able to compare the datasheet for his LEDs to the datasheet for your LEDs once you clarify exactly which LED P/N you are asking about.
        Thanks for helping bro  ;D

        The link of L-53F3C was right...but the site has a kind of protection

        https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C/+5JW55UhGLGwyKIlZfSHEDP.O+/datasheet.pdf

        PART number is L-53F3C , according to your suggestions and datasheet

        Source voltage 5
        diode forward voltage 1.26
        diode forward current (mA) 40
        number of LEDs in your array 8
        Your link is still not working.
        But from the ref the leds aren't bright enough (Radiant Intensity (Ie): 30mW/Sr).
        So you might want something brighter, and if possible with a bit higher angle (50~100mW/sr minimum with 30degrees).
        From my experience IR leds are sadly a bit trial and error, as the real performance might vary a lot from the datasheets specs.
        Anyway if you go this route, I'd recommend you to use 3 leds for each point instead, 2 isn't always enough and cause misdetections.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Howard_Casto on June 30, 2020, 09:44:59 am
        You know if it's that much of a struggle just hack up a couple of those offbrand wii sensor bars you can get for a song on aliexpress. 
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: cybermat on June 30, 2020, 09:49:58 am
        alldatasheet seems have protection in case of direct link

        Anyway i tried to buy the leds you indicated, but i read they come from Japan. There is an italian user that bought this one

        https://pdf1.alldatasheetit.com/datasheet-pdf/view/321971/LIGITEK/LIR3333-H0-PF.html , but at the moment ebay seller has finished them.

        So i started to find leds with the suggested specs and started learning how the site of led wizard works. If any user would like to share leds used, resistor scheme and where to buy , will be appreciated.

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: PL1 on June 30, 2020, 11:10:51 am
        PART number is L-53F3C , according to your suggestions and datasheet

        Source voltage 5
        diode forward voltage 1.26
        diode forward current (mA) 40
        number of LEDs in your array 8

        (http://forum.arcadecontrols.com/index.php?action=dlattach;topic=161189.0;attach=383561;image)

        Thanks for the clarification on the P/N.   :)

        I know you won't be using these LEDs, but here's how to check the LED calculator results:

        1. Solve for resistor voltage drop (single resistor)
        W = V * A (wattage formula)
        W/A = V
        108.8mW/40mA = 2.72v

        2. Solve for current draw through the resistor. (ensures voltage in step 1 is right)
        E = I * R (ohm's law)
        E/R = I
        2.72v/68 ohms = 40mA

        3. Solve for voltage drop across each LED
        (Source voltage - resistor voltage)/2 = voltage drop across each LED
        (5v-2.72v)/2 = 1.14v per LED

        4. Run that 1.14v LED voltage drop through the chart on pg 3 of the datasheet and you get about 8mA.   :(

        The calculator provided a VERY safe current limiting resistor value that will make your LEDs VERY dim.
        ----------------------
        https://ledcalculator.net/#p=5&v=1.26&c=40&n=2&o=w (https://ledcalculator.net/#p=5&v=1.26&c=40&n=2&o=w)

        Using the same values as above, this calculator returns a resistor value of 62 ohms, 5% or better tolerance, 1/8W (min.) or 1/4W (better heat dissipation) for 2 LEDs and one resistor per row.

        1. Solve for resistor voltage drop (single resistor)
        W = V * A (wattage formula)
        W/A = V
        99.2mW/40mA = 2.48v

        2. Solve for current draw through the resistor. (ensures voltage in step 1 is right)
        E = I * R (ohm's law)
        E/R = I
        2.48v/62 ohms = 40mA

        3. Solve for voltage drop across each LED
        (Source voltage - resistor voltage)/2 = voltage drop across each LED
        (5v-2.48v)/2 = 1.26v per LED

        4. Run that 1.26v LED voltage drop through the chart on pg 3 of the datasheet and you get about 40mA.
        ---------------
        You're working on a very steep part of the curve so even a small change in resistor value results in a very large change in current.
        - Might be worth the effort and expense to use a variable resistor.   :dunno

        Another good LED calculator site: http://ledcalc.com/ (http://ledcalc.com/)

        Good luck finding suitable LEDs.   :cheers:


        Scott
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on June 30, 2020, 01:37:35 pm
        Note that in the discord server in the pinned posts there is a newer led system I built, that uses high power smd LEDs and works way better than any other led systems.
        It's a bit more expensive and require a bit more experience and trial and error, but it makes a huge difference.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: hyo2012 on July 01, 2020, 04:08:13 am
        JayBee, I send a PM  :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: sniiki on August 06, 2020, 05:30:27 am
        Just recently built a control box even though it's missing punch of other stuff too like trackball and spinners, I personally mostly yearn for a pair of guns. As there's not many options on the market for a calibration free systems, I started experimenting with a regular RGB camera and OpenCV with screen edge detection. Quick tests are somewhat promising but might have too much lag in the end so to get something a usable sooner, I ordered the HW for pair of Arduino IR guns.

        @JayBee I'm more than happy to support you but still would of course want to receive the licence too and reading the red text in the first post, not that sure if I will as a fresh forum member?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on August 11, 2020, 02:39:57 am
        Just recently built a control box even though it's missing punch of other stuff too like trackball and spinners, I personally mostly yearn for a pair of guns. As there's not many options on the market for a calibration free systems, I started experimenting with a regular RGB camera and OpenCV with screen edge detection. Quick tests are somewhat promising but might have too much lag in the end so to get something a usable sooner, I ordered the HW for pair of Arduino IR guns.

        @JayBee I'm more than happy to support you but still would of course want to receive the licence too and reading the red text in the first post, not that sure if I will as a fresh forum member?
        Yeah that's the main problem of using a normal cam for this task, it takes lot of power and have quite a lot of latency, especially if the cam doesn't have high frame rate.
        The cam we use in this project is not perfect, far from it, but it's very fast and convenient to use.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Howard_Casto on August 12, 2020, 10:24:14 pm
        Yeah it's essentially the wiimote camera right?  So it's purpose built for this. 
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on August 13, 2020, 10:20:01 pm
        Yeah it's essentially the wiimote camera right?  So it's purpose built for this.
        Yes pretty much. Still searching for a better alternative, but haven't found one yet.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on August 20, 2020, 09:56:21 am
        Last changelogs I didn't have time to post here:

        *2020/06/28 - GUI v0.89beta - Firmware v2.24
        - UI: preventing the UI to crash when calibration give weird numbers
        - Firmware: calibration more stable and accurate

        *2020/07/30 - GUI v0.90beta
        - Added a temporary fix to prevent the app from crashing if the gun somehow has wrong settings saved, and asks you if you want to reset it to default.
        - Fixed a bug where you can't switch between keyboard and mouse buttons on saved buttons settings

        *2020/08/20 - GUI v0.92beta - Firmware v2.25
        Firmware:
        - big overall of the IR camera code. You can now change the camera sensitivity to different levels, allow to fit your setup way more.
        UI:
        - adding the camera sensitivity option.
        - changed the way the GUI upload the gun settings, now it doesn't reboot the gun anymore, it's a lot faster.

        *2020/08/20 - GUI v0.93beta
        - fixed a bug that prevented from uploading the settings

        The biggest update lately is adding the sensitivity levels that you can now change! so you can fit the camera to your setup way more easily.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on August 21, 2020, 04:56:38 am
        *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
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: janderclander14 on August 22, 2020, 07:14:38 pm

        The biggest update lately is adding the sensitivity levels that you can now change! so you can fit the camera to your setup way more easily.

        Thanks a lot for this. May I ask what the different sensitivity settings do and which criteria should be used to prefer one or the other?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on August 22, 2020, 11:19:40 pm

        The biggest update lately is adding the sensitivity levels that you can now change! so you can fit the camera to your setup way more easily.

        Thanks a lot for this. May I ask what the different sensitivity settings do and which criteria should be used to prefer one or the other?
        As the name imply, they are just different level of sensitivity for the IR camera. The lower the sensitivity is, the less you will get light parasites, but the more difficult it will be to pick up led points if you are far or they aren't strong enough.
        To choose the mode, you can either start from lowest setting, test it, and increase as long as it's working well. Or the other way around.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on August 31, 2020, 02:03:32 am
        Important update:

        Lately with the testing crew, we've been trying something new; adding smartphone wide or fish eye lenses to the camera.
        It seems to work quite well in this system, and reduces the minimum distance by a huge margin.
        But since all lenses have different specs, the results on them varies from working perfectly to having inconsistencies in the aiming.

        So if you are interested, I invite you to test out any wide or fish eye lenses you possess, and report the results you get here.
        It will allow us to know which ones work better and make a list for anyone who wants to get one  ;)

        The testing process is simple;
        Align the lens with the camera, attach it temporarily with something, like tape, do a simple gun calibration, and play some games, see how close you can get from the screen.

        Template for reporting it if you want;

        Lens used:
        Lens specs (zoom, angle...):
        Screen size and aspect ratio:
        LEDs used:
        Minimum distance without lens:
        Minimum distance with lens:
        Comments on how well it works:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 01, 2020, 08:45:48 am
        Impressionante trabalho, parabéns!!! Estou estudando seus posts para ver se consigo montar uma parecida, é  um sonho que tenho a muito tempo.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 02, 2020, 03:00:11 pm
        Olá!! Amigo, consegui comprar emissores TSAL6200, acha que eles sao bons para o projeto?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 02, 2020, 03:11:45 pm
        Hello!
        Sorry I don't speak Portuguese.
        But to answer to your questions, yes the led looks nice, however it has a low angle, meaning it would be better to make each of your 4 led points with 3leds combined.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 02, 2020, 05:17:15 pm
        Thanks for the info.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 03, 2020, 07:37:00 pm
        I'm going to mount this light gun, does this solenoid need a temperature sensor or is it optional?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 04, 2020, 12:58:46 am
        I'm going to mount this light gun, does this solenoid need a temperature sensor or is it optional?
        The sensor is always optional, but it's useful if you're not sure how hot the solenoid gets while working  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 05, 2020, 06:41:30 pm
        In progress
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 06, 2020, 08:44:50 pm
        Hello Friend. I am not able to make it work, the mame hooker does not recognize the arduino, I put the output in mame.ini (windows). I configured mame.exe on mamehooker ...
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 06, 2020, 09:06:12 pm
        Hello Friend. I am not able to make it work, the mame hooker does not recognize the arduino, I put the output in mame.ini (windows). I configured mame.exe on mamehooker ...
        That's normal.
        To connect mamehooker to the arduino you need to use the serial commands, it won't be recognized as a supported device.
        More info on my first post.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 06, 2020, 10:34:23 pm
        I understood what you said, I already built all the hardware, I read your post but I'm a beginner in Arduino and I don't know how to do this part of sending the command via serial. if you could explain, i would appreciate it too much. and I would like to purchase the GUI, how can I help you?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 07, 2020, 09:59:40 am
        No problem, I understand.

        Mamehooker isn't very user friendly with serial commands, you need to read the full mamehooker tutorials here:
        http://dragonking.arcadecontrols.com/static.php?page=mhtutorials
        Basically you need to setup both mame (windows output option), and mamehooker (for sound notification for instance).
        Then open any game that is compatible with mamehooker. It should notify you of new outputs. Once done, open the mamehooker folder, the mame subfolder, and the game .ini file.
        Inside the file, you need to input the various command and modes needed to trigger the feedback.
        I will post a sample file later to show you.

        And of course you have to install my firmware first, or else the the arduino won't understand the commands 😉
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 07, 2020, 10:12:10 am

        I will study everything. how do I download your current firmware and GUI? thanks for all the help.

        e-mail: jardielnascimento@gmail.com
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 07, 2020, 10:18:30 am
        The archive containing everything is in my main post, as long as the explanations for everything  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 09, 2020, 02:20:45 pm
        Você já usou com pcsx e  pcsx2 ?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 09, 2020, 02:33:11 pm
        Amigo, fiz o processo para adquirir seus arquivos. Poderia conferir?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 09, 2020, 02:33:36 pm
        Yes, it works with the epsxe and pcsx2 with the nuvee plugin, but this plugin is very old and not easy to use.
        You can also use retroarch if your machine is powerful enough.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 09, 2020, 02:34:24 pm
        Amigo, fiz o processo para adquirir seus arquivos. Poderia conferir?
        I already sent it to you earlier  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 09, 2020, 02:38:47 pm
        Muito obrigado, estou estudando para ver como usar.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 09, 2020, 02:40:51 pm
        Anytime  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: sniiki on September 12, 2020, 07:54:56 am
        It's most likely been discussed somewhere in this topic already but at least for me the GUI fw flasher did not work with an eBay Arduino Pro Micro chip even though it works exactly like Sparkfun version. So just in case I'll share this short guide for one way to flash it.
        I copied the flashing script from Arduino IDE console.

        Atmega32u4 needs to be reset to bootloader in order for it to accept new program. To get the program com port number you need to set the Pro Micro to bootloader mode by pressing reset (reset pin to ground) twice quickly. It'll then stay in bootloader for 8 secs and during that time you can check the com port from your Windows device manager / device list. Then just run the avrdude with correct com port in place of COM12.

        avrdude.exe and avrdude.conf can be found e.g. from Arduino IDE install dir. Just copy and place them in same folder with JB hex file to avoid having to enter long paths. JB.hex should be of course whatever 1-4P hex file you wish.

        Code: [Select]
        avrdude -C avrdude.conf -v -patmega32u4 -cavr109 -PCOM12 -b57600 -D -Uflash:w:"JayBee_IRLightGun_4Points_2.26.ino.jbgunpm1.hex":i
        I'm struggling to get the LEDs oriented to make tracking stable. Using a pair of LD271 in each position @80 mA. They don't seem to be ideal for this. I wonder tho why DFrobot is so insensitive compared to e.g. old webcam with IR filter removed and a piece of floppy disk in front to block most visible light. With the latter a single SFH485P gave really good results.
        Has anyone tested one of those 3-10W COB chips with or without a lens?

        @JayBee would it be huge task to add some sort of simple visualization for debuggin to the GUI? There are those camera test etc. tabs but at least for me they're not showing anything. While doing the initial setup it's quite hard to spot the problem without getting any readings shown (as calibration doesn't really tell anything about e.g. not spotting one of the 4 LEDs), so I just instead plotted DFrobot library readings using another test script. Helps a lot aligning the LEDs (but aligning is still painful with current ones).

        Btw. a cheap wide angle lens in front of DF cam was first idea I had when I found Samco project and noticed the annoyingly narrow angle of DF cam. Good to hear it looks promising.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 12, 2020, 08:16:41 am
        Hey sniiki!
        So to answer to all your questions, the process to flash the sparkfun model (or clones) is written in the main post.
        Basically you don't need all that process, you only need to flash an empty sketch in arduino IDE as "leonardo" board.

        If the avrdude isn't working that's another issue, most of the time causes because the version I give is 64bit, so indeed if you have a 32bits system you need to replace it with the arduino original.
        It should be enough to make it work correctly in the GUI.

        For the LEDs spec, they don't seem so bad, they are powerful enough, but have quite a narrow angle. Best setup with normal leds is using 3 per IR point, to maximize the vertical angle.
        There are few other solutions written in the discord server if you want to check  ;)

        The dfrobot IR cam is a wiimote aftermarket cam, and so have the same specs, which is usually good. But you might have to change the sensitivity of the cam in the GUI to match your setup.

        The cam visualization and gun test functions in my GUI are made exactly for that.
        What issues are you having with it? Is it greyed out or just not working?

        The wide lenses work very well to increase the angle, but also has limitations. Namely the lens deformations that tend to have cause small inaccuracies on the side. Nothing huge, but still noticable if you're picky  :lol
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: sniiki on September 12, 2020, 09:48:36 am
        Hi,
        I did of course read the first post but what I mean is that the GUI flasher doesn't recognize the board (empty sketch was in so no, it wasn't in the fresh bootloader state) and thus doesn't allow flashing it. I have 64 bit OS and like said, avrdude otherwise works ok. This particular board also functions perfectly in Arduino IDE and obeys the reset command IDE sends during flashing etc. so no problem there either. Win 10 so no additional drivers required either. Just thought to mention this another / normal flashing route as I didn't see it mentioned anywhere.

        I have some 1W leds on their way and I actually just spotted your one post about similar powered ones. I thought they'd still be too weak with the wide angle, based on current tests so that's why I asked if anyone has tested 3-10W ones but you seemed to have good results with those so maybe they're powerful enough. And yeah, they need some cooling to prevent melting / igniting things around :)

        Test screen & cal screens work ok, but they don't give any info about seen LEDs.
        Camera test tab does absolutely nothing. I guess there should be some dots shown and button status should be indicated on right side panel but nothing is happening on my screen and yes, I did press 'start testing' :).

        Did you use fish eye sort of lens or a more subtle, less distorting wide lens? I have some china quality 0.67x lenses on their way (well some 3-in-1 packs where there is fish eye lens too).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 12, 2020, 10:19:07 am
        Hi,
        I did of course read the first post but what I mean is that the GUI flasher doesn't recognize the board (empty sketch was in so no, it wasn't in the fresh bootloader state) and thus doesn't allow flashing it. I have 64 bit OS and like said, avrdude otherwise works ok. This particular board also functions perfectly in Arduino IDE and obeys the reset command IDE sends during flashing etc. so no problem there either. Win 10 so no additional drivers required either. Just thought to mention this another / normal flashing route as I didn't see it mentioned anywhere.

        I have some 1W leds on their way and I actually just spotted your one post about similar powered ones. I thought they'd still be too weak with the wide angle, based on current tests so that's why I asked if anyone has tested 3-10W ones but you seemed to have good results with those so maybe they're powerful enough. And yeah, they need some cooling to prevent melting / igniting things around :)

        Test screen & cal screens work ok, but they don't give any info about seen LEDs.
        Camera test tab does absolutely nothing. I guess there should be some dots shown and button status should be indicated on right side panel but nothing is happening on my screen and yes, I did press 'start testing' :).

        Did you use fish eye sort of lens or a more subtle, less distorting wide lens? I have some china quality 0.67x lenses on their way (well some 3-in-1 packs where there is fish eye lens too).
        What's the board name you're choosing when flashing in the arduino IDE? The arduino model detected is completely dependent of the model you choose in the list ;)
        Fresh bootloader or not doesn't matter, despite what I first thought the issue isn't related to the bootloader, but to the model you choose in arduino IDE.
        The difference between my app and the arduino IDE is that arduino IDE doesn't do automatic detection, so that you can select any serial arduino. My app does autodetection and therefore is limited to only the correct PID/VID, to avoid any flash on incompatible boards. The sparkfun board doesn't have the correct IDs by default. I might fix that in future app updates.
        If the board is recognized but you still have issues flashing, try changing the avrdude and app properties to run them as admin, or putting them in a more short path folder.
        There is no reason that shouldn't work, since the all my app does is running an avrdude command exactly as you do manually  :lol

        The 1W leds I have work wonders, they allow to use it from any angle and any distance.
        The only issue is that they are hard to work with as you probably saw.
        But for that I'm using a psu that has both voltage and current regulation.

        That's the first time I hear that the cam test does nothing. Even the buttons testing isn't showing anything when pushed?
        If not, it means there is a serial communication issue between the gun and pc. If the buttons react, it means either the cam has an issue or the connection between the cam and the board is bad.
        The calibration screen should also start the gun calibration, is that what's happening?
        Have you tried unplug/replug the gun, restart the app, and then go directly to the cam tab without touching anything else?

        Fish eyes lens has too much deformation, it messes up too much with the calibration. Wide lenses are the way to go.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: sniiki on September 12, 2020, 10:37:51 am
        What's the board name you're choosing when flashing in the arduino IDE? The arduino model detected is completely dependent of the model you choose in the list ;)
        Fresh bootloader or not doesn't matter, despite what I first thought the issue isn't related to the bootloader, but to the model you choose in arduino IDE.
        The difference between my app and the arduino IDE is that arduino IDE doesn't do automatic detection, so that you can select any serial arduino. My app does autodetection and therefore is limited to only the correct PID/VID, to avoid any flash on incompatible boards. The sparkfun board doesn't have the correct IDs by default. I might fix that in future app updates.
        If the board is recognized but you still have issues flashing, try changing the avrdude and app properties to run them as admin, or putting them in a more short path folder.
        There is no reason that shouldn't work, since the all my app does is running an avrdude command exactly as you do manually  :lol

        Used Sparkfun Pro Micro / ATMega32U4 (5V, 16Mhz) during uploading  the empty sketch. Board info shows:
        Code: [Select]
        BN: Unknown board
        VID: 1B4F
        PID: 9206
        SN: Upload any sketch to obtain it
        As the GUI isn't detecting the board I can't yet confirm if there'd be any issue with the avrdude itself, but at this point it's most likely just the VID/PID thing.


        Quote
        That's the first time I hear that the cam test does nothing. Even the buttons testing isn't showing anything when pushed?
        If not, it means there is a serial communication issue between the gun and pc. If the buttons react, it means either the cam has an issue or the connection between the cam and the board is bad.
        The calibration screen should also start the gun calibration, is that what's happening?
        Have you tried unplug/replug the gun, restart the app, and then go directly to the cam tab without touching anything else?

        Everything else works like should. I can calibrate it normally and it functions normally, just the cam test tab is dead. Even button press indications react in no way and they too work in reality (or well, at least trigger does as I'm still running this on a breadboard so only 1 or 2 micro switches connected during testing). I tested the GUI on two different PCs and have replugged the chip several times and also flashed it few times.

        Quote
        Fish eyes lens has too much deformation, it messes up too much with the calibration. Wide lenses are the way to go.
        I thought so. I just noticed the 'fish eye' term in some post and wondered if it really didn't affect too much the accuracy. What zoom factor did your lens have?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 12, 2020, 10:54:27 am
        Used Sparkfun Pro Micro / ATMega32U4 (5V, 16Mhz) during uploading  the empty sketch. Board info shows:
        Code: [Select]
        BN: Unknown board
        [b]VID: 1B4F
        PID: 9206[/b]
        SN: Upload any sketch to obtain it
        As the GUI isn't detecting the board I can't yet confirm if there'd be any issue with the avrdude itself, but at this point it's most likely just the VID/PID thing.
        Yeah that's exactly what I said in my previous message, you need to flash it as arduino Leonardo model, or else it won't work :lol

        Everything else works like should. I can calibrate it normally and it functions normally, just the cam test tab is dead. Even button press indications react in no way and they too work in reality (or well, at least trigger does as I'm still running this on a breadboard so only 1 or 2 micro switches connected during testing). I tested the GUI on two different PCs and have replugged the chip several times and also flashed it few times.
        Seems like a serial communication issue or something similar.
        I will look into it to check if anything could be causing that.
        I was also planning to add a debug mode in my app to help with this kind of cases, I might add it soon.
        If you need I can send you an independent test app that should allow you to test the cam.

        I thought so. I just noticed the 'fish eye' term in some post and wondered if it really didn't affect too much the accuracy. What zoom factor did your lens have?
        Mine has is 0.6x, but other users successfully tested lenses from 0.36x (cheap Chinese ones).
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: nicr4wks on September 13, 2020, 11:09:29 pm
        Final piece of the puzzle landed on my desk today, the IR sensor! Can't wait to get home and put everything together.
        I've got a couple of old CCTV cameras that have ~30 IR LED's on each of them, going to recycle a few and see how they behave. I assume they should give a good result as the cameras had reasonable range and angle at night. I'll test them in the GUI app to get a better idea.

        JayBee I've just sent donation via PayPal for the GUI, Thanks!  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 14, 2020, 03:12:25 am
        Final piece of the puzzle landed on my desk today, the IR sensor! Can't wait to get home and put everything together.
        I've got a couple of old CCTV cameras that have ~30 IR LED's on each of them, going to recycle a few and see how they behave. I assume they should give a good result as the cameras had reasonable range and angle at night. I'll test them in the GUI app to get a better idea.

        JayBee I've just sent donation via PayPal for the GUI, Thanks!  :cheers:
        Thanks a lot!  :cheers:
        I sent the license to you email address  ;D
        Yeah in my experience CCTV leds can give good result. Are they smd or normal leds?
        You're using the DFRobot cam for your guns, right?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: nicr4wks on September 14, 2020, 03:22:09 am
        Thanks a lot!  :cheers:
        I sent the license to you email address  ;D
        Yeah in my experience CCTV leds can give good result. Are they smd or normal leds?
        You're using the DFRobot cam for your guns, right?

        Received license  :D
        Normal LED's, some camera's have clear LED and others have a grey/smoked LED so I'll see which perform best, luckily plenty of LED per camera if they need to be clustered.

        Yes DFRobot, had to order from America was worried about postage due to covid but they arrived in 7 days exactly   :)

        I'll have a couple of hours spare after work tonight so can hopefully get enough built for a quick tester.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: nicr4wks on September 15, 2020, 07:11:06 pm
        After a couple of nights work I've got a very rough example chucked together. I was too excited to get everything connected and see it in action, now I need to go back to tidy things up and re-solder a few points  :lol

        Using old CCTV LED's was a bit of a time waster, the donor cameras were so old half of the LED's were burnt out, a bunch more were dim and the remaining good ones probably aren't as bright as new, also not knowing the specs didn't help. Set them up for 1.5v 50ma with 4 LED's in each array, they get a bit warmer than I'd expect.

        I found a very basic\cheap PS1 gun to experiment with, there doesn't seem to be any branding on it. Definitely will source a nicer shell going forward.

        Things were going well until I cleaned up my desk and fired up MAME, after cleaning everything up the camera started picking up IR reflections from something so I gave up and went to bed  :lol

        (https://i.imgur.com/Dlq78sW.jpg)

        (https://i.imgur.com/WU4wvGr.jpg)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 15, 2020, 08:25:02 pm
        Nice work!  :cheers:
        Messy is ok as long as it works  :lol
        Yeah those reflection happen sometime, on desks or other shiny surfaces, can be quite annoying to point them down.
        It could also be the sunlight. I usually get different results with different LEDs too.
        But you can try changing the camera sensitivity in the settings to try to remove or at least reduce the issue  ;D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: nicr4wks on September 17, 2020, 06:31:13 am
        I've ordered some of these LED's, they're cheap and look reasonable in the photos, but who really knows from china  :lol In the customer reviews it looks like you can remove the lens to reveal the SMD LED, but who knows the lens might actually help.
        https://www.aliexpress.com/item/32962722947.html?spm=a2g0s.9042311.0.0.3a064c4digQvLZ

        In MAME the crosshair jumps around a lot and loses accuracy very easily, hoping some better LED's resolve this.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 26, 2020, 03:44:21 pm
        hello friend, sorry for my ignorance but i was wondering if you can help me finish the project, i set up the leds, and the arduino inside the pistol, but i don't know how to make it work, i want to use the retroarch and i'm watching a samco tutorial, just that when I'm going to configure the buttons on the retroach the pistol does not work, I opened the serial monitor and it is working ok, I saw that you speak of avrdude, you speak of flashing the empty sketch in the arduino's ide to work, can you help me? Thank you very much in advance.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 12:05:33 am
        hello friend, sorry for my ignorance but i was wondering if you can help me finish the project, i set up the leds, and the arduino inside the pistol, but i don't know how to make it work, i want to use the retroarch and i'm watching a samco tutorial, just that when I'm going to configure the buttons on the retroach the pistol does not work, I opened the serial monitor and it is working ok, I saw that you speak of avrdude, you speak of flashing the empty sketch in the arduino's ide to work, can you help me? Thank you very much in advance.
        In order to help you, I will need more information;
        - what arduino model are you using?
        - have you flashed my firmware already? The arduino by itself can't do anything.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 27, 2020, 06:54:40 am
        estou usando arduino pro micro Atmega32u4 5v/16hz.

        windows 10 64bits

        pinos usados.

        SDA = pino 2
        SCL = pino 3
        trigger = pino A2
        botão A = pino A3
        botao B = pino 4
        pedal = pino 6
        calibraçao = pino A1

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 09:03:53 am
        estou usando arduino pro micro Atmega32u4 5v/16hz.

        windows 10 64bits

        pinos usados.

        SDA = pino 2
        SCL = pino 3
        trigger = pino A2
        botão A = pino A3
        botao B = pino 4
        pedal = pino 6
        calibraçao = pino A1
        Games won't work with a test firmware, it's just for testing. You have to flash the full firmware to play.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 27, 2020, 09:27:02 am
        como faço, onde posso encontrar o firmware atualizado?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 09:46:46 am
        como faço, onde posso encontrar o firmware atualizado?
        Can you please speak english? I don't understand Italian.
        Everything you need to make the gun work is written in the first post.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 27, 2020, 10:09:01 am
        where do I download the updated sketch? the only file I found was (IR_Light_Gun-2.16). it's that? can you explain how do i upload the updated sketch?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 10:32:48 am
        where do I download the updated sketch? the only file I found was (IR_Light_Gun-2.16). it's that? can you explain how do i upload the updated sketch?
        Like I said, everything is in the first post, including the firmware and gui download.
        The 2.16 is a very old version.
        You simply download the gui/firmware package of the first post and flash the firmware with it.
        But for that you need a donator license.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 27, 2020, 10:46:51 am
        the donor license I already have.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 11:14:31 am
        the donor license I already have.
        then I don't understand what you are asking, flashing the firmware is as simple as select your board and pushing a button in my GUI.
        You don't use the IDE for it.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 27, 2020, 11:44:14 am
        my doubt is how to load the .hex files on the arduino.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 11:55:37 am
        my doubt is how to load the .hex files on the arduino.
        Tools => Flash Firmware...
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 27, 2020, 12:14:22 pm
        *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.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 28, 2020, 06:54:28 am

        I managed to load the firmware with xloader. I have some doubts, I loaded the first .hex file (JayBee_IRLightGun_4Points_2.26.ino.jbgunmi1) the other .hex files, 2, 3 ... load automatically? the arduino was recognized by the GUI, what do I need to do for the buttons and camera to work, because I can only move through the pc keyboard.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 28, 2020, 08:14:57 am

        I managed to load the firmware with xloader. I have some doubts, I loaded the first .hex file (JayBee_IRLightGun_4Points_2.26.ino.jbgunmi1) the other .hex files, 2, 3 ... load automatically? the arduino was recognized by the GUI, what do I need to do for the buttons and camera to work, because I can only move through the pc keyboard.
        The firmware 1, 2, 3 & 4 are for the player 1, 2, 3 & 4, the ones you select on the bottom part.
        The only difference between those are the usb IDs that are different, to be able to keep them binded to a specific player in mame.
        Can you do a camera test (in the camera test tab), and show me what you are getting?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 28, 2020, 09:03:32 am
        nothing happens, the buttons don't work either.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 28, 2020, 09:17:47 am
        nothing happens, the buttons don't work either.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 28, 2020, 10:27:14 am
        nothing happens, the buttons don't work either.
        That grey dot in the middle shows that the communication with the board is working. But the camera can't see anything or isn't connected correctly.
        Are you using a common ground for all buttons?
        Also are you using the dfrobot ir cam?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 28, 2020, 10:55:49 am
        I'm using the same gnd for the buttons and camera.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 28, 2020, 12:05:24 pm
        I removed all the welds and soldered again
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 28, 2020, 12:16:32 pm
        now i will try to use it in the retroarch I appreciate all the patience and help. thank you very much!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on September 28, 2020, 12:31:57 pm
        now i will try to use it in the retroarch I appreciate all the patience and help. thank you very much!
        No problem, glad you got it worked  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on September 29, 2020, 11:14:01 am
        anyone here already managed to use in retroarch? I made the configuration like samco, but the gun only moves the mouse, the buttons do not work and a message appears saying that the pistol is not configured, only that everything is configured.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 01, 2020, 08:38:50 am
        anyone here already managed to use in retroarch? I made the configuration like samco, but the gun only moves the mouse, the buttons do not work and a message appears saying that the pistol is not configured, only that everything is configured.
        In retroarch it's per core related config. Some support the gun, some don't (it's even version/game dependent).
        If the gun controls the mouse, it should also work in supported cores if setup correctly, since all the gun does is sending mouse coordinates to the PC.
        However I'm not a retroarch expert so you might want to ask to the retroarch community directly for more help on that  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on October 01, 2020, 08:39:27 pm
        do you use mame, what lightgun games can you run on mame and what are they?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 01, 2020, 09:59:38 pm
        do you use mame, what lightgun games can you run on mame and what are they?
        Ok it looks like a moderator removed the link I sent, even if it doesn't contain any rom of any sort.
        So I will just say that you can find the long list of mame light gun games in a few seconds on google.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on October 02, 2020, 05:31:21 am
        thank you very much.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 04, 2020, 11:01:46 am
        Note: this time the firmware update is quite huge, with lot of changes under the hood, so you will need to click to the "reset" button of the new GUI version before or after the flash to make it work properly.

        *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.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 04, 2020, 01:01:45 pm
        I updated the main forum post with up to date help for the firmware, especially the serial/feedback communication explanation. Go take a look if you need!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on October 04, 2020, 01:17:27 pm
        hello, i decided to use mame, i went to mame .ini i modified #
        # OSD OUTPUT OPTIONS
        #
        output windows

        # CORE INPUT OPTIONS
        #

        mouse                     1

        but when I run the game I can't move or shoot with the gun, I configure the buttons within the game, even so I can't, is there any other modification for the game to recognize the gun? out of the game I can move the arrow and use the buttons on the gun.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 04, 2020, 01:39:52 pm
        hello, i decided to use mame, i went to mame .ini i modified #
        # OSD OUTPUT OPTIONS
        #
        output windows

        # CORE INPUT OPTIONS
        #

        mouse                     1

        but when I run the game I can't move or shoot with the gun, I configure the buttons within the game, even so I can't, is there any other modification for the game to recognize the gun? out of the game I can move the arrow and use the buttons on the gun.
        Sorry that's not a gun issue but a mame issue, I'm not a specialist with it, you'd have to ask in the mame forum for help I'm afraid  :-\
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on October 04, 2020, 04:55:58 pm
        You need to turn lightgun to 1, not mouse.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on October 04, 2020, 06:16:36 pm
        how do you send commands via serial with your GUI?
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 05, 2020, 03:32:49 am
        how do you send commands via serial with your GUI?
        You don't. You use mamehooker like written in my guide.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 07, 2020, 11:15:19 am
        *2020/10/08 - GUI 0.991beta - FW 2.33
        GUI:
        - Updated the GUI graphic management. Now both camera sensor tab and full screen test mode should be super smooth, no more flickering! So you should be able to see way more easily if there are any detection issue with your LEDs.
        - Finally added the temperature sensor reading button, now you can check the solenoid current temperature with a single button press.
        - added a function to change sensitivity for the camera sensor in real time; press CTRL keyboard key in the camera test mode to change the sensitivity level. (don't forget to upload the settings once you finish, if you are happy with the result)
        - fixed a small bug that was preventing the sensitivity to display correctly

        Firmware:
        - added real time sensitivity change for the new GUI function
        - fixed some bugs that were preventing the gamepad mode from working correctly
        - better IR correction algorithm (for IR reflections, duplicated points...)
        - now the gun doesn't need to see the 4 led points to start tracking, it starts tracking as soon as it see 2 points.
        - various bug fixes and optimizations
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on October 08, 2020, 09:09:43 pm
        You need to turn lightgun to 1, not mouse.

        how do I do? I downloaded some versions of mame and I can't get it to work in the game, I already opened mame.ini and put mouse = 1
        lightgun = 1
        I've used several options, I've been in the mother's settings and nothing happened.
        Could you explain to me how you do it?
        the gun works on the Windows screen.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Foxhole on October 08, 2020, 10:01:31 pm
        Look here: https://youtu.be/mcnBxqiJzD8
        It's aimed at aimtrak users, but the procedure is the same for all guns basically.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Jardielsilva on October 09, 2020, 07:57:56 pm
        Look here: https://youtu.be/mcnBxqiJzD8
        It's aimed at aimtrak users, but the procedure is the same for all guns basically.

        thank you very much, it worked!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 23, 2020, 12:33:26 pm
        Huge update again!
        Mainly for 2 things; pseudo 3d aiming calculation, and bluetooth extension board support!


        *2020/10/24 - GUI 1.0beta - FW 2.39

        Firmware:
        - pseudo 3d aiming calculation, that works way better on every aspects, and makes the aiming flawless no matter the angle!
        - RN-42 (or hacked HC-05) bluetooth board support! Now you can use bluetooth and usb at the same time.
          To make it work, configure the module to hid controller, then connect it to the pin 0 and 1 of the board (more info about that coming soon).
        - fixed some bugs with the calibration that was preventing it from working correctly
        - fixed a bug with the nunchuck direction
        - added a fullauto mode enable/disable option
        - various bug fixes and optimizations

        GUI:
        - added fullauto and Bluetooth mode options
        - fixed some bugs
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 23, 2020, 01:03:03 pm
        Here is a small guide to add an optional Bluetooth module.
        FOR ADVANCED USERS ONLY


        You will either need a RN-42 board, or a HC-05 hacked with the RN-42 firmware (they both have the same chipset).

        Follow this guide for the HC-05, from the beginning to the end;
        https://www.instructables.com/Upgrade-Your-3-Bluetooth-Module-to-Have-HID-Firmwa/

        For both RN-42 and hacked HC-05, you need to connect the BT board to any Arduino (don't forget it's 3v3 logic, so if your arduino is 5v you will need a voltage divider or a level shifter), use the test sketch available in the guide and configure the board the same way as written, with one difference; send SH,0210 instead of SH,0230 at the end to activate the gamepad mode instead of mouse/keyboard.

        Once the board is configured correctly, you need to connect it to the gun's arduino as followed (don't forget it's 3v3 logic, so you will need a voltage divider or a level shifter);
        Arduino TX (pin 0) => BT board RX
        Arduino RX (pin 1) => BT board TX

        And connect the VCC and GND.

        Of course if you want to use it wirelessly, you need to add a 5v battery(3v3 won't work with the pro micro 16MHz), and a regulator.

        Done!  ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: lodoss118 on October 25, 2020, 04:30:48 pm
        Hi, i was wondering if someone could build me a gun with this module, i am in the uk and wanted this gun converted:

        https://www.aliexpress.com/item/4000682192646.html?spm=a2g0o.productlist.0.0.64c37cb1EcSpUi&algo_pvid=e254f106-8ea7-46fc-81fb-d5bf662c13fd&algo_expid=e254f106-8ea7-46fc-81fb-d5bf662c13fd-0&btsid=2100bde116036577551161651e0004&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_ (https://www.aliexpress.com/item/4000682192646.html?spm=a2g0o.productlist.0.0.64c37cb1EcSpUi&algo_pvid=e254f106-8ea7-46fc-81fb-d5bf662c13fd&algo_expid=e254f106-8ea7-46fc-81fb-d5bf662c13fd-0&btsid=2100bde116036577551161651e0004&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 26, 2020, 08:08:04 pm
        Great review video of my system by Ben!  ;D
        https://youtu.be/O6zyrMOQLG4
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 27, 2020, 07:46:16 am
        Hi, i was wondering if someone could build me a gun with this module, i am in the uk and wanted this gun converted:

        https://www.aliexpress.com/item/4000682192646.html?spm=a2g0o.productlist.0.0.64c37cb1EcSpUi&algo_pvid=e254f106-8ea7-46fc-81fb-d5bf662c13fd&algo_expid=e254f106-8ea7-46fc-81fb-d5bf662c13fd-0&btsid=2100bde116036577551161651e0004&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_ (https://www.aliexpress.com/item/4000682192646.html?spm=a2g0o.productlist.0.0.64c37cb1EcSpUi&algo_pvid=e254f106-8ea7-46fc-81fb-d5bf662c13fd&algo_expid=e254f106-8ea7-46fc-81fb-d5bf662c13fd-0&btsid=2100bde116036577551161651e0004&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_)
        Actually I'm planning to build some premade guns in the future for people who want it, but it's not for the near future tho, it might take a while.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on October 28, 2020, 11:22:03 pm
        *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
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: nicr4wks on November 07, 2020, 02:08:49 am
        I've ordered some of these LED's, they're cheap and look reasonable in the photos, but who really knows from china  :lol In the customer reviews it looks like you can remove the lens to reveal the SMD LED, but who knows the lens might actually help.
        https://www.aliexpress.com/item/32962722947.html?spm=a2g0s.9042311.0.0.3a064c4digQvLZ

        LED's finally arrived and has completely fixed tracking/jitter issues I had with the gun, played for 1hr straight without a single issue! Excellent option for $8
        The only downside is they generate a lot of heat, too hot to touch. Will need to make up a clip to hold them away from the TV frame as i'm pretty sure it could melt.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on November 07, 2020, 10:03:27 am
        I've ordered some of these LED's, they're cheap and look reasonable in the photos, but who really knows from china  :lol In the customer reviews it looks like you can remove the lens to reveal the SMD LED, but who knows the lens might actually help.
        https://www.aliexpress.com/item/32962722947.html?spm=a2g0s.9042311.0.0.3a064c4digQvLZ

        LED's finally arrived and has completely fixed tracking/jitter issues I had with the gun, played for 1hr straight without a single issue! Excellent option for $8
        The only downside is they generate a lot of heat, too hot to touch. Will need to make up a clip to hold them away from the TV frame as i'm pretty sure it could melt.
        Nice! That makes another good alternative option for the led system  ;D
        For my leds that become hot too, I'm using some heatsink and a thick enough tape to isolate them from the screen.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ZedEx48K on November 13, 2020, 05:49:03 am
        So I've been looking into building one of these, I have the Namco Guncoms to hack, but I was wondering about parts, the 1st post mentions hacking the camera from a WiiMote, but I see no instructions to do this, does anyone have any? Can I use the leds from a Wii bar? and lastly is this controller ok to use? https://www.ebay.co.uk/itm/Arduino-Pro-Micro-Leonardo-compatible-5V-16MHz-ATmega32U4-headers-UK-TESTED-/251960157859

        I think that will give me the basics to build one of these, budgets a bit tight atm is all, thanks.

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on November 14, 2020, 12:42:27 pm
        So I've been looking into building one of these, I have the Namco Guncoms to hack, but I was wondering about parts, the 1st post mentions hacking the camera from a WiiMote, but I see no instructions to do this, does anyone have any? Can I use the leds from a Wii bar? and lastly is this controller ok to use? https://www.ebay.co.uk/itm/Arduino-Pro-Micro-Leonardo-compatible-5V-16MHz-ATmega32U4-headers-UK-TESTED-/251960157859

        I think that will give me the basics to build one of these, budgets a bit tight atm is all, thanks.
        Yes, you can hack the wilmote cam but it's a bit involved process, especially to adjust the cam in the gun's barrel once the circuit is done.
        Beside the cam module you will need a 25MHz crystal, few diodes and a way to convert the arduino 5v i2c levels to 3v3 (either a level shifter pcb or resistor divider). I will send you the schematics and detailed parts list.
        I guess the IR bar LEDs should work, but you might need to figure out their specs to know how to power them correctly ;)
        And yes, that's the board we are using.
        No problem, it's difficult times, and it's always better to start diy on cheap hardware anyway :D
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: ZedEx48K on November 21, 2020, 05:15:16 am
        I think that will give me the basics to build one of these, budgets a bit tight atm is all, thanks.
        Yes, you can hack the wilmote cam but it's a bit involved process, especially to adjust the cam in the gun's barrel once the circuit is done.
        Beside the cam module you will need a 25MHz crystal, few diodes and a way to convert the arduino 5v i2c levels to 3v3 (either a level shifter pcb or resistor divider). I will send you the schematics and detailed parts list.
        I guess the IR bar LEDs should work, but you might need to figure out their specs to know how to power them correctly ;)
        And yes, that's the board we are using.
        No problem, it's difficult times, and it's always better to start diy on cheap hardware anyway :D
        [/quote]

        I might just order the right camera then, I found it for a good price on Amazon, as for the LEDs it's a wireless bar so just takes X amount of batteries, which I suspect I can run from a USB port for equvailent power.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on November 25, 2020, 02:26:33 am

        I might just order the right camera then, I found it for a good price on Amazon, as for the LEDs it's a wireless bar so just takes X amount of batteries, which I suspect I can run from a USB port for equvailent power.
        Yeah, if it uses batteries, unless it uses 4 or more AA batteries, you can easily recreate the current/voltage needed with a resistors voltage divider ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on November 26, 2020, 07:47:04 pm
        2 nice videos by hyo2012 that show my system really well;  ;D
        https://youtu.be/7z0xmR6kQok
        https://youtu.be/jZsT_Facpc8
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: thetone on November 27, 2020, 10:14:41 pm
        Alright, finally got it going.

        This is so much fun!!! JB great job!!!! :applaud:

        I'll be giving a full review of the problems I've faced and how I resolved them probs in a couple weeks or so, we'll see.
        I wasn't able to get the WII cam to work. I'm guessing because of the clock. I harvested some oscillators from some old boards, but I hardly know what I'm doing, software or hardware wise. The DFRobot cam worked right out of the box.

        This system is ideal for me because I can make any gun into a light gun. I plan on making this one and a few more with rumble and the slide kickback.

        Great work JB and everyone involved!!  :cheers:

        btw the verification steps to reply seem like a little much.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Vounomer on December 01, 2020, 02:05:58 am
        Hello, first of all congratulations for this great project, I wanted to make a question: I am from South America and here it is very difficult to get parts like the DFRobot IR Camera, so I was thinking of making the gun with a wiimote camera, but I am not very clear as would be the diagram with the 5v-3.3v converter and other diodes, crystals, etc. Could you help me with that diagram? thank you
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on December 01, 2020, 06:37:21 pm
        Alright, finally got it going.

        This is so much fun!!! JB great job!!!! :applaud:

        I'll be giving a full review of the problems I've faced and how I resolved them probs in a couple weeks or so, we'll see.
        I wasn't able to get the WII cam to work. I'm guessing because of the clock. I harvested some oscillators from some old boards, but I hardly know what I'm doing, software or hardware wise. The DFRobot cam worked right out of the box.

        This system is ideal for me because I can make any gun into a light gun. I plan on making this one and a few more with rumble and the slide kickback.

        Great work JB and everyone involved!!  :cheers:

        btw the verification steps to reply seem like a little much.
        that's great, I'm glad to hear the system is working well for you :D
        Yeah the wiimote cam isn't easy to work with sometime.

        Hello, first of all congratulations for this great project, I wanted to make a question: I am from South America and here it is very difficult to get parts like the DFRobot IR Camera, so I was thinking of making the gun with a wiimote camera, but I am not very clear as would be the diagram with the 5v-3.3v converter and other diodes, crystals, etc. Could you help me with that diagram? thank you
        Yes I will provide a complete schematics as soon as I test it better ;)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: Vounomer on December 01, 2020, 09:31:23 pm
        Yes I will provide a complete schematics as soon as I test it better ;)

        Thank you, I will be waiting for you, it will be very helpful for many people :)
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: _Gioacchino_ on December 07, 2020, 06:32:18 am
        Ho guys how can i set/mount the temperature sensor near the solenoid?

        Inviato dal mio Redmi Note 8T utilizzando Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on December 07, 2020, 06:50:25 am
        Ho guys how can i set/mount the temperature sensor near the solenoid?

        Inviato dal mio Redmi Note 8T utilizzando Tapatalk
        I usually put it against the coil, between the coil and the metal frame, which is ideal to sense the heat from the coil. I hold it in place with simple electrical tape.
        Be careful tho to not make any contact between the sensor pins and the metal part.
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: _Gioacchino_ on December 07, 2020, 06:55:04 am
        Ho guys how can i set/mount the temperature sensor near the solenoid?

        Inviato dal mio Redmi Note 8T utilizzando Tapatalk
        I usually put it against the coil, between the coil and the metal frame, which is ideal to sense the heat from the coil. I hold it in place with simple electrical tape.
        Be careful tho to not make any contact between the sensor pins and the metal part.
        Can you post a photo of this?

        Inviato dal mio Redmi Note 8T utilizzando Tapatalk

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on December 09, 2020, 03:28:14 am
        Another great video from foxhole, showing how well the gun system works even from close range.  ;D
        Also shows his skills :applaud:
        https://youtu.be/fi3TZm3PpPQ
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on December 13, 2020, 10:30:41 am
        Big update of the main post, and added a more user friendly guide with all content in it!

        *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
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: TroyO on December 28, 2020, 11:57:53 am
        This is just too dang cool! I just read all 17 pages, LOL.

        Thank you JeyBee and all others out there figuring all this out!

        I'm in! I recently working on a project to basically house a WiiMote in to a Nintendo Zapper body and just never really got it working very well.

        Now I see this, its within my skillset (I hope, LOL) and almost custom tailored for what I want to do. WheeeeeEeeeeEe! Plus the add on options... recoil etc... I'll have to think on what I want, LOL.

        Questions.... I have so many, but a couple of key ones...

        I saw mention of, but not many details on using a WiiMote camera. Other than cost, does this have any advantages in sensing ability? I'm curious about the LED Brightness issues, and why it seems to be an issue when the WiiMote/DolphinBar setup doesn't seem to be doing anything special with the LED's? Is it less of a problem with official WiiMote gear?

        I almost wonder if its a light wavelength issues? Has anyone noted a difference between 850 vs 940 nm and how well they read?

        For now... off to donate and source some pieces-parts.

        Thank you to all involved this project, its freaking awesome.

        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on December 28, 2020, 12:47:45 pm
        This is just too dang cool! I just read all 17 pages, LOL.

        Thank you JeyBee and all others out there figuring all this out!

        I'm in! I recently working on a project to basically house a WiiMote in to a Nintendo Zapper body and just never really got it working very well.

        Now I see this, its within my skillset (I hope, LOL) and almost custom tailored for what I want to do. WheeeeeEeeeeEe! Plus the add on options... recoil etc... I'll have to think on what I want, LOL.

        Questions.... I have so many, but a couple of key ones...

        I saw mention of, but not many details on using a WiiMote camera. Other than cost, does this have any advantages in sensing ability? I'm curious about the LED Brightness issues, and why it seems to be an issue when the WiiMote/DolphinBar setup doesn't seem to be doing anything special with the LED's? Is it less of a problem with official WiiMote gear?

        I almost wonder if its a light wavelength issues? Has anyone noted a difference between 850 vs 940 nm and how well they read?

        For now... off to donate and source some pieces-parts.

        Thank you to all involved this project, its freaking awesome.
        You're welcome  ;)

        I actually started with a Wiimote crammed inside a Guncon2, with the same struggles as you.
        But as you can see I was not satisfied with it and made my own solution  ;D

        To answer to your question concerning the cam; the cam model we are using right now, the dfrobot IR cam, is pretty much a fancy aftermarket wiimote cam with a nice pcb inside a strong shell.
        So they work the same, and you can make your own cam pcb from a salvaged wiimote cam and few components.
        The sensitivity issue we got at first is pretty much solved now, since I managed to make the sensitivity of the cam configurable.

        There are various different diy leds solutions available at all specs and prices.
        Some of them are described in my pdf guide, but you can also join the discord server if you want more details or want to ask other questions.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 05, 2021, 12:29:46 am
        One last big update to close 2020, and start 2021 fresh!

        Don't forget to update to the new firmware first with the new GUI before using the new functions.

        *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
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 10, 2021, 02:20:34 am
        First big update of the year!

        The "Micro" firmware has been updated to support the full pinout of both Arduino Micro and Teensy 2.0, meaning you have all the buttons available, as well as the RGB Led support!
        The firmware is of course still compatible with boards with less pins, like the Micro Beetle or the chinese copies.
        See more info about those boards in the User Guide.


        *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

        You can get the latest files in my Github.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: tlanks on January 10, 2021, 07:14:58 am
        nice job!

        BTW  I donated . got my email?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: skywalky on January 14, 2021, 09:40:20 am
        Good work! I have the guns to shot my arcade machine. I just donated to help this project and to use the GUI.
        Thank you
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on January 19, 2021, 07:12:35 am
        Hi to everybody!

        I am looking to build my own gun (my first one, just to give it a try) and would like to find a link for buying a compatible IR camera here in Europe, or in AliExpress. Could you tell me if this model feets the specifications?

        https://a.aliexpress.com/_B0ZRsz

        Thank you in advance!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 19, 2021, 07:34:26 am
        Hi to everybody!

        I am looking to build my own gun (my first one, just to give it a try) and would like to find a link for buying a compatible IR camera here in Europe, or in AliExpress. Could you tell me if this model feets the specifications?

        https://a.aliexpress.com/_B0ZRsz

        Thank you in advance!
        This model won't work, you need very specific specs.
        For that you need to get either the one from dfrobot:
        https://www.dfrobot.com/product-1088.html
        https://www.digikey.com/catalog/en/partgroup/ir-positioning-camera-for-arduino/71049
        or make a cam yourself from a dead wiimote (the schematics and components needed are all in my guide).
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on January 19, 2021, 07:36:41 pm
        can someone not sell a completed gun, I'm not much of a DIY'er.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on January 21, 2021, 04:24:24 am
        Cannot find the Discord server of the project (I am quite noob with Discord). @JayBee can you share a direct link? Thank you in advance.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Foxhole on January 21, 2021, 04:45:25 pm
        Cannot find the Discord server of the project (I am quite noob with Discord). @JayBee can you share a direct link? Thank you in advance.
        https://discord.com/invite/HJyfYja
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on January 23, 2021, 11:53:44 am
        https://discord.com/invite/HJyfYja

        Thanks!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on February 08, 2021, 09:39:17 am
        *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)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ebvetle on February 25, 2021, 11:00:04 am
        First of all, hello to everybody.
        I'd like to thank all of the passionate people here trying to revive all those childhood memories.
        I'm about to drop a few bucks, but I'd like to know if the games are two player compatible.
        I'm seeing that it emulates a mouse, but connecting two mice doesn't allow me to play.
        How this can be solved?
        Thank you again for this impressive work.
        Cheers.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: exodus123456 on February 25, 2021, 04:53:10 pm
        It depends on what you want to use, if it's MAME, you just need to activate multi mice support.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on February 25, 2021, 08:24:56 pm
        First of all, hello to everybody.
        I'd like to thank all of the passionate people here trying to revive all those childhood memories.
        I'm about to drop a few bucks, but I'd like to know if the games are two player compatible.
        I'm seeing that it emulates a mouse, but connecting two mice doesn't allow me to play.
        How this can be solved?
        Thank you again for this impressive work.
        Cheers.
        There are 2 modes that you can easily switch between with the gun, the first is of course mice, which is supported by many emulators and games with raw mouse input (sometime through the Demulshooter app), and the second mode is joystick, which is basically using a controller X and Y axis and buttons instead of the mouse and keyboard  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ebvetle on February 26, 2021, 02:09:43 pm
        First of all, hello to everybody.
        I'd like to thank all of the passionate people here trying to revive all those childhood memories.
        I'm about to drop a few bucks, but I'd like to know if the games are two player compatible.
        I'm seeing that it emulates a mouse, but connecting two mice doesn't allow me to play.
        How this can be solved?
        Thank you again for this impressive work.
        Cheers.
        There are 2 modes that you can easily switch between with the gun, the first is of course mice, which is supported by many emulators and games with raw mouse input (sometime through the Demulshooter app), and the second mode is joystick, which is basically using a controller X and Y axis and buttons instead of the mouse and keyboard  ;D

        Thank you for the info.
        I'm reading about RawInput and Demulshooter.
        I guess I'll order a DFRobot camera soon.
        Cheers!



        EDIT: Have anybody tried to cram the Gun4IR inside a Gun-con 2 controller? (NPC-106).
        I'm considering purchasing this instead the original GunCon because the D-Pad, which brings another question
        Is the D-Pad really that needed for lightgun games?
        Is there any list which contains mandatory D-Pad for lightgun games? That way I can avoid making the nunchuck mod.
        Thank you.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on March 01, 2021, 02:26:35 am

        Thank you for the info.
        I'm reading about RawInput and Demulshooter.
        I guess I'll order a DFRobot camera soon.
        Cheers!



        EDIT: Have anybody tried to cram the Gun4IR inside a Gun-con 2 controller? (NPC-106).
        I'm considering purchasing this instead the original GunCon because the D-Pad, which brings another question
        Is the D-Pad really that needed for lightgun games?
        Is there any list which contains mandatory D-Pad for lightgun games? That way I can avoid making the nunchuck mod.
        Thank you.
        Yes I did a gcon2 mod, it's not super easy to mod, but not the worse either. I even managed to fit all feedbacks in it, like a mini solenoid, rumble motor and rgb led for notifications  :lol
        You can find more info on it in my discord server if you want (the link in the first post).

        To be honest a dpad on a gun is quite useless for in-game stuff, and is required only on some rare ps2 games, and maybe wii games but those aren't really lightgun games.
        I mostly use my dpad to scroll in menus from my sofa without having to go back to my pc.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ebvetle on March 01, 2021, 02:51:50 am

        Thank you for the info.
        I'm reading about RawInput and Demulshooter.
        I guess I'll order a DFRobot camera soon.
        Cheers!



        EDIT: Have anybody tried to cram the Gun4IR inside a Gun-con 2 controller? (NPC-106).
        I'm considering purchasing this instead the original GunCon because the D-Pad, which brings another question
        Is the D-Pad really that needed for lightgun games?
        Is there any list which contains mandatory D-Pad for lightgun games? That way I can avoid making the nunchuck mod.
        Thank you.
        Yes I did a gcon2 mod, it's not super easy to mod, but not the worse either. I even managed to fit all feedbacks in it, like a mini solenoid, rumble motor and rgb led for notifications  :lol
        You can find more info on it in my discord server if you want (the link in the first post).

        To be honest a dpad on a gun is quite useless for in-game stuff, and is required only on some rare ps2 games, and maybe wii games but those aren't really lightgun games.
        I mostly use my dpad to scroll in menus from my sofa without having to go back to my pc.
        Thanks for your reply.
        If D-Pad in game is not usually needed, I think I'll get the original PSX Gun-Gon, as I like it more and the trigger microswitch mod looks more sturdy than the one on the Gun-con 2.
        I'll check the discord.
        Cheers!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: MartyKong on March 14, 2021, 07:21:56 pm
        Just curious with all the Aim-Trak users out there ....  Has anyone used their Aim-Trak gun shells to upgrade to Gun4IR? Apologize if this has been discussed before :dunno
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on March 15, 2021, 01:27:00 am
        Just curious with all the Aim-Trak users out there ....  Has anyone used their Aim-Trak gun shells to upgrade to Gun4IR? Apologize if this has been discussed before :dunno
        I'm not sure anyone did that yet, although some people considered the option before using other gun shells.
        But it should work just fine I believe!   ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: itsj4y on March 18, 2021, 07:31:01 pm
        any one else having problems with the arduino disconnecting from the computer or the ir camera not reading when using the solenoid recoil?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Endprodukt on March 19, 2021, 07:50:34 am
        any one else having problems with the arduino disconnecting from the computer or the ir camera not reading when using the solenoid recoil?

        Bad wiring, crosstalk, or cold solder joint are the common reasons for that. Bad or missing diode would also turn into resets.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Endprodukt on March 19, 2021, 11:17:20 am
        Also, did u use the GUI to further check what is happening when, if it's just the cam giving up or if the entire Arduino restarts?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: itsj4y on March 19, 2021, 02:08:26 pm
        im thinking its crosstalk. i uploaded another sketch that has serial debugging and when firing it says the camera is unavailable then hangs. ive even completely separated the recoil circuit from the rest of the gun and it still hangs
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Endprodukt on March 19, 2021, 02:45:49 pm
        What do you see in the GUI? Does the camera test fail randomly?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: itsj4y on March 19, 2021, 04:14:11 pm
        What do you see in the GUI? Does the camera test fail randomly?

        i dont have the GUI
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: itsj4y on March 19, 2021, 08:52:27 pm
        Got it fixed. It was crosstalk. I used a shielded usb cable for the camera connection and no more hanging
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Endprodukt on March 20, 2021, 03:23:30 am
        What do you see in the GUI? Does the camera test fail randomly?

        i dont have the GUI

        Then get it. It has awesome calibration features.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on March 20, 2021, 06:50:10 am
        can we use the IR camera from AIMTRACK?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on March 20, 2021, 06:58:09 am
        can we use the IR camera from AIMTRACK?
        I don't know honestly, they is no doc on which model they are using.
        I guess if someone is willing to do close up pics of it, we might be able to figure it out.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on March 20, 2021, 07:14:37 am
        oki i will try to make it work   ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on March 20, 2021, 08:47:53 am
        oki i will try to make it work   ;)
        If you can give me the pinout you see on the cam, I might be able to help you to try making it work  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: m3th0d84 on April 02, 2021, 09:38:47 pm
        Can a previously modified Gcon2 with a Samco board work with your system?

        Thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 02, 2021, 09:52:19 pm
        Can a previously modified Gcon2 with a Samco board work with your system?

        Thanks
        It can't be done directly as it's not the same pinout. But you can still use it if you manually reroute to the correct pins.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on April 03, 2021, 11:42:37 am
        i try al lot of thing to make AIMTRAK IR module to work but with no luck on the pcb it's seem it need an oscillator we can see Y1 but finally prefer to do with SEN0158 and with the JOLT GUN case , i made a small PCB breadboard for the RECOIL every thing seems good , but i haven't got my PCB from CHINA for IR module. :)

        Thanks for your work without the 4 IR module , i can see my job is ok with the sun ligthing , camera test is moving :)

        A small question JayBee you're French? ( it could help me if i really need a special  question , but my english is understandable :) )
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 03, 2021, 12:33:42 pm
        i try al lot of thing to make AIMTRAK IR module to work but with no luck on the pcb it's seem it need an oscillator we can see Y1 but finally prefer to do with SEN0158 and with the JOLT GUN case , i made a small PCB breadboard for the RECOIL every thing seems good , but i haven't got my PCB from CHINA for IR module. :)

        Thanks for your work without the 4 IR module , i can see my job is ok with the sun ligthing , camera test is moving :)

        A small question JayBee you're French? ( it could help me if i really need a special  question , but my english is understandable :) )
        Yes I'm french  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on April 03, 2021, 12:55:34 pm
        French people and arcade system ... :applaud: :applaud: :applaud: every time I need the best solution for one of my cab it's french guy who made the best solution  :notworthy: :notworthy: :notworthy:
        I'm french guy too lol but really it' seems to be true, FFB for Wheel arcade the best solution is french , and for GUNCAB it's seems your job is really good
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on April 04, 2021, 08:57:10 am
        Finally something is strange
        I'm using a pro micro and the PIN 7 for solenoid RECOIL is always at 3.6V and my FFB is always actif but when i check other the pin 16 seems working for FFB 0v and got a pulse when i click on test RECOIL
        Have you change the order of PIN for RECOIL ?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 04, 2021, 09:17:20 am
        Finally something is strange
        I'm using a pro micro and the PIN 7 for solenoid RECOIL is always at 3.6V and my FFB is always actif but when i check other the pin 16 seems working for FFB 0v and got a pulse when i click on test RECOIL
        Have you change the order of PIN for RECOIL ?
        That looks like you flashed the wrong firmware version :o
        If you have a pro micro board you need to flash the Pro Micro firmware, not the Micro/beetle  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on April 04, 2021, 09:23:24 am
         :applaud: :applaud:
        I think it's automatic , you're right everything is nice now  :applaud:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: tlanks on April 04, 2021, 01:23:46 pm
        Is there any DIY sensor to replace DFRobot IR camera?  it is too big for me。
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 04, 2021, 01:42:55 pm
        :applaud: :applaud:
        I think it's automatic , you're right everything is nice now  :applaud:
        Yeah the detection should be automatic but sometime pro micro don't come with the correct factory firmware flashed on it  :P

        Is there any DIY sensor to replace DFRobot IR camera?  it is too big for me。

        Yes, the wiimote cam sensor can be used too if you had some components. More info about it in my pdf guide.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bandicoot on April 08, 2021, 05:29:49 am
        After a long time to find the correct sensor place it's work very well on my ARCADE 25'' CRT  :applaud:
        I want to try a lens for have better distance ( it's also great but ) have you got a link to a good model ?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 08, 2021, 05:39:07 am
        After a long time to find the correct sensor place it's work very well on my ARCADE 25'' CRT  :applaud:
        I want to try a lens for have better distance ( it's also great but ) have you got a link to a good model ?
        This kit is very cheap and nice;
        https://a.aliexpress.com/_mrcazR9 (https://a.aliexpress.com/_mrcazR9)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on April 26, 2021, 06:22:28 am
        Just curious with all the Aim-Trak users out there ....  Has anyone used their Aim-Trak gun shells to upgrade to Gun4IR? Apologize if this has been discussed before :dunno

        I do not recomend you to do that. An Aimtrak cost quite a lot of money, it is easy to be sold on the second hand market and the camera is not compatible with the Gun4IR project. It is better to use an original (and cheap) Gcon45 for PS1 and sell your Aimtrak to someone who would like to use it.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: MartyKong on April 28, 2021, 02:56:48 pm
        Makes sense, Thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on April 29, 2021, 09:57:46 pm
        I can't believe I didn't stumble upon this before this week. This is awesome!

        JayBee bravo! Super idée, bien ficelée!


        Anyway, I realised I had pretty much all I needed to make one, except the camera... so I ordered one from dfrobot yesterday, took DHL shipping.

        Today I had to pay brokerage and customs charges - 22$!
        So, yeah. Bummer.

        Besides that, I'm thrilled!

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 29, 2021, 11:00:26 pm
        I can't believe I didn't stumble upon this before this week. This is awesome!

        JayBee bravo! Super idée, bien ficelée!


        Anyway, I realised I had pretty much all I needed to make one, except the camera... so I ordered one from dfrobot yesterday, took DHL shipping.

        Today I had to pay brokerage and customs charges - 22$!
        So, yeah. Bummer.

        Besides that, I'm thrilled!
        Merci  ;D
        Yeah those cam modules aren't cheap sadly, I hope I can do something about it in the future.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on April 29, 2021, 11:51:23 pm


        Merci  ;D
        Yeah those cam modules aren't cheap sadly, I hope I can do something about it in the future.

        The circuit is rather simple. It's the main component that is hard to get by. I'm surprised there aren't more suppliers of similar module; so many potential uses!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 29, 2021, 11:53:48 pm
        I agree with that. Sadly the tech is heavily patented by one company only, and that company is super protective of their tech, which I can understand.

        Merci  ;D
        Yeah those cam modules aren't cheap sadly, I hope I can do something about it in the future.

        The circuit is rather simple. It's the main component that is hard to get by. I'm surprised there aren't more suppliers of similar module; so many potential uses!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: tlanks on April 30, 2021, 01:44:26 am
        https://photos.app.goo.gl/E58qh9aJtbbjNsTP9(https://photos.app.goo.gl/E58qh9aJtbbjNsTP9)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: zeeker on May 02, 2021, 05:14:48 am
        There are others IR Cameras alternatives, different from DfRobot Cam or a Wiimote Cam. Maybe could be some came from an old or damaged, toy, smart phone, tablet, or Laptop?  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 02, 2021, 11:44:22 pm
        There are others IR Cameras alternatives, different from DfRobot Cam or a Wiimote Cam. Maybe could be some came from an old or damaged, toy, smart phone, tablet, or Laptop?  ;)
        Sadly it won't work, the cam sensor we use isn't really a camera per se, it's a tracking sensor.
        A real camera just won't work as a replacement, and would most likely do a terrible job at tracking the IR points anyway.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 03, 2021, 06:01:18 am
        Hi,

        I have build 2 guns and they work in the gui perfect, but when using dolphin the line of sight is not correct.
        Does anybody have a working setup 16:9 monitor with the 4:3 aspect ratio of the games.

        AND

        has anybody figured out how to use gamepad mode with dolphin (I have built the bluetooth setup and its quite cool)



        If anybody is interested I used the recoil lasertag guns as base, cause they have already all inside
        - Battery with 6V
        - Trigger Microswitch
        - The lasertag module has the same breakthrough as the IR camera
        - 2 extra Buttons already availible
        - a recoil system with a motor and gear (does not overheat, but is still snappy, as the release blowback is done by a spring)
        - and with the micro and the HC05 you can go completely wireless
        - the headphone connection can be used as chargeing port

        Hope someone can help me to use it outside of the gui app.

        thanks

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 03, 2021, 05:31:54 pm
        @JayBee do you know if we need the whole front surface of the dfrobot camera?
        Is the camera actually centered inside there?

        What if the edge is covered?

        Thanks!

        (https://uploads.tapatalk-cdn.com/20210503/c27be735b0ec0ee56d7ca4a2d5e0e565.jpg)(https://uploads.tapatalk-cdn.com/20210503/1c792325d1f390665691eee1ae903670.jpg)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 04, 2021, 12:38:46 am
        Hi,

        I have build 2 guns and they work in the gui perfect, but when using dolphin the line of sight is not correct.
        Does anybody have a working setup 16:9 monitor with the 4:3 aspect ratio of the games.

        AND

        has anybody figured out how to use gamepad mode with dolphin (I have built the bluetooth setup and its quite cool)



        If anybody is interested I used the recoil lasertag guns as base, cause they have already all inside
        - Battery with 6V
        - Trigger Microswitch
        - The lasertag module has the same breakthrough as the IR camera
        - 2 extra Buttons already availible
        - a recoil system with a motor and gear (does not overheat, but is still snappy, as the release blowback is done by a spring)
        - and with the micro and the HC05 you can go completely wireless
        - the headphone connection can be used as chargeing port

        Hope someone can help me to use it outside of the gui app.

        thanks
        For 4:3 aspect ratio games in 16:9 screen, you need to switch the content mode in the GUI or with the mode button if you added it  ;)
        For dolphin in I'm not so sure, the wiimote not being an absolute coordinate device it might not work at all... I will check it and tell you how it works for me.
        Your gun setup sounds really cool!
        Feel free to share pics of it with us  ;D

        @JayBee do you know if we need the whole front surface of the dfrobot camera?
        Is the camera actually centered inside there?

        What if the edge is covered?

        Thanks!

        (https://uploads.tapatalk-cdn.com/20210503/c27be735b0ec0ee56d7ca4a2d5e0e565.jpg)(https://uploads.tapatalk-cdn.com/20210503/1c792325d1f390665691eee1ae903670.jpg)
        The cam is indeed centered and doesn't use the whole surface, only a very small zone in the center. The way you put it should work fine  :cheers:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 04, 2021, 04:38:49 pm
        That's great news!

        This is a shell I got (damage and all) in a swap meet a while back.
        It isn't big but will be fun regardless. The camera fits perfectly without much alterations to the shell, like one was designed for the other

        I can't fit much in there... I have a rumble motor that won't fit. And a small solenoid that's too big.
        But... I have a tiny solenoid that does

        Recoil won't be big with that (https://uploads.tapatalk-cdn.com/20210504/fe3d10dc851bbee2ec807bb97931ac4f.jpg)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 05, 2021, 12:46:13 am
        That's great news!

        This is a shell I got (damage and all) in a swap meet a while back.
        It isn't big but will be fun regardless. The camera fits perfectly without much alterations to the shell, like one was designed for the other

        I can't fit much in there... I have a rumble motor that won't fit. And a small solenoid that's too big.
        But... I have a tiny solenoid that does

        Recoil won't be big with that (https://uploads.tapatalk-cdn.com/20210504/fe3d10dc851bbee2ec807bb97931ac4f.jpg)

        Haha it looks good!  ;D
        For rumble motors, I had some luck with aftermarket xbox 360 rumble motors. They aren't too big and they work nicely.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2huwman on May 06, 2021, 08:33:37 am
        I've got a spare DFRobot SEN0158 camera if anyone needs one. £25 + UK postage. Just message if you'd like it.

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: clhug on May 06, 2021, 08:26:17 pm
        Just curious with all the Aim-Trak users out there ....  Has anyone used their Aim-Trak gun shells to upgrade to Gun4IR? Apologize if this has been discussed before :dunno

        I do not recomend you to do that. An Aimtrak cost quite a lot of money, it is easy to be sold on the second hand market and the camera is not compatible with the Gun4IR project. It is better to use an original (and cheap) Gcon45 for PS1 and sell your Aimtrak to someone who would like to use it.

        Thank you for that explanation.  I've been wondering the same thing about my AimTraks, particularly whether any of the internal parts (camera mainly) could be reused for this.  So good to know.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Howard_Casto on May 06, 2021, 10:54:35 pm
        I noticed your youtube presence has exploded lately.   Everyone seems to agree that your system is better than the sinden.   Sweet vindication.  ;)

        Anyway I look forward to building one in the future.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: clhug on May 06, 2021, 11:01:22 pm
        I noticed your youtube presence has exploded lately.   Everyone seems to agree that your system is better than the sinden.   Sweet vindication.  ;)

        Anyway I look forward to building one in the future.

        The only reason I'm looking at the Gun4IR over the Sinden is so I don't need the white border.  And maybe the better option for recoil.  But I'm also very interested in Sinden as an off-the-shelf solution.  Actually, I wish these two would have found each other and worked together.  I would very much pay for a pre-built, ready-to-purchase lightgun using this technology vs. building it myself.  I'm perfectly capable of building it myself, but that will take time I don't really have.

        I was all set to order a pair of Sindens, but then I stumbled across the Gun4IR at the last minute.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 06, 2021, 11:59:28 pm
        I noticed your youtube presence has exploded lately.   Everyone seems to agree that your system is better than the sinden.   Sweet vindication.  ;)

        Anyway I look forward to building one in the future.
        Thanks!
        I look forward to hear what you think about it after testing it :cheers:

        I noticed your youtube presence has exploded lately.   Everyone seems to agree that your system is better than the sinden.   Sweet vindication.  ;)

        Anyway I look forward to building one in the future.

        The only reason I'm looking at the Gun4IR over the Sinden is so I don't need the white border.  And maybe the better option for recoil.  But I'm also very interested in Sinden as an off-the-shelf solution.  Actually, I wish these two would have found each other and worked together.  I would very much pay for a pre-built, ready-to-purchase lightgun using this technology vs. building it myself.  I'm perfectly capable of building it myself, but that will take time I don't really have.

        I was all set to order a pair of Sindens, but then I stumbled across the Gun4IR at the last minute.
        I agree, our 2 systems are kind of complementary and it would have been nice to have a solution that take the best of both worlds.
        Maybe for a future product? Who knows.
        I will release god quality pre built and also drop in kits soon for my system  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 07, 2021, 05:18:00 am
        Hi

        Thank you for the quick reply

        @Screen not 90 degree vertical.
        The screen of my cab is 15 degree out of the vertical. Do you have to consider it when entering the screen aspect ratio, or not?

        ---> I would post pics of my guns (both BT and wired), but I can not upload any attachments (security checks fail)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 07, 2021, 05:21:35 am
        Hi

        Thank you for the quick reply

        @Screen not 90 degree vertical.
        The screen of my cab is 15 degree out of the vertical. Do you have to consider it when entering the screen aspect ratio, or not?

        ---> I would post pics of my guns (both BT and wired), but I can not upload any attachments (security checks fail)
        If the LEDs are pretty close from each screen edges aspect ratio should be your true screen aspect ratio, the gun firmware will handle that  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 07, 2021, 05:31:23 am
        the pics

        @screen inclination
        The IRS are about 4% away from screen (Screen case border). Thank you
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 07, 2021, 05:49:32 am
        @Bluetooth HC05/RN
        is there any chance that you can enable Mouse+Keyboard Mode in your FW for Bluetooth.
        The HC05 can be set in both modes, and many LGshooter are far more easy to setup in Mouse+KB Mode.
        As you use the serial interface it should not matter what your FW sents to the Modul. And latency is no really gamebreaker, as CRT LG have a really high latency, due to the white screen they need for positioning.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 07, 2021, 05:52:03 am
        @Bluetooth HC05/RN
        is there any chance that you can enable Mouse+Keyboard Mode in your FW for Bluetooth.
        The HC05 can be set in both modes, and many LGshooter are far more easy to setup in Mouse+KB Mode.
        As you use the serial interface it should not matter what your FW sents to the Modul. And latency is no really gamebreaker, as CRT LG have a really high latency, due to the white screen they need for positioning.
        That's not possible as this Bluetooth module hardware doesn't support absolute positioning mouse (relative positioning mice aka normal mice don't work for lightguns).
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 07, 2021, 07:25:43 am
        OK, but thank you for your explanation
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 08, 2021, 05:51:54 am
        @Gun Aspect Ratio Mode
        Is there a chance to light a led to signal in which mode you are (fullscreen or content asperct ratio)
        Would be helpful when not using serial commands


        The steam version of thotd ok plays really cool now. Beaware they made an artificial recoil  for the guns, but when a gun is maxed out aiming is perfect.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: graeflicher on May 08, 2021, 07:15:00 am
        @2knuckels

        How did you connect the recoil to the controller? Is the selenoid triggered through the Arduino?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 08, 2021, 09:48:46 am
        There are 2 options

        My Bluetooth guns have a 7,4V LiBattery. The recoil is connected directly to the Battery and driven by a mosfet which is connected to the micro. (like in the schematics example

        With the USB guns I use the 5V from the USB directly (one pad of the Jumper 1 is direct 5V from the USB line -> DO NOT use RAW or 5V from arduino does not work good). You also need the Mosfet

        Dwell Time is minimum 28ms , I go with 30ms. And I use the soli pin not the rumble pin

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 08, 2021, 09:51:54 am
        I thought the 'raw' pin was directly connected to the USB 5V..?



        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 08, 2021, 10:27:11 am
        I thought the 'raw' pin was directly connected to the USB 5V..?

        Just test it with a volt meter, on my micro boards they are not

        You can connect up to 12V to RAW, BUT the USB port is not directly connected to RAW pin, when you messure you get a voltage drop
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 08, 2021, 10:33:30 am
        I had thought raw was "the unmodified USB VCC"
        But it's more of a power input.

        So many different boards, so many different hardware configuration!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: PL1 on May 08, 2021, 10:45:55 am
        I thought the 'raw' pin was directly connected to the USB 5V..?

        Just test it with a volt meter, on my micro boards they are not

        You can connect up to 12V to RAW, BUT the USB port is not directly connected to RAW pin, when you messure you get a voltage drop
        On a Pro Micro, there are a fuse (F1) and a diode (D2) between the USB 5v input and the RAW pin -- upper left on this schematic.
        http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf (http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf)

        D2 causes that voltage drop.


        Scott
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 08, 2021, 02:18:03 pm
        @Gun Aspect Ratio Mode
        Is there a chance to light a led to signal in which mode you are (fullscreen or content asperct ratio)
        Would be helpful when not using serial commands


        The steam version of thotd ok plays really cool now. Beaware they made an artificial recoil  for the guns, but when a gun is maxed out aiming is perfect.
        When you change mode, the rgb led (that you can add) is blinking and rumble motor is vibrating to tell you which mode you are in.

        On a Pro Micro, there are a fuse (F1) and a diode (D2) between the USB 5v input and the RAW pin -- upper left on this schematic.
        http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf (http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf)

        D2 causes that voltage drop.


        Scott
        Thanks, I was going to say exactly that but you were faster ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 09, 2021, 05:42:51 am
        @LED to signal aspect ratio mode
        Sorry but is what you wrote in your manual.
        I was thinking on something different like a status led which is on when a mode is selected.
        Maybe its an option for your next FW
        Maybe I am missing something, but a blink feedback when firing in my opinion does not much add to the gameplay feeling, so the optional rerouting of one led as a status led maybe an option.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 09, 2021, 05:52:08 am
        @LED to signal aspect ratio mode
        Sorry but is what you wrote in your manual.
        I was thinking on something different like a status led which is on when a mode is selected.
        Maybe its an option for your next FW
        Maybe I am missing something, but a blink feedback when firing in my opinion does not much add to the gameplay feeling, so the optional rerouting of one led as a status led maybe an option.
        Yes in the manual I am writing about the RGB led, I thought that was obvious.
        The Arduino doesn't have enough pins nor enough storage left to add a permanent indicator led.
        Led feedback is not an option for everyone, same as any other feedback, it's just a matter of preference  ;)
        And there are tons of different mod that you can change in real time for the gun, so the RGB led blinking for each mode is a more universal solution.
        But you can already change modes on a game basic with some simple scripts/commands, and I am currently working on an app to change the modes at game startup.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 09, 2021, 08:46:34 am
        Thank you for your quick answer.
        The serial port is a good option to set the mode, it was only because your solution needs no software to work which is awesome, so it was just an idea, but I get your point
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Tonystark2021 on May 10, 2021, 12:55:24 pm
        hi jaybee, i made the donation i look forward to your reply by mail  :notworthy:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Geniery on May 13, 2021, 11:17:38 am
        hi JayBee, the project is beautiful.
        For the moment I have assembled the gun with the basic commands: camera and trimmer, but I have a problem.
        Every time I quit the MAME, I lose the settings and I have to set the lightgun x and y analog and the trimmer again.
        If I open another emulator (MAMEUI, MAMEUI64, ARCADE64, etc.), the list of games automatically begins to scroll up, preventing me from selecting the games at the bottom of the list.
        how can i solve :dizzy: :dizzy: :dizzy:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: lllll44 on May 13, 2021, 12:39:02 pm
        Does someone sell those premade + recoil? i will buy in a minute.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 13, 2021, 12:49:36 pm
        hi JayBee, the project is beautiful.
        For the moment I have assembled the gun with the basic commands: camera and trimmer, but I have a problem.
        Every time I quit the MAME, I lose the settings and I have to set the lightgun x and y analog and the trimmer again.
        If I open another emulator (MAMEUI, MAMEUI64, ARCADE64, etc.), the list of games automatically begins to scroll up, preventing me from selecting the games at the bottom of the list.
        how can i solve :dizzy: :dizzy: :dizzy:
        For the setting not staying, it sounds like a software issue, the mice input enumeration not being stable or something similar.
        There are ways to fix that, I'd recommend you to come on the discord server so I can help you better ;)
        For the other issue, it can be caused by either the wrong firmware version being flashed, or a but, that I will fix in the upcoming firmware update  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: graeflicher on May 13, 2021, 01:33:21 pm
        It seems i killed the A2 pin on the micro. I now connected the triggerswitch to another pin (pin 16). Is there any way to remap the pins, so that anoter pin (e.g. pin 16) acts as the trigger?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 13, 2021, 01:43:40 pm
        It seems i killed the A2 pin on the micro. I now connected the triggerswitch to another pin (pin 16). Is there any way to remap the pins, so that anoter pin (e.g. pin 16) acts as the trigger?
        It's not possible to remap the pins since they are hardwired for optimisation purpose, and because some have special hardware functions  :dizzy:
        You can still use other button pins and remap the button assignment in the GUI, but you won't have the special trigger functions like off screen reload and feedbacks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 13, 2021, 02:30:30 pm
        It seems i killed the A2 pin on the micro. I now connected the triggerswitch to another pin (pin 16). Is there any way to remap the pins, so that anoter pin (e.g. pin 16) acts as the trigger?
        Maybe get another unit and use this one for something else?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 14, 2021, 06:56:19 am
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil. Of course I’m tempted by recoil but i thought I’d use this as a base to start.

        I have to say, anyone worried about amount of work. It was a breeze. The components fit into the gk45 with no mods and only a bit of soldering. It actually took more time to build the screen LEDs, the gun mod itself took less that 30mins.

        My shopping list below for anyone wanting a quick build:

        - ir positioning camera from UK.farnell.com (SEN0158) - £22.79
        - second hand guncon34 from eBay (£17)

        Both came within 2 days

        Rest was from Amazon next day:

        - 12 x 940nm ir emitters (£5.99)
        - double sided PCB assorted (£6.99 loads spare)
        - 100 x 27ohm resisters (£3.99)
        - 3 pack 3m micro usb cables (£6.79)
        - 3 pack pro micro atmega32U4 arduino 5v 16mhz (£20.99)

        Soldier and wiring I already had. Quick recycling tip. If you splice the original guncon harness. Loads of great coloured wiring there. Waste not!

        Thank you so much jaybee for doing all the hard work for us lazy people. Whole process worked flawlessly first attempt.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 14, 2021, 07:39:02 am
        Cool build, and not so heavy, cause no recoil
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 14, 2021, 09:51:13 am
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil.

        Nice build. Thanks for posting!

        I'm in the (slow) process of getting all for my first attempt at Gun4IR too... (really just waiting on IR leds...)

        Question - no recoil. No rumble? and no LEDs?
        Did you implement a mode button of any sort?

        I'm currently working my way into putting a mode/RGB led on my (very) old lightgun shell.

        I'd be curious to hear about functionality and playability from the viewpoint of a builder.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 14, 2021, 11:01:51 am
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil. Of course I’m tempted by recoil but i thought I’d use this as a base to start.

        I have to say, anyone worried about amount of work. It was a breeze. The components fit into the gk45 with no mods and only a bit of soldering. It actually took more time to build the screen LEDs, the gun mod itself took less that 30mins.

        My shopping list below for anyone wanting a quick build:

        - ir positioning camera from UK.farnell.com (SEN0158) - £22.79
        - second hand guncon34 from eBay (£17)

        Both came within 2 days

        Rest was from Amazon next day:

        - 12 x 940nm ir emitters (£5.99)
        - double sided PCB assorted (£6.99 loads spare)
        - 100 x 27ohm resisters (£3.99)
        - 3 pack 3m micro usb cables (£6.79)
        - 3 pack pro micro atmega32U4 arduino 5v 16mhz (£20.99)

        Soldier and wiring I already had. Quick recycling tip. If you splice the original guncon harness. Loads of great coloured wiring there. Waste not!

        Thank you so much jaybee for doing all the hard work for us lazy people. Whole process worked flawlessly first attempt.
        Very clean, great job!  :cheers:
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: sinvel on May 14, 2021, 05:03:25 pm



        Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
        It means you can't have both, since they are using the same pins.
        If you need those buttons you won't be able to use the led at all. Or not use those buttons at all.
        The question is more about which button/pins should we sacrifice or move when using the LED.
        From what I understand the only pro micro PWM pins are 3-5-6-9-10,
        the only pin that can be sacrificed without losing features is only the start button since most games start by shooting, you could consider using a single-pin LED and maybe add the A + Select combo for the Start button: D

        I just received all of my parts and I have just started building my first GUN4IR light gun (this community rocks!!)
        I have a quick question, as I understand it we cannot have the RGB led and the pedal/directional/start buttons at the same time, as they use the same pins on the pro micro and on the instructions it states that the firmware will detect what is connected. I really would love to use the pedal (for Time crisis, etc) and the led at the same time, and wonder if there is a workaround?

        When does the firmware detect the led or pedal exactly? Is on boot up (power on) every time or is it on first connection and the setting is written in memory and permanent from that point on?  Specifically, can I simply disconnect the common wire for the led to deactivate it on next power on?

        Thank you for your help!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: cosmodk on May 14, 2021, 07:02:11 pm
        My first Lightgun project ever. Thanks to Jaybee for all the hard word.

        You can watch a short Build log here on YouTube
        https://www.youtube.com/watch?v=NpYPi1N9pug

        Thanks JayBee

        //Cosmodk
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 15, 2021, 03:25:06 am
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil.

        Nice build. Thanks for posting!

        I'm in the (slow) process of getting all for my first attempt at Gun4IR too... (really just waiting on IR leds...)

        Question - no recoil. No rumble? and no LEDs?
        Did you implement a mode button of any sort?

        I'm currently working my way into putting a mode/RGB led on my (very) old lightgun shell.

        I'd be curious to hear about functionality and playability from the viewpoint of a builder.

        I will add recoil and some extra buttons for sure. This first build was fine for testing purposes. Trigger and two buttons enough for most games. Either being trigger/A/B, trigger/start/coin or trigger/A/start depending on game/emulator.

        The guncon45 definitely needs a thumb button or two. I think I’ll start here.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 15, 2021, 03:25:47 am
        My first Lightgun project ever. Thanks to Jaybee for all the hard word.

        You can watch a short Build log here on YouTube
        https://www.youtube.com/watch?v=NpYPi1N9pug

        Thanks JayBee

        //Cosmodk

        Excellent work!! And very good video!
        Title: Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
        Post by: JayBee on May 15, 2021, 04:08:16 am



        Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
        It means you can't have both, since they are using the same pins.
        If you need those buttons you won't be able to use the led at all. Or not use those buttons at all.
        The question is more about which button/pins should we sacrifice or move when using the LED.
        From what I understand the only pro micro PWM pins are 3-5-6-9-10,
        the only pin that can be sacrificed without losing features is only the start button since most games start by shooting, you could consider using a single-pin LED and maybe add the A + Select combo for the Start button: D

        I just received all of my parts and I have just started building my first GUN4IR light gun (this community rocks!!)
        I have a quick question, as I understand it we cannot have the RGB led and the pedal/directional/start buttons at the same time, as they use the same pins on the pro micro and on the instructions it states that the firmware will detect what is connected. I really would love to use the pedal (for Time crisis, etc) and the led at the same time, and wonder if there is a workaround?

        When does the firmware detect the led or pedal exactly? Is on boot up (power on) every time or is it on first connection and the setting is written in memory and permanent from that point on?  Specifically, can I simply disconnect the common wire for the led to deactivate it on next power on?

        Thank you for your help!
        With the RGB LEDs and the pro micro board, you only lose the dpad, the other buttons are all still available with a slightly different pinout  ;)
        Now if you want every possible buttons with rgb leds, and even feedbacks at the same time, you can used a modified Teensy 2.0 or a Micro, they have enough pins to support everything!

        Yes the detection is performed at each boot when all 3 pins of the RGB LEDs are connected, so you can add/remove it anytime.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 15, 2021, 04:17:11 am
        My first Lightgun project ever. Thanks to Jaybee for all the hard word.

        You can watch a short Build log here on YouTube
        https://www.youtube.com/watch?v=NpYPi1N9pug

        Thanks JayBee

        //Cosmodk
        Really nice job!  :cheers:
        So did you get the gun side leds flashing?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 16, 2021, 09:05:45 pm
        Here's mine.

        The shell is old. Very old. Midway, had a db9 connector. Genesis? I got it for dirt cheap because it was broken.

        Had to cut the barrel short. It was shattered, and was crumbling, it kept breaking and ended shorter than I was hoping.

        Kept the inner circuit boards for the switches, but had to install new switches as they weren't reliable.
        Found a switch that would fit in the rj9 expansion connector in the handle, but it was NC (we need NO switches...) so I cut it open and made my own from a microswitch.

        The camera fit perfectly in the barrel and the grove is perfectly sized.
        Somehow I had to turn the camera 90 degrees, is that normal?

        I added the rgb led in the front.

        The whole circuitry fits tightly. Very tightly. There's no more room, so no rumble, no solenoid.  But it works very, very well.


        Thanks JayBee for doing the leg work for us! (https://uploads.tapatalk-cdn.com/20210517/5c89ba94b6ed968858dc21b37c53d515.jpg)(https://uploads.tapatalk-cdn.com/20210517/0369b7f720019e38df7489a7cd3322cb.jpg)(https://uploads.tapatalk-cdn.com/20210517/03b5eb9391596b7dd593c468e243b02a.jpg)(https://uploads.tapatalk-cdn.com/20210517/563cf4047c331072667ba132fce7a0f8.jpg)(https://uploads.tapatalk-cdn.com/20210517/252767421c3e89e26a123da8aeb15cf5.jpg)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 16, 2021, 09:27:07 pm
        Here's mine.

        The shell is old. Very old. Midway, had a db9 connector. Genesis? I got it for dirt cheap because it was broken.

        Had to cut the barrel short. It was shattered, and was crumbling, it kept breaking and ended shorter than I was hoping.

        Kept the inner circuit boards for the switches, but had to install new switches as they weren't reliable.
        Found a switch that would fit in the rj9 expansion connector in the handle, but it was NC (we need NO switches...) so I cut it open and made my own from a microswitch.

        The camera fit perfectly in the barrel and the grove is perfectly sized.
        Somehow I had to turn the camera 90 degrees, is that normal?

        I added the rgb led in the front.

        The whole circuitry fits tightly. Very tightly. There's no more room, so no rumble, no solenoid.  But it works very, very well.


        Thanks JayBee for doing the leg work for us! (https://uploads.tapatalk-cdn.com/20210517/5c89ba94b6ed968858dc21b37c53d515.jpg)(https://uploads.tapatalk-cdn.com/20210517/0369b7f720019e38df7489a7cd3322cb.jpg)(https://uploads.tapatalk-cdn.com/20210517/03b5eb9391596b7dd593c468e243b02a.jpg)(https://uploads.tapatalk-cdn.com/20210517/563cf4047c331072667ba132fce7a0f8.jpg)(https://uploads.tapatalk-cdn.com/20210517/252767421c3e89e26a123da8aeb15cf5.jpg)
        Great job! It's always nice to see old broken hardware being put back to life in some way  :cheers:
        And yeah for the cam being on the side, it's dfrobot mistake, it's actually the right side.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 16, 2021, 09:35:00 pm
        Great job! It's always nice to see old broken hardware being put back to life in some way  :cheers:
        Thanks


        I was happy the camera actually fit in there. That gun has been in my parts bin forever, and today was the first time I saw it "work"
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 18, 2021, 08:32:14 pm
        Added a solenoid circuit and extra button to my guncon45 tonight.

        When I tested the recoil in the gun4ui app I thought it a little underwhelming for the effort to install. Then when I tried it in a couple of games I was blown away. What a great addition.

        I’m using a 10mm throw, 24v solenoid with 6n bought from Amazon. It’s small but load enough that I worry about waking up the kids when using it.  ;D

        Quick question, assuming with continuous use this thing will get hot. What use is too much? 30+ minutes of intensive gameplay? My wife and kids tend to hold the trigger down for really long periods. Should I be worried?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 18, 2021, 10:44:20 pm
        Added a solenoid circuit and extra button to my guncon45 tonight.

        When I tested the recoil in the gun4ui app I thought it a little underwhelming for the effort to install. Then when I tried it in a couple of games I was blown away. What a great addition.

        I’m using a 10mm throw, 24v solenoid with 6n bought from Amazon. It’s small but load enough that I worry about waking up the kids when using it.  ;D

        Quick question, assuming with continuous use this thing will get hot. What use is too much? 30+ minutes of intensive gameplay? My wife and kids tend to hold the trigger down for really long periods. Should I be worried?
        I have a similar solenoid, but no gun shell that would fit it... Lol
        Happy to read it makes a great effect!

        You had the same idea as me for the USB cable: cloth covered instead of rubber. Mine just haven't arrived yet.
        How long is your cable?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 18, 2021, 11:51:13 pm
        Added a solenoid circuit and extra button to my guncon45 tonight.

        When I tested the recoil in the gun4ui app I thought it a little underwhelming for the effort to install. Then when I tried it in a couple of games I was blown away. What a great addition.

        I’m using a 10mm throw, 24v solenoid with 6n bought from Amazon. It’s small but load enough that I worry about waking up the kids when using it.  ;D

        Quick question, assuming with continuous use this thing will get hot. What use is too much? 30+ minutes of intensive gameplay? My wife and kids tend to hold the trigger down for really long periods. Should I be worried?
        For that I recommend using a temp sensor you can put against the coil.
        You can then regulate the threshold temp with the settings in the app (the default is super low as a safety, you will have to increase the thresholds).
        Really nice solenoid btw, seems like perfect size, which model is it?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 19, 2021, 04:14:35 am
        Some time ago I also have built with these 24V and even 6V solis from amazon. The Problem is they get hot, and if you reduce the spring force too much it is pretty useless.
        For heavy duty rapidfire I would also use any motorized soli, as they are built to work without stop.
        If you have a 3D printer you can print the "half cog" yourself or you disassembly a toy gun with a recoil unit  (e.g. lasertag guns). With these recoils you can get up to approx. 12 shots per second. Should be enough for lightguns.
        The motor on time depends on the cog diameter and the gear and is usually around 10 to 40 ms. You need no motor control as you just apply 5V or what ever for the soli on time.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 19, 2021, 04:26:17 am
        Some time ago I also have built with these 24V and even 6V solis from amazon. The Problem is they get hot, and if you reduce the spring force too much it is pretty useless.
        For heavy duty rapidfire I would also use any motorized soli, as they are built to work without stop.
        If you have a 3D printer you can print the "half cog" yourself or you disassembly a toy gun with a recoil unit  (e.g. lasertag guns). With these recoils you can get up to approx. 12 shots per second. Should be enough for lightguns.
        The motor on time depends on the cog diameter and the gear and is usually around 10 to 40 ms. You need no motor control as you just apply 5V or what ever for the soli on time.
        Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
        They are only good for full auto.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 19, 2021, 08:36:55 am
        Added a solenoid circuit and extra button to my guncon45 tonight.

        When I tested the recoil in the gun4ui app I thought it a little underwhelming for the effort to install. Then when I tried it in a couple of games I was blown away. What a great addition.

        I’m using a 10mm throw, 24v solenoid with 6n bought from Amazon. It’s small but load enough that I worry about waking up the kids when using it.  ;D

        Quick question, assuming with continuous use this thing will get hot. What use is too much? 30+ minutes of intensive gameplay? My wife and kids tend to hold the trigger down for really long periods. Should I be worried?
        I have a similar solenoid, but no gun shell that would fit it... Lol
        Happy to read it makes a great effect!

        You had the same idea as me for the USB cable: cloth covered instead of rubber. Mine just haven't arrived yet.
        How long is your cable?

        3m. Long enough for my room
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 19, 2021, 08:38:55 am
        Some time ago I also have built with these 24V and even 6V solis from amazon. The Problem is they get hot, and if you reduce the spring force too much it is pretty useless.
        For heavy duty rapidfire I would also use any motorized soli, as they are built to work without stop.
        If you have a 3D printer you can print the "half cog" yourself or you disassembly a toy gun with a recoil unit  (e.g. lasertag guns). With these recoils you can get up to approx. 12 shots per second. Should be enough for lightguns.
        The motor on time depends on the cog diameter and the gear and is usually around 10 to 40 ms. You need no motor control as you just apply 5V or what ever for the soli on time.
        Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
        They are only good for full auto.

        Hey Jaybee, any way to restrict to single shot from software? Or is the setting on the arduino software? I would be nice for games where you know it’s semi auto pistols not to have continuous recoil.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 19, 2021, 08:43:22 am
        Some time ago I also have built with these 24V and even 6V solis from amazon. The Problem is they get hot, and if you reduce the spring force too much it is pretty useless.
        For heavy duty rapidfire I would also use any motorized soli, as they are built to work without stop.
        If you have a 3D printer you can print the "half cog" yourself or you disassembly a toy gun with a recoil unit  (e.g. lasertag guns). With these recoils you can get up to approx. 12 shots per second. Should be enough for lightguns.
        The motor on time depends on the cog diameter and the gear and is usually around 10 to 40 ms. You need no motor control as you just apply 5V or what ever for the soli on time.
        Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
        They are only good for full auto.

        Hey Jaybee, any way to restrict to single shot from software? Or is the setting on the arduino software? I would be nice for games where you know it’s semi auto pistols not to have continuous recoil.
        Yeah it's a setting in my GUI
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 19, 2021, 08:44:35 am
        Added a solenoid circuit and extra button to my guncon45 tonight.

        When I tested the recoil in the gun4ui app I thought it a little underwhelming for the effort to install. Then when I tried it in a couple of games I was blown away. What a great addition.

        I’m using a 10mm throw, 24v solenoid with 6n bought from Amazon. It’s small but load enough that I worry about waking up the kids when using it.  ;D

        Quick question, assuming with continuous use this thing will get hot. What use is too much? 30+ minutes of intensive gameplay? My wife and kids tend to hold the trigger down for really long periods. Should I be worried?
        For that I recommend using a temp sensor you can put against the coil.
        You can then regulate the threshold temp with the settings in the app (the default is super low as a safety, you will have to increase the thresholds).
        Really nice solenoid btw, seems like perfect size, which model is it?

        It’s an “ sourcingmap DC 24V 300mA Push Pull Type Open Frame Solenoid Electromagnet 10mm 6N 1.3LB” from Amazon. Notice it’s not in immediate stock anymore. I wouldn’t say it’s super powerful. But the clicking sound is what really takes me back to the arcades in terms of experience.

        Temp sensor sounds like a wise idea (along with explaining to a 6 year old that he doesn’t have to hold the trigger down forever. 😂)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mike5im5 on May 19, 2021, 08:47:32 am
        Some time ago I also have built with these 24V and even 6V solis from amazon. The Problem is they get hot, and if you reduce the spring force too much it is pretty useless.
        For heavy duty rapidfire I would also use any motorized soli, as they are built to work without stop.
        If you have a 3D printer you can print the "half cog" yourself or you disassembly a toy gun with a recoil unit  (e.g. lasertag guns). With these recoils you can get up to approx. 12 shots per second. Should be enough for lightguns.
        The motor on time depends on the cog diameter and the gear and is usually around 10 to 40 ms. You need no motor control as you just apply 5V or what ever for the soli on time.
        Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
        They are only good for full auto.

        Hey Jaybee, any way to restrict to single shot from software? Or is the setting on the arduino software? I would be nice for games where you know it’s semi auto pistols not to have continuous recoil.
        Yeah it's a setting in my GUI

        Great! Will be even cooler to be able to switch it on/off via a CLI. So you could toggle it with game loading scripts. Games like alien extermination play so nice with the full auto.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 19, 2021, 09:07:22 am
        Some time ago I also have built with these 24V and even 6V solis from amazon. The Problem is they get hot, and if you reduce the spring force too much it is pretty useless.
        For heavy duty rapidfire I would also use any motorized soli, as they are built to work without stop.
        If you have a 3D printer you can print the "half cog" yourself or you disassembly a toy gun with a recoil unit  (e.g. lasertag guns). With these recoils you can get up to approx. 12 shots per second. Should be enough for lightguns.
        The motor on time depends on the cog diameter and the gear and is usually around 10 to 40 ms. You need no motor control as you just apply 5V or what ever for the soli on time.
        Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
        They are only good for full auto.

        Hey Jaybee, any way to restrict to single shot from software? Or is the setting on the arduino software? I would be nice for games where you know it’s semi auto pistols not to have continuous recoil.
        Yeah it's a setting in my GUI

        Great! Will be even cooler to be able to switch it on/off via a CLI. So you could toggle it with game loading scripts. Games like alien extermination play so nice with the full auto.
        It's also possible to do that  ;D
        Alien extermination doesn't work so well with solenoids, since it make them overheat super fast, but works super well with motorize solenoid and rumble output (which is also supported).
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Distortion23 on May 21, 2021, 08:12:53 am
        hello everyone ready to tackle this project. just wonder what gauge wire I should order for connection to the arduino board. thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: kim_sama_999 on May 25, 2021, 11:46:19 am
        I bought one the TC4 gun clones from Aliexpress and they are great quality. I did successfuly convert it to GUN4IR but there wasn't enough room for everything. I was a tight space to put the Pro Micro board and the camera had to stick out
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 25, 2021, 12:18:34 pm
        I bought one the TC4 gun clones from Aliexpress and they are great quality. I did successfuly convert it to GUN4IR but there wasn't enough room for everything. I was a tight space to put the Pro Micro board and the camera had to stick out
        These guns are looking great. That's a full recoil?

        Can you post pictures of the insides?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: kim_sama_999 on May 25, 2021, 12:29:46 pm
        I bought one the TC4 gun clones from Aliexpress and they are great quality. I did successfuly convert it to GUN4IR but there wasn't enough room for everything. I was a tight space to put the Pro Micro board and the camera had to stick out
        These guns are looking great. That's a full recoil?

        Can you post pictures of the insides?

        It does come with the solenoid but I didn't set it up.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: boppyman on May 25, 2021, 02:00:05 pm
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil. Of course I’m tempted by recoil but i thought I’d use this as a base to start.

        I have to say, anyone worried about amount of work. It was a breeze. The components fit into the gk45 with no mods and only a bit of soldering. It actually took more time to build the screen LEDs, the gun mod itself took less that 30mins.

        My shopping list below for anyone wanting a quick build:

        - ir positioning camera from UK.farnell.com (SEN0158) - £22.79
        - second hand guncon34 from eBay (£17)

        Both came within 2 days

        Rest was from Amazon next day:

        - 12 x 940nm ir emitters (£5.99)
        - double sided PCB assorted (£6.99 loads spare)
        - 100 x 27ohm resisters (£3.99)
        - 3 pack 3m micro usb cables (£6.79)
        - 3 pack pro micro atmega32U4 arduino 5v 16mhz (£20.99)

        Soldier and wiring I already had. Quick recycling tip. If you splice the original guncon harness. Loads of great coloured wiring there. Waste not!

        Thank you so much jaybee for doing all the hard work for us lazy people. Whole process worked flawlessly first attempt.

        Hi mate would you mind adding links to the IR camera and IR emitters?   I can't seem to see the IR camera for £23 and am unsure which LEDs to buy.

        I'm looking at ordering all the parts and I'm also from the UK so it would be a big help.

        Thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2huwman on May 26, 2021, 04:12:11 am
        I've used the 1w version of these IR emitters, powering them with a 1A USB plug. You have to bridge the 'IN' and '5V' inputs to keep them on constantly. They get hot but not too hot:

        https://www.aliexpress.com/item/32869020004.html?spm=a2g0s.9042311.0.0.ea094c4dE9i0qU

        They were delivered within a couple of weeks to the UK.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 26, 2021, 05:37:48 am
        I bought one the TC4 gun clones from Aliexpress and they are great quality. I did successfuly convert it to GUN4IR but there wasn't enough room for everything. I was a tight space to put the Pro Micro board and the camera had to stick out

        Could you please post a link or how they are called at aliexpress I did not find them
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: boppyman on May 26, 2021, 11:09:44 am
        I've used the 1w version of these IR emitters, powering them with a 1A USB plug. You have to bridge the 'IN' and '5V' inputs to keep them on constantly. They get hot but not too hot:

        https://www.aliexpress.com/item/32869020004.html?spm=a2g0s.9042311.0.0.ea094c4dE9i0qU

        They were delivered within a couple of weeks to the UK.

        I was thinking of doing it that way tbh but plug sockets are at a premium lol, so am just looking to run them via USB straight from the PC
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 26, 2021, 10:54:55 pm
        I'm using the HDD power connector to power mine.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on May 26, 2021, 11:15:53 pm
        I've used the 1w version of these IR emitters, powering them with a 1A USB plug. You have to bridge the 'IN' and '5V' inputs to keep them on constantly. They get hot but not too hot:

        https://www.aliexpress.com/item/32869020004.html?spm=a2g0s.9042311.0.0.ea094c4dE9i0qU

        They were delivered within a couple of weeks to the UK.
        Are 1w infrared LEDs safe to look at?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sinvel on May 27, 2021, 01:45:16 am
        Ah my first gun build!

        I had to try this after losing bids twice on some Guncon gun shells on ebay.  :o  Went out and found a Rival Nerf gun at walmart for 10$.  :lol Some of the pics show the building process and the final wiring I had to do at the end.

        I put in a 12v 25N solenoid I got at Amazon, so there is full recoil attached to the slider at the front of the gun, along with a working RGB led light I put in at the side of the gun. I also put in 4 working buttons in the dimples at the front part of the gun.  It was hard work but a ton of fun building it!  :cheers:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 27, 2021, 02:03:33 am
        I've used the 1w version of these IR emitters, powering them with a 1A USB plug. You have to bridge the 'IN' and '5V' inputs to keep them on constantly. They get hot but not too hot:

        https://www.aliexpress.com/item/32869020004.html?spm=a2g0s.9042311.0.0.ea094c4dE9i0qU

        They were delivered within a couple of weeks to the UK.
        Are 1w infrared LEDs safe to look at?
        From the research we did, yes they are.
        But from the testing I've been doing lately, the advantages compared to a more simple led system isn't that huge.

        Ah my first gun build!

        I had to try this after losing bids twice on some Guncon gun shells on ebay.  :o  Went out and found a Rival Nerf gun at walmart for 10$.  :lol Some of the pics show the building process and the final wiring I had to do at the end.

        I put in a 12v 25N solenoid I got at Amazon, so there is full recoil attached to the slider at the front of the gun, along with a working RGB led light I put in at the side of the gun. I also put in 4 working buttons in the dimples at the front part of the gun.  It was hard work but a ton of fun building it!  :cheers:
        That's awesome, super cool result!  :cheers:
        Nerf guns are def a nice and creative solution for my system  :lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: kim_sama_999 on May 28, 2021, 04:39:43 am
        I bought one the TC4 gun clones from Aliexpress and they are great quality. I did successfuly convert it to GUN4IR but there wasn't enough room for everything. I was a tight space to put the Pro Micro board and the camera had to stick out

        Could you please post a link or how they are called at aliexpress I did not find them

        This is the one I bought: https://www.aliexpress.com/item/1005001599914124.html?spm=a2g0s.9042311.0.0.63434c4dbseawb
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on May 28, 2021, 07:42:17 am
        thank you. I did not know that searching with the german translation of tc aliexpress finds these
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: dromerin30 on June 04, 2021, 04:13:22 am
        Hello, I made the payment by paypal on June 2 and I still have not received the key
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: leirbag23 on June 05, 2021, 01:25:29 am
        Hi, im very new at this, im trying to see every tutorial. My goal for a test is to use a nintendo zapper (super simple) and the camera of a original wiimote. Any advice?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 06, 2021, 09:17:18 pm
        Preparing my "new" monitor for my stand-up - had to repaint the bezel - once dark, it's barely visible behind the glass.

        Took the opportunity to drill led holes for the gun4ir.

        How do you guys mount your LEDs? (https://uploads.tapatalk-cdn.com/20210607/909bb6e557915141c9802088e4e467cc.jpg)(https://uploads.tapatalk-cdn.com/20210607/49116d1ad30a0c1afc2dbfd75597c24f.jpg)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 06, 2021, 09:18:40 pm
        Hi, im very new at this, im trying to see every tutorial. My goal for a test is to use a nintendo zapper (super simple) and the camera of a original wiimote. Any advice?
        Just dig in. Besides mechanical placement, nothing special to think about. JayBee made all the legwork for us. Follow his guide and all will work good.

        And post pictures!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: boppyman on June 07, 2021, 02:17:05 pm
        Just a heads up for anyone ordering a IR Camera from the UK (possibly anywhere else as well).  I just got mine delivered from https://www.dfrobot.com/ for 21.93 with FedEx shipping as they are giving $10 off the shipping when you register taking the cost down quite a bit.

        It only took about 4 days to come as well which is nice :)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2huwman on June 08, 2021, 03:13:33 am
        Just a heads up for anyone ordering a IR Camera from the UK (possibly anywhere else as well).  I just got mine delivered from https://www.dfrobot.com/ for 21.93 with FedEx shipping as they are giving $10 off the shipping when you register taking the cost down quite a bit.

        It only took about 4 days to come as well which is nice :)

        Nice - did you have to pay any import duty?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: outrunner on June 09, 2021, 05:44:35 am
        Thanks for the tip. Was looking for a camera to build a second gun but everywhere in the UK seems to be sold out (we're all building GUN4IRs). Don't think I've ever had to pay import duty on items from china, hopefully this will be the same.

        Can anybody recommend a wide angle lens, looking for something decent quality with the same diameter that can screw straight onto IR camera?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 09, 2021, 06:15:41 am
        Thanks for the tip. Was looking for a camera to build a second gun but everywhere in the UK seems to be sold out (we're all building GUN4IRs). Don't think I've ever had to pay import duty on items from china, hopefully this will be the same.

        Can anybody recommend a wide angle lens, looking for something decent quality with the same diameter that can screw straight onto IR camera?
        Yeah since that cam is using old stock of sensors, it seems like the stock is slowly drying out...
        Sadly we couldn't find any lense that fit directly in the IR cam, but it is possible to use pretty much any wide/fisheye smartphone lenses on it if you either glue it on, print a support, or glue a smartphone support on it. The cleanest solution is by far the 3d print of course  :D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 09, 2021, 07:13:16 am


        Yeah since that cam is using old stock of sensors, it seems like the stock is slowly drying out...
        That is not good news...

        What if dfrobot's stock dries out? What then?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 09, 2021, 07:28:06 am


        Yeah since that cam is using old stock of sensors, it seems like the stock is slowly drying out...
        That is not good news...

        What if dfrobot's stock dries out? What then?
        For a while I've been investigating on replacement for the cam module, that is still being produced.
        There are possiblities but no simple solutions yet.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 09, 2021, 07:38:49 am
        Last resort, there is always wiimote scavenged parts...

        But the dfrobot form factor seems like it was made purposely for building lightguns

        Keep us posted in any developments.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 09, 2021, 07:51:20 am
        Last resort, there is always wiimote scavenged parts...

        But the dfrobot form factor seems like it was made purposely for building lightguns

        Keep us posted in any developments.
        Dfrobot sensors ARE wiimote salvaged cams, repackaged  :lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 09, 2021, 07:52:33 am
        Last resort, there is always wiimote scavenged parts...

        But the dfrobot form factor seems like it was made purposely for building lightguns

        Keep us posted in any developments.
        Dfrobot sensors ARE wiimote salvaged cams, repackaged 
        I thought it was new stock from the supplier, repackaged.
        They salvage them from wiimote!?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: boppyman on June 09, 2021, 12:44:10 pm
        Just a heads up for anyone ordering a IR Camera from the UK (possibly anywhere else as well).  I just got mine delivered from https://www.dfrobot.com/ for 21.93 with FedEx shipping as they are giving $10 off the shipping when you register taking the cost down quite a bit.

        It only took about 4 days to come as well which is nice :)

        Nice - did you have to pay any import duty?

        No, no tax or import duty. 

        What i did do was ask them to label it less then £20 which they kindly did, as suggested on https://lightgunpedia.fandom.com.   I don't think that affects the UK anyway though tbh as VAT isn't charged for anything under £39 and customs duty under £135 (according to gov.uk) but I didn't know that until I'd already emailed dfrobot lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on June 12, 2021, 01:28:19 am
        Hello Jaybee,

        I am a sinden backer but im starting to think your mod is the way to go, less hassle is always a plus.

        I cant put this together myself, so I might have rpeg do an aimtrack conversion. I hated the aimtrak system, as soon as i got to close to the monitor the aim would get wonky, and moving back and forth the aim would get bad. I hated it, then my recoil stopped working. So i  am a bit hesitant to go with another IR solution, I am hoping yours does not have this issue. And of course not overly excited about using the aimtrak to have it moded but it seemed like the cheapest most readily available option. I also wish there was a dpad and few more buttons on the aimtrak.

        However I still believe your solution might be the best way to go. One thing i want to ask looking at your software gui, is there no way to map buttons offscreen? When I play house of the dead for instance in demul playing house of the dead to make off screen reload work i had to set my trigger to a different button off screen (such as right click, cant remember exactly) but then when i pressed trigger offscreen it reloaded, I enjoyed that. But it seems when i watched a video of your software you cant map buttons to do something different offscreen?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 12, 2021, 03:53:43 am
        Hello Jaybee,

        I am a sinden backer but im starting to think your mod is the way to go, less hassle is always a plus.

        I cant put this together myself, so I might have rpeg do an aimtrack conversion. I hated the aimtrak system, as soon as i got to close to the monitor the aim would get wonky, and moving back and forth the aim would get bad. I hated it, then my recoil stopped working. So i  am a bit hesitant to go with another IR solution, I am hoping yours does not have this issue. And of course not overly excited about using the aimtrak to have it moded but it seemed like the cheapest most readily available option. I also wish there was a dpad and few more buttons on the aimtrak.

        However I still believe your solution might be the best way to go. One thing i want to ask looking at your software gui, is there no way to map buttons offscreen? When I play house of the dead for instance in demul playing house of the dead to make off screen reload work i had to set my trigger to a different button off screen (such as right click, cant remember exactly) but then when i pressed trigger offscreen it reloaded, I enjoyed that. But it seems when i watched a video of your software you cant map buttons to do something different offscreen?
        Thanks for your interest!
        Yeah my system don't have those kind of issue.
        Of course if you get too close form the screen the aim can lose in accuracy but that's easily solved by using a fisheye/wide lens on it.
        Concerning the offscreen reload, of course you can configure it the way you want  ;)
        You have the option to triggers whatever is mapped to the reload button when shooting offscreen, which is right click by default.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on June 12, 2021, 04:14:54 am
        Thanks for the information.

        Is it also possible to assign other buttons different keyboard values off screen?

        Typically in aimtrak software when pointed off screen i could set my side buttons as coin (3) and start (1).

        If not is that something you would consider adding to the software?

        I am going to have to look into the fisheye lens mod rpeg does as well. Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 12, 2021, 04:20:05 am
        Thanks for the information.

        Is it also possible to assign other buttons different keyboard values off screen?

        Typically in aimtrak software when pointed off screen i could set my side buttons as coin (3) and start (1).

        If not is that something you would consider adding to the software?

        I am going to have to look into the fisheye lens mod rpeg does as well. Thanks.
        Right now you can remap the offscreen/reload button to any button/keys you want, but for optimisation purpose it's not available for other buttons like A/B/Start/Select.
        However it's in my to do list for the next firmware.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: outrunner on June 12, 2021, 04:40:01 am
        My basic G-45 gun build works well but I'd like to add an RGB LED and mode button. Can anybody explain how I work out what resistor values to use? As an example I'm looking at some LEDs on ebay that give the specs:

        Red 2.0v
        Green 3.0-3.2v
        Blue 3.0-3.2v


        I know that to calculate V you need I and R. How do I work out R when I only know V?

        Also, forgive me another question in the same post. I've mostly played Model 2 games so far on a 16:9 monitor running the game full screen 4:3 (boarder at the left and right). I'd assumed this would mean I'd need to set the content to 4:3 leaving the screen as 16:9, but when I do this it throws the tracking out on the left and right. Leaving the setup as screen 16:9, content Full screen seems to work fine though. This isn't a problem as such as works well, I just don't understand what the setting is for as it doesn't seem to work in my scenario. Cheers all.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 12, 2021, 04:47:28 am
        My basic G-45 gun build works well but I'd like to add an RGB LED and mode button. Can anybody explain how I work out what resistor values to use? As an example I'm looking at some LEDs on ebay that give the specs:

        Red 2.0v
        Green 3.0-3.2v
        Blue 3.0-3.2v


        I know that to calculate V you need I and R. How do I work out R when I only know V?

        Also, forgive me another question in the same post. I've mostly played Model 2 games so far on a 16:9 monitor running the game full screen 4:3 (boarder at the left and right). I'd assumed this would mean I'd need to set the content to 4:3 leaving the screen as 16:9, but when I do this it throws the tracking out on the left and right. Leaving the setup as screen 16:9, content Full screen seems to work fine though. This isn't a problem as such as works well, I just don't understand what the setting is for as it doesn't seem to work in my scenario. Cheers all.
        For the LEDs use this;
        http://ledcalc.com/#calc
        It's super easy to use and convenient.

        For the model 2, the content mode you use also depends on the mouse input mode used by the emulator. If it's normal mouse mode, no matter the aspect ratio the mouse range will stay fullscreen.
        If it's raw mouse (for instance with mame and demulshooter), it will match the aspect ratio.
        So I guess in your case it's using normal input mode  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: outrunner on June 12, 2021, 05:22:48 am

        Thanks for the quick response JayBee, your excellent support is appreciated. I did look at the calculator first, but as I didn't know the current I wasn't sure how to calculate. I'll work on the assumption they're 20ma.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on June 12, 2021, 05:41:29 am
        Thanks for the information.

        Is it also possible to assign other buttons different keyboard values off screen?

        Typically in aimtrak software when pointed off screen i could set my side buttons as coin (3) and start (1).

        If not is that something you would consider adding to the software?

        I am going to have to look into the fisheye lens mod rpeg does as well. Thanks.
        Right now you can remap the offscreen/reload button to any button/keys you want, but for optimisation purpose it's not available for other buttons like A/B/Start/Select.
        However it's in my to do list for the next firmware.

        Thanks that would be awesome, the aimtrak is lacking a few buttons, so the offscreen buttons doing different things was very nice. If you added it, it would be awesome. Typically in games you could map those buttons to something on screen, and then i could map it to coin and start when i pointed the gun off screen. Very handy. Would be awesome to see that in the software as well. Probably the only thing i noticed useful in sindens and aimtraks not in yours, but everything else looks amazing.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on June 13, 2021, 09:48:02 am
        Im going to build some more guns and I want to try out the fisheye lens.
        Does anybody have a link to a lens that works?
        Would be nice.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on June 13, 2021, 06:22:43 pm
        Im going to build some more guns and I want to try out the fisheye lens.
        Does anybody have a link to a lens that works?
        Would be nice.

        I am also wondering about the lens, raymond is going to mod and fix my stupid aimtrak recoil i almost threw in the garbage 6 months ago.

        Does anyone know of a lens that works on the aimtrak? Not sure what exactly i am looking for.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on June 15, 2021, 06:09:46 am
        Im going to build some more guns and I want to try out the fisheye lens.
        Does anybody have a link to a lens that works?
        Would be nice.

        I am also wondering about the lens, raymond is going to mod and fix my stupid aimtrak recoil i almost threw in the garbage 6 months ago.

        Does anyone know of a lens that works on the aimtrak? Not sure what exactly i am looking for.

        This one works fine:

        https://es.aliexpress.com/item/1005002606066666.html
        [/quote]
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 15, 2021, 07:15:42 am

        This one works fine:

        https://es.aliexpress.com/item/1005002606066666.html
        Do you have to change calibration after installing it?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on June 15, 2021, 07:24:49 am
        Yes, but the change in the calibration profile is not too much big. Anyway I always play with the fisheye len mounted, because I stand from 50cm to 1.5m of my 28" monitor.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 15, 2021, 09:10:48 am
        Yes, but the change in the calibration profile is not too much big. Anyway I always play with the fisheye len mounted, because I stand from 50cm to 1.5m of my 28" monitor.
        I was asking because my arcade cabinet runs XP and I'll need to connect it's vga CRT to another machine for calibration... So I wondered if it was required at all.

        My gun tracks well at 1m, but closer than that it's unreliable without the fisheye. I'll permanently attach a fisheye when it reaches here, I've ordered the exact same as yours.

        Please Mr. Postman, bring me my fisheye!

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on June 15, 2021, 11:20:27 am
        Thank you for your link. I just ordered
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on June 16, 2021, 01:20:00 pm
        For using the camera from a wiimote, it requires a original wiimote or any 3rd party one from china will do?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 16, 2021, 01:37:44 pm
        For using the camera from a wiimote, it requires a original wiimote or any 3rd party one from china will do?
        3rd party wiimote don't have the same camera. They are no-go.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: lllll44 on June 18, 2021, 03:11:10 pm
        Does anyone sell a gun4ir with a recoil?
        a namco model will be the best.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Emilio5639 on June 19, 2021, 05:14:56 pm
        Is there a location that has what systems this supports.  I was looking at TeknoParrot, MAME, and other systems, I wasnt sure if there was some master list.  Thanks again.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 19, 2021, 06:24:45 pm
        Is there a location that has what systems this supports.  I was looking at TeknoParrot, MAME, and other systems, I wasnt sure if there was some master list.  Thanks again.
        The gun is essentially an HID Compliant mouse, any system that can use a mouse as input will be able to use gun4ir.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on June 22, 2021, 12:37:27 am
        Just curious i have i think a december build of teknoparrot, do i need to update it for gun4ir? Or should it work with a december 2020 version? Not sure if anyone knows when support was added.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on June 22, 2021, 03:26:06 am
        when using only single player all apps with mouse support work, and its really easy to setup regardless of app -> demulshooter, dolphin, pcsx2 or arcade PA ( tekkno parrot)
        When using RAW mode for 2 player there may be some tweaks are necessary as 2 Independent normal mice are not supported in windows on "NOT RAW" mode.
        If you want to get rid of a cursor use nomousey.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: outrunner on June 22, 2021, 08:28:55 am
        Finished building my second gun at the weekend, another basic G-con45 build but this time I added an LED and a small mode button, with the purpose of being able to easily change between widescreen and 4:3 mode. Everything works as expected but I was wondering if there's a way to change the LED flash colour when changing modes: maybe flash green for 4:3, flash blue for fullscreen?


        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on June 25, 2021, 08:37:03 pm
        Question to gun4ir users. Do you actually use the mode button?


        I am strongly thinking of using this button as a 3rd button instead of mode.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on June 26, 2021, 04:37:15 am
        if using mouse mode (single player) there is no need, in raw mode its useful.
        But in most cases it is more useful as an extra button, and switch the ratio mode by the app.
        ex some wii games need + and A to work properly.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on July 02, 2021, 09:59:13 pm
        Got my gun4ir system from ray, he modded an aimtrak with better recoil, fisheye lens, ect... very powerful recoil. Enjoying the gun4ir so far, alot better then the aimtrak thats for sure. I have sinden tech on my buck hunter cab, and it works well, but i cancelled my preorder not wanting to spend countless hours fiddling with software on a pc and making the boarders work, or stopping and starting the software when im playing or stopping it when im not playing, i also worried about the software crashing at times, it is windows..... So i cant really compare, my sindens are on a dedicated arcade1up cab with an 17 inch screen and gun4ir is on a 50 inch trying to do everything.

        I have a 4 player pedestal with a tv.

        I just got mame working but setup was a breeze. One thing i will mention is if you have a thicker tv (mines not thick its a 2019 samsung tv, but its not oled thin either) you should probably put the IR sensors on the side that ray makes, instead of on the back of the tv trying to bend them toward you around the bezel. Even though the sensors were protruding the width of the tv, i still had trouble picking up the ones on the sides. That caused me the most issues. Since ray has Velcro on the led's i simply remove them when not in use and stick them on when i want to play light gun games. I hide them behind the tv out of site when not in use, only takes me 40 seconds to grab them from the behind the tv and stick them on the 4 spots when i want to use them.

        But make sure the gun can clearly see them, I thought it should be able to see them sticking them on the back of the tv and pointing them toward me, but it was faint at times, so sticking them on the side of the tv bezel really helped. Turning up sensitivity didnt do much in software. Its very sensitive in my experience on a 50 inch tv if it cant see the IR sensors as clearly as it wants.

        Only things I would like to request as i mentioned before is the offscreen buttons doing something different, so aimtrak or guncons have those two red buttons. With my aimtraks I made the red buttons when i point them off screen to coin (3) and start (1) on my system. This way i dont have to walk to my pedestal whenever i need to insert coins, or skip a cut scene. I can stay in my spot. I just point the gun away from the tv, and I can hit coin or start on my gun. Hope thats in the next firmware. Fingers crossed!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on July 07, 2021, 12:34:51 am
        One other request, and maybe its already present, or maybe it wouldnt be possible to implement unless the software is always running.

        But i was curious if you could somehow assign a hot key to bring up the calibration, or some way to check the camera points and how well the gun see's them.

        For those of us using rays wireless led's who put them away when not in use, it would just be nice to be able to call up the calibration test screen and check the cameras once in awhile when i attach them to play light gun games, just to make sure everything is aligned. Especially if we are using a front end so we didnt have to close out every time, check the calibration/camera test screen manually and then reopen the front end.

        Not a huge deal was just curious if its possible and thought it might be useful.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on July 11, 2021, 04:06:22 pm
        On this same topic was talking to ray at rpeg, and he mentioned my above post is currently possible with a mode button. Unfortunately my aimtrak does not have a mode button.

        It would be awesome if we could assign a hotkey like on aimtrak to do certain things. I know i could set it so if i press A and B buttons and hold them for 10 seconds pointed off screen it would trigger calibration.

        Just be cool for something like that, one other really good use for it would be instead of requiring a physical mode button on the gun, if we could just use the buttons available to us, and if we could also switch reload modes on the fly. Some games require shot in corner, some i set offscreen to the reload button (house of the dead 2). So if could set some combination of buttons on my gun to switch reload modes.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on July 11, 2021, 10:39:35 pm
        On this same topic was talking to ray at rpeg, and he mentioned my above post is currently possible with a mode button. Unfortunately my aimtrak does not have a mode button.

        It would be awesome if we could assign a hotkey like on aimtrak to do certain things. I know i could set it so if i press A and B buttons and hold them for 10 seconds pointed off screen it would trigger calibration.

        Just be cool for something like that, one other really good use for it would be instead of requiring a physical mode button on the gun, if we could just use the buttons available to us, and if we could also switch reload modes on the fly. Some games require shot in corner, some i set offscreen to the reload button (house of the dead 2). So if could set some combination of buttons on my gun to switch reload modes.
        I'd like if we could remap buttons. Would solve things like that.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on July 13, 2021, 09:45:06 am
        Hi @JayBee

        Since I can't even find now a df robot camera to buy I've got a wiimote to serve as a donner.

        Went to the github page to find the instructions but can't find the PDF anymore. It's been moved?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on July 13, 2021, 11:49:23 pm
        Check in the download firmware section in github
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on July 14, 2021, 07:59:50 am
        Check in the download firmware section in github

        Got it. Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on July 14, 2021, 10:48:24 pm
        Ray at rpeg is going to do some more mods to my gun, he is going to add a mode button so i can switch reload modes for games (reload button or shot in corner) and rumble when i reload so the gun has feedback when i reload, after that i think im done.

        I also received ray's dual pedals today for time crisis, very fun. Especially time crisis 5.

        I think the only thing I personally need from this system and software is being able to remap buttons when pointed off screen like aimtrak. I had it setup on aimtrak so when i pointed offscreen my two red buttons on the left and right added coins and started the game. I play some games sitting or i simply have to be away from my cab for the sensors to pick up the gun, it sucks when i die and have to continue I move back to the cab adding more coins, and hitting start, then going back to my position.

        If that could be added i think I will have everything i need. Being able to point the gun off screen and having my two red buttons act as start and coin when pointed off screen just made things that much smoother and easier. When i died, just point my gun down, hit the red right button on my gun for coin, and the red left button for start.

        Really happy so far. Everything else about it trumps my aimtrak, and i certainly am happy i cancelled my sinden preorder, cant imagine dealing with white boarders and the software constantly running in the background.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 2knuckels on July 15, 2021, 02:35:46 am
        I have upgraded my guns with the fisheye, and in my opinion its a gamechanger, as with the lense suggested 1 page earlier, you can get really close to the screen (eg. 32"  screen and approx. 50cm minimum).
        Everyone building the guns should consider this upgrade (the 180 degree lens works without any loss pf precision ( installation is easy as the IR is 18mm and the lens is 17mm -> just print a tube and snap both in)
        Happy shooting
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Gobbicus on July 18, 2021, 09:48:30 pm
        I made a donation to get access to the files but I did it before creating this account but I did use the same email as I did to make the donation,  can I still get access to the files for assembling the gun4ir?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Gobbicus on July 19, 2021, 10:26:03 am
        Could the recoil on the aliexpress time crisis 4 clone work? I'm trying to find a gun shell to use with the gun4ir that has slide action recoil but all of the super jolts guns I see cost 250 dollars one ebay  :'(   Anyone know of any other guns that have slide action recoil?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 02, 2021, 03:42:16 am
        Built my first gun last night

        can you make ones for anyone in the UK, rpegelectronics only does US.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 02, 2021, 05:54:01 am
        Ray at rpeg is going to do some more mods to my gun, he is going to add a mode button so i can switch reload modes for games (reload button or shot in corner) and rumble when i reload so the gun has feedback when i reload, after that i think im done.

        I also received ray's dual pedals today for time crisis, very fun. Especially time crisis 5.

        I think the only thing I personally need from this system and software is being able to remap buttons when pointed off screen like aimtrak. I had it setup on aimtrak so when i pointed offscreen my two red buttons on the left and right added coins and started the game. I play some games sitting or i simply have to be away from my cab for the sensors to pick up the gun, it sucks when i die and have to continue I move back to the cab adding more coins, and hitting start, then going back to my position.

        If that could be added i think I will have everything i need. Being able to point the gun off screen and having my two red buttons act as start and coin when pointed off screen just made things that much smoother and easier. When i died, just point my gun down, hit the red right button on my gun for coin, and the red left button for start.

        Really happy so far. Everything else about it trumps my aimtrak, and i certainly am happy i cancelled my sinden preorder, cant imagine dealing with white boarders and the software constantly running in the background.
        You can already remap it. It's bound to the reload button that is remappable like every other buttons.
        In the next firmware will also bring more options.

        Could the recoil on the aliexpress time crisis 4 clone work? I'm trying to find a gun shell to use with the gun4ir that has slide action recoil but all of the super jolts guns I see cost 250 dollars one ebay  :'(   Anyone know of any other guns that have slide action recoil?
        It does work yes, several of us already modded a TC4 gun.

        Built my first gun last night

        can you make ones for anyone in the UK, rpegelectronics only does US.
        Selling the gun without authorization and proper licensing is strictly prohibited and will result in legal action against the seller.
        User license are for personal use only.
        If you want to buy a gun in EU contact Gustavo, from the link in my GitHub.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 02, 2021, 07:16:45 pm
        ah, i see it now, it was not made clear, he doesn't have a website or anything like the other person does.

        I have sent him an e-mail.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ar008 on August 02, 2021, 11:28:50 pm
        Hi!JayBee

        I'm from Hong Kong and try to donations for GUI licenses fee, but the Paypal show ( Donations to this recipient aren't supported in this country ), can you provide other ways for the donations?thx!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 03, 2021, 02:20:44 am
        Hi!JayBee

        I'm from Hong Kong and try to donations for GUI licenses fee, but the Paypal show ( Donations to this recipient aren't supported in this country ), can you provide other ways for the donations?thx!
        Sorry, licensing isn't working for most Asian countries right now. I don't know when it will be restored. But the upcoming gun kit will be easier to get.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Moksi on August 03, 2021, 09:35:38 am
        im interested too , now anybody that is going to build his could post some pictures how to etc. could motivave me & others, because ordering parts without electronics knowledge its hard
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 03, 2021, 09:50:05 am
        im interested too , now anybody that is going to build his could post some pictures how to etc. could motivave me & others, because ordering parts without electronics knowledge its hard
        You can find all those info and more in my Discord server  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 03, 2021, 09:57:31 pm
        is there anyway to make Gun4IR work with 2 screens, 1 for 4:3, the other for 16:9.

        for example time crisis 2 goes to 4:3, time crisis 5 goes to 16:9 screen, pc is hooked up to both.

        maybe a 2nd set of LEDs?

        im not interested in just 1 monitor for both aspet ratios, pillarboxing 4:3 into 16:9, i don't like grey-light leakage.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 03, 2021, 11:41:41 pm
        is there anyway to make Gun4IR work with 2 screens, 1 for 4:3, the other for 16:9.

        for example time crisis 2 goes to 4:3, time crisis 5 goes to 16:9 screen, pc is hooked up to both.

        maybe a 2nd set of LEDs?

        im not interested in just 1 monitor for both aspet ratios, pillarboxing 4:3 into 16:9, i don't like grey-light leakage.
        It is possible if only one 4 LEDs system is active at a time, or else it's impossible for the cam to know what is what.
        And you need to activate only one screen at a time as well if you don't want any issue.
        But please if you need more support, join the discord server, it's way easier to help users from there. And it also has tons of resources if needed.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 03, 2021, 11:59:29 pm
        ok i will look into the discord server.

        yes only 1 screen at a time will be active, maybe possible with monitor software, but will your software know which set of LED's to use, maybe it would if it just uses the active monitor.

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on August 04, 2021, 12:02:26 am
        ok i will look into the discord server.

        yes only 1 screen at a time will be active, maybe possible with monitor software, but will your software know which set of LED's to use, maybe it would if it just uses the active monitor.
        The camera sees the LEDs. The camera doesn't see the monitor.

        If you want the system to work, you need the camera to only see the 4leds for the monitor you are pointing at.

        Put a switch on your leds
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 04, 2021, 06:29:02 am
        ah so there is no way to do it automatically, maybe it can be setup on the pc via autohotkeys script, when i select the game a hardware switch automatially switches off the 4:3 LEDs, and swithes on the 16:9 LEDs., on game quit it switches reverses this.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Pegafun on August 04, 2021, 06:34:06 am
        You can automate it with a USB Relay and an script. A few months ago I wrote this tutorial that can be of your interest.

        https://insertmorecoins.es/foro/rocketlauncher/(tutorial)-automatizar-el-encendidoapagado-de-leds-con-un-rele-usb-y-rocketlaun/

        The idea is similar.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 04, 2021, 09:37:47 am
        can you not simply extend the LEDs to make a 2390x768   3.1:1 aspect ratio

        (https://i.ibb.co/j6ZKqkF/solution.jpg) (https://ibb.co/C1sd4KF)

        then no fiddiling around with it.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 04, 2021, 09:44:18 am
        can you not simply extend the LEDs to make a 2390x768   3.1:1 aspect ratio

        (https://i.ibb.co/j6ZKqkF/solution.jpg) (https://ibb.co/C1sd4KF)

        then no fiddiling around with it.
        That's not how it works, the LEDs has to match the screen displaying the content. There is no way around it, that's the only way my system can have a aim of sight accuracy.
        If you go that way you're better off with a wiimote or aimtrak.
        But we already told you what solutions you can use  ;)
        Btw if your only issue is grey light leakage you can just get an OLED screen as well.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 04, 2021, 10:14:21 am
        I can't confirm if they are perfect black or not so i will have to do that 1st but they are too large and expensive anyway.

        ok so i need to use a switcher, i will look into that.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 05, 2021, 09:00:19 am
        would it be possible to play 2 player time crisis 2/3 by stretchign the image across 2 4:3 displays, making a 2.66 aspect ratio, it goes anamorphic naturally.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on August 05, 2021, 09:11:48 am
        would it be possible to play 2 player time crisis 2/3 by stretchign the image across 2 4:3 displays, making a 2.66 aspect ratio, it goes anamorphic naturally.
        No
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 05, 2021, 09:21:22 am
        would it be possible to play 2 player time crisis 2/3 by stretchign the image across 2 4:3 displays, making a 2.66 aspect ratio, it goes anamorphic naturally.
        No.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 05, 2021, 09:32:34 am
        ok thanks for that information, im not sure why that wouldn't be possible as does it not work with 2 player single screen 1.33 or 1.78 currently, why can't the screen be 2.66, you are telling me a 2.37 screen wouldn't work.

        as i understand 2 player is being worked on with an adapter, once finished why not a single wider screen.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on August 05, 2021, 09:50:00 am
        ok thanks for that information, im not sure why that wouldn't be possible as does it not work with 2 player single screen 1.33 or 1.78 currently, why can't the screen be 2.66, you are telling me a 2.37 screen wouldn't work.

        as i understand 2 player is being worked on with an adapter, once finished why not a single wider screen.
        I don't think you understand how this system work.
        It's not like a wiimote or an aimtrak, it is using the 4 LEDs as point of reference to make the native aim of sight accuracy. Leds need to be centered with the game area.
        2 players already work, even 3-4 players work, but with ONE game area, ONE game at a time.

        You could of course stretch the game on 2 screens, but then you'd need the game image to be centered, and have the screen borders in the middle of the screen. You're better off using a 16:9 screen in that case.
        I understand here your goal is to use only one of the screens when using 4:3 games.
        But as we said before, it WILL NOT work.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on August 05, 2021, 09:59:29 am
        I'm begining to understand now, could you not have a permanent setup for it, so you don't go back to a single 4:3 screen, just have 2 guns working on a 'phantom' 2.66  screen for 2 player time crisis only?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on August 05, 2021, 10:28:27 am
        If you have two screens mirroring each other, not visible from the other gun, you can have two screens.

        Otherwise, gun systems are tied to a single, fixed screen. That's the nature of using a pistol as a pointing device.

        At the arcades, to get two player games, you either had one screen two players, or two machines linked together. Same limitation still applies.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on August 22, 2021, 11:21:56 pm
        Ray at rpeg is adding a "mode" button for me, can the end user map what this button can do? Or would ray need to do that? Im not sure where i can find in depth details on the mode button.

        I want to be able to use the mode button to toggle reload modes (none, shot in corner, reload button, ect..)

        As far as i can tell he just needs the mode button and then looks like holding the mode button and trigger will change reload modes?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Montell on August 22, 2021, 11:47:00 pm
        Ray at rpeg is going to do some more mods to my gun, he is going to add a mode button so i can switch reload modes for games (reload button or shot in corner) and rumble when i reload so the gun has feedback when i reload, after that i think im done.

        I also received ray's dual pedals today for time crisis, very fun. Especially time crisis 5.

        I think the only thing I personally need from this system and software is being able to remap buttons when pointed off screen like aimtrak. I had it setup on aimtrak so when i pointed offscreen my two red buttons on the left and right added coins and started the game. I play some games sitting or i simply have to be away from my cab for the sensors to pick up the gun, it sucks when i die and have to continue I move back to the cab adding more coins, and hitting start, then going back to my position.

        If that could be added i think I will have everything i need. Being able to point the gun off screen and having my two red buttons act as start and coin when pointed off screen just made things that much smoother and easier. When i died, just point my gun down, hit the red right button on my gun for coin, and the red left button for start.

        Really happy so far. Everything else about it trumps my aimtrak, and i certainly am happy i cancelled my sinden preorder, cant imagine dealing with white boarders and the software constantly running in the background.
        You can already remap it. It's bound to the reload button that is remappable like every other buttons.
        In the next firmware will also bring more options.

        Could the recoil on the aliexpress time crisis 4 clone work? I'm trying to find a gun shell to use with the gun4ir that has slide action recoil but all of the super jolts guns I see cost 250 dollars one ebay  :'(   Anyone know of any other guns that have slide action recoil?
        It does work yes, several of us already modded a TC4 gun.

        Built my first gun last night

        can you make ones for anyone in the UK, rpegelectronics only does US.
        Selling the gun without authorization and proper licensing is strictly prohibited and will result in legal action against the seller.
        User license are for personal use only.
        If you want to buy a gun in EU contact Gustavo, from the link in my GitHub.

        Just to clarify regarding my comment, my wish and I think you said it will be in the next firmware, is to remap buttons when pointed off screen. On aimtrak when im pointed off screen the reload button or right click for instance will output 1 (start) and middle click or the red button on the right of an aimtrak will output (5) or coin, this is when its pointed off screen. When pointed On screen some games require those buttons for other functions in the game. But when i point it off screen, it essentially acts like a totally different button.

        So basically an aimtrak the red button on the left will reload or send a right click when pointed on screen, when i point the gun down, or off screen and press it, it will output (1) or start. Sinden software also has on screen mappings and offscreen mappings for every button. Its the only thing missing imo. Otherwise everything works great.

        https://static.miraheze.org/sindenlightgunwiki/thumb/5/56/Button_Assignments_tab.jpg/1500px-Button_Assignments_tab.jpg
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: tlanks on September 25, 2021, 11:47:22 pm
        I have some questions about the  crystal oscillator。According to your PDF, it should be PIN1 - > 3v3   PIN7 - > out pin    PIN14, 8 - > GND.  eBut I checked the Pin diagramof crystal oscillator 。It is different from the PDF you gave.

        Please check the pin connection of the crystal oscillator in your PDF diagram


         Please give an accurate pin connection diagram. Thank you







        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on September 26, 2021, 01:32:45 am
        I have some questions about the  crystal oscillator。According to your PDF, it should be PIN1 - > 3v3   PIN7 - > out pin    PIN14, 8 - > GND.  eBut I checked the Pin diagramof crystal oscillator 。It is different from the PDF you gave.

        Please check the pin connection of the crystal oscillator in your PDF diagram


         Please give an accurate pin connection diagram. Thank you

        My pdf diagram is correct, the way you read the pin diagram is wrong.
        Check it again, and pay attention to the non rounded corner of the oscillator shell.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on September 26, 2021, 08:10:26 am
        Please check the pin connection of the crystal oscillator in your PDF diagram


         Please give an accurate pin connection diagram. Thank you
        Pretty harsh way of asking someone to explain when you fail to read schematics correctly, but ok

        The schematics are clearly showing that when seen upside-down instead of Right-side up, the relative position of a same physical pin changes compare to the rest.

        See attached an anoted version.
        (https://uploads.tapatalk-cdn.com/20210926/cca822e21a6a80d010938e415b218257.jpg)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on September 28, 2021, 09:07:40 pm
        Hello, I can't donate because of regional restrictions. Is there any other way to donate? I hope to get a permit.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Arcadista on October 03, 2021, 11:02:39 pm
        Hi everyone, I've been gathering the required components to build my guns but now I'm stuck at the licensing process. I can access paypal and choose to donate but get a never ending "please wait" message and can't finish the process.
        I would like to contact directly JayBee but can't see a way to send him a private message.
        Sorry for using this topic for this.

        Greetings from Argentina.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: PL1 on October 03, 2021, 11:20:30 pm
        I would like to contact directly JayBee but can't see a way to send him a private message.
        Now that your first post is approved, you should be able to send him a PM.   :cheers:


        Scott
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: swiftgti on October 12, 2021, 10:28:31 am
        Hi all,

        My first post here.. just getting into this world as I'm planning on building an arcade setup for my son for xmas!
        I've purchased a couple of guncon /gcon45 light guns and plan to mod them using gun4IR, I have a few faulty wiimotes on the way (the IR bit should be fine however).

        Could anyone link to the crystal oscillator needed ? - I'm seeing all sorts of different sizes, smd mount etc, and some that are only 3 pins..

        Also, has anyone ever made an interface board for gun4ir ? - I was thinking of getting something made via PCBWay that could neatly allow interfacing to wii IR cam, solenoid, leds etc.

        And lastly, are there any brands / suppliers to avoid (or aim for) when looking for a solenoid to go in the guncon? - My research leads me to needing a '25N JF-1039' ? which seem to be available on aliexpress for ~£3 + P&P is something like this likely to be OK for light usage?

        Sorry for all the question  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on October 19, 2021, 01:05:15 pm
        I've bought the IR camera from dfrobot but it's taking forever to arrive.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 01, 2021, 04:02:50 am
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil. Of course I’m tempted by recoil but i thought I’d use this as a base to start.

        I have to say, anyone worried about amount of work. It was a breeze. The components fit into the gk45 with no mods and only a bit of soldering. It actually took more time to build the screen LEDs, the gun mod itself took less that 30mins.

        My shopping list below for anyone wanting a quick build:

        - ir positioning camera from UK.farnell.com (SEN0158) - £22.79
        - second hand guncon34 from eBay (£17)

        Both came within 2 days

        Rest was from Amazon next day:

        - 12 x 940nm ir emitters (£5.99)
        - double sided PCB assorted (£6.99 loads spare)
        - 100 x 27ohm resisters (£3.99)
        - 3 pack 3m micro usb cables (£6.79)
        - 3 pack pro micro atmega32U4 arduino 5v 16mhz (£20.99)

        Soldier and wiring I already had. Quick recycling tip. If you splice the original guncon harness. Loads of great coloured wiring there. Waste not!

        Thank you so much jaybee for doing all the hard work for us lazy people. Whole process worked flawlessly first attempt.

        Hi mate would you mind adding links to the IR camera and IR emitters?   I can't seem to see the IR camera for £23 and am unsure which LEDs to buy.

        I'm looking at ordering all the parts and I'm also from the UK so it would be a big help.

        Thanks

        I assume you've probably built this by now but I'm from the UK and was thinking about converting a Real arcade gun so Have started looking into this. The IR camera he bought would have been this I think https://uk.farnell.com/dfrobot/sen0158/ir-positioning-camera-arduino/dp/3517916?ost=sen0158
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 01, 2021, 04:13:21 am
        Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil. Of course I’m tempted by recoil but i thought I’d use this as a base to start.

        I have to say, anyone worried about amount of work. It was a breeze. The components fit into the gk45 with no mods and only a bit of soldering. It actually took more time to build the screen LEDs, the gun mod itself took less that 30mins.

        My shopping list below for anyone wanting a quick build:

        - ir positioning camera from UK.farnell.com (SEN0158) - £22.79
        - second hand guncon34 from eBay (£17)

        Both came within 2 days

        Rest was from Amazon next day:

        - 12 x 940nm ir emitters (£5.99)
        - double sided PCB assorted (£6.99 loads spare)
        - 100 x 27ohm resisters (£3.99)
        - 3 pack 3m micro usb cables (£6.79)
        - 3 pack pro micro atmega32U4 arduino 5v 16mhz (£20.99)

        Soldier and wiring I already had. Quick recycling tip. If you splice the original guncon harness. Loads of great coloured wiring there. Waste not!

        Thank you so much jaybee for doing all the hard work for us lazy people. Whole process worked flawlessly first attempt.

        Cheers for this. I think I might attempt this with an RAC. Just need to add the recoil parts and I'm sorted. looks like the camera and the atmega32U4 are cheaper now as well.

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: SuperMagoAlex on November 01, 2021, 04:40:15 am
        Hi guys,
        I started my gun4ir building. Can I use mosfet IRLZ34N instead IRL540 for recoil circuit ?
        Thanks!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 01, 2021, 07:59:07 am
        How did you solve the 32u4 software installation problem
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 01, 2021, 08:12:56 am
        Hi guys,
        I started my gun4ir building. Can I use mosfet IRLZ34N instead IRL540 for recoil circuit ?
        Thanks!
        Yeah it should work as well.

        How did you solve the 32u4 software installation problem
        What software, and what problem?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 01, 2021, 10:13:47 pm
        How to install the second 32u4 firmware? Two guns cannot be used at the same time in the game. In addition, how to effectively reduce the moving speed of arrow indicators, I can't adjust it in windows.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on November 01, 2021, 10:20:44 pm
        Your game must accept multiple mouse.

        This has nothing to do with firmware.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 01, 2021, 11:01:02 pm
        How to install the second 32u4 firmware? Two guns cannot be used at the same time in the game. In addition, how to effectively reduce the moving speed of arrow indicators, I can't adjust it in windows.
        You can use the GUI to install player 2 firmware, but it only changed the IDs, it doesn't change the 2 player support in emulator/games.
        As Marsupial said you need an emulator that support and is set for 2 absolute raw mice, we can't do anything about that on the firmware side.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 02, 2021, 12:46:56 am
        I'm using gun4ir to test FPS games. It can replace the mouse, which is a novel way of game experience. I found that the cursor sensitivity is too high in most games. I have adjusted the mouse sensitivity in the game to 0. I want to adjust it, but the mouse adjustment of win system does not support gun4ir. How to effectively reduce gun4ir the cursor movement speed. Also, JB, you can try gun4ir to replace the mouse. It's really good to experience FPS.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 02, 2021, 01:00:36 am
        I'm using gun4ir to test FPS games. It can replace the mouse, which is a novel way of game experience. I found that the cursor sensitivity is too high in most games. I have adjusted the mouse sensitivity in the game to 0. I want to adjust it, but the mouse adjustment of win system does not support gun4ir. How to effectively reduce gun4ir the cursor movement speed. Also, JB, you can try gun4ir to replace the mouse. It's really good to experience FPS.
        The GUN4IR system isn't made to work with FPS games, and will never work properly with them.
        No true lightgun system will work for that.
        There is no mouse speed setting as the motion in the gun4ir is absolute type motion, for the lightgun games.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 02, 2021, 01:27:58 am
        I have successfully used gun4ir in medal of honor 1. I can also control it carefully in sniper elite 1. It turns out that your gun4ir is stronger than you think. As long as he can completely replace the mouse, it is a great design.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 02, 2021, 01:45:50 am
        I have successfully used gun4ir in medal of honor 1. I can also control it carefully in sniper elite 1. It turns out that your gun4ir is stronger than you think. As long as he can completely replace the mouse, it is a great design.
        That's great if you manage to make some games work for it, that have enough mice options to handle it.
        But that doesn't change the fact the Gun4IR is not made for working on FPS at all, and I can't do anything to fix games that don't have enough customization to work with it :lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 02, 2021, 03:01:33 am
        Hey all.

        For those of you who have tried solenoids and rumble motors. How does the rumble motor feel compared to a solenoid for auto fire games? Would you recommend it having tried both? Are they strong enough to put in a bigger build like a machine gun/rifle shell?

        I already have a jolt gun for single shot games but Im considering building a machine gun for auto games. Does anyone have a good recommendation for a suitable shell in the UK that is affordable?

        Cheers
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 02, 2021, 07:59:52 am
        Maybe I didn't make it clear. The gun4ir you developed may change the way FPS games experience. And you will become a celebrity in the history of game controller development. And gun4ir it's only a small step away from success. He only needs to be compatible with the win mouse driver and can be controlled by the system.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 02, 2021, 08:05:33 am
        Hey all.

        For those of you who have tried solenoids and rumble motors. How does the rumble motor feel compared to a solenoid for auto fire games? Would you recommend it having tried both? Are they strong enough to put in a bigger build like a machine gun/rifle shell?

        I already have a jolt gun for single shot games but Im considering building a machine gun for auto games. Does anyone have a good recommendation for a suitable shell in the UK that is affordable?

        Cheers
        These things are easy to buy in the Chinese market and the price is not expensive. It's just that cross-border second-hand goods can easily lead to misunderstandings. I also found the miniature gun4ir light sensor.
        (https://z3.ax1x.com/2021/11/02/IkmHYV.jpg) (https://imgtu.com/i/IkmHYV)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 02, 2021, 08:38:04 am
        Hey all.

        For those of you who have tried solenoids and rumble motors. How does the rumble motor feel compared to a solenoid for auto fire games? Would you recommend it having tried both? Are they strong enough to put in a bigger build like a machine gun/rifle shell?

        I already have a jolt gun for single shot games but Im considering building a machine gun for auto games. Does anyone have a good recommendation for a suitable shell in the UK that is affordable?

        Cheers
        It's very hard to say which one is better or not since it's a very subjective thing  :lol
        But personally I like to have both in my guns, for games with single shots I highly prefer solenoid/recoil, as you can really feel the shock of each blow. But for games that use fullauto a lot, I prefer rumble, as solenoid/feedback in that case can be quite tiresome for both the hand and the ears. I also use rumble for late night play as it's quite silent.
        Feeling of rumble itself is quite different as it's a shake more then a shock (not sure if it's clear  :P).

        Maybe I didn't make it clear. The gun4ir you developed may change the way FPS games experience. And you will become a celebrity in the history of game controller development. And gun4ir it's only a small step away from success. He only needs to be compatible with the win mouse driver and can be controlled by the system.
        Let me reexplain;
        Full support for FPS is impossible without losing support for lightgun game, as mouse input and absulote positioning input are NOT the same.
        The fact some FPS work DOESN'T mean it can work with all.
        And even if it was possible, that isn't the goal of this system, and make the whole 4 led system totally worthless, as it's aimed as aim on sight accuracy lightgun (which isn't possible in FPS as isn't not how FPS work). For only FPS you're better off using a wiimote.
        Many other devices went the FPS route in the past, and failed. As it's nothing more than a gimmick.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 02, 2021, 09:00:14 am
        Cool cheers for the response. I think I'll go for the rumble for now. I can always add a solenoid later. As said, ideally it'd be a uzi build for op wolf/thunderbolt and t2 etc. Just need to find a suitable shell. I see some people built one from a hollowed airsoft gun. There's a £20 spring one that's out of stock everywhere but I've no idea of it has space inside it once the spring mech is removed etc.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 02, 2021, 09:16:44 am
        The electromagnet must be specially designed for the game gun, otherwise it will easily break during continuous operation. Pneumatic structure I have seen, need additional air pump and other components. Miniature cylinders are not easy to buy and are expensive.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 03, 2021, 04:54:27 am
        Do you think this could work? It's very cheaply made but it means it's super cheap in terms of cost. It'd need a new trigger I guess.
        Does it look like it'd have the space for the components and width needed for the camera etc?

        https://youtu.be/uit9swnczMo
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 03, 2021, 08:02:35 am
        Do you think this could work? It's very cheaply made but it means it's super cheap in terms of cost. It'd need a new trigger I guess.
        Does it look like it'd have the space for the components and width needed for the camera etc?

        https://youtu.be/uit9swnczMo
        His space is big enough, but there are too many places to transform. An opening is also required to install the microswitch.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 03, 2021, 08:40:51 am
        Do you mean that I'd need to make holes for extra buttons etc?

        That'd be true of any custom build.

        Also, Im not sure what you mean by "places to transform"
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 03, 2021, 10:22:23 pm
        The original internal structure shall be basically removed to make room for the installation of new parts. Glue may also be required to secure the microswitch. This is a necessary step for refitting a toy gun. If you also need to install an electromagnet, you need to consider its volume. At present, I use the original special model of the game gun. Its volume and weight need to be considered. In addition, the price is a little high.
        (https://z3.ax1x.com/2021/11/04/IZixBR.jpg) (https://imgtu.com/i/IZixBR)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 04, 2021, 06:11:44 am
        Yeah I get that. I've already converted a jolt gun to an aimtrak.

        I'm actually changing my mind tho. As much as I'd like an uzi to mimic Op wolf. I might just get a top shot and copy what arcade pirate did. The idea of having a cock slide is pretty cool and can be used in different ways for a number of different games. Plus its only £18

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 04, 2021, 08:10:56 am
        ok, ordered my first batch of stuff. Couldnt get the transistor from this site as they were out of stock. Everything else will probably come from amazon.

        All from Farnell.co.uk

        IR Positioning Camera, For Arduino Development Boards
        3517916   SEN0158   £18.99   1   £18.99
           
        Power MOSFET, N Channel, 100 V, 36 A, 0.044 ohm, TO-220AB, Through Hole
        8651078   IRL540NPBF   £1.66   1   £1.66
           
        Standard Recovery Diode, 50 V, 1 A, Single, 1.1 V, 30 A
        2889052   1N4001-E3/54   £0.284   5   £1.42
           
        Through Hole Resistor, 1 kohm, R Series, 250 mW, ± 0.1%, Axial Leaded, 500 V
        1083251   YR1B1K0CC   £0.639   1   £0.64
           
        Through Hole Resistor, 100 kohm, R Series, 250 mW, ± 0.1%, Axial Leaded, 250 V
        1083469   YR1B100KCC   £0.639   1   £0.64
           
        Through Hole Resistor, 270 ohm, ROX Series, 1 W, ± 5%, Axial Leaded, 350 V
        1738579   ROX1SJ270R   £0.144   1   £0.14
           
        Ceramic Disc Capacitor, 0.1 µF, 50 V, +80%, -20%, Y5V, 5 mm, Radial Leaded (frustratingly you had to buy a min of 10)
        9411887   MCFYU6104Z6   £0.186   10   £1.86
           
        Infrared Emitter, High Power, 25 °, T-1 (3mm), 100 mA, 1.35 V, 940 nm, 800 ns (bought 15 to give me 3 spares)
        Date/Lot Code
        1045420   TSAL4400   £0.388   15   £5.82
           
        Through Hole Resistor, 10 ohm, R Series, 250 mW, ± 0.1%, Axial Leaded, 250 V   (For the 3 led clusters (1.35v at 100ma))
        1083036   YR1B10RCC   £0.639   1   £0.64

        I have some electronics knowledge but if anyone spots something wrong then please let me know.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 04, 2021, 12:42:33 pm
        Second set ordered

        Ebay -
        360 motor pair £6
        10 x pn2222 transistors £2

        Amazon
        3 usb micro cables £7 - https://www.amazon.co.uk/gp/product/B07WNX1B8C/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
        3 x atmega32U4 pro micro £21 - https://www.amazon.co.uk/gp/product/B08LL9821L/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
        Top gun elite £20 - https://www.amazon.co.uk/gp/product/B004Q3RDQ6/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
        PCB's £5 (turns out these come with all the resisters I needed, sigh!) - https://www.amazon.co.uk/gp/product/B081JRTWYN/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1


        Things I already had
        Real arcade gun with a replaced stronger solenoid (Solenoid Tubular, NSF, 18mm Pull, SDT2652 L231) - 28N pull fully energised with a 36v supply - 60% duty cycle (i.e fine for full auto as long as off more than its on). Or you can run it at 24v for 22N fully energised
         and 100% duty cycle (means you can leave it on forever)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: SuperMagoAlex on November 04, 2021, 01:58:42 pm
        Top gun elite £20 - https://www.amazon.co.uk/gp/product/B004Q3RDQ6/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

        I'm modding the same gun (Xbox 360 version)  :)

        I just finished led RGB cruit, recoil and rumble circuit. Now I'm making led IR circuit  :applaud:

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 04, 2021, 02:11:36 pm
        Ah cool. I'm not going to bother with the RGB circuit or a recoil one. (the recoil parts I got are to convert my jolt gun from aimtrak to gun4ir).

        That said, maybe I misunderstood what the rgb one is for. it just flashes when you fire right?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on November 04, 2021, 04:35:02 pm
        Ah cool. I'm not going to bother with the RGB circuit or a recoil one. (the recoil parts I got are to convert my jolt gun from aimtrak to gun4ir).

        That said, maybe I misunderstood what the rgb one is for. it just flashes when you fire right?
        It flashes when you shoot or change modes.

        I am looking at removing the mode button on mine and made rgb brightness at minimum as it was annoying.

        I guess some people need this, but as a gun controller for an arcade machine, I want minimal user configuration in order to not have to redo it all the time when guests play with it.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 04, 2021, 08:57:28 pm
        ok, ordered my first batch of stuff. Couldnt get the transistor from this site as they were out of stock. Everything else will probably come from amazon.

        All from Farnell.co.uk

        IR Positioning Camera, For Arduino Development Boards
        3517916   SEN0158   £18.99   1   £18.99
           
        Power MOSFET, N Channel, 100 V, 36 A, 0.044 ohm, TO-220AB, Through Hole
        8651078   IRL540NPBF   £1.66   1   £1.66
           
        Standard Recovery Diode, 50 V, 1 A, Single, 1.1 V, 30 A
        2889052   1N4001-E3/54   £0.284   5   £1.42
           
        Through Hole Resistor, 1 kohm, R Series, 250 mW, ± 0.1%, Axial Leaded, 500 V
        1083251   YR1B1K0CC   £0.639   1   £0.64
           
        Through Hole Resistor, 100 kohm, R Series, 250 mW, ± 0.1%, Axial Leaded, 250 V
        1083469   YR1B100KCC   £0.639   1   £0.64
           
        Through Hole Resistor, 270 ohm, ROX Series, 1 W, ± 5%, Axial Leaded, 350 V
        1738579   ROX1SJ270R   £0.144   1   £0.14
           
        Ceramic Disc Capacitor, 0.1 µF, 50 V, +80%, -20%, Y5V, 5 mm, Radial Leaded (frustratingly you had to buy a min of 10)
        9411887   MCFYU6104Z6   £0.186   10   £1.86
           
        Infrared Emitter, High Power, 25 °, T-1 (3mm), 100 mA, 1.35 V, 940 nm, 800 ns (bought 15 to give me 3 spares)
        Date/Lot Code
        1045420   TSAL4400   £0.388   15   £5.82
           
        Through Hole Resistor, 10 ohm, R Series, 250 mW, ± 0.1%, Axial Leaded, 250 V   (For the 3 led clusters (1.35v at 100ma))
        1083036   YR1B10RCC   £0.639   1   £0.64

        I have some electronics knowledge but if anyone spots something wrong then please let me know.
        Excluding the shell, how much do you need to refit a part? Calculate it in detail.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 05, 2021, 03:34:00 am
        If you read down I mention the shell in my next post! (I even provide links)

        I've enough components to convert 2 guns with the exception of a second camera since farnell only had 1 left. I'll add it all up later once I'm done.

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 08, 2021, 03:16:37 pm
        Ah ha!
        Turns out I made a mistake. I only ordered 1x10ohm resistor. But of course I'll need one per sensor array.
        Thankfully as I mentioned. The pcbs came with a whole slew of resistors including 10ohm ones. Phew!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 09, 2021, 02:48:12 pm
        Just about to start and I found I need a couple more questions answered.

        Do people recommend the small or large 360 rumble motor? I see in the pdf image its using the large one but I also saw that Arcade pirate uses the small one.
        and
        Does the resistor value matter much for connecting it? The pdf says 270-1k. The schematic uses the 270 and the picture the 1k. IS it using 1k specifically because its a 360 motor? (Arcade pirate uses 650ish)

        Cheers

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 09, 2021, 08:34:57 pm
        Just about to start and I found I need a couple more questions answered.

        Do people recommend the small or large 360 rumble motor? I see in the pdf image its using the large one but I also saw that Arcade pirate uses the small one.
        and
        Does the resistor value matter much for connecting it? The pdf says 270-1k. The schematic uses the 270 and the picture the 1k. IS it using 1k specifically because its a 360 motor? (Arcade pirate uses 650ish)

        Cheers

        Pod
        I actually recommend a PS4 rumble motor instead, the Chinese Xbox 360 ones are actually PS2 7.5v ones and are using too much current in 5v. Original ones work tho, but that means sacrificing a controller.
        I don't recommend 270 anymore as it had some issues with some schematics.
        But anything between 500 and 1k should work.
        The resistor doesn't drive the motor itself, just the command circuit. Motor doesn't matter.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 10, 2021, 01:48:24 am
        Ah OK. I've already bought them so I guess maybe what I'll do is swap them into my original 360 pad and use the ones I take out then.

        Cheers
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on November 11, 2021, 06:36:23 pm
        The pieces I have imported are finally arriving! Now it's time to plan how to build my GUN4IR :D

        People who used the Top Shot Elite Gun... It's possible to use it's buttons and sticks as they are?
        And it's possible to use the gun's camera? (it's a wiimote camera?)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 11, 2021, 09:15:52 pm
        The pieces I have imported are finally arriving! Now it's time to plan how to build my GUN4IR :D

        People who used the Top Shot Elite Gun... It's possible to use it's buttons and sticks as they are?
        And it's possible to use the gun's camera? (it's a wiimote camera?)
        Yeah I think it's possible to use the buttons and sticks. Not so sure about the camera tho, probably not (most of those third party cams are old sensors that support only 2 led points at a time).
        I haven't modded one myself, but I believe some people in my discord server did, you can join the server if you want, to get more info on that  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on November 12, 2021, 07:23:19 am
        I will. Thanks!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: holmes on November 12, 2021, 01:51:37 pm
        Hi,
        I am about to start to mod 2 toy guns. I wonder if a rumble motor will fit in and I I did not find the dimensions so far. Could someone give me the dimensions of a PS4 rumble motor? Also is there a way to power it with the arduino or is it compulsary to have 2 USB cables (one for the arduino, one for the motor power supply)?

        Thanks,
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 13, 2021, 03:10:46 am
        Hi,
        I am about to start to mod 2 toy guns. I wonder if a rumble motor will fit in and I I did not find the dimensions so far. Could someone give me the dimensions of a PS4 rumble motor? Also is there a way to power it with the arduino or is it compulsary to have 2 USB cables (one for the arduino, one for the motor power supply)?

        Thanks,
        You can use 0.3 square 6-core cable or network cable.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 13, 2021, 03:26:39 am
        I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.
        (https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 13, 2021, 05:31:21 am
        Hi,
        I am about to start to mod 2 toy guns. I wonder if a rumble motor will fit in and I I did not find the dimensions so far. Could someone give me the dimensions of a PS4 rumble motor? Also is there a way to power it with the arduino or is it compulsary to have 2 USB cables (one for the arduino, one for the motor power supply)?

        Thanks,
        For PS4 rumble you can power it from the main USB cable, no issues  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 16, 2021, 02:43:22 am
        Update on mine. I've hooked up the rumble, trigger, slide and camera. All tested and working. Just need to sort out the side button (just behind the camera) and then I can reassemble. (plus some cable management)

        I'll defo get a wide angle lens. It's just a tiny bit far to far back I feel.
        Will any phone intended one work? I assume I'll just grab the cheapest from amazon.

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 16, 2021, 02:53:07 am
        Pic for ref

        https://drive.google.com/file/d/1XSD0SbzPJ8CioJSQ10gUdhP93z3nQ0Eg/view?usp=drivesdk
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: codeena on November 16, 2021, 12:45:30 pm
        The original internal structure shall be basically removed to make room for the installation of new parts. Glue may also be required to secure the microswitch. This is a necessary step for refitting a toy gun. If you also need to install an electromagnet, you need to consider its volume. At present, I use the original special model of the game gun. Its volume and weight need to be considered. In addition, the price is a little high.
        (https://z3.ax1x.com/2021/11/04/IZixBR.jpg) (https://imgtu.com/i/IZixBR)

        Hi, may I ask where you get your rubber damperers for the recoil? Thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 17, 2021, 04:35:08 am
        Ordinary rubber is OK. The hardness of waste automobile tires is more appropriate
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: holmes on November 19, 2021, 02:14:04 am

        For PS4 rumble you can power it from the main USB cable, no issues  ;D
        [/quote]
        Can I just cut a USB cable, split the power wires and resolder the data wires? Will it cause trouble with the data? Or is it safer to use a USB splitter data+power cable?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on November 19, 2021, 05:54:42 am

        For PS4 rumble you can power it from the main USB cable, no issues  ;D
        Can I just cut a USB cable, split the power wires and resolder the data wires? Will it cause trouble with the data? Or is it safer to use a USB splitter data+power cable?
        [/quote]
        No no you don't need to split it, just use the board "raw" and gnd pins  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 19, 2021, 11:24:46 am
        Man, why did nobody say that mounting the x360 rumble in the handle of the topshot elite was so hard! I've melted all of the plastic and made it as flat as possible and there still not enough room! :D
        Going to have to melt out a recess in the 2mm thick wall and hope I dont burn through the whole handle.
        Did Arcade Pirate use a rumble motor that was 80% in size? :D

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 19, 2021, 03:26:30 pm
        Phew, all assembled. Next step, working out mame hooker and getting the gun swapped from com6 to com1
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 19, 2021, 06:28:09 pm
        OK I got stuck. 2 things I couldnt figure out and 1 that I find confusing

        Jaybee - I set Trigger, A and B to be Mouse Left, Mouse Right, "Keyboard B" respectively. But in mame the inputs are registered as Gun3 B0,  Gun3 B0, "keyboard B". If I change the A button to be "Keyboard A" then in mame it registers as Gun3 B2!
        Any idea whats going on? (Edit - I've now noticed that after uploading the settings and hitting reload - that the A button is reverting to Middle mouse, so that looks like its just failing to upload correctly?)

        Howard_Casto - I cant seem to get mamehooker to recognise MameUI.exe. Is that not supported or am I doing something wrong? If I change the exe to be mame64.exe it works fine

        Anyone who can help - In Op wolf I've used the following ini settings for mamehooker to control the rumble motor
        MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1,cmw 1 S1
        MameStop=cmc 1
        [Output]
        Player1_Recoil_Piston=cmw 1 F1.0.0|cmw 1 F1.1.255

        That seems to work fine if I'm tapping the trigger but if I hold the button and run out of bullets the motor stops as expected while I'm auto-reloading but wont come back on for another X (can be a whole clip in rare circumstances) bullets or so. It is random tho. Sometimes it does work correctly. Releasing and pressing the trigger seems to 100% restart the motor. I can see in mamehookers debug window that the piston value is changing correctly.

        Cheers for any help guys

        Pod
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Podbod on November 20, 2021, 03:35:43 am
        Jaybee, one more thing. For Terminator 2 I use Hooker to set an on time of 35 with a 0ms pause time. This is roughly the speed of the pulse that it sends out from the game. So I use "cmw 1 f1.2.1" to send each pulse to the gun. That works but 35ms is right on the limit of getting the rumble to do a full rotation so sometimes it feels weak. Ideally I'd like to up that to a 45ms on time but then I run into the problem that all the pulses end up getting queued and the gun rumbles on after I let go of the trigger for a while.

        Could we potentially get a feature to set a maximum pulse queue to prevent that? (apologies if that already exists and I missed it)

        Cheers
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on November 24, 2021, 01:54:07 am
        Every time I shoot, I can only trigger the electromagnet once. How can I trigger it continuously and automatically.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: GRA71 on December 06, 2021, 01:25:33 pm
        Hello,

        Does anyone know how to calculate resistors to install a 5V solenoid instead of 12V. In 12V, you need a resistance of 1Kohm and 100Kohms.
        It is to save space.
        Thank you
        (https://zupimages.net/up/21/49/oiqr.jpg)

        (https://zupimages.net/up/21/49/fr2c.png)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Loey575 on December 10, 2021, 06:22:48 am
        Hello,

        Does anyone know how to calculate resistors to install a 5V solenoid instead of 12V. In 12V, you need a resistance of 1Kohm and 100Kohms.
        It is to save space.
        Thank you
        (https://zupimages.net/up/21/49/oiqr.jpg)

        (https://zupimages.net/up/21/49/fr2c.png)
        You can use the same resistors, they only control the operation of the MOSFET, and not the solenoid
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: agent_c on December 12, 2021, 05:59:42 am
        Has anyone converted the gun con 2's by using samco's replacement board and then using Jaybee's 4 point ir/software? I just managed to get two gun con 2 guns for £10 and would like the simplicity of putting in the board from Samco as it will be easier and better internally with the arduino mounted and all the wiring neat and tidy, I was going to use a "the real arcade" jolt gun (another £10 buy) to convert but the gun con2 looks like a better option to me, especially as I will have two of them.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 12, 2021, 06:27:41 am
        Has anyone converted the gun con 2's by using samco's replacement board and then using Jaybee's 4 point ir/software? I just managed to get two gun con 2 guns for £10 and would like the simplicity of putting in the board from Samco as it will be easier and better internally with the arduino mounted and all the wiring neat and tidy, I was going to use a "the real arcade" jolt gun (another £10 buy) to convert but the gun con2 looks like a better option to me, especially as I will have two of them.
        The Samco board pinout and mine are different, it won't work.
        But I'll sell drop in kits soon for the gcon1/2 if you are interested.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: agent_c on December 12, 2021, 10:10:42 am
        thanks, such a shame, it would have been perfect!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: holmes on December 19, 2021, 12:07:21 pm
        I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.
        (https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
        Could you give a link or directions to find this?
        I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device.  :-[
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on December 20, 2021, 10:03:19 am
        I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.
        (https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
        Could you give a link or directions to find this?
        I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device.  :-[
        This is a camera from China. Its price is not high, but the freight is too high. Can only find friends to buy together and share the freight. You need  infrared LEDs, 3 LEDs and a resistor in series. I use a 25 Ω resistor, which smaller.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: holmes on December 20, 2021, 03:04:35 pm
        Oh, I thought it was a mini LED lamp. My mistake!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: holmes on December 24, 2021, 04:52:40 am
        Hi,
        Is there a way to test the buttons?
        I haven't connected the camera yet. I just wanted to start simply with the buttons and test them. I don't see how to do it in the GUI.
        I launched the camera test and ended it with the trigger but it works only once. Then  I have to disconnect and reconnect the arduino to do it again. I doubt this is a normal behaviour. Have I screwed my solder once again?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on December 24, 2021, 08:04:32 am
        Hi,
        Is there a way to test the buttons?
        I haven't connected the camera yet. I just wanted to start simply with the buttons and test them. I don't see how to do it in the GUI.
        I launched the camera test and ended it with the trigger but it works only once. Then  I have to disconnect and reconnect the arduino to do it again. I doubt this is a normal behaviour. Have I screwed my solder once again?
        I need to make sure your problem is that you can't use it every time you press the button. Do you need to disconnect the USB connection? If yes, you need to check all the solder joints to see if there is short circuit and faulty welding.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: fjser on December 24, 2021, 07:25:28 pm
        Has anyone looked into feasibility of putting gun4ir guts into one of these? I think the biggest issue would be camera mounting since the end is pretty large diameter

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on December 24, 2021, 09:40:25 pm
        Has anyone looked into feasibility of putting gun4ir guts into one of these? I think the biggest issue would be camera mounting since the end is pretty large diameter
        The electromagnet is the problem. It's too big. The camera is not a problem.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Headrush69 on December 27, 2021, 06:05:33 am
        Has anyone converted the gun con 2's by using samco's replacement board and then using Jaybee's 4 point ir/software? I just managed to get two gun con 2 guns for £10 and would like the simplicity of putting in the board from Samco as it will be easier and better internally with the arduino mounted and all the wiring neat and tidy, I was going to use a "the real arcade" jolt gun (another £10 buy) to convert but the gun con2 looks like a better option to me, especially as I will have two of them.
        The Samco board pinout and mine are different, it won't work.
        But I'll sell drop in kits soon for the gcon1/2 if you are interested.
        I have done this. Obviously you can't use the pin header but you can wire them up appropriately. There was plenty of room in the Guncon 2s for this. In my case the original guncon 2 board was in rough shape and this was the easiest, fastest solution for me.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: agent_c on December 28, 2021, 04:44:07 am
        Has anyone converted the gun con 2's by using samco's replacement board and then using Jaybee's 4 point ir/software? I just managed to get two gun con 2 guns for £10 and would like the simplicity of putting in the board from Samco as it will be easier and better internally with the arduino mounted and all the wiring neat and tidy, I was going to use a "the real arcade" jolt gun (another £10 buy) to convert but the gun con2 looks like a better option to me, especially as I will have two of them.
        The Samco board pinout and mine are different, it won't work.
        But I'll sell drop in kits soon for the gcon1/2 if you are interested.
        What are the drop in kits Jay? Cost etc.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: agent_c on December 28, 2021, 04:47:19 am
        Has anyone converted the gun con 2's by using samco's replacement board and then using Jaybee's 4 point ir/software? I just managed to get two gun con 2 guns for £10 and would like the simplicity of putting in the board from Samco as it will be easier and better internally with the arduino mounted and all the wiring neat and tidy, I was going to use a "the real arcade" jolt gun (another £10 buy) to convert but the gun con2 looks like a better option to me, especially as I will have two of them.
        The Samco board pinout and mine are different, it won't work.
        But I'll sell drop in kits soon for the gcon1/2 if you are interested.
        I have done this. Obviously you can't use the pin header but you can wire them up appropriately. There was plenty of room in the Guncon 2s for this. In my case the original guncon 2 board was in rough shape and this was the easiest, fastest solution for me.

        Ithought the same, just wire direct and it will work, like you i think the original g con board is just too complicated to leave in and the samco board answers the tidiness and space for stuff, thanks for the reply.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: tarnfeather on December 28, 2021, 12:49:51 pm
        I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.
        (https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
        Could you give a link or directions to find this?
        I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device.  :-[
        This is a camera from China. Its price is not high, but the freight is too high. Can only find friends to buy together and share the freight. You need  infrared LEDs, 3 LEDs and a resistor in series. I use a 25 Ω resistor, which smaller.

        Could you still provide us with the part number or a link to where you ordered it?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: woordmand on December 30, 2021, 10:57:50 am
        I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.
        (https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
        Could you give a link or directions to find this?
        I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device.  :-[
        This is a camera from China. Its price is not high, but the freight is too high. Can only find friends to buy together and share the freight. You need  infrared LEDs, 3 LEDs and a resistor in series. I use a 25 Ω resistor, which smaller.

        Could you still provide us with the part number or a link to where you ordered it?
        I can't find the model number. It's second-hand. You have to consider long distances and shipping costs. And slow transportation.
        https://market.m.taobao.com/app/idleFish-F2e/widle-taobao-rax/page-detail?wh_weex=true&wx_navbar_transparent=true&id=661132861950&ut_sk=1.WylAcgYoPT8DAAiWBjStYn5A_21407387_1640879555623.copy.detail.661132861950.16753707&forceFlush=1 (https://market.m.taobao.com/app/idleFish-F2e/widle-taobao-rax/page-detail?wh_weex=true&wx_navbar_transparent=true&id=661132861950&ut_sk=1.WylAcgYoPT8DAAiWBjStYn5A_21407387_1640879555623.copy.detail.661132861950.16753707&forceFlush=1)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Kalypso9 on December 31, 2021, 10:37:59 am
        Hi , I’ve recently donate for the license in waiting for it , thanks for all , one question , software work properly on windows 7 ?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: agent_c on December 31, 2021, 04:26:33 pm
        License arrived for me as quick as i read my messages on discord... Setup and testing worked without a hitch.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: agent_c on December 31, 2021, 04:54:24 pm
        Thanks for the cool work on the gun4ir setup and instructions Jaybee, all went without a hitch, (well so far!) I have to say I was nervous about permanently mounting the ir leds as it meant drilling the screen surround but I think it looks just fine, and yes I offset the side led's a bit on purpose as well as angling the outside top and side ones to gain a better accuracy.
        Looks good don't ya think :)
        Awesome to now have the light gun games available.
        Thanks again.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on December 31, 2021, 08:33:58 pm
        Good job on the bezel, @agent_c
        It does look good.

        I did similar, but my bezel being black I believe helps better hiding the leds.

        In any case, it's not very noticeable.

        Enjoy!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 31, 2021, 11:33:12 pm
        Hi , I’ve recently donate for the license in waiting for it , thanks for all , one question , software work properly on windows 7 ?
        Yeah it does, just need to install the drivers included in the drivers subfolder.
        Thanks for the cool work on the gun4ir setup and instructions Jaybee, all went without a hitch, (well so far!) I have to say I was nervous about permanently mounting the ir leds as it meant drilling the screen surround but I think it looks just fine, and yes I offset the side led's a bit on purpose as well as angling the outside top and side ones to gain a better accuracy.
        Looks good don't ya think :)
        Awesome to now have the light gun games available.
        Thanks again.

        Awesome, it looks great! Glad you are enjoying it  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: hassansardar on January 06, 2022, 03:12:27 am
        Dear how can i donate you it says you cannot donate from this country please help ??? :'( :'(
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: atsumori on January 14, 2022, 11:03:21 pm
        Hi, I’m really interested in gun4IR but I’m wondering if somewhere there’s a guide or post that goes in more detail with how to setup a wireless solution for gun4iR?  I’m trying to figure out the best Bluetooth solution and how to wire up a rechargeable battery but I haven’t really worked with Arduino before so I’m not really sure where to start.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: marcusandre on January 22, 2022, 10:08:27 pm

        The Samco board pinout and mine are different, it won't work.
        But I'll sell drop in kits soon for the gcon1/2 if you are interested.
        [/quote]

        Any update on this?
        Wanna get yours or Samco, but pref Gun4ir, but the PCB is break or make kind of.
        Great work!
        Regards
        Marcus
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: rbarr110 on January 25, 2022, 08:45:19 pm
        Is this a workable alternate to the DFrobot IR camera?  They claim it will be back in stock very soon.....
        https://www.robotshop.com/en/ir-tracking-camera.html#product-reviews

        Edit:  I may have answered my own questions, looking at some of the data sheets, it appears to have DFR in the part numbers, so it is likely a DFrobot camera.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: rbarr110 on February 23, 2022, 06:18:23 pm
        Has anyone used these IR leds.....if so, how are you powering them? I am pretty sure they require more power draw than a USB port typically puts out.

        https://www.aliexpress.com/item/32869020004.html?spm=a2g0o.productlist.0.0.776e4e66KafRvT&algo_pvid=a744b281-a57a-46cf-803c-377b81a58b44&algo_exp_id=a744b281-a57a-46cf-803c-377b81a58b44-0&pdp_ext_f=%7B%22sku_id%22%3A%2266709189116%22%7D&pdp_pi=-1%3B9.86%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch

        Thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: sonik on February 24, 2022, 03:20:23 pm
        Has anyone used these IR leds.....if so, how are you powering them? I am pretty sure they require more power draw than a USB port typically puts out.

        https://www.aliexpress.com/item/32869020004.html?spm=a2g0o.productlist.0.0.776e4e66KafRvT&algo_pvid=a744b281-a57a-46cf-803c-377b81a58b44&algo_exp_id=a744b281-a57a-46cf-803c-377b81a58b44-0&pdp_ext_f=%7B%22sku_id%22%3A%2266709189116%22%7D&pdp_pi=-1%3B9.86%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch

        Thanks

        I've bought some of those LEDs but I have not used them yet. Try asking in the discord server.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: shinichi on March 08, 2022, 01:28:59 am
        Hello everyone

        i have this problem when i start the JB_GUN4IR_GUI.exe

        I have already flashed the arduino, but when I try to configure it, this window appears with this error and the gun is not detected. I built the camera with a wiimote

        (https://blogger.googleusercontent.com/img/a/AVvXsEjVe_pyTrPDBBWJyjewbyRxuoJBYGBU5RxgNzqazKFvCFH4sjhJkHVus-z2jvX0fnSHOXxx6-bqjljG9XnOcQrNSWcUXHB70OloChmzpO9bNrslzZLExnQPgOcuKLeEwQDH3gF71NCOaeBjfHdcFWL2kMeX1d0gPiYa3IIg87a0rNrBEmf2hFpSDKzTcA=s912)

        this is the error message

        See the end of this message for details on invoking
        just-in-time (JIT) debugging instead of this dialog box.


        ************** Exception Text **************
        System.InvalidOperationException: The port is closed.
           at System.IO.Ports.SerialPort.Write(String text)
           at System.IO.Ports.SerialPort.WriteLine(String text)
           at JB_GUN4IR_GUI.MainGUI.getEepData(SerialPort _serialPort, Int32 addr, Int32& eepData)
           at JB_GUN4IR_GUI.MainGUI.detectArd(Boolean clear, Boolean nbr, String[,] boardList, String name, String board, Boolean isSerial)
           at JB_GUN4IR_GUI.MainGUI.detectGuns()
           at JB_GUN4IR_GUI.MainGUI.detectBut_Click(Object sender, EventArgs e)
           at System.Windows.Forms.Control.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ButtonBase.WndProc(Message& m)
           at System.Windows.Forms.Button.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


        ************** Loaded Assemblies **************
        mscorlib
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4470.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
        ----------------------------------------
        JB_GUN4IR_GUI
            Assembly Version: 1.22.0.0
            Win32 Version: 1.22.0.0
            CodeBase: file:///C:/Users/Shin/Documents/proyectos/JB%20GUN4%20IRmanual%20de%20usuario%20v%201.2%20Ingles%20y%20Espa%C3%B1ol/JB_GUN4IR_GUI_1.26_FW_2.64/JB_GUN4IR_GUI.exe
        ----------------------------------------
        System.Windows.Forms
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
        ----------------------------------------
        System
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
        ----------------------------------------
        System.Drawing
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
        ----------------------------------------
        System.Core
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4470.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
        ----------------------------------------
        System.Configuration
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
        ----------------------------------------
        System.Xml
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4084.0 built by: NET48REL1
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
        ----------------------------------------

        ************** JIT Debugging **************
        To enable just-in-time (JIT) debugging, the .config file for this
        application or computer (machine.config) must have the
        jitDebugging value set in the system.windows.forms section.
        The application must also be compiled with debugging
        enabled.

        For example:

        <configuration>
            <system.windows.forms jitDebugging="true" />
        </configuration>

        When JIT debugging is enabled, any unhandled exception
        will be sent to the JIT debugger registered on the computer
        rather than be handled by this dialog box.

        --------------------------------------------------------------------------------

        Thank you very much to those who want to help me with this error


        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: will1384 on March 14, 2022, 04:06:50 pm
        I started off with a SAMCO modified GUNCON 2 gun, but decided to go with GUN4IR, I used a jewelers saw to cut the pin headers that I had used to connect the Adafruit ItsyBitsy to the SAMCO board, I then used a de-soldering gun to remove the pin headers from both the Adafruit ItsyBitsy and the SAMCO board, I found some nice ribbon wire with a bunch of different colors and cut it to about three inches in length or about 76mm, I made up a "cheat sheet" that showed me the pin-out of the SAMCO board and the GUN4IR Pro Micro, then I just wired the GUN4IR Pro Micro to the SAMCO board using the ribbon wire, I then hot glued all the wire in place to keep them from breaking off at the solder joint, it works well, something to remember, the SAMCO (reload) is the GUN4IR (pedal) and the GUN4IR (calibration) is the SAMCO (pedal), kinda confusing, I added a small momentary contact button to the GUNCON 2 to act has the GUN4IR (calibration), the small button is wired to the SAMCO (pedal) pads, BTW I found a nice 3D printed part to connect a cheap phone fisheye lens to the IR sensor, it was made for the GUNCON45 but seems to work just fine on the GUNCON2, the file is over at:

        https://arcadeforever.forumfree.it/?t=78234617&st=255

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: vk123 on April 04, 2022, 10:02:49 am
        Hi,

        I am unable to donate with the link given , it says donation isn't supported from my country (india).

        Could you help me out with this please.

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: jimbone007 on April 10, 2022, 02:10:31 pm
        Are there any tutorials for setting up gun4ir with most emulators/roms in launchbox? Im having a hell of a time getting these guns to work and its becoming very time consuming. Also do I need to have buttons on my guns? Can I map the buttons to my keyboard until I get my actual arcade set up built? a couple games I'm trying require in game calibration of guncons (ps2) and tell you to hit a to finish but I can't figure out how to map a to my keyboard.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: krayon on May 27, 2022, 09:47:13 am
        @JayBee,

        Great project - especially for those in Countries that don't allow even imitation guns to be sent in the mail like Australia :censored: I've been wanting guns for years and this may indeed be an option.

        Just FYI, given that your firmware is based on https://github.com/samuelballantyne , in some countries you are likely legally required to provide the source code and/or have a license with the original author in order to distribute. Having said that, I'm not a Lawyer :P
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: nightkiller05 on May 30, 2022, 11:03:15 am
        Hi guys, ¿is this project private? I mean, do I need to donate in order to access to the manual and/or firmware? I don't see any of these in the first post
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mosios on June 02, 2022, 10:55:45 am
        Hello everyone

        i have this problem when i start the JB_GUN4IR_GUI.exe

        I have already flashed the arduino, but when I try to configure it, this window appears with this error and the gun is not detected. I built the camera with a wiimote

        (https://blogger.googleusercontent.com/img/a/AVvXsEjVe_pyTrPDBBWJyjewbyRxuoJBYGBU5RxgNzqazKFvCFH4sjhJkHVus-z2jvX0fnSHOXxx6-bqjljG9XnOcQrNSWcUXHB70OloChmzpO9bNrslzZLExnQPgOcuKLeEwQDH3gF71NCOaeBjfHdcFWL2kMeX1d0gPiYa3IIg87a0rNrBEmf2hFpSDKzTcA=s912)

        this is the error message

        See the end of this message for details on invoking
        just-in-time (JIT) debugging instead of this dialog box.


        ************** Exception Text **************
        System.InvalidOperationException: The port is closed.
           at System.IO.Ports.SerialPort.Write(String text)
           at System.IO.Ports.SerialPort.WriteLine(String text)
           at JB_GUN4IR_GUI.MainGUI.getEepData(SerialPort _serialPort, Int32 addr, Int32& eepData)
           at JB_GUN4IR_GUI.MainGUI.detectArd(Boolean clear, Boolean nbr, String[,] boardList, String name, String board, Boolean isSerial)
           at JB_GUN4IR_GUI.MainGUI.detectGuns()
           at JB_GUN4IR_GUI.MainGUI.detectBut_Click(Object sender, EventArgs e)
           at System.Windows.Forms.Control.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ButtonBase.WndProc(Message& m)
           at System.Windows.Forms.Button.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


        ************** Loaded Assemblies **************
        mscorlib
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4470.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
        ----------------------------------------
        JB_GUN4IR_GUI
            Assembly Version: 1.22.0.0
            Win32 Version: 1.22.0.0
            CodeBase: file:///C:/Users/Shin/Documents/proyectos/JB%20GUN4%20IRmanual%20de%20usuario%20v%201.2%20Ingles%20y%20Espa%C3%B1ol/JB_GUN4IR_GUI_1.26_FW_2.64/JB_GUN4IR_GUI.exe
        ----------------------------------------
        System.Windows.Forms
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
        ----------------------------------------
        System
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
        ----------------------------------------
        System.Drawing
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
        ----------------------------------------
        System.Core
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4470.0 built by: NET48REL1LAST_C
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
        ----------------------------------------
        System.Configuration
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
        ----------------------------------------
        System.Xml
            Assembly Version: 4.0.0.0
            Win32 Version: 4.8.4084.0 built by: NET48REL1
            CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
        ----------------------------------------

        ************** JIT Debugging **************
        To enable just-in-time (JIT) debugging, the .config file for this
        application or computer (machine.config) must have the
        jitDebugging value set in the system.windows.forms section.
        The application must also be compiled with debugging
        enabled.

        For example:

        <configuration>
            <system.windows.forms jitDebugging="true" />
        </configuration>

        When JIT debugging is enabled, any unhandled exception
        will be sent to the JIT debugger registered on the computer
        rather than be handled by this dialog box.

        --------------------------------------------------------------------------------

        Thank you very much to those who want to help me with this error

        Are you using the Wiimote IR camera or DFrobot SEN0158? If it is the former, then it could be your connections on the IR camera is wrong.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 03, 2022, 07:02:27 am
        @JayBee,

        Great project - especially for those in Countries that don't allow even imitation guns to be sent in the mail like Australia :censored: I've been wanting guns for years and this may indeed be an option.

        Just FYI, given that your firmware is based on https://github.com/samuelballantyne , in some countries you are likely legally required to provide the source code and/or have a license with the original author in order to distribute. Having said that, I'm not a Lawyer :P
        The project is in no way based on samco system.
        If I was using his source code, 4 points like I do wouldn't be even be possible.
        Sam did an awesome job with his original project, but making a working 4 leds system like mine was a novelty at the time.
        But good attempt to try getting my source code.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 03, 2022, 07:22:20 am
        Are you using the Wiimote IR camera or DFrobot SEN0158? If it is the former, then it could be your connections on the IR camera is wrong.
        Indeed it sounds like a communication problem with the cam.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: saint on June 03, 2022, 07:57:42 pm
        Rule #1 please folks - thanks!

        http://new.arcadecontrols.com/arcade_message_rules.html
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: apalomares on June 16, 2022, 08:50:35 pm
        I've got a spare DFRobot SEN0158 camera if anyone needs one. £25 + UK postage. Just message if you'd like it.

        Hi.

        Would you still have the ir camera?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mptrs on June 20, 2022, 07:57:53 am
        Looks like all the IR sensors are sold out until end of July?

        If anyone is looking for an Innovation Super Jolt Gun, I have 2 for sale. Still sealed guns, let me know if you are interested.

        Sold from Europe, but I should be able to send them anywhere  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Ugo on June 20, 2022, 12:44:36 pm
        Yea sucks. There's a Worldwide shortage in a lot of parts.
        Question: How do you feel about Gyroscope-Aiming?
        Gyroscope-Aiming is a lightgun that detects the movements of your hands to properly place the cursor on the screen. No IR LEDs or Sensors needed.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 26, 2022, 08:47:11 am
        Yea sucks. There's a Worldwide shortage in a lot of parts.
        Question: How do you feel about Gyroscope-Aiming?
        Gyroscope-Aiming is a lightgun that detects the movements of your hands to properly place the cursor on the screen. No IR LEDs or Sensors needed.
        Gyro aiming have awful drift and literally stops being accurate few seconds of playing after calibration, even on recent hardware.
        Just check the gyro on recent gaming consoles, they need to be recentered all the time.
        The reason why we use IR is because it's the only tech that allow to have precise and stable points of reference.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: BlueGhost on July 02, 2022, 04:02:58 pm
        Will Gun4IR work on a secondary monitors? Or does it need to be used with the primary monitor?

        I'm building a virtual pinball machine, and think the backglass monitor would work good for shooting games.  But the VP software requires the playfield to be the primary monitor.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on July 08, 2022, 08:01:06 pm
        to further my dual monitor 4:3 and 1.78 setup

        is there a possibility to have 2 instances of the software working with 2 sets of LED's, they are both always watching, this way i wont have to switch anything?

        the only other solution would be 2 PC's, 2 monitors, 2 guns etc sitting next to each other.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on July 14, 2022, 04:16:09 am
        to further my dual monitor 4:3 and 1.78 setup

        is there a possibility to have 2 instances of the software working with 2 sets of LED's, they are both always watching, this way i wont have to switch anything?

        the only other solution would be 2 PC's, 2 monitors, 2 guns etc sitting next to each other.
        You do understand that if the gun camera sees the other monitor leds, it won't work, right?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on July 17, 2022, 09:35:31 pm
        may i ask when you will be selling new ones, your website is out of stock.

        will you sell one without solenoid/rumble at a reduced cost.

        may i ask why guncon2 is more expensive than guncon 1.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: filthy1982 on July 22, 2022, 03:05:10 am
        Hi I purchased a license for the gui a year or so ago and I can't find the email anymore here is the email I used if you could resent it that would be great, neilbrooke1982@hotmail.co.uk
        (https://i.imgur.com/xRuyD6N.png)

        GUN4IR®
        The Ultimate 4 Points Lightgun System

        Copyright © and trademark ® Jean-Baptiste Bongrand 2019-2021, All Rights Reserved.
        This system, including hardware and software, is Copyrighted© by Jean-Baptiste Bongrand.
        Any unauthorised / commcerial use of the system or any part of it is strictly prohibited.
        By requesting a license, you are agreeing with those terms.



        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:
        (https://i.imgur.com/SgUVLmO.gif) (https://www.paypal.com/donate?hosted_button_id=KJLJB9KLTFEQA&source=url)
        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.



        You will receive the files needed including the complete user guide to build and use this system in your email box after the donation.

        Everything can also be also accessed from my discord server (recommended if you want to stay up to date and want help):
        JB Discord Server (https://discord.gg/HJyfYja)


        A little preview of the gun system GUI;

        (https://i.imgur.com/snOJSdO.png)

        Some videos to show the system:

        2 cool videos made by Foxhole on Point Blank and Sports Shooting USA, this guy has skills 8)
        https://youtu.be/mcYRB-wIr9M
        https://youtu.be/fi3TZm3PpPQ

        2 other nice videos by hyo2012 that show my system really well;  ;D
        https://youtu.be/7z0xmR6kQok
        https://youtu.be/jZsT_Facpc8

        A review video of the system by Ben:
        https://youtu.be/O6zyrMOQLG4

        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:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on July 25, 2022, 07:31:52 pm
        I've been out of the arcade scene for a few years and getting back into it.  I see lots has changed!

        Question about these guns...  since everything is stored on the gun, can you unplug and swap guns without having to calibrate and set up?  I ask because I wouldn't mind different style guns for different games.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on July 25, 2022, 08:20:24 pm
        may i ask when you will be selling new ones, your website is out of stock.

        will you sell one without solenoid/rumble at a reduced cost.

        may i ask why guncon2 is more expensive than guncon 1.
        To answer your questions;
        1. No ETA yet. I will announce when it's going back online.
        2. No, only fully packed ones. Removing feedbacks wouldn't be worth it as it would still be expensive (still a lot of work). If you want cheap you can go diy.
        3. The gcon2 is a lot more expensive to source and a lot more work to mod.

        Hi I purchased a license for the gui a year or so ago and I can't find the email anymore here is the email I used if you could resent it that would be great
        Sure, I will send you back. I'd recommend to not share your email publicly tho, to avoid spamming.

        I've been out of the arcade scene for a few years and getting back into it.  I see lots has changed!

        Question about these guns...  since everything is stored on the gun, can you unplug and swap guns without having to calibrate and set up?  I ask because I wouldn't mind different style guns for different games.

        Indeed, you just need to calibrate each gun once and then you can plug them anyway you want.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on July 26, 2022, 10:40:19 am
        will you ever go wireless, with no rumble/feedback.

        do you think guncon 2 or 1 is better?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on July 26, 2022, 02:11:12 pm
        will you ever go wireless, with no rumble/feedback.

        do you think guncon 2 or 1 is better?
        That's planned yes, most likely with a custom 2.4GHz wireless to minimize latency. although I don't know if it will be possible to release for the diy version, but more for fhe future fully featured version.

        It's honestly hard for me to choose between gc1 and 2, the gc2 has more button and feels great to hold, but it's harder to mod, and the gc1 has more space inside to mod bigger solenoid and switches.
        If you don't care about feedbacks the gc2 is definitely the best tho.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on July 31, 2022, 07:35:16 am
        Please excuse my dumb questions (lack of knowledge)...

        How many buttons do most shooter games use/need?  I see some guns with a D Pad, what is that used for in the games?  I found some pretty cool looking Logic 3 P99 light guns and would like to do this mod on one.  Some have the D Pad, some don't. 
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on July 31, 2022, 09:07:21 am
        Anyone convert one of these... HORI BERETTA M92FS TARGET or the Thrustmaster Beretta 92FS?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on July 31, 2022, 09:41:54 am
        Found the info I needed :)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on July 31, 2022, 09:50:52 am
        Sorry about all the posts...
        I just want to make sure I get all the right components.  Is this the right IR cam?

        https://www.dfrobot.com/product-1088.html
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on July 31, 2022, 01:56:49 pm
        I DO have an EMS TopGun (think it is a II) and a Time Crisis Gun (think it is a 3 or 4... the one with that god awful side handle with the 'joystick'-  I hated it and will get rid of it if anyone is interested).

        I also bought a couple other guns, and have a Sega shell to work with.  Which is the best to start with, then I can deal with doing customs?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: wbassett on August 04, 2022, 11:30:54 am
        Apologies about all the posts.

        Just waiting now for the DIY kits at RPEG Electronics to come back in stock :)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on September 01, 2022, 02:50:51 pm
        @JayBee

        can you not add a button on the gun like the arcadeguns mini button, it is much better as a reload button in time crisis than having it at the side.

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: rcboosted on September 05, 2022, 12:02:06 am
        Newly registered because of GUN4IR, and I want to build one!  With the extreme parts shortage of DFrobot SEN0158, I just wanted to make sure before I start buying parts.  Does GUN4IR work with Wiimote IR camera?  I read in the thread that it does but I also read that Wiimote is not an absolute position sensor so it won't work? The Wiimote camera also looks a lot different than the SEN0158, it looks more like a traditional webcam based on an instructable build here https://www.instructables.com/Wii-Remote-IR-Camera-Hack/
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RetroRon on September 05, 2022, 08:45:06 pm
        The original Wii remote IR camera is an absolute positioning sensor capable of tracking 4 infrared points. Most will tell you that the SEN0158 uses cameras salvaged from Wii remotes.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: rcboosted on September 06, 2022, 01:45:25 am
        The original Wii remote IR camera is an absolute positioning sensor capable of tracking 4 infrared points. Most will tell you that the SEN0158 uses cameras salvaged from Wii remotes.

        Thanks for the reply. I've begun ordering parts.  The Wii Remotes are like $3 on ebay for "parts". It might be a cheaper option even if SEN0158 comes back in stock.


        Anyone know if this crystal will work on the Wii Camera?  https://www.aliexpress.com/item/3256804229927403.html

        *edit* for future references, I ordered https://www.aliexpress.com/item/2251832824182546.html that is suggested as known to work.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TapeWormInYourGut on September 06, 2022, 07:05:11 pm
        Element14 won't have the SEN0158 again until July 2023 according to their site. That's over a year you'd be waiting. History of general availability shows stock every 6 or so months, and they're sold out in less than 30 days. The best reason to get a SEN0158 is its barrel shape, and can get an adapter for the wide lense. But the Wiimote sensors are cheaper for sure. You'll just need to mount with a little bit more effort. I wouldn't wait a year for a SEN0158 though, that's insane.

        I purchased the board kits from rpegelectronics.com (http://rpegelectronics.com). I have Aimtrak-modded Namco knockoffs (the "Named" guns), but am just so disappointed in their accuracy as it doesn't really like movement... Finally decided to try GUN4IR and will mod those in instead.

        This place says hat they will have some in October. Never used them though..
        https://www.robotshop.com/en/ir-tracking-camera.html
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Jmaillier on September 18, 2022, 02:23:04 pm
        Dear JayBee, I have made a donation, in the name of Martina Land, can you send me a private message? I don't have the option.
        Thank you very much!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 1942 on September 22, 2022, 01:39:26 am
        Hi all, I am trying to get a Wii IR camera to work with either a Teensy 2.0 or the Arduino Micro, but no luck so far.  I have followed JB's instructions and have been able to get all buttons, LED colours, rumble and solenoid working using the test app.  However the camera does not pick anything up either in the test screen or the calibration screen.

        I have tried trouble shooting by doing the following:

        Reflash the teensy board (done)
        Tested continuity and all connections (done)
        Try different teensy board (done)
        Try an arduino micro board (done)
        Try a different pullup resistor value (33K and 2K7) on the camera module. - done
        Try a different camera module –pulled out of another Wiimote - done
        Try another 3.3v supply to the camera in case there is not enough amps from the controller– done used a bench power supply
        Try different LEDs - done, I even rigged up two Wii sensor bars in case the LEDs are dodgy or the wrong wavelength
        Try on a different windows computer – done on windows 10 and windows 7
        Tested the output of the crystal is 24Mhz – tested using oscilloscope ok
         :banghead:

        I am wondering if the SDA and SCL on the teensy/micro need a 5v communication signal but the camera module only communicates using 3.3V? I have checked the output of the SDA and SCL without the camera connected with an oscilloscope and it is showing a peak to peak of 5.2V, but the camera only has 3.3 V.

        Has anyone else been able to get a Wii camera to work as shown in the (attached) diagram?  Or should there be a I2C bus voltage converter shield in between?

        Thanks,
        Steve
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: jimiz on September 27, 2022, 02:04:16 pm
        Hi guys, dry question for experts .... in the absence of the damned unobtainable SEN0158 .... If the WII camIR with adequate connection is used, and fully functional, it works 100% identical to the system with SEN0158 or there are differences ??? , and if so which ones (malfunctions, incompatibilities with the software etc ...) ???

        thanks x 10000 !!!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TapeWormInYourGut on September 27, 2022, 09:51:21 pm
        From what I understand there is no difference. You just need an IR sensor that can identify 4 unique IR sources, which the Wii has.

        The link I provided above gives an estimated new stock 10/31 if you wanted to try your luck. That might not be accurate at all, or maybe it is who knows  :banghead:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: pacooka on October 04, 2022, 07:29:41 am
        Found this Chinese supplier for the Camera, is this the right part?
        https://www.chxchips.com/en/dfrobot_SEN0158.html
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Ugo on October 04, 2022, 04:14:30 pm
        Found this Chinese supplier for the Camera, is this the right part?
        https://www.chxchips.com/en/dfrobot_SEN0158.html

        Yes, that's the right part number. How did you find this website?
        Are you sure it's not a scam? Especially how it says it'll ship in 24hrs. lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TapeWormInYourGut on October 04, 2022, 06:04:32 pm
        It's probably a valid supplier, but Chinese suppliers on Ebay usually estimate about 1 month shipping on products. It's probably 24 hours to ship it, but then 3-4 weeks to actually receive it.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 05, 2022, 03:38:38 pm
        I am wondering if the SDA and SCL on the teensy/micro need a 5v communication signal but the camera module only communicates using 3.3V? I have checked the output of the SDA and SCL without the camera connected with an oscilloscope and it is showing a peak to peak of 5.2V, but the camera only has 3.3 V.

        Has anyone else been able to get a Wii camera to work as shown in the (attached) diagram?  Or should there be a I2C bus voltage converter shield in between?

        If you are seeing 5v+ on the data lines, you may have cooked the camera(s).  Technically, the pull-ups to the 3.3v rail should provide the 3.3v high signal levels, but that diagram is a little spooky.  Not because it won't work, but because of the possibility that the data pins on the MCU may not always be set to open-drain inputs with internal pull-ups disabled.  This could happen if there is a code/programming issue, or user error (wiring to the wrong pin, etc.) Again, if you are seeing 5v on the data lines, this would seem to be the case as the only other way you should see that level is if your 3.3v rail isn't really 3.3v.

        There's also the I2C V4 spec which calls out a 30% and 70% of VDD for the low and high levels respectively.  70% of 5v = 3.5v, so technically, delivering 3.3v to an 5v device may not be sufficient.  However, at the end of the day, you are still just connected to an I/O pin of an MCU, so those rules should apply unless there is some additional circuitry which comes into play when the pins are used for serial communication.  The only way to know is to look at the datasheet for the MCU and/or the carrier PCB.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 05, 2022, 10:52:47 pm
        @JayBee

        can you not add a button on the gun like the arcadeguns mini button, it is much better as a reload button in time crisis than having it at the side.
        The fully feature gun I am preparing will have a ton of easily accessible buttons, but I will also have a polling for users suggestions and wish list for the final design. I want it to be a lightgun perfectly tailored to everyone's need ;)

        Hi all, I am trying to get a Wii IR camera to work with either a Teensy 2.0 or the Arduino Micro, but no luck so far.  I have followed JB's instructions and have been able to get all buttons, LED colours, rumble and solenoid working using the test app.  However the camera does not pick anything up either in the test screen or the calibration screen.

        I have tried trouble shooting by doing the following:

        Reflash the teensy board (done)
        Tested continuity and all connections (done)
        Try different teensy board (done)
        Try an arduino micro board (done)
        Try a different pullup resistor value (33K and 2K7) on the camera module. - done
        Try a different camera module –pulled out of another Wiimote - done
        Try another 3.3v supply to the camera in case there is not enough amps from the controller– done used a bench power supply
        Try different LEDs - done, I even rigged up two Wii sensor bars in case the LEDs are dodgy or the wrong wavelength
        Try on a different windows computer – done on windows 10 and windows 7
        Tested the output of the crystal is 24Mhz – tested using oscilloscope ok
         :banghead:

        I am wondering if the SDA and SCL on the teensy/micro need a 5v communication signal but the camera module only communicates using 3.3V? I have checked the output of the SDA and SCL without the camera connected with an oscilloscope and it is showing a peak to peak of 5.2V, but the camera only has 3.3 V.

        Has anyone else been able to get a Wii camera to work as shown in the (attached) diagram?  Or should there be a I2C bus voltage converter shield in between?

        Thanks,
        Steve
        Sorry for the late reply.
        I2C is an active low type of signal, so it's working perfectly fine in 3.3v, 5v might damage the cam. Everything on the cam side has to be 3.3v, including the oscillator.
        Please double check everything in the circuit, oscillator, continuity, shorts... as those cams are very sensitive to any small issues.
        You can also join the Discord server, where we will be able to help you more easily.

        If you are seeing 5v+ on the data lines, you may have cooked the camera(s).  Technically, the pull-ups to the 3.3v rail should provide the 3.3v high signal levels, but that diagram is a little spooky.  Not because it won't work, but because of the possibility that the data pins on the MCU may not always be set to open-drain inputs with internal pull-ups disabled.  This could happen if there is a code/programming issue, or user error (wiring to the wrong pin, etc.) Again, if you are seeing 5v on the data lines, this would seem to be the case as the only other way you should see that level is if your 3.3v rail isn't really 3.3v.

        There's also the I2C V4 spec which calls out a 30% and 70% of VDD for the low and high levels respectively.  70% of 5v = 3.5v, so technically, delivering 3.3v to an 5v device may not be sufficient.  However, at the end of the day, you are still just connected to an I/O pin of an MCU, so those rules should apply unless there is some additional circuitry which comes into play when the pins are used for serial communication.  The only way to know is to look at the datasheet for the MCU and/or the carrier PCB.

        By default (when not set up), those lines are always left as floating, so if the lines are properly pulled up to 3.3v with the resistors, they should always be on 3.3v, never 5v. Same when active as I2C, they aren't pulling up to anything, they are either floaty on state high (and rely on the external pullup), or pulled to gnd on state low, so that it works with any device voltage. The state high threshold on that MCU I think is between 1 and 2v.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 06, 2022, 08:44:31 am
        By default (when not set up), those lines are always left as floating, so if the lines are properly pulled up to 3.3v with the resistors, they should always be on 3.3v, never 5v. Same when active as I2C, they aren't pulling up to anything, they are either floaty on state high (and rely on the external pullup), or pulled to gnd on state low, so that it works with any device voltage. The state high threshold on that MCU I think is between 1 and 2v.

        I understand all of that and suspected as much about the MCU levels.  But there is a real-world situation which could end in a dead or damaged Wii camera every time.

        What if a user has an Arduino lying around (who doesn't) which has been used previously for tinkering and has some other code present which has one of those pins set up as an output already and set to high level, or as an input with internal pullups enabled (pretty much common for a switch)?  If they build the circuit first and then apply power to program the arduino, 5v will be connected to the data pins of the Wii camera. 

        So with that particular circuit, it is absolutely imperative that the board is programmed and verified to be working properly prior to attaching it to the rest of the circuit to avoid possible damage.

        That's why I stated that it will work but was a little spooky. 

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: mptrs on October 06, 2022, 09:26:31 am
        Shortage in IR sensors but no shortage in Super Jolt Guns!!

        For the people that are still looking for a Super Jolt Gun. I've got quite some supply. Colours are limited due to restrictions in my country.
        Let me know if you want one: http://forum.arcadecontrols.com/index.php/topic,167013.0.html

        (hope this is more in line with the rules :) )
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: pacooka on October 07, 2022, 08:19:17 am
        Found this Chinese supplier for the Camera, is this the right part?
        https://www.chxchips.com/en/dfrobot_SEN0158.html

        Yes, that's the right part number. How did you find this website?
        Are you sure it's not a scam? Especially how it says it'll ship in 24hrs. lol
        Did a google search :-), i'm also talking with another chinese supplier from Alibaba, they're on vacation now and will respond on the 8-9th oct, I'll update.
        The above supplier, no I never bought from him but he has a PayPal (insurance) so I don't mind.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 07, 2022, 11:19:25 am
        There's also something else not right about that circuit for the Wii camera.  The pinout for the camera calls out 25mhz on the CLK line, but the schematic shows a 24mhz oscillator.  Is the camera being underclocked intentionally, or is one of these in error?

        Starting to think that this is the reason 1942 is not having success, as he is using a 24mhz oscillator, and every reference I have seen to this part calls out a 25mhz clock.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: pacooka on October 08, 2022, 08:06:47 am
        For the IR LED, I would like to use the black 940nm IR LED SIR5028B instead of the transparent ones because I heard they perform better.
        By looking at the calculator, I see that for VCC 1.2V I should use 47 Ohm (for transparent LEDs - 27 Ohm); can someone please advise if this is correct, or point me to the right black LEDs & resistors?

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Ugo on October 08, 2022, 02:08:23 pm
        For the IR LED, I would like to use the black 940nm IR LED SIR5028B instead of the transparent ones because I heard they perform better.
        By looking at the calculator, I see that for VCC 1.2V I should use 47 Ohm (for transparent LEDs - 27 Ohm); can someone please advise if this is correct, or point me to the right black LEDs & resistors?

        Sounds like it should work.
        For me, i use a voltage divider scheme with high wattage resistors to drop the volts and maintain enough amps/watts for the LEDs.
        I use tools like this website https://circuitdigest.com/calculators/voltage-divider-calculator
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Zebidee on October 08, 2022, 08:51:30 pm
        For the IR LED, I would like to use the black 940nm IR LED SIR5028B instead of the transparent ones because I heard they perform better.
        By looking at the calculator, I see that for VCC 1.2V I should use 47 Ohm (for transparent LEDs - 27 Ohm); can someone please advise if this is correct, or point me to the right black LEDs & resistors?

        I know I'm coming in sideways and haven't read all the previous 25 pages of the thread, so I apologise if I misunderstand the context, but...

        It is generally better to run your LEDs in parallel rather than in series.

        That means each LED has its own resistor and 5v power (you daisy chain the 5v, much like we commonly do for grounds). If you have Vcc=5v, forward voltage over LED = 1.2v, want 10mA current, then 380R (for each LED) is the "right" resistor. This is the safe minimum, you can use higher value resistors safely (the LEDs will be less "bright").

        As each resistor/LED pair is only passing 10mA current, you can use any old 1/4W or even 1/8W resistors, don't need to be high wattage rating.

        If wanted, you MAY add another resistor (one, in series) on the 5v supply, to all LEDs, to limit the current a bit more. Again, everything is going to be <30mA so 1/4W rated resistor is fine.

        You CAN wire all the LEDs in series behind a single resistor. However, in practice this often means the last LED is struggling to get enough current, especially as even the best 5v supply will have ripples. Makes the quality of your power supply more important. Also means a single fault anywhere prevents all from working, and makes it more difficult to troubleshoot.

        Love this project, been following for a while, really happy to see more great lightguns happening :D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 09, 2022, 08:21:58 am
        For the IR LED, I would like to use the black 940nm IR LED SIR5028B instead of the transparent ones because I heard they perform better.
        By looking at the calculator, I see that for VCC 1.2V I should use 47 Ohm (for transparent LEDs - 27 Ohm); can someone please advise if this is correct, or point me to the right black LEDs & resistors?

        The current to radiant intensity curve on this part looks to be very linear, and I assume that you want the maximum amount of brightness given that you seem to want to use this part for it's performance characteristics. 

        This particular LED shows to have a continuous current rating of 20ma, so driving it at half that (your stated 10ma per part), while possibly increasing the longevity considerably, is likely to be giving up a good chunk of that performance. If it were me, and based on the data for the part, I would run them "hotter" at 16-18ma which should give them a higher radiant intensity, while providing a bit of a safe zone. 

        Given that it's only 3 LEDs, I'd have no qualms about running them in series with one appropriately sized resistor so long as that worked properly for the application at hand.  However, you do need to be aware that when one LED burns out AND dies in the shorted state OR is no longer consuming it's share of the total current, the other LEDs in the series will also be damaged.  I consider this arrangement a possible problem only in the event of a premature failure, as IR LEDs tend to wear out at a fairly even rate across the board and usually quicker than other types.   So just like the brake pads on either end of a vehicle, if you replace one side due to wear, you might as well replace the other because they are probably due.

        As for the proper wavelength, there is anecdotal evidence out there for 940nm being optimal, but to really know for sure one would need to look at not only the specs for the sensor, but also the specs for the filter material in front of it (if it has one).  Ideally, the filter should be tuned to pass the wavelengths at the highest levels, which match those most favorable to the sensor.  In other words, if the sensor has the highest sensitivity at 850nm, but the filter blocks 15% of light at that frequency, it will be exactly the same as feeding it unobstructed light at a frequency to which it is 15% less sensitive.  So gains will be limited if the optical components are not properly matched to begin with.  The issue is that these components seem to be hacks built on hacks which have little if any official specifications available, meaning that more hacking (and not just with the LEDs) might be necessary to really use them to their fullest potential.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: pacooka on October 09, 2022, 09:38:56 am
        Ugo, Zebidee, and RandyT, thank you for the detailed responses, I really appreciate it.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: CRaccani on October 10, 2022, 04:52:17 pm
        Hey, JayBee
        Just donated to your fabulous project.
        When can I expect the email to access the discord etc.?

        Regards

        Thank you, all good.
        JB contacted me via his Discord channel.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Totophe on October 12, 2022, 05:37:00 pm
        Bonjour à tous Je suis en train de fabriquer ma borne et ce projet du gun 4ir m'intéresse beaucoup. Ma question est si je donne la contribution paypal il y a aussi la liste de pièces à commander ? En attente de votre retour bonne soirée.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: BadMouth on October 13, 2022, 01:38:20 pm
        I haven't followed closely, but noticed recent posts about using a wii camera. 

        I have two awesome looking third party Walther P99 replica Wii guns from way back when we were using glovepie scripts.  :oldman

        To convert them to GUN4IR using the cameras already in them, would I be able to just follow the instructions or is there going to be a lot more to it.
        I'm not looking to go down a rabbit hole......but I'm accustomed to ending up going down a rabbit hole.

        EDIT: I got 8 9 numbered pins (with two sets combined) where the camera board is soldered to the next board.  A quick search for Wii camera shows 8 pins.
        There are lots of tiny surface mount components on the camera board though.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: BadMouth on October 13, 2022, 03:19:53 pm
        It appears there is a piece of software called Lichtknarre that uses 4 IR LED tracking with unmodified Wii remotes.  Looks kinda janky, but I am going to try it.
        Hopefully I have some bare IR LEDs somewhere.  Might try it with the dolphin bar first just to see how the software functions.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 13, 2022, 03:58:49 pm
        I understand all of that and suspected as much about the MCU levels.  But there is a real-world situation which could end in a dead or damaged Wii camera every time.

        What if a user has an Arduino lying around (who doesn't) which has been used previously for tinkering and has some other code present which has one of those pins set up as an output already and set to high level, or as an input with internal pullups enabled (pretty much common for a switch)?  If they build the circuit first and then apply power to program the arduino, 5v will be connected to the data pins of the Wii camera. 

        So with that particular circuit, it is absolutely imperative that the board is programmed and verified to be working properly prior to attaching it to the rest of the circuit to avoid possible damage.

        That's why I stated that it will work but was a little spooky.
        That is why I always recommend flashing the arduino first and/or adding a level shifter to the mix. And as I state in my guides, those DIY schematics aren't for beginners. You must know what you are getting into.
        There is absolutely no way of making a DIY circuit foolproof. But on the few thousand guns made to this day, none got their cams fried for that reason.

        There's also something else not right about that circuit for the Wii camera.  The pinout for the camera calls out 25mhz on the CLK line, but the schematic shows a 24mhz oscillator.  Is the camera being underclocked intentionally, or is one of these in error?

        Starting to think that this is the reason 1942 is not having success, as he is using a 24mhz oscillator, and every reference I have seen to this part calls out a 25mhz clock.

        There is nothing wrong there, the cam itself supports between 23 and 25MHz. I have been using cams with 24MHz for years (as it was the easiest oscillator to get), but 25Mhz works as well.


        I know I'm coming in sideways and haven't read all the previous 25 pages of the thread, so I apologise if I misunderstand the context, but...

        It is generally better to run your LEDs in parallel rather than in series.

        That means each LED has its own resistor and 5v power (you daisy chain the 5v, much like we commonly do for grounds). If you have Vcc=5v, forward voltage over LED = 1.2v, want 10mA current, then 380R (for each LED) is the "right" resistor. This is the safe minimum, you can use higher value resistors safely (the LEDs will be less "bright").

        As each resistor/LED pair is only passing 10mA current, you can use any old 1/4W or even 1/8W resistors, don't need to be high wattage rating.

        If wanted, you MAY add another resistor (one, in series) on the 5v supply, to all LEDs, to limit the current a bit more. Again, everything is going to be <30mA so 1/4W rated resistor is fine.

        You CAN wire all the LEDs in series behind a single resistor. However, in practice this often means the last LED is struggling to get enough current, especially as even the best 5v supply will have ripples. Makes the quality of your power supply more important. Also means a single fault anywhere prevents all from working, and makes it more difficult to troubleshoot.

        Love this project, been following for a while, really happy to see more great lightguns happening :D

        Putting LEDs in parallel is generally a bad idea for few reasons;
        - The more power you need to drop/limit with a resistor, the more power it will need to dissipate, increasing its heat and minimum rating by a lot.
        The rating isn't only related to the current going through it, but also the ratio between input voltate and led forward voltage.
        To give a small exemple, the leds we are currently using/recommending ideally need 80mA, at around 1.5v.
        That's only 37mW per resistor when they are by 3 in series, but 261mW if you use them one by one.
        - The power dropping on last led is also happening in parallel, it's even worse if the wires/resistors/leds have some variations, or if you are using the power supply max current. We use them by 3 because even if there are some variation it's not so much noticeable.
        - More components and more soldering also means more possibilities of failure, especially for DIY stuff  :lol

        For the IR LED, I would like to use the black 940nm IR LED SIR5028B instead of the transparent ones because I heard they perform better.
        By looking at the calculator, I see that for VCC 1.2V I should use 47 Ohm (for transparent LEDs - 27 Ohm); can someone please advise if this is correct, or point me to the right black LEDs & resistors?

        The current to radiant intensity curve on this part looks to be very linear, and I assume that you want the maximum amount of brightness given that you seem to want to use this part for it's performance characteristics. 

        This particular LED shows to have a continuous current rating of 20ma, so driving it at half that (your stated 10ma per part), while possibly increasing the longevity considerably, is likely to be giving up a good chunk of that performance. If it were me, and based on the data for the part, I would run them "hotter" at 16-18ma which should give them a higher radiant intensity, while providing a bit of a safe zone. 

        Given that it's only 3 LEDs, I'd have no qualms about running them in series with one appropriately sized resistor so long as that worked properly for the application at hand.  However, you do need to be aware that when one LED burns out AND dies in the shorted state OR is no longer consuming it's share of the total current, the other LEDs in the series will also be damaged.  I consider this arrangement a possible problem only in the event of a premature failure, as IR LEDs tend to wear out at a fairly even rate across the board and usually quicker than other types.   So just like the brake pads on either end of a vehicle, if you replace one side due to wear, you might as well replace the other because they are probably due.

        As for the proper wavelength, there is anecdotal evidence out there for 940nm being optimal, but to really know for sure one would need to look at not only the specs for the sensor, but also the specs for the filter material in front of it (if it has one).  Ideally, the filter should be tuned to pass the wavelengths at the highest levels, which match those most favorable to the sensor.  In other words, if the sensor has the highest sensitivity at 850nm, but the filter blocks 15% of light at that frequency, it will be exactly the same as feeding it unobstructed light at a frequency to which it is 15% less sensitive.  So gains will be limited if the optical components are not properly matched to begin with.  The issue is that these components seem to be hacks built on hacks which have little if any official specifications available, meaning that more hacking (and not just with the LEDs) might be necessary to really use them to their fullest potential.


        Failing LEDs usually aren't passing juice anymore, so if one fails it's very common that the others don't have any issue. While IR might have shorter life than others, it is still several years of continuous use for the good ones, I wouldn't worry too much about it.
        That being said, the LEDs mentionned there don't seem great. The only reason we recommend the other black led model is because of the model specs themselves, and the esthetic.
        No, the sensor is 100% sure 940nm, and needs a proper additional 940nm filter to work. I have reverse engineered that sensor, studied and used it for years, what I am doing with it is anything but hacky.
        Heck I am using those sensor better than they have been used in the wiimote themselves. DIY doesn't automatically means it comes from amateur work ;)

        Bonjour à tous Je suis en train de fabriquer ma borne et ce projet du gun 4ir m'intéresse beaucoup. Ma question est si je donne la contribution paypal il y a aussi la liste de pièces à commander ? En attente de votre retour bonne soirée.
        Oui, une liste globale les pièces nécessaires.

        I haven't followed closely, but noticed recent posts about using a wii camera. 

        I have two awesome looking third party Walther P99 replica Wii guns from way back when we were using glovepie scripts.  :oldman

        To convert them to GUN4IR using the cameras already in them, would I be able to just follow the instructions or is there going to be a lot more to it.
        I'm not looking to go down a rabbit hole......but I'm accustomed to ending up going down a rabbit hole.

        EDIT: I got 8 9 numbered pins (with two sets combined) where the camera board is soldered to the next board.  A quick search for Wii camera shows 8 pins.
        There are lots of tiny surface mount components on the camera board though.

        Those are most likely different sensors and probably won't work I'm afraid  :-\
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 14, 2022, 04:32:00 am
        There is nothing wrong there, the cam itself supports between 23 and 25MHz. I have been using cams with 24MHz for years (as it was the easiest oscillator to get), but 25Mhz works as well.

        It's still odd that the main guy who seems to have started all of this hacking is calling out a 25mhz oscillator.  I'm assuming that the value was taken from the clock source on the unit he was hacking, but one would have to assume others were doing the same, so something seems to have changed somewhere along the way.  Still, the processor inside the camera has to be affected one way or the other, unless of course it is self-clocking and separate from the camera.

        Quote
        Failing LEDs usually aren't passing juice anymore, so if one fails it's very common that the others don't have any issue. While IR might have shorter life than others, it is still several years of continuous use for the good ones, I wouldn't worry too much about it.

        For the most part, I agree.  LEDs are cheap enough now that it really doesn't matter.  However, I have seen cases where a faulty or damaged LED in series has brought down the others.  As they age or become damaged, the luminous intensity decreases.  The question is "what happens to the power?" when this occurs.  If it's turned to heat instead of light, then no problem.  But if it's just not consumed and allows the unused power to reach the others in the series, then it will degrade those as well.  I looked for this information, but sadly couldn't find much.

        Quote
        No, the sensor is 100% sure 940nm, and needs a proper additional 940nm filter to work. I have reverse engineered that sensor, studied and used it for years, what I am doing with it is anything but hacky.
        Heck I am using those sensor better than they have been used in the wiimote themselves. DIY doesn't automatically means it comes from amateur work ;)

        Here's where I think we don't agree fully ;)

        Anything to do with these particular "blob sensing" cameras is a straight-up hack, unless it's coming from Nintendo.  The manufacturer made these exclusively for them, and the datasheet is a closely guarded secret, to the point that the legal departments seem to be activated if there's a leak and one finds it's way to the internet.  The fact that you can't even get one of the parts without tearing apart an original WiiMote, unless you buy one in a different package pre-extracted by someone else, really says it all.  Now, that in no way is meant to detract from the amazing reverse-engineering work done by those who use them in their projects, just "calling a spade a spade".   

        Now to why 940nm isn't necessarily ideal.  First of all, if you look at similar public facing components from that same manufacturer, it seems that they call out ~850nm.  This could be different for the Nintendo part, so that doesn't necessarily mean anything.  According to the internet, however, the camera is sensitive to a much wider frequency band, limited by a 940nm internal filter.  Why 940nm? Well, again guessing, these "blob sensing" camera systems are hyper-sensitive to stray light, so pushing them farther outside of the visible spectrum makes sense.  On the other side of the coin, you also don't want the sensor to become oversaturated when it is close to the emitters, which again, according to the internet, they are when the 940nm LEDs are used in that proximity.  So it's a balancing game, and it makes a certain amount of sense that the manufacturer would call out something "middle of the road" and then rely on the software controllable "sensitivity" and firmware to monitor and adjust dynamically, based on what the camera is (or isn't) seeing.

        It's probably not necessary to do this and still have it work (possibly perfectly with a specific application), but again, without that 20+ page (based on internet posts) document from the manufacturer, only they and Nintendo knows if it is implemented as well as it could be.  And only they know what else that sensor can do. 

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 14, 2022, 10:28:36 am
        It's still odd that the main guy who seems to have started all of this hacking is calling out a 25mhz oscillator.  I'm assuming that the value was taken from the clock source on the unit he was hacking, but one would have to assume others were doing the same, so something seems to have changed somewhere along the way.  Still, the processor inside the camera has to be affected one way or the other, unless of course it is self-clocking and separate from the camera.
        Yes the 25MHz was only mentionned because that's the oscillator used with it on original hardware, based on the limited knowledge he had at that time. I know for a fact the cam circuit can work from 23 to 25MHz. It does impact its working frequency, but not the way you might think, and doesn't have any negative impact on performance or longevity for our specific use.
        You seem to think I am relying on other people hacky work, or incomplete info found online to use that sensor? You don't know the half of it :lol

        Quote
        For the most part, I agree.  LEDs are cheap enough now that it really doesn't matter.  However, I have seen cases where a faulty or damaged LED in series has brought down the others.  As they age or become damaged, the luminous intensity decreases.  The question is "what happens to the power?" when this occurs.  If it's turned to heat instead of light, then no problem.  But if it's just not consumed and allows the unused power to reach the others in the series, then it will degrade those as well.  I looked for this information, but sadly couldn't find much.
        LEDs that fry usually stops conducting current properly. The power not used anymore by the led doesn't need to go somewhere, it's just not used. If one LED in a series fails the other components only get less power (or no power at all if it's completely dead), which won't harm them in any way. The dying LED can very rarely, in extreme cases burn up, crack or even explode, but even then it's rarely dangerous for the neighbor components.
        Here is a fun list of things that can happen;
        https://en.wikipedia.org/wiki/List_of_LED_failure_modes
        But I am sure you already know that, it's basic electronic stuff  ;D

        Quote
        Anything to do with these particular "blob sensing" cameras is a straight-up hack, unless it's coming from Nintendo. The manufacturer made these exclusively for them, and the datasheet is a closely guarded secret, to the point that the legal departments seem to be activated if there's a leak and one finds it's way to the internet.
        Those sensors are only a variation of an old model that company used to make. Nintendo was just using them, as a client, and not to their full potential, far from it.
        The reason we are using those is that they are by far the most common and easy/cheap to get. For a full commercial and non DIY product, I wouldn't use those at all obviously.
        Docs and informations about this sensor and others indeed aren't available publicly online, but it doesn't mean we can't get very reliable info on them through reverse engineering, research and official docs from other models. If I was limiting myself to simple hacks, barely working libraries or incomplete leaked info found online, my gun wouldn't perform anywhere near as it does now.
        If I wanted a sluggish and unreliable light gun system I would have stayed with a wiimote+software solution  :dunno

        Quote
        The fact that you can't even get one of the parts without tearing apart an original WiiMote, unless you buy one in a different package pre-extracted by someone else, really says it all.
        They just aren't produced anymore, and haven't been for many years.

        Quote
        Now, that in no way is meant to detract from the amazing reverse-engineering work done by those who use them in their projects, just "calling a spade a spade".   
        Thanks. And sure, let's call it a hack :P

        Quote
        Now to why 940nm isn't necessarily ideal.
        It doesn't matter, that specific sensor (and not the several other models from the same company) is essentially designed to work with 940nm, filter or not.
        It was made that way not for technical reasons, but because they didn't want the users to see the leds with their naked eyes, as 850nm can be seen, but still wanted the sensor to perform optimally with them (which a native 850nm sensor wouldn't do).
        Of course the sensor can see the 850nm LEDs as well, because it was hard to make a sensor that only sees 940nm range in a reliable manner. That's the reason why they always need an extra IR pass filter (that black plastic in front of the sensor on the wiimote isn't just for show), as opposed to more recent 850nm sensors.

        Quote
        On the other side of the coin, you also don't want the sensor to become oversaturated when it is close to the emitters, which again, according to the internet, they are when the 940nm LEDs are used in that proximity.
        That or the fact light blobs have a limited size in the sensor memory banks and becomes garbage passed that size. There are also several other issues like internal or external reflections and such  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Zebidee on October 14, 2022, 10:51:49 am
        Thanks for that LED breakdown Jaybee :D

        To give a small exemple, the leds we are currently using/recommending ideally need 80mA, at around 1.5v.
        That's only 37mW per resistor when they are by 3 in series, but 261mW if you use them one by one.

        Those LEDs sure use a lot of power, makes sense to run in series and keep the watts/waste heat down.

        If there is an issue with current supply to a long string of LEDs, in series or parallel, spaced bypass capacitors (suggest/guess ceramic, maybe 103 [0.01uF] to 105 [1uF]) can help to smooth out power droops for those further down the line.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 14, 2022, 03:20:06 pm
        LEDs that fry usually stops conducting current properly. The power not used anymore by the led doesn't need to go somewhere, it's just not used.

        With regard to the failing ones which sever or heat up, I agree.  But those failure modes which leak current past definitely send that extra to the remaining LEDs.

        Quote
        If I wanted a sluggish and unreliable light gun system I would have stayed with a wiimote+software solution  :dunno

        What would lead you to that conclusion?  Is it simply the lack of a good driver or have you concluded that there is something inherently bad/slow about the processor in the Wii remotes?  From what I have been able to gather, all of the important sensor information is available from the Wii controller and would therefore be accessible by code running on a much faster and more powerful processor.  Namely, the one in the PC.

        Quote
        (that black plastic in front of the sensor on the wiimote isn't just for show)

        Heh.  Actually, it might be.  If the camera has an integrated filter, which I assume it does, then the plastic in front is just a window the camera can see through but you can't, in order to hide the inner components.  I.e. just for show :).  However, if the window is further filtering what gets in beyond the integrated filter, then that's a different story.  What does your testing show?

        I'll buy that they didn't want the LEDs in the "sensor bar" to be seen, but oh the cost. 

        What might be an interesting experiment to improve detection would be to remove any internal filter (assuming it's possible and also that it indeed has one tuned for 940nm) and replace it with an external one which is meant for 850nm and use those LEDs.  Spectral response on virtually every silicon-based camera, even on the expensive ones intended for IR, drops by about 50% between 850 and 940nm, and I'm honestly very skeptical that these are much different, especially given the price. 

        Quote
        That or the fact light blobs have a limited size in the sensor memory banks and becomes garbage passed that size. There are also several other issues like internal or external reflections and such  ;)

        It's possible.  But it's probably not necessary to store bitmapped image data, outside of the standard frame-buffer, to get good blob co-ordinates.  I.e. I would think the memory requirement for the calculations would remain constant, regardless of blob size.   But once the sensor is driven to the point that there are no real borders to be found (everything above the low-level cutoff) then I'm sure it will have a bad time.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 15, 2022, 01:22:15 am
        But those failure modes which leak current past definitely send that extra to the remaining LEDs.
        I totally understand your point there, but that's and extremely rare and unlikely case, and isn't really relevant in our case on LEDs in series vs in parallel.
        Let me ask you, if it was so much of an issues, why would all the engineers on the planet use IR LEDs in series in their IR point designs?

        Quote
        What would lead you to that conclusion?  Is it simply the lack of a good driver or have you concluded that there is something inherently bad/slow about the processor in the Wii remotes?  From what I have been able to gather, all of the important sensor information is available from the Wii controller and would therefore be accessible by code running on a much faster and more powerful processor.  Namely, the one in the PC.
        The extra processing happening in the wiimote itself, the way it's handled, and the BT protocol are the bottleneck here, and the sensor wasn't used to its maximum specs simply because it wouldn't have been useful.
        That means with a wiimote you'll never ever reach the 4ms latency I achieve with my gun system, especially without the Wii proprietary low latency BT protocol (which can't really be used for anything else than the Wii itself or Wii emulation).
        Sadly no good drivers can fix that.
        If it could I don't think I would have bothered making a full hardware solution.

        You might think latency isn't an issue, but lightguns are way more sensitive than normal controllers to latency if you are playing without crosshair (as it should always be).
        You want the hit to always land on time and exactly where you are aiming, not where you were aiming 2 or more frames ago.

        Quote
        Heh.  Actually, it might be.  If the camera has an integrated filter, which I assume it does, then the plastic in front is just a window the camera can see through but you can't, in order to hide the inner components.  I.e. just for show :).  However, if the window is further filtering what gets in beyond the integrated filter, then that's a different story.  What does your testing show?

        I'll buy that they didn't want the LEDs in the "sensor bar" to be seen, but oh the cost. 

        What might be an interesting experiment to improve detection would be to remove any internal filter (assuming it's possible and also that it indeed has one tuned for 940nm) and replace it with an external one which is meant for 850nm and use those LEDs.  Spectral response on virtually every silicon-based camera, even on the expensive ones intended for IR, drops by about 50% between 850 and 940nm, and I'm honestly very skeptical that these are much different, especially given the price. 
        Not "might". The front plastic is an IR pass filter as the camera doesn't have a proper integrated filter, it relies on the extra IR pas filter, the same way it relies on external oscillator to drive it (later models don't need that extra hardware or extra filter). Please just try it by yourself before making assumptions, you'll see how bad the cam behaves without the front filter, no matter the type of led used or the cam sensitivity setting.
        It can catch some LEDs that aren't in the IR spectrum, and will catch tons of noises and reflections that cannot be filtered by software or cam settings.
        That's just the way it was designed.
        Having an IR pass filter that also hides the internal was most likely more cost effective than having to add a proper filter in the cam itself.

        The cost? I am not sure I'm following you here, how would that have been more expensive or less efficient (for that particular use) to use simple 940nm than using 850nm ones? The "sensor bar" (even if it's a weird name for a thing that doesn't have sensors) doesn't need expensive IR pass filter or anything, and uses very very basic low power LEDs (in series).

        I already tried what you are suggesting, and the results weren't good enough to be worth the switch to 850nm. And the whole point of using black LEDs is making them very discreet, using a wavelength we can see with naked eyes would make it completely counter productive.

        Again, I have no idea why you think I am guesstimating here.
        I have the feeling you think I don't know what I'm talking about here haha.
        You think you'd get more knowledge from quick online search than me in years of study on the subject?  :lol

        Quote
        It's possible.  But it's probably not necessary to store bitmapped image data, outside of the standard frame-buffer, to get good blob co-ordinates.  I.e. I would think the memory requirement for the calculations would remain constant, regardless of blob size.   But once the sensor is driven to the point that there are no real borders to be found (everything above the low-level cutoff) then I'm sure it will have a bad time.
        It does store its data in fixed registers, that have a very limited size. Of course the computation of the blobs has its own limit, but the way the data is stored/prepared is also limiting it (newer more powerful sensors have far less limits on that aspect). And like I said, there are many other factors at play here but I won't go into detail, here is not the place to do.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: hongliulin88@.com on October 15, 2022, 01:33:35 am
        I have made a donation, can you give me a license?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 15, 2022, 05:22:16 am
        I totally understand your point there, but that's and extremely rare and unlikely case, and isn't really relevant in our case on LEDs in series vs in parallel.

        I feel like we are beating a dead horse here and I'm not getting through.  LEDs in series is exactly the relevant case where current leakage failure modes are concerned.  Parallel always isolates each LED, end of story.  But the benefits of using them in series far outweighs any concerns about keeping a couple of cheap LEDs alive for longer in specific cases of failure, unless one has a visceral fear of soldering.  So we agree fully on that.

        Quote
        The extra processing happening in the wiimote itself, the way it's handled, and the BT protocol are the bottleneck here, and the sensor wasn't used to its maximum specs simply because it wouldn't have been useful.
        That means with a wiimote you'll never ever reach the 4ms latency I achieve with my gun system, especially without the Wii proprietary low latency BT protocol (which can't really be used for anything else than the Wii itself or Wii emulation).
        Sadly no good drivers can fix that.
        If it could I don't think I would have bothered making a full hardware solution.

        https://www.youtube.com/watch?v=5s5EvhHy7eQ

        I don't see any of the bottlenecking you are describing in the examples being shown, and this is using a standard Wii remote.  This tells me that any issues are the result of poor BT adapters and/or software implementations.  And while this is purely academic, as your approach is plenty fast enough for a light gun, every reference to the camera module indicates that it provides x and y co-ordinates only once every 10ms, after which the processing of that data would take place.  So, I'm assuming that actual latency of your system is at least 14ms, not the 4ms being stated.  References for MoCap software using the stock remote is able to track objects in 3D with a 49ms latency, which also isn't bad, as moving from target to target can easily take 200ms.  So, while yours is indeed very fast, far more "plug and play" and system compatible, I'm not willing to accept that it can't be done "well enough" on a PC with a stock remote, decent BT adapter and software.  But for its lower speed, it would also be wireless :)

        Given the age of the device, however, It's doubtful anyone will bother to make something as polished as you have in that regard.
         
        Quote
        Not "might". The front plastic is an IR pass filter as the camera doesn't have a proper integrated filter, it relies on the extra IR pas filter.
        ...
        The cost? I am not sure I'm following you here, how would that have been more expensive or less efficient (for that particular use) to use simple 940nm than using 850nm ones?

        Ok, thank you for that clarification on the camera. That actually answers the question I had a few posts back about its nature.  So, it's not a specifically filtered camera module, rather relying on an external filter entirely.  This means that anyone homebrewing from a Wii remote will need to come up with their own filter, or fashion the existing one into their design, and will need to be careful about light leakage into that area.  The RobotShop module definitely sounds more appealing.   It's unfortunate the supply is so intermittent.

        I didn't mean monetary cost, rather the cost of a ~%50 loss in sensitivity to avoid some faintly glowing red dots while playing :).

        I appreciate the responses to my questions.  They helped to save my pristine remotes from the wrath of my screwdriver.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 15, 2022, 09:31:12 am
        I don't see any of the bottlenecking you are describing in the examples being shown, and this is using a standard Wii remote.  This tells me that any issues are the result of poor BT adapters and/or software implementations. 
        You can see the tracking lagging behind a little bit. Sure it's not very visible on slow movements and on a YouTube vid, but on fast motions on very picky lightgun games like point blank you WILL see the difference. And I'm not talking about the latency of the drivers or BT implementation, but on the hardware bottleneck of the wiimote itself and its protocol.

        Quote
        And while this is purely academic, as your approach is plenty fast enough for a light gun, every reference to the camera module indicates that it provides x and y co-ordinates only once every 10ms, after which the processing of that data would take place.  So, I'm assuming that actual latency of your system is at least 14ms, not the 4ms being stated. 
        That is why I said the info online is old, incomplete and incorrect. It's based on what the wiimote is doing with the sensor, not at all what the sensor is truly capable at its max specs.
        And every library online are based on those erroneous info.
        But again, if you don't believe me, investigate by yourself instead of just repeating me the same outdated info you found online ;)

        Quote
        References for MoCap software using the stock remote is able to track objects in 3D with a 49ms latency, which also isn't bad, as moving from target to target can easily take 200ms.  So, while yours is indeed very fast, far more "plug and play" and system compatible, I'm not willing to accept that it can't be done "well enough" on a PC with a stock remote, decent BT adapter and software.  But for its lower speed, it would also be wireless :)

        Given the age of the device, however, It's doubtful anyone will bother to make something as polished as you have in that regard.
        Anybody telling you 49ms isn't bad for gaming is either trying to sell you something or doesn't know ---steaming pile of meadow muffin--- about gaming. Let alone 200ms.
        And if you think 200ms is remotely ok to play a lightgun game without crosshair, no offence but you don't have a clue on how lightgun games work.
        200ms means there will be 200ms between the time you pull the trigger and the time the shot land. It means your hit will land not where you are but where you where 1/4 second earlier. On picky games with fast motions and fast target you will ALWAYS miss your hit, as old crt based games require a max latency of around 16ms to work properly. If you don't believe me on that ask around in this forum see what people think about it  :lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 15, 2022, 12:11:53 pm
        You can see the tracking lagging behind a little bit.

        I chalked that up to the drawing program.  I have seen them do this even with a mouse or graphics tablet.  The other examples where it has crosshairs which follow his actions looked much better.

        Quote
        That is why I said the info online is old, incomplete and incorrect. It's based on what the wiimote is doing with the sensor, not at all what the sensor is truly capable at its max specs.

        Ahhh, there we go.  So, the older sensor used in the remote does have the same 200hz spec as the newer ones.  There is at least one reference for that spec published in a researchgate paper online, so they aren't all incorrect :).  That's definitely a "pro" for a direct connection, especially if the Wii remote hardware is responsible for limiting that. 

        Quote
        Anybody telling you 49ms isn't bad for gaming is either trying to sell you something or doesn't know ---steaming pile of meadow muffin--- about gaming. Let alone 200ms.
        And if you think 200ms is remotely ok to play a lightgun game without crosshair, no offence but you don't have a clue on how lightgun games work.
        200ms means there will be 200ms between the time you pull the trigger and the time the shot land. It means your hit will land not where you are but where you where 1/4 second earlier. On picky games with fast motions and fast target you will ALWAYS miss your hit, as old crt based games require a max latency of around 16ms to work properly. If you don't believe me on that ask around in this forum see what people think about it  :lol

        I think you may be putting some words in my mouth there.  The MoCap system is able to do high quality 3D motion capture with a 49ms latency.  This system uses 2 Wii remotes to accurately plot coordinates in 3D space.  Their system was tested out to a few points less than the 100hz maximum, even with 2 controllers.  In other words, that system has a whole lot more processing going on in the back end once the sensor serves up the co-ordinates.

        I also didn't say 200ms response time was "ok", only that by the time a human being identifies what they are seeing as a target and has moved into position, it can reach that amount of time.  Obviously, if it took another 200ms to fire once there, it would suck, but that wouldn't be the case. :)

        In my mind, the target for response time would be the 16ms of an actual CRT refresh, as that is what those games really expected when they were created.  Unfortunately, the average LCD television already blows that goal with it's own input lag, which can be as much as three plus times that on older sets, and don't even think about what a projector adds to the mix.    Even newer sets with so-called "excellent" latency average to about 20ms. 

        But honestly, most light gun games aren't that speed critical, with the obvious exception of the Point Blank series, where it was the focus of the game.  And with those titles, just playing them on an LCD puts the player at a disadvantage unless every part of the system comes in at under the 16ms mark when accumulated.  If the Wii remote is able to provide a reliable stream of data at 100hz, or 40% better than what the original CRT based light guns did, it's still possible (note that I didn't say probable) to get there with a low-latency display, coupled with good BT and software.   
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: allenc on October 15, 2022, 11:01:28 pm
        maybe the wii camera need to use this I2C voltage converter chip to the Arduino
         https://www.instructables.com/Wii-Remote-IR-Camera-Hack/
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 16, 2022, 02:44:02 am
        That's definitely a "pro" for a direct connection, especially if the Wii remote hardware is responsible for limiting that.
        I wasn't aware it was available online as it's one of the numerous technical specs I was able to find by my own, but yeah, among other things, it's what makes my system way more suitable.

        Quote
        I think you may be putting some words in my mouth there.  The MoCap system is able to do high quality 3D motion capture with a 49ms latency.  This system uses 2 Wii remotes to accurately plot coordinates in 3D space.  Their system was tested out to a few points less than the 100hz maximum, even with 2 controllers.  In other words, that system has a whole lot more processing going on in the back end once the sensor serves up the co-ordinates.

        I also didn't say 200ms response time was "ok", only that by the time a human being identifies what they are seeing as a target and has moved into position, it can reach that amount of time.  Obviously, if it took another 200ms to fire once there, it would suck, but that wouldn't be the case. :)

        In my mind, the target for response time would be the 16ms of an actual CRT refresh, as that is what those games really expected when they were created.  Unfortunately, the average LCD television already blows that goal with it's own input lag, which can be as much as three plus times that on older sets, and don't even think about what a projector adds to the mix.    Even newer sets with so-called "excellent" latency average to about 20ms. 

        But honestly, most light gun games aren't that speed critical, with the obvious exception of the Point Blank series, where it was the focus of the game.  And with those titles, just playing them on an LCD puts the player at a disadvantage unless every part of the system comes in at under the 16ms mark when accumulated.  If the Wii remote is able to provide a reliable stream of data at 100hz, or 40% better than what the original CRT based light guns did, it's still possible (note that I didn't say probable) to get there with a low-latency display, coupled with good BT and software.

        I think we don't really understand each other on why latency higher than a frame for lightguns is a huge issue, even for normal games and average gamers. It's fine tho, I understand your point here.
        For most screen/controllers/games, higher latency is fine, as you get used to anticipate your actions depending of the latency of the system.
        It also works with lightgun games that use a crosshair and don't need you to aim.

        For aim on sight shooting on the other hand, it just doesn't work. It means on fast motions your aim will never be totally accurate and will never feel as good as arcade original games. Even 2~3 frames of latency makes a huge difference.
        And added screen latency is another reason you don't want your gun to have latency, as those latencies only add up to each other.

        But no worries, on a fast gaming monitor on mame with G-Sync mode active, the total latency of the screen + the gun4ir input is only 1 frame in total, so 16.66ms, the exact same as with the real arcade cab.
        I recently did testing on the MiSTer FPGA on my CRT with the various cores that support lightgun, with the original guns, and there was no added latency compared to the CRT guns, it preformed exactly like the original, down to the single frame.
        That is something no other lightguns in the market can achieve at the moment, especially not with levels of accuracy also beating CRT guns ;)
        But you don't need to believe me on that, I'm preparing some videos to show that off, since I'm getting tired of people getting skeptical when I talk about my system performances  :lol
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on October 16, 2022, 09:12:32 am
        That is something no other lightguns in the market can achieve at the moment, especially not with levels of accuracy also beating CRT guns ;)
        But you don't need to believe me on that, I'm preparing some videos to show that off, since I'm getting tired of people getting skeptical when I talk about my system performances  :lol

        I'd definitely be interested in seeing a video backing up that claim :).  I have a dedicated 36" CRT and a PS2 with GunCons connected to it via RGB.  Speed and accuracy are at least "arcade quality" with this setup, but it's limited to the PS libraries.  FWIW, my interest in all of this is to turn that into a "gun system" which is capable of playing all of the light gun games with one gun and the same speed and accuracy as a GC2.  So, I'd be a happy camper if that is truly the case, and the minimum distance wasn't further than the 5 or so feet away I normally play from it.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: jimiz on October 22, 2022, 01:04:13 pm
        Hi , but gun4ir arduino fw  work with raspberry 3/4 without install anything?  I read setup calibration is to do only with pc , ok... but example, I have a good working retropie/emulationstation in my Pi3,  I connect the gun (USB) and in any game  mouse  game gun "mame"  , sensor+led move the cursor  OR need a driver ??  if yes what/where ?
         
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 23, 2022, 03:04:37 pm
        Hi , but gun4ir arduino fw  work with raspberry 3/4 without install anything?  I read setup calibration is to do only with pc , ok... but example, I have a good working retropie/emulationstation in my Pi3,  I connect the gun (USB) and in any game  mouse  game gun "mame"  , sensor+led move the cursor  OR need a driver ??  if yes what/where ?
        You need the windows GUI to flash and setup everything. Once it's setup you can use the gun in anything you want.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: jimiz on October 25, 2022, 09:15:42 am
        but there is a "special" setting to do on windows,  that gun can work with retropie?
        few friends say to me not!  this program after you install the firmware on your gun, is only for calibrate , no optinons for  raspberry.
        and one friend again have just try , and not work on raspberry 3 + retropie and retroarch emulators,   only few keys , not triger and not move/cursor...in any way on setting/inputs...
        but retroarch seem to see on inputs "arduinio gun4ir"....   
        so he say meaby is something to install/compile on retropie system before gun can full working....  is true?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on October 25, 2022, 09:52:29 am
        but there is a "special" setting to do on windows,  that gun can work with retropie?
        few friends say to me not!  this program after you install the firmware on your gun, is only for calibrate , no optinons for  raspberry.
        and one friend again have just try , and not work on raspberry 3 + retropie and retroarch emulators,   only few keys , not triger and not move/cursor...in any way on setting/inputs...
        but retroarch seem to see on inputs "arduinio gun4ir"....   
        so he say meaby is something to install/compile on retropie system before gun can full working....  is true?
        Once flashed the gun works perfectly natively on RPi, it uses generic mouse/KB input so it's compatible with anything that support those.
        But you do need cores that support lightgun, which can be hard to find and setup.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: jimiz on November 09, 2022, 04:49:15 am
        one question of distance.
        22" lcd....desktop , any way to play about 30/40 cm to screen  not more?
        I try many ways...inclinate ir leds, no much power, but nothing to do, sensor begin to work well only about 1 meter for screen...to much for little screens.
        why (tecnical) this limit?  seem not to do with the inclination ir leds, power,  sensor gun...
        I read with Fish lens we can really play near , so like I say 30/40 cm to screen ?   really or only a dream?

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: connormmii on November 10, 2022, 10:48:23 pm
        Once donated how do i get the GUN4IR Setup program?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: canastro on December 09, 2022, 10:47:47 am
        Hello everyone! Has anyone set up the system with a projector? What leds and lenses do I use to make it work?
        Thx.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on December 15, 2022, 04:41:10 am
        is there anyway to make Gun4IR work with 2 screens, 1 for 4:3, the other for 16:9.

        for example time crisis 2 goes to 4:3, time crisis 5 goes to 16:9 screen, pc is hooked up to both.

        maybe a 2nd set of LEDs?

        im not interested in just 1 monitor for both aspet ratios, pillarboxing 4:3 into 16:9, i don't like grey-light leakage.
        It is possible if only one 4 LEDs system is active at a time, or else it's impossible for the cam to know what is what.
        And you need to activate only one screen at a time as well if you don't want any issue.
        But please if you need more support, join the discord server, it's way easier to help users from there. And it also has tons of resources if needed.

        are you sure if you unplug 1 LED set for 1024x768 then plug in another for 1920x1080 that it will just work automatically, will you not need to re-set the values.

        maybe you can have 2 instances of the softfware up and running?, would I not need to switch instances?

        would you consider built in support for 2xLED's sets in the software, maybe a bulit in switch for the LED's at an extra cost.

        I think it's important to have 2 screens, no pillarboxing 4:3 content with small image, would need to move in and out for 4:3 then 16:9.

        i this is not possible looks like i will need 2x PC's, 2x guns, 2x LED set's to have 2 different monitors, 1 4:3, another 16:9.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Guybushinryu on December 16, 2022, 11:29:02 am
        Hi i am new in the forum. I need some help to activate my account with my email. I made a donation with my another email from hotmail. But i can't activate my account here on the forum because, i don't receive any email of verification process. Its looks like a problem with hotmail domain. So i create a new account here with my gmail, this is working fine.
        My concern its how i am going to receive the files for gun4ir files?
        Could you send to my gmail address?
         
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: chris974M on December 22, 2022, 02:36:12 pm
        bonjour comment avoir le software please
        cordialy
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 28, 2022, 12:15:55 pm
        That is something no other lightguns in the market can achieve at the moment, especially not with levels of accuracy also beating CRT guns ;)
        But you don't need to believe me on that, I'm preparing some videos to show that off, since I'm getting tired of people getting skeptical when I talk about my system performances  :lol

        I'd definitely be interested in seeing a video backing up that claim :).  I have a dedicated 36" CRT and a PS2 with GunCons connected to it via RGB.  Speed and accuracy are at least "arcade quality" with this setup, but it's limited to the PS libraries.  FWIW, my interest in all of this is to turn that into a "gun system" which is capable of playing all of the light gun games with one gun and the same speed and accuracy as a GC2.  So, I'd be a happy camper if that is truly the case, and the minimum distance wasn't further than the 5 or so feet away I normally play from it.
        Haven't had time to work on the vids lately, and not sure I will have time soon, so I made a quick side by side comparison of the native guncon 1 (connected with SNAX on the mister fpga, so as native as on a real ps1) vs the usb gun4ir, on a ps1 guncon game calibration screen.
        https://youtu.be/sE9FgECUapY
        I let you draw the conclusions you want with it ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on December 30, 2022, 01:09:29 pm
        I let you draw the conclusions you want with it ;)

        My conclusion is that your system is as fast as a stabilized (i.e. over-sampled) cursor in the calibration screen. ;)  Unfortunately, no other conclusion can be really be drawn when using that screen as a basis for comparison. 

        For purposes of calibration, the console averages the heck out of the cursor position data to find the mean position, as this will likely be a relatively stable representation of where the gun is actually pointing when not being averaged during the course of normal play.  That way, any deviation which occurs will be small and usually within the pre-defined hit-box set up in the game code.  If the code is acting on, for example, 50 of the GC's samples and only 10 of yours (not saying this is the case) you will not see it here.

        In other words, that screen is a poor test for the purposes you most likely had in mind and probably doesn't demonstrate what you think it does. :)

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 31, 2022, 02:36:48 am
        I let you draw the conclusions you want with it ;)

        My conclusion is that your system is as fast as a stabilized (i.e. over-sampled) cursor in the calibration screen. ;)  Unfortunately, no other conclusion can be really be drawn when using that screen as a basis for comparison. 

        For purposes of calibration, the console averages the heck out of the cursor position data to find the mean position, as this will likely be a relatively stable representation of where the gun is actually pointing when not being averaged during the course of normal play.  That way, any deviation which occurs will be small and usually within the pre-defined hit-box set up in the game code.  If the code is acting on, for example, 50 of the GC's samples and only 10 of yours (not saying this is the case) you will not see it here.

        In other words, that screen is a poor test for the purposes you most likely had in mind and probably doesn't demonstrate what you think it does. :)
        No, that means the latency of my gun system, with a PS1 60Hz game (in that case PS1 NTSC Point Blank), is as good as the original native PS1 gun connected to the native PS1 port (not USB).

        The aim smoothing isn't working at all in the way you think it works ;)
        The in-game sample logic is always the same no matter the gun here. In this setup, the game sees both guns as guncons and so treat them equally.
        One is a real native guncon with native direct ps1 connection, and the other uses a conversion from gun4ir usb data to guncon ps1 protocol.
        In that calibration screen, on similar motion, the total added latency by the smoothing will always be the same on every gun.
        For instance if you average the aim over a constant sample of 4 frames, then the added latency on equal motions will always be equal, allowing you to compare each of the guns on equal ground over the course of a few motions. It's very basic math.
        It doesn't magically change the smoothing sample depending on the gun like you believe, ps1 wasn't that modern and has no way to differentiate the guns here :lol
        I even used a music metronome for that video to reproduce the same matching rythm, trajectory and speed of motion with both gun.
        So in short if a gun had more latency than the other one, it WOULD be very visible.

        And this video is in no way to show the aim accuracy, as the accuracy was already shown extensively in the previous videos.
        The only reason I use that calibration screen is because it's the only one that has native IN GAME crosshair tracking with constant (non variable) aim smoothing/latency, that allows me to have precise comparison of the motion latency between guns.
        But I though all that was pretty obvious and everyone understood it.

        I don't know exactly what I did to you or why you decided to be so anti gun4ir, but it is very clear now that no matter how good my proofs are, you won't believe them and will always find convoluted excuses not to. So I'm done losing my time trying :dunno
        If you have something against me or my system, stop fooling around with the passive agressitivy, be brave and say what you have to say right to my face, here or in pm ;)
        Assume your point of view whatever it is. Meanwhile, believe whatever you want about it. You do you bud  :cheers:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on December 31, 2022, 11:05:43 am
        Not sure if it's intentional, but it seems like you totally missed what I wrote.  I'm not sure how it's possible, because I even took the time to explain it.  No-one ever implied that the code treated one gun different from another.  Just the opposite, in fact.

        The calibration screens average a bunch of samples before displaying a position on the screen, which is the reason why the cursor lags behind the gun position when it's moving.  Therefore, it cannot show how fast EITHER system is.  With that screen, we know that it is acting on every authentic sample from the real GC, because it is programmed to work at the limits of that technology.  In the case of emulated controls, the sample rate of the code will be the same, but the rate at which that data changes in whatever temporary buffer in which it is stored, cannot be discerned.  i.e. if a non-GC gun is used, it just plucks data from the buffer at the rate it is expected to have been updated, and if it is unchanged due to a difference in actual reporting rate from the device, it doesn't care.  It will happily collect duplicate reports and average them into the position.  How much or if any differences will be visible is extremely dependent upon the speed at which the gun is moving, the number of samples taken and the amount of deviation in each respective group of samples.  i.e. variables which are virtually impossible to control. 

        No-one is implying that your system doesn't do what you claim.  But I am stating as a matter of fact that the method you are attempting to use to demonstrate that claim, is terribly flawed.  But if this test is the one you used to come to your conclusion, you may wish to find a different method, because this one is incapable of showing you what you appear to want it to.

        But in the end, there's no need to make grandiose claims or worry about backing them up.  Either the system works well-enough or it doesn't.  Everything in-between is academic.  Attempting to villainize someone who points out discrepancies in what is a technical discussion seems equally unnecessary.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 31, 2022, 03:45:12 pm
        Not sure if it's intentional, but it seems like you totally missed what I wrote.  I'm not sure how it's possible, because I even took the time to explain it.  No-one ever implied that the code treated one gun different from another.  Just the opposite, in fact.
        Oh I read everything carefully, english isn't my native language obviously but you don't write anything hardly difficult to understand.
        Somehow you continiously miss the point and lose youself in pointless overthinking/overanalysing. You misunderstand how that tech and how the MiSTer FPGA input handling work, or what I am showing here.

        The calibration screens average a bunch of samples before displaying a position on the screen, which is the reason why the cursor lags behind the gun position when it's moving.
        No kidding, sherlock.

        Therefore, it cannot show how fast EITHER system is.  With that screen, we know that it is acting on every authentic sample from the real GC, because it is programmed to work at the limits of that technology.
        Yes, it doesn't measure how fast either of the gun are, it shows the latency difference, on a big enough sample with similar enough gun motion to be significative, with the limit of the tech in mind.

        In the case of emulated controls, the sample rate of the code will be the same, but the rate at which that data changes in whatever temporary buffer in which it is stored, cannot be discerned.  i.e. if a non-GC gun is used, it just plucks data from the buffer at the rate it is expected to have been updated, and if it is unchanged due to a difference in actual reporting rate from the device, it doesn't care.  It will happily collect duplicate reports and average them into the position.
        The sample rate of the emulated controls is totally irrelevent here.
        The PS1 reads the guncon input only once a frame obviously, so in the best case scenario, the gun4ir itself + conversion of the HID data to the guncon data will take less than that and there will be no difference with the original guncon.
        And in the worst case it's slower than a frame, missing the mark and adding one (or more) frame of latency compared to the guncon.

        How much or if any differences will be visible is extremely dependent upon the speed at which the gun is moving, the number of samples taken and the amount of deviation in each respective group of samples.  i.e. variables which are virtually impossible to control. 
        Again, duh.
        You completely ignored the part where I explained my methodology.
        Oh sure it's not super ultra precise to the 10th of ms or 2mm motion between each gun, but it doesn't need to be, the motion is similar enough to be usable.
        As I explained if the gun input + conversion isn't fast enough it will add one or more frames of latency, 16ms each, even with the smoothing.
        No matter the minor differences of speed and acceleration between each gun motion, any difference that big would be very visible on the vid I show here, despite the small duration of the vid (trying to avoid harming epileptic people with long vid of blinking lights).
        Just take any as many points of reference in the video as you want and see how many 60Hz frame it takes for each gun crosshair to reach the passing position of the gun aim.
        It's all a balance between precision of the test, and what we want to show, while keeping it simple and readable.

        No-one is implying that your system doesn't do what you claim. 
        You did, more than a few times, in your usual way ;)

        But I am stating as a matter of fact that the method you are attempting to use to demonstrate that claim, is terribly flawed.  But if this test is the one you used to come to your conclusion, you may wish to find a different method, because this one is incapable of showing you what you appear to want it to.
        No "matter of fact" here, just your own opinion, that has absolutely no more value than anybody else.
        Having a good english semantic and claiming you know your stuff doesn't make you right.
        You don't seem to have any real interest in using my system, or contributing to it, so I have no clue what's your issue with me and my work and why you keep going at it like that :dunno
        Anyway it's my thread so obviously I feel obligated to answer, but man what a massive waste of time.

        But in the end, there's no need to make grandiose claims or worry about backing them up.  Either the system works well-enough or it doesn't.  Everything in-between is academic.
        No grandiose claim here, just doing my job to inform my users.
        By saying everything in between is academic, or that backing up the claims isn't useful, you are basically saying the users are too stupid to want to know the real specs and performance of the product.
        I don't know about you, but that isn't how I treat my users.
        If I did we both know my system wouldn't be as popular as it is now.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on December 31, 2022, 06:45:02 pm
        We are just talking past each other at this point, and your defenses seem to be in overdrive.  When a claim is made that X is as good or even better than Y relative to a certain specification, it should probably be expected that the claim will be called into question, and in cases where it doesn't seem plausible, the methodology used to come to that conclusion as well.  I've stated why, from a technical standpoint, the test you showed can't really affirm your claim.  You can accept that or not.

        But as you stated, the "proof is in the pudding".  Obviously, the system has very good accuracy and quite possibly better than the original when dialed in, especially in the X direction where jitter is more of an issue with the original technology.  Interestingly, that increase in accuracy is precisely what can mask a possible difference in speed when the positions are averaged, as they are in that calibration screen.  Again, this is academic and related specifically to the claims you have made, and isn't intended to reflect poorly on the overall performance or quality of your system.

        A more accurate lightgun system will trump a one or two frame difference in reporting speed all day long, for what good is more data if a larger percentage of it is incorrect?  Not much, and that doesn't seem to be the case with yours, so why so defensive?

        Showing that a controller is as fast as the host system and software will ever allow is mind-numbingly simple, provided you have a few cycles to spare.  All it takes is adding a couple of lines of code to your firmware to toggle a spare pin, at the precise location where changes in your position calculations are "set in stone" and will be transferred, and then measuring the frequency of the signal on that pin with an oscilloscope.  So long as you aren't working from buffered data, it will paint a very clear picture as to timeliness of the updates.  If you are sending accurate updates 60 times a second and the host/software isn't able to act on those updates in near real-time, there's nothing you will ever be able to do about it.  In other words, even if it's not as timely as the original hardware and methodology, it's not on you, and the increase in accuracy will probably make up for it "in spades".
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 01, 2023, 02:08:19 am
        We are just talking past each other at this point, and your defenses seem to be in overdrive.  When a claim is made that X is as good or even better than Y relative to a certain specification, it should probably be expected that the claim will be called into question, and in cases where it doesn't seem plausible, the methodology used to come to that conclusion as well.  I've stated why, from a technical standpoint, the test you showed can't really affirm your claim.  You can accept that or not.
        You are the only one who actually don't agree with my methodology here, with your logic as broken and wrong as you think my methodology is.
        Funny the way you always consider everything you say as THE absolute truth and clearly never consider you could ever be wrong. What makes you so sure you are right here?
        In reality what you say is just your own opinion, just words on the internet, and has nothing else to show off, it has no more value than anybody else's opinion at that point.

        But as you stated, the "proof is in the pudding".  Obviously, the system has very good accuracy and quite possibly better than the original when dialed in, especially in the X direction where jitter is more of an issue with the original technology.  Interestingly, that increase in accuracy is precisely what can mask a possible difference in speed when the positions are averaged, as they are in that calibration screen.  Again, this is academic and related specifically to the claims you have made, and isn't intended to reflect poorly on the overall performance or quality of your system.
        No, the CRT guncon at that distance does not exhibit more jittery than my gun, and no, averaging the aim won't make any significative difference on FAST motion. It's very basic math bud ;)

        A more accurate lightgun system will trump a one or two frame difference in reporting speed all day long, for what good is more data if a larger percentage of it is incorrect?  Not much, and that doesn't seem to be the case with yours, so why so defensive?
        Again, guncon and gun4ir are equally accurate in that setup, and no, it doesn't have any incidence on the speed of fast motions. For instance a jittery of 2~3 pixels (which is about what we get on the guns at that distance) is simply changing nothing when the gun moves at a speed of 20 pixel or more on each frame over the course of several frames. If one of the guns had a constant extra latency of one frame, in that theorical case it would always drag 20+ pixel behind what the other gun does, and be clearly visible in the video.
        Averaging wouldn't hide that, as during the motion the lag would propagate to every single position.
        When every single position data has the same offset, averaging them will NOT remove that offset, that's the opposite, it would actually show it more clearly and reliably without the jitter.
        Again, very basic math. I can't believe I even have to explain that. Your point is totally irrelevent at best, very insulting at worse.

        Showing that a controller is as fast as the host system and software will ever allow is mind-numbingly simple, provided you have a few cycles to spare.  All it takes is adding a couple of lines of code to your firmware to toggle a spare pin, at the precise location where changes in your position calculations are "set in stone" and will be transferred, and then measuring the frequency of the signal on that pin with an oscilloscope.  So long as you aren't working from buffered data, it will paint a very clear picture as to timeliness of the updates.  If you are sending accurate updates 60 times a second and the host/software isn't able to act on those updates in near real-time, there's nothing you will ever be able to do about it.  In other words, even if it's not as timely as the original hardware and methodology, it's not on you, and the increase in accuracy will probably make up for it "in spades".
        Once again you have no clue how things work, and what I wanted to show.
        Your suggestion is a very basic and widely used method to measure digital state change like with button, but won't work here because you are completely ignoring the latency of the sensor itself, so even if you measure the speed at which the sensor or the gun send data (which I did already, it's ~4ms for the sensor itself, ~5ms for the sensor+the rest, over several thousand samples) in comparison to the speed the host hardware handles it, it won't give you squat for the total latency.
        Your methodology here is completely useless in this context, and doesn't show anything valuable I don't already know.
        Even if I measure the latency of the sensor itself, it wouldn't show much valuable information for my end users, as it wouldn't be a real world case.

        What I am showing here is how the gun can match the native guncon on the MiSTer fpga PS1 core, nothing more, nothing less.
        It's not supposed to be a very technical video, just showing the MiSTer users what they can expect from it in real world use, which is what it is all about here.
        When I said the gun4ir was doing as good as CRT guns at their own game few messages ago, you said you'd be curious to see a video that shows it.
        Which is what I clearly did. Now that you accept it as proof or not it's totally on you. I know my methodology and the result of it are sound, especially after all the research and consulting I did, no matter what you think you might know better.
        Some of us just don't make claims without actually thoroughly studying and testing that claim by themselves ;)
        And I accept any criticism, but only when they actually make sense in the context.

        But you clearly won't change your mind anyway, so let's agree to disagree and keep it that way, I wasted way too much time on this already.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on January 01, 2023, 04:12:21 am
        If you want to boil it down to what you stated, what you showed was that it keeps up in the averaged calibration screen, not in actual use.  I don't think that's a better way to think about it.  And the math you are using includes a lot of assumptions, like the error being a constant.  "Jitter' is by it's nature, specifically not that, rather a small error in timing. Timing errors can manifest themselves as both over-runs and under-runs.  The composite cable of GCs provide a tighter timing reference over earlier lightguns, but it's not digitally perfect, due to the analog parts and signals, and still subject to these timing errors. This would be much more apparent on a screen which is not averaging/oversampling the cursor position.  But I get that there aren't really any options in available software to view it in that form.

        But I will admit that I do not know what MiSTer does with an original GC.  It could be very different from how it interacts with an original console.

        As for the method I stated not being valuable, it was very specific that it included accurate data.  I.e. the latest data available from the camera module, so it's factored in.  I don't believe that there is currently a better sensor or method (reasonably) available for this type of controller, so what the camera module is doing is somewhat moot, so long as it is faster than 60 fps (which it easily is and then some) with enough margin left for processing overhead to meet the 60fps of the original control.  That total timeframe is exactly what would be measured at the point in which the data is to be transferred to the host.  Or do you believe otherwise?  If so, I'm interested to know why, because that's where the "rubber meets the road" and anything beyond that is not in your control.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 01, 2023, 05:10:08 am
        If you want to boil it down to what you stated, what you showed was that it keeps up in the averaged calibration screen, not in actual use.  I don't think that's a better way to think about it.  And the math you are using includes a lot of assumptions, like the error being a constant.  "Jitter' is by it's nature, specifically not that, rather a small error in timing. Timing errors can manifest themselves as both over-runs and under-runs.  The composite cable of GCs provide a tighter timing reference over earlier lightguns, but it's not digitally perfect, due to the analog parts and signals, and still subject to these timing errors. This would be much more apparent on a screen which is not averaging/oversampling the cursor position.  But I get that there aren't really any options in available software to view it in that form.

        As for the method I stated not being valuable, it was very specific that it included accurate data.  I.e. the latest data available from the camera module, so it's factored in.  I don't believe that there is currently a better sensor or method (reasonably) available for this type of controller, so what the camera module is doing is somewhat moot, so long as it is faster than 60 fps (which it easily is and then some) with enough margin left for processing overhead to meet the 60fps of the original control.  That total timeframe is exactly what would be measured at the point in which the data is to be transferred to the host.  Or do you believe otherwise?  If so, I'm interested to know why, because that's where the "rubber meets the road" and anything beyond that is not in your control.
        I've taken all parameters into consideration and none of what you are saying here have any relevance or is any significant for the current case.
        You are trying to find issues when there is none, just to desperately trying to make your point.
        The analog sync and CRT gun sensor are precise down to a few micro seconds, and are very consistent, else it won't even work the way it does. The main cause of those jitter we get with these CRT guns isn't even the analog/digital imprecision. And again, for fast motion, in the course of several frame, none of the inaccuracies or errors are significative enough to actually cause issues and prevent a good analysis of the data. If it was the case it would also be very visible even with the limits of the hardware.

        And the rest of your message again completely misses the point and the argument you are trying to make it totally empty in relation to the video and what it's showing.

        But I'm done wasting my time arguing here, at that point you totally lost yourself in convoluted explanations that have no purpose or end.

        Fine by me, but please stop wasting both of our time and polluting that thread, and go doing something else, more useful, like spending time with your friends or family for the new year celebrations.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: RandyT on January 01, 2023, 06:45:57 am
        Of course it has to be in the microseconds.  The raster is moving extremely fast and if the timing wasn't reasonably precise, the cursor would bounce around so much you probably wouldn't see it. But that doesn't mean it is without error, as it would be if a similar system were possible in the purely digital realm (which it is obviously not.)

        But no matter, you are correct that neither of us will likely see eye-to-eye on this.  It doesn't truly matter anyway, as the current best approach to this problem on modern displays is the one you, and a couple of others have taken, and no other approaches compare.  At least in my opinion.  None are going to be a perfect analog to the original technology, nor does it need to be, so long as it works well.  Yours obviously must to have so many happy users.

        Hope you have a nice New Years celebration. :)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 01, 2023, 08:51:58 am
        Of course it has to be in the microseconds.  The raster is moving extremely fast and if the timing wasn't reasonably precise, the cursor would bounce around so much you probably wouldn't see it. But that doesn't mean it is without error, as it would be if a similar system were possible in the purely digital realm (which it is obviously not.)

        But no matter, you are correct that neither of us will likely see eye-to-eye on this.  It doesn't truly matter anyway, as the current best approach to this problem on modern displays is the one you, and a couple of others have taken, and no other approaches compare.  At least in my opinion.  None are going to be a perfect analog to the original technology, nor does it need to be, so long as it works well.  Yours obviously must to have so many happy users.

        Hope you have a nice New Years celebration. :)
        Thanks, you too  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: _Gioacchino_ on January 09, 2023, 02:49:55 am
        I bought one the TC4 gun clones from Aliexpress and they are great quality. I did successfuly convert it to GUN4IR but there wasn't enough room for everything. I was a tight space to put the Pro Micro board and the camera had to stick out
        i will plan for a double pair of tc 3 or 4 guns...
        i have many question about it so:

        1) main difference is a good fit for dfrobot cam and rumble motor for tc3 but hte are a lot expensive (200 € shell+solenoid) instead of tc4. right?

        for money reason however i'm gonna to buy tc4 guns+solenoids


        2)SOLENOIDS they wants a 24 v power supply but what is hte value of current

        Inviato dal mio RMX2170 utilizzando Tapatalk

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Gate_001 on January 15, 2023, 10:57:55 pm
        Salut JayBee,
        Il est très bien ce projet.

        I was DIYing the SAMCO lightgun, when I came across your project. I think I'll change for your lightgun project  ;D

        I'm going to use an Arduino Pro Micro that I already have. From what I understand, you have to choose between the DPad and the RGB led. What is this LED for?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ben_r_ on January 17, 2023, 09:07:26 pm
        This looks awesome and I can't wait to get started. Sent JayBee a $20 donation a few days ago via PayPal, but I guess it's waiting to clear? Haven't heard anything back yet.

        JayBee: PM me if you happen to see this and I can let you know the transaction details.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: 1amgoingin on January 18, 2023, 07:35:02 am
        Hi, I donated 20 dollars for the project , I am waiting for my license for GUI, thank you.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 22, 2023, 02:03:40 pm
        Salut JayBee,
        Il est très bien ce projet.

        I was DIYing the SAMCO lightgun, when I came across your project. I think I'll change for your lightgun project  ;D

        I'm going to use an Arduino Pro Micro that I already have. From what I understand, you have to choose between the DPad and the RGB led. What is this LED for?
        Merci  :cheers:
        So the RGB is one of the optional feedbacks you can have, to either use as basic fire/reload or synchronized with in game feedback.
        Yes you will need to choose between this and the dpad, as the pro micro doesn't have enough pins.
        If you want to have everything (dpad and all feedbacks) at the same time, then you can use a full size micro board or a modded teensy 2.0.

        This looks awesome and I can't wait to get started. Sent JayBee a $20 donation a few days ago via PayPal, but I guess it's waiting to clear? Haven't heard anything back yet.

        JayBee: PM me if you happen to see this and I can let you know the transaction details.
        Hi, I donated 20 dollars for the project , I am waiting for my license for GUI, thank you.
        I sent everything already, if you haven't received anything yet please check your email box spam folder. If it's still not there, feel free to contact me in pm.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Gate_001 on January 22, 2023, 10:22:53 pm
        Salut JayBee,
        Il est très bien ce projet.

        I was DIYing the SAMCO lightgun, when I came across your project. I think I'll change for your lightgun project  ;D

        I'm going to use an Arduino Pro Micro that I already have. From what I understand, you have to choose between the DPad and the RGB led. What is this LED for?
        Merci  :cheers:
        So the RGB is one of the optional feedbacks you can have, to either use as basic fire/reload or synchronized with in game feedback.
        Yes you will need to choose between this and the dpad, as the pro micro doesn't have enough pins.
        If you want to have everything (dpad and all feedbacks) at the same time, then you can use a full size micro board or a modded teensy 2.0.

        If I find a way to release 3 pins, will you make another version?  ;)
        My idea is the following:
        I don't need Bluetooth HID, so 2 free pins. For the third pin we can combine the right and left DPad on the same pin A10 and read this pin in analog. 0V is left, 5v is right and 2.5V neither are on.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 23, 2023, 01:49:13 am
        Salut JayBee,
        Il est très bien ce projet.

        I was DIYing the SAMCO lightgun, when I came across your project. I think I'll change for your lightgun project  ;D

        I'm going to use an Arduino Pro Micro that I already have. From what I understand, you have to choose between the DPad and the RGB led. What is this LED for?
        Merci  :cheers:
        So the RGB is one of the optional feedbacks you can have, to either use as basic fire/reload or synchronized with in game feedback.
        Yes you will need to choose between this and the dpad, as the pro micro doesn't have enough pins.
        If you want to have everything (dpad and all feedbacks) at the same time, then you can use a full size micro board or a modded teensy 2.0.

        If I find a way to release 3 pins, will you make another version?  ;)
        My idea is the following:
        I don't need Bluetooth HID, so 2 free pins. For the third pin we can combine the right and left DPad on the same pin A10 and read this pin in analog. 0V is left, 5v is right and 2.5V neither are on.
        I am not doing custom versions on demand, for optimisation purpose and because I use a lot of the pins special functions, everything is hardwired in each version.
        Resistor ladders are also very unreliable, have far more cpu and memory overhead, slowing down the code and adding latency, and would require me to rewrite my whole input management code around it.
        Doing a custom version like that would cost me way more in work than it would cost you to buy a full micro board that has everything integrated already  :lol
        That being said, if you are not interested in RGB led out, you already have everything you need there.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Gate_001 on January 23, 2023, 06:43:47 am
        Salut JayBee,
        Il est très bien ce projet.

        I was DIYing the SAMCO lightgun, when I came across your project. I think I'll change for your lightgun project  ;D

        I'm going to use an Arduino Pro Micro that I already have. From what I understand, you have to choose between the DPad and the RGB led. What is this LED for?
        Merci  :cheers:
        So the RGB is one of the optional feedbacks you can have, to either use as basic fire/reload or synchronized with in game feedback.
        Yes you will need to choose between this and the dpad, as the pro micro doesn't have enough pins.
        If you want to have everything (dpad and all feedbacks) at the same time, then you can use a full size micro board or a modded teensy 2.0.

        If I find a way to release 3 pins, will you make another version?  ;)
        My idea is the following:
        I don't need Bluetooth HID, so 2 free pins. For the third pin we can combine the right and left DPad on the same pin A10 and read this pin in analog. 0V is left, 5v is right and 2.5V neither are on.
        I am not doing custom versions on demand, for optimisation purpose and because I use a lot of the pins special functions, everything is hardwired in each version.
        Resistor ladders are also very unreliable, have far more cpu and memory overhead, slowing down the code and adding latency, and would require me to rewrite my whole input management code around it.
        Doing a custom version like that would cost me way more in work than it would cost you to buy a full micro board that has everything integrated already  :lol
        That being said, if you are not interested in RGB led out, you already have everything you need there.

        No problem, I'll buy a new board or ditch the DPad.
        By the way, the Teensy 2.0 is a discontinued board. Have you thought about porting your code to more recent Tennsy?
        I just sent you $20
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 23, 2023, 06:54:57 am
        Salut JayBee,
        Il est très bien ce projet.

        I was DIYing the SAMCO lightgun, when I came across your project. I think I'll change for your lightgun project  ;D

        I'm going to use an Arduino Pro Micro that I already have. From what I understand, you have to choose between the DPad and the RGB led. What is this LED for?
        Merci  :cheers:
        So the RGB is one of the optional feedbacks you can have, to either use as basic fire/reload or synchronized with in game feedback.
        Yes you will need to choose between this and the dpad, as the pro micro doesn't have enough pins.
        If you want to have everything (dpad and all feedbacks) at the same time, then you can use a full size micro board or a modded teensy 2.0.

        If I find a way to release 3 pins, will you make another version?  ;)
        My idea is the following:
        I don't need Bluetooth HID, so 2 free pins. For the third pin we can combine the right and left DPad on the same pin A10 and read this pin in analog. 0V is left, 5v is right and 2.5V neither are on.
        I am not doing custom versions on demand, for optimisation purpose and because I use a lot of the pins special functions, everything is hardwired in each version.
        Resistor ladders are also very unreliable, have far more cpu and memory overhead, slowing down the code and adding latency, and would require me to rewrite my whole input management code around it.
        Doing a custom version like that would cost me way more in work than it would cost you to buy a full micro board that has everything integrated already  :lol
        That being said, if you are not interested in RGB led out, you already have everything you need there.

        No problem, I'll buy a new board or ditch the DPad.
        By the way, the Teensy 2.0 is a discontinued board. Have you thought about porting your code to more recent Tennsy?
        I just sent you $20
        It's discontinued but you can still find plenty of clones online  ;)
        I use it because it's the same chipset as the micro and pro micro, it allows me to still use the same AVR Studio (I'm not using arduino IDE).
        Same issue, if I wanted to port the code to a more recent teensy, I'd have to rewrite the entire firmware from scratch to make it compatible.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: vd2021 on January 23, 2023, 11:24:08 am
        JB, I'm refreshing my cab and have discovered your project. I used these, in the cab, with the CRT. I believe they are ps guncon2. Do these have the space for your kit? I also plan to go rumble/vibration.  I also see you nolonger include the solenoid. Is the kit still priced the same as it was with it? Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on January 24, 2023, 09:26:44 am
        @JayBee what do you think of the people selling your Gun4IR custom mod in china

        [Link removed by saint]

        the buttons seem cool, maybe the arcade guns are a better option than the guncon 2 shell.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 25, 2023, 08:47:24 am
        JB, I'm refreshing my cab and have discovered your project. I used these, in the cab, with the CRT. I believe they are ps guncon2. Do these have the space for your kit? I also plan to go rumble/vibration.  I also see you nolonger include the solenoid. Is the kit still priced the same as it was with it? Thanks.
        Are you referring to the kits Ray is selling? if that's the case you'd have to ask him directly ;)

        @JayBee what do you think

        the buttons seem cool, maybe the arcade guns are a better option than the guncon 2 shell.
        What do you believe I think of people using my work to make money without even crediting me or giving me anything in return?
        Please do not share that kind of links here if you care about my system, bad advertisement is still advertisement  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: talem84 on January 28, 2023, 01:36:57 am
        Can't wait to use this !
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Marsupial on January 29, 2023, 09:25:27 am



        No problem, I'll buy a new board or ditch the DPad.

        I'd simply ditch the rgb led.

        I installed it when building mine, and find it distractful. Might simply disconnect it. I know it's a preference thing but I'd rather have more inputs than the blinking LEDs. That said, I don't "change mode" ever with this system, those who do may want status output.

        Envoyé de mon SM-S901W en utilisant Tapatalk

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on January 29, 2023, 11:03:21 am



        No problem, I'll buy a new board or ditch the DPad.

        I'd simply ditch the rgb led.

        I installed it when building mine, and find it distractful. Might simply disconnect it. I know it's a preference thing but I'd rather have more inputs than the blinking LEDs. That said, I don't "change mode" ever with this system, those who do may want status output.

        Envoyé de mon SM-S901W en utilisant Tapatalk
        Yeah I always put mine in a non direct lighting configuration, and reduce the power a lot, to just see them but not be distracted by them.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ZTylerDurden717 on February 10, 2023, 11:02:42 pm
        [deleted comment]
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Daniel B. on February 14, 2023, 10:16:56 pm
        I'm not seeing the option to buy the license and stuff on the website. What is the best way to do so? Does it also include a BOM or do I need to sort through this thread?

        Can't wait! Looks amazing!

        Edit- I read the first post, thanks!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Daniel B. on February 15, 2023, 03:47:31 pm
        I've completed the donation! I look forward to receiving the information!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: grotesque on February 18, 2023, 06:23:50 am
        Hi everyone,

        I'm in the process of designing an arcade cab, with the build stage hopefully starting soon, and want to integrate the Gun4IR LEDs into it. I have a few questions I would really appreciate some guidance with. I searched this long thread plus read the Gun4IR manual but didn't find the same questions but apologies if this has already been explained.
        Thanks!
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on February 20, 2023, 09:02:56 am
        Hi everyone,

        I'm in the process of designing an arcade cab, with the build stage hopefully starting soon, and want to integrate the Gun4IR LEDs into it. I have a few questions I would really appreciate some guidance with. I searched this long thread plus read the Gun4IR manual but didn't find the same questions but apologies if this has already been explained.
        • Will it be an issue that the panel is tilted backwards about 12 degrees rather than being exactly vertical? That's just the way the cabinet design is. Should I try to mount the LEDs to point exactly horizontally at the player or just perpendicular to the display will be fine?
        • Does it make much difference to have the LEDs mounted in a small triangle pattern vs a straight line? I've seen examples of both but not sure if either is preferable. Is there any recommendation on the distance between the LEDs in the clusters?
        • I will probably be standing 1-2m from a 32" screen but my guns only have Fish Eye lenses. Would I be better suited with Wide Angle lenses? If so, is there a recommended place to get them from?
        Thanks!
        Hi,
        To answer your questions:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: grotesque on February 21, 2023, 07:52:13 am
        Thanks JayBee, much appreciated. For question #2, I'm using the high power LED kits from RPEG Electronics. The LEDs will be mounted behind a layer of perspex (this is going to cover the whole screen/front panel of the cabinet) so I assume it's safer to put them in a triangle shape to have the best output. When you say to bend them a bit, is that so that each LED is pointing more towards the player? Just want to be sure I'm bending/aiming them correctly! Thanks

        • no issue, 12 degrees isn't much and should still work nicely :)
        • it all depends on your LEDs specs. If using powerful and good angle ones, in line it's fine, else in triangle (with each bent a bit on they side) is a bit better. You should keep them as close as possible from each other.
        • 2m seems good for an optimal playing distance with either fish eye or wide lens. You probably won't need wide lens tho.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Bambam1963 on February 21, 2023, 01:55:43 pm
        I am a huge fan of this tech.  I got my old PS1 Namco Guncon 45 up and running.  It works and tracks great.  I do, however, need two fish-eye lenses as I currently have to sit quite far back from my monitor for the gun to track properly. I am unable to find any fish-eye lenses to finish my project. Can someone point me in the right direction? Thank you.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Daniel B. on February 22, 2023, 12:10:26 pm
        Is there a recent BOM for the current "best way" to accomplish all this? I want to start putting together my parts list and get any overseas ordering done as soon as possible. I'll admit, I made it about 12 pages through before I sent jaybee the donation so I may be out of touch lol.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on February 23, 2023, 04:19:36 am
        Thanks JayBee, much appreciated. For question #2, I'm using the high power LED kits from RPEG Electronics. The LEDs will be mounted behind a layer of perspex (this is going to cover the whole screen/front panel of the cabinet) so I assume it's safer to put them in a triangle shape to have the best output. When you say to bend them a bit, is that so that each LED is pointing more towards the player? Just want to be sure I'm bending/aiming them correctly! Thanks

        • no issue, 12 degrees isn't much and should still work nicely :)
        • it all depends on your LEDs specs. If using powerful and good angle ones, in line it's fine, else in triangle (with each bent a bit on they side) is a bit better. You should keep them as close as possible from each other.
        • 2m seems good for an optimal playing distance with either fish eye or wide lens. You probably won't need wide lens tho.
        If it's the black LEDs points we made together, then no need to bend anything, it should work as is. The leds have enough angle to work nicely.

        I am a huge fan of this tech.  I got my old PS1 Namco Guncon 45 up and running.  It works and tracks great.  I do, however, need two fish-eye lenses as I currently have to sit quite far back from my monitor for the gun to track properly. I am unable to find any fish-eye lenses to finish my project. Can someone point me in the right direction? Thank you.
        Any cheap smartphone fish eye lens will work.

        Is there a recent BOM for the current "best way" to accomplish all this? I want to start putting together my parts list and get any overseas ordering done as soon as possible. I'll admit, I made it about 12 pages through before I sent jaybee the donation so I may be out of touch lol.
        Yes the full bom is the doc I send you with the license.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on March 19, 2023, 09:43:24 am
        I noticed your website shows New slim IR LED points

        are these the same as the ones I've already seen or are they new SLIM ones, i would like to see them.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on March 26, 2023, 11:45:01 am
        I noticed your website shows New slim IR LED points

        are these the same as the ones I've already seen or are they new SLIM ones, i would like to see them.
        Yes they are brand new, I haven't uploaded any image yet.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: KlausR on March 29, 2023, 08:44:06 am
        Hi JayberH
        Donation is done. Could you please send license, appreciate
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: teozan on April 11, 2023, 09:09:29 am
        Hello Everybody and to JayBee of course.
        Few months ago (its one year almost) I had in mind to build this fantastic toy and purchased the license. I'm still at the license phase and one day will build my phisycal piece of gun ;)

        Recently I was thinking about the use of this gun with a PS3/PS4 console but unsure about the results becuase I'm probably missing some info:

        - I suppose that any system which can recognize a mouse/keyboard is potentially recognizing the gun as a mouse/keyboard too?
        - the initial setup (done on a compatible system/windows) is done just once; means the parameters are stored inside the internal micro/teensy?
        - the usb connection to the host (PC / console) is for the power (5v) as well as the info exchange (mouse/pointer position/keys pressed/) and to let the host system recognize there's a new device (mouse/keyb) connected? or is there any "driver" that is running inside the host? I suppose this is the main question on whether a PS3 (for instance) may or may not recognize the device being a standard mouse....

        At the end, it the above makes any sense, adding a XIM APEX to the PS3 and then this gun will make a KILLER to anything else!

        Thank you

        Rgds
        Matteo
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on April 12, 2023, 06:08:09 am
        Hello Everybody and to JayBee of course.
        Few months ago (its one year almost) I had in mind to build this fantastic toy and purchased the license. I'm still at the license phase and one day will build my phisycal piece of gun ;)

        Recently I was thinking about the use of this gun with a PS3/PS4 console but unsure about the results becuase I'm probably missing some info:

        - I suppose that any system which can recognize a mouse/keyboard is potentially recognizing the gun as a mouse/keyboard too?
        - the initial setup (done on a compatible system/windows) is done just once; means the parameters are stored inside the internal micro/teensy?
        - the usb connection to the host (PC / console) is for the power (5v) as well as the info exchange (mouse/pointer position/keys pressed/) and to let the host system recognize there's a new device (mouse/keyb) connected? or is there any "driver" that is running inside the host? I suppose this is the main question on whether a PS3 (for instance) may or may not recognize the device being a standard mouse....

        At the end, it the above makes any sense, adding a XIM APEX to the PS3 and then this gun will make a KILLER to anything else!

        Thank you

        Rgds
        Matteo
        To answer your questions:
        - technically yes it will be recognized, but the gun aim input isn't a standard mouse input and won't work properly if the OS/software doesn't support that specific kind of input.
        - yes stored inside the gun
        - I see where you are going here, but it's like I explained on the first point, any system that isn't specifically made to work with hid mouse lightgun input will not work  ;)

        PS3 lightgun games don't support generic mouse input (at least not in the lightgun way), and if you are talking about FPS games, lightgun aren't made of FPS and won't work with them.
        No matter the machine, mouse aiming and lightgun aiming are too different to work in a playable manner.
        It requires a game that is especially made for aiming devices (afaik only the wii and a few PS Move titles ever did that).
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TimeCrisis on April 12, 2023, 06:00:28 pm
        do you plan to make the slim LED creation available to your distrubutors, in particular you europeans distributor.

        is there any reason why the other distributors couldn't have made it slim, is there some special workings involved?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ricebelly on April 30, 2023, 06:05:50 am
        I have made a donation as instructed on the forum link.
        please will you send me the licence + link to latest software.
        My details:
        Discord user name: discord#6956
        Full name:  Kwok Lee
        Email address:  ricebelly@yahoo.co.uk
        paypal payment using: ricebelly@yahoo.co.uk

        Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 02, 2023, 06:47:05 am
        do you plan to make the slim LED creation available to your distrubutors, in particular you europeans distributor.

        is there any reason why the other distributors couldn't have made it slim, is there some special workings involved?
        Yes, that's the plan.
        And yes, they require a lot of 3d printing for the shell, I am selling them at loss. Which is only ok because I sell a small quantity.

        I have made a donation as instructed on the forum link.
        please will you send me the licence + link to latest software.
        My details:
        Discord user name: discord#6956
        Full name:  Kwok Lee

        Thanks.
        Bud, don't post your email on a public forum  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: SystemBuilder on May 04, 2023, 06:57:22 am
        Hello Sir Jaybee

        A few questions if I may ask.

        1) Is your system expandable for for than 4 x Led units, eg 8, 12 or 16 for best accuracy

        2) How does the vibration work, is it only programmed to vibrate when you reload or shoot, or is it mapped to in game vibration like a standard xbox one controller connected to PC? So if a game supports vibration and a standard xbox on controller vibrates in game does the gun4ir follow the same vibration path? Reason I am asking I am looking to add vibration to a Custom Aracade controller build and was wondering how to go about it.

        3) Is it possible to make use of two motors for vibration like they have in standard xbox one controller?

        4) Is it possible to wire in an analogue stick to gun4ir, (5v, ground signal) and max number of buttons can be used if using recoil and vibration?

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: flybynight on May 06, 2023, 05:10:59 pm
        Inspired by the recent time crisis 2 mame fixes, I've dived head first into gun4ir.

        The 2x guns I bought are the time crisis 3 reproductions "NAMED" branded with the rumble and solenoid with kick back. Pink and blue guns. The TC3 guns are expensive but I went with them anyway as the cheaper TC4 repro gun shell I've read are too small. Also ordered a genuine arcade time crisis pedal. Probably would have been cheaper to buy an old Time Crisis 2 cabinet :D

        I've of course donated to JB and have the official guide and software. (Thanks JB!)

        Before I go it alone, has anyone already added gun4ir to a NAMED shell? Can you offer any guidance?
        I'm asking because on the first page of the guide has the BOM list of parts to order and there are different options for the pcb and I don't want to order something that doesn't fit or is the wrong choice for this shell.

        Also is anyone selling kits or do I buy the parts individually from ebay?

        I'm also reading about new "slimline" leds but can't find them for sale?

        By the way this will be used on a sega Naomi cabinet with 29 inch 31khz 4:3 monitor with a PC connected to it.

        Cheers!


        _________

        EDIT:

        Went ahead and ordered both a pro micro and a teensy. Got the camera from farnells. Other bits from amazon and eBay.

        Couldn't find anyone with a guide specific to the NAMED Time Crisis 3 shells. There are a few videos and links to RPEG and aliexpress offering Pre-modded NAMED guns. A bit crappy they didn't post actual "how to" guides for DIY or even a picture of the internals on a fully modded one.

        Just the leds to sort now. Might try those aliexpress wireless ones unless anyone has a better suggestion?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: BlaqKing on May 11, 2023, 06:12:26 am
        Good Morning Sir! I am a HUGE fan of Yours and wanting to know how much You will charge to modify the Guns if I send them to You. I want to have 2  GunCon controller (known as G-Con 45 in Europe) (the black one)
        And 2 Guncon 2 as I will buy them ASAP if You are willing to modify them for me. You don't modify Guncon 3's do You? I will contact You on Discord as well. Thank You so much as I am sa fan of Yours.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: GRA71 on May 18, 2023, 04:18:49 am
        Bonjour,
        Dans le jeu EndGame sur PS2, avec le plug-in « Nuvee », il fallait calibrer le lightgun avec les paramètres suivants, sinon on tirait dans le cercle rouge, après réglage le tire était correct (dans le cercle vert). Paramètres à rentrer dans le fichier « nuvee_ps2_usb_guncon_profiles.ini »

        (https://zupimages.net/up/23/20/lalc.jpg)

        (https://zupimages.net/up/23/20/7tad.png)

        (https://zupimages.net/up/23/20/2j1u.png)

        Avec la nouvelle version de l’émulateur PCSX2 Nightly (1.7.4517), il n’y a plus besoin du plug-in « Nuvee » pour les railshooters, mais dans le jeu EndGame les tirs sont toujours décalés.

        J’ai essayé de modifier les paramètres suivants sans résultats et en cochant la case Manual Screen Configuration :

        (https://zupimages.net/up/23/20/j6rm.png)

        Merci pour votre aide  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on May 18, 2023, 11:09:56 pm
        Hello Sir Jaybee

        A few questions if I may ask.

        1) Is your system expandable for for than 4 x Led units, eg 8, 12 or 16 for best accuracy

        2) How does the vibration work, is it only programmed to vibrate when you reload or shoot, or is it mapped to in game vibration like a standard xbox one controller connected to PC? So if a game supports vibration and a standard xbox on controller vibrates in game does the gun4ir follow the same vibration path? Reason I am asking I am looking to add vibration to a Custom Aracade controller build and was wondering how to go about it.

        3) Is it possible to make use of two motors for vibration like they have in standard xbox one controller?

        4) Is it possible to wire in an analogue stick to gun4ir, (5v, ground signal) and max number of buttons can be used if using recoil and vibration?

        1) the sensor we have is limited to 4 points. and adding more won't increase accuracy anyway, it's already as high as it can possibly be.

        2) it's handle by the gun, lightgun game that use dinput or xinput rumble are very very rare. but you can also pilot it with mamehooker and demulshooter.

        3) not really useful, but you could probably try to do it anyway.

        4) not yet, and all these info are in the pdf manual I provide with the license.

        Inspired by the recent time crisis 2 mame fixes, I've dived head first into gun4ir.

        The 2x guns I bought are the time crisis 3 reproductions "NAMED" branded with the rumble and solenoid with kick back. Pink and blue guns. The TC3 guns are expensive but I went with them anyway as the cheaper TC4 repro gun shell I've read are too small. Also ordered a genuine arcade time crisis pedal. Probably would have been cheaper to buy an old Time Crisis 2 cabinet :D

        I've of course donated to JB and have the official guide and software. (Thanks JB!)

        Before I go it alone, has anyone already added gun4ir to a NAMED shell? Can you offer any guidance?
        I'm asking because on the first page of the guide has the BOM list of parts to order and there are different options for the pcb and I don't want to order something that doesn't fit or is the wrong choice for this shell.

        Also is anyone selling kits or do I buy the parts individually from ebay?

        I'm also reading about new "slimline" leds but can't find them for sale?

        By the way this will be used on a sega Naomi cabinet with 29 inch 31khz 4:3 monitor with a PC connected to it.

        Cheers!


        _________

        EDIT:

        Went ahead and ordered both a pro micro and a teensy. Got the camera from farnells. Other bits from amazon and eBay.

        Couldn't find anyone with a guide specific to the NAMED Time Crisis 3 shells. There are a few videos and links to RPEG and aliexpress offering Pre-modded NAMED guns. A bit crappy they didn't post actual "how to" guides for DIY or even a picture of the internals on a fully modded one.

        Just the leds to sort now. Might try those aliexpress wireless ones unless anyone has a better suggestion?
        Several of my users made that mod, you can see them on my discord server.
        The ali express sellers are scammers stealing my tech without any kind of agreement with me or compensation. Plus the quality is abismally bad, I get a lot of complain and of course I do not give any kind of support for these.

        Good Morning Sir! I am a HUGE fan of Yours and wanting to know how much You will charge to modify the Guns if I send them to You. I want to have 2  GunCon controller (known as G-Con 45 in Europe) (the black one)
        And 2 Guncon 2 as I will buy them ASAP if You are willing to modify them for me. You don't modify Guncon 3's do You? I will contact You on Discord as well. Thank You so much as I am sa fan of Yours.
        Hey, are you living in the US? If yes, you can contact Ray from RPEG electronics, he might be able to help you with that.

        Bonjour,
        Dans le jeu EndGame sur PS2, avec le plug-in « Nuvee », il fallait calibrer le lightgun avec les paramètres suivants, sinon on tirait dans le cercle rouge, après réglage le tire était correct (dans le cercle vert). Paramètres à rentrer dans le fichier « nuvee_ps2_usb_guncon_profiles.ini »

        (https://zupimages.net/up/23/20/lalc.jpg)

        (https://zupimages.net/up/23/20/7tad.png)

        (https://zupimages.net/up/23/20/2j1u.png)

        Avec la nouvelle version de l’émulateur PCSX2 Nightly (1.7.4517), il n’y a plus besoin du plug-in « Nuvee » pour les railshooters, mais dans le jeu EndGame les tirs sont toujours décalés.

        J’ai essayé de modifier les paramètres suivants sans résultats et en cochant la case Manual Screen Configuration :

        (https://zupimages.net/up/23/20/j6rm.png)

        Merci pour votre aide  ;)

        Rejoins the channel français de mon serveur discord, on pourra plus facilement t'aider ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: flybynight on May 19, 2023, 04:59:58 am
        Thanks JB. I don't use discord but I found this guide online so I'll likely follow this:
        https://flatfootfox.com/a-look-at-the-gun4ir-light-gun/  (Believe it or not, it's actually the only guide I could find online!).

        Everything has arrived so far except the actual NAMED guns.

        Will post my progress here for others to see.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: gamejoyarcade on May 24, 2023, 07:32:15 am
        After using my gun4ir gun for a certain period of time, it does not automatically identify the usb device after a certain period of time, I tried it on my different computer, the same problem occurs again, this may be the reason, I changed the arduino, this did not solve my problem
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: vilegar on May 27, 2023, 07:30:20 am
        Hi, I have made a donation with Paypal.
        please can you send me the licence & latest software.
        Paypal Id. de transacción
        7XD9957967180721J
        Best regards.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: MarkJG on June 02, 2023, 08:35:06 am
        Hi JayBee, just to let you know I have just made the donation for the software and license... my details should be with the PayPal payment.
        Name: Mark Godfrey
        Discord: MarkJG
        Transaction ID: 5BW697646B3640237
        Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on June 05, 2023, 10:38:22 am
        Hi, I have made a donation with Paypal.
        please can you send me the licence & latest software.
        Paypal Id. de transacción
        7XD9957967180721J
        Best regards.
        Hi JayBee, just to let you know I have just made the donation for the software and license... my details should be with the PayPal payment.
        Name: Mark Godfrey
        Discord: MarkJG
        Transaction ID: 5BW697646B3640237
        Thanks.
        Thanks guys, I did send you everything, but please keep your private info in private message  ;)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Jardielsilva on June 05, 2023, 09:31:58 pm
        goodnight!
        i am having problem with installing rumble and solenoid. I did it according to the diagram, but when I turn on 12v the solenoid recoils without pressing the trigger and does not come back and the rumble does not trigger. The Arduino LED lights up when I press the trigger. does anyone know what could be going on?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Arcade-Man on July 01, 2023, 02:46:34 pm
        Hi, I have made a donation with Paypal.
        please can you send me the licence & latest software.
        Paypal Id. de transacción
        7XD9957967180721J
        Best regards.
        Hi JayBee, just to let you know I have just made the donation for the software and license... my details should be with the PayPal payment.
        Name: Mark Godfrey
        Discord: MarkJG
        Transaction ID: 5BW697646B3640237
        Thanks.
        Thanks guys, I did send you everything, but please keep your private info in private message  ;)

        Hi, so I just follow the paypal link and the software will be emailed to me? Thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Secret of Mana on July 06, 2023, 12:29:51 am
        Hi Jaybee, I was excited when I first hear about GUN4IR, I have a few old guns waiting to be modded but I'm having a problem making a donation to ur paypal account as it said "donation to this recipient aren't supported in this country". Upon searching for the workaround, it seems this is a pretty common problem in paypal, users in some countries can't donate thru links for unknown reason, their solution is to send money to the account user directly. Perhaps u can give me ur paypal username or email for sending money? Please advise, thnx.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: vilegar on July 15, 2023, 04:35:28 am
        Hi, I have made a donation with Paypal.
        please can you send me the licence & latest software.
        Paypal Id. de transacción
        7XD9957967180721J
        Best regards.
        Hi JayBee, just to let you know I have just made the donation for the software and license... my details should be with the PayPal payment.
        Name: Mark Godfrey
        Discord: MarkJG
        Transaction ID: 5BW697646B3640237
        Thanks.
        Thanks guys, I did send you everything, but please keep your private info in private message  ;)

        Hi, so I just follow the paypal link and the software will be emailed to me? Thanks

        Hello Arcade-Man, He sent me the link to download the latest software version, and he sent me the license file to be able to use the gui
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Floweringapple on August 09, 2023, 08:24:50 am
        Hey JayBee, I sent a donation but I failed to provide my info in the notes section. I also cannot send DMs here (perhaps because my account is too new?) What's the best way to get in contact with you to provide my info for download.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: PL1 on August 09, 2023, 02:00:41 pm
        I also cannot send DMs here (perhaps because my account is too new?)
        When your first post was approved, your account was auto-upgraded to "Jr. Member" so you should be able to send PMs now.   :cheers:


        Scott
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: POPO69 on August 11, 2023, 08:23:52 am
        Hello what is the solution to add mamehooker with gun ir? Tks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: POPO69 on August 15, 2023, 03:25:11 pm
        Hello can you give me the last update? I have the 1.2 beta.
        Tks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Javier Uva on August 28, 2023, 07:00:07 am
        Hi, i am new in the forum, how can i get the last update?
        Regards.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: bigwilly on August 31, 2023, 10:48:45 am
        Hello
        I purchased a licence from the donation last week and haven't received any e-mail regarding the software what is the usual time it takes to arrive?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: retroman2022 on September 01, 2023, 01:49:06 pm
        Hi Jb,
        I did donation for license.
        What is the next step?
        Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: retroman2022 on September 01, 2023, 01:55:50 pm
        Hi JB,
        Amazing job!
        Thanks.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: POPO69 on September 11, 2023, 05:30:35 pm
        Hello I have a problem with Mamehooker and Operation Ghost.
        Can I have the Ini file in Mamehooker please?
        Tks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: MaxG on December 09, 2023, 06:18:55 pm
        Hi,

        I have some problems runnig the programm.
        I downloaded everthing and put the licence file in the same folder.
        I connected an "adafruit Itsybitsy 32u4 5V 16Mhz" and tried to flash the controller.
        but after opening the

        GUI -> Tools -> Flash Firmeware

        I cant click on anything.

        Somebody knows what Im diong wrong? How can I get the programm on the controller?

        Merci for your answers

        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 10, 2023, 10:35:57 am
        Hi,

        I have some problems runnig the programm.
        I downloaded everthing and put the licence file in the same folder.
        I connected an "adafruit Itsybitsy 32u4 5V 16Mhz" and tried to flash the controller.
        but after opening the

        GUI -> Tools -> Flash Firmeware

        I cant click on anything.

        Somebody knows what Im diong wrong? How can I get the programm on the controller?

        Merci for your answers
        itsy bitsy boards often need to be initialized with arduino IDE, you can flash it as "micro" or "leonardo" board in the IDE, it should then work perfectly.
        Also check that the board is being detected properly by the pc.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Flomartin on December 10, 2023, 12:04:52 pm
        Bonjour Jean-Baptiste,

        Je me permets de poster ici ne sachant pas trop comment vous contacter.

        Sur le site Facebook de Gun4IR, vous aviez indiqué que des ensembles préassemblés seraient disponibles sous peu pour la France.

        Je voulais juste savoir s'il y avait une chance que ceux-ci soient disponibles avant Noël ?

        Juste pour savoir si je peux compter dessus comme cadeau, ou s'il vaut mieux que je trouve une autre idée :)

        Un grand merci pour votre retour !
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: MaxG on December 10, 2023, 01:48:06 pm
        Thanks a lot. It works perfectly now.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on December 10, 2023, 09:52:03 pm
        Bonjour Jean-Baptiste,

        Je me permets de poster ici ne sachant pas trop comment vous contacter.

        Sur le site Facebook de Gun4IR, vous aviez indiqué que des ensembles préassemblés seraient disponibles sous peu pour la France.

        Je voulais juste savoir s'il y avait une chance que ceux-ci soient disponibles avant Noël ?

        Juste pour savoir si je peux compter dessus comme cadeau, ou s'il vaut mieux que je trouve une autre idée :)

        Un grand merci pour votre retour !
        Oui il le seront, il en aura quelques uns de disponibles cette semaine  ;D
        Il vaut mieux rejoindre mon groupe facebook ou discord pour recevoir les notification pour la date exacte, qui sera annoncée sur ces différents médias
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Flomartin on December 11, 2023, 01:52:03 am
        Merci Jean-Baptiste pour ta réponse rapide ;)

        Je vais essayer de rejoindre le groupe Discord alors, pour être sûr de ne pas louper l'annonce !

        Encore merci pour ton retour, et j'espère bien faire partie des heureux élus qui en auront un  ;D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ongtw on December 16, 2023, 11:41:20 pm
        hi i am from singapore and i cannot donate to download the gun4ir software as my region singapore whether card or paypal cant donate to your account
        please provide me a valid link to donate so i can download the software ?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: ongtw on December 17, 2023, 12:04:01 am
        hi i am from singapore and i cannot donate to download the gun4ir software as my region singapore whether card or paypal cant donate to your account
        please provide me a valid link to donate so i can download the software ? my email is ongteckwei@gmail.com please reply so i can pay the donation to download the software
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: An0thernumber on December 26, 2023, 07:13:27 am
        Hi JayBee I donated a couple days ago and send a PM on this forum. Is there anything else I need to do to get the licence?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Vitaly17 on January 06, 2024, 05:32:30 pm
        Could you tell me how to load the calibration settings into the gun before starting the game. I use non-standard bezels for some mame games. For the 4:3 settings, I use the  command "Run ,%COMSPEC% /C echo M3.1 >COM 1,, hide". But what about the non-standard calibration? Is there any way to save the calibration settings and send them to the gun? Otherwise, I have to turn on the scope and recalibrate the weapon with a non-standard bezel. I have given an example below, sorry for my English.
        (https://i.postimg.cc/vH0kgYQg/IMG-1911.jpg)
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: dhoyosg on January 11, 2024, 03:39:22 am
        Hi JayBee I donated a couple days ago and send a PM on this forum. Is there anything else I need to do to get the licence?
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Roi973 on January 15, 2024, 11:38:48 am
        good evening, I donated yesterday for the software license. I await news. A thousand thanks
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TapeWormInYourGut on March 06, 2024, 09:35:23 pm
        @JayBee I've been using GUN4IR for a little over a year now and really love it.

        I don't know if anyone has ever shown interest in a feature like this, but is it possible to add another "auto reload" mode that would press+hold the reload button whenever you're pointing the gun off-screen? And have the ability to set this option via serial commands? It's not a purely automatic reload, but I find it to be a nice hybrid.

        Maybe newer games have spoiled me with the way that they've implemented their reload. I'm kind of thinking that Nintendo started this trend with the Wii. There seems to be a few emulators that hack this in as well. Anyways, if there is ever a feature to be requested, then that would be mine  >:D
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: JayBee on March 07, 2024, 03:43:36 am
        @JayBee I've been using GUN4IR for a little over a year now and really love it.

        I don't know if anyone has ever shown interest in a feature like this, but is it possible to add another "auto reload" mode that would press+hold the reload button whenever you're pointing the gun off-screen? And have the ability to set this option via serial commands? It's not a purely automatic reload, but I find it to be a nice hybrid.

        Maybe newer games have spoiled me with the way that they've implemented their reload. I'm kind of thinking that Nintendo started this trend with the Wii. There seems to be a few emulators that hack this in as well. Anyways, if there is ever a feature to be requested, then that would be mine  >:D
        Yeah it's already in the feature list for future updates.
        It's a tricky feature at it could cause the button to stay held down whenever you aren't using the gun, which is definitely something you don't want.
        But I've got a few ideas on how to fix that.
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: TapeWormInYourGut on March 07, 2024, 07:50:28 am
        Ah I see. I hadn't even thought about how it would act outside of play like that :banghead:
        Title: Re: GUN4IR - The Ultimate 4 Points Lightgun System
        Post by: Daniel B. on March 18, 2024, 05:15:33 pm
        Ok so it's been a couple of years since I donated. Is this still the most up to date version from my link?

        JB_GUN4IR_GUI_1.26_FW_2.64.zip

        If not, may I please email you JB for an update?


        Additionally, If I purchase this https://rpegelectronics.com/products/universal-gun4ir-diy-pcb?pr_prod_strat=jac&pr_rec_id=6a4074826&pr_rec_pid=7500555387069&pr_ref_pid=7150185021629&pr_seq=uniform

        Aside from a gun shell, what else is needed to be purchased? I'm trying to decide if I want to build this or just put sindens on the credit card and hide from my wife.

        Thanks all.
        Daniel