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

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

Poll

02/19 I will add RGB led support soon, I need for that to use 3 arduino PWM pins, which are currently being used by Pedal, Start & Right. I will do 2 firmwares, one with 11 buttons, and one with 8 button+led. How should they behave?

Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active
0 (0%)
Swap the pedal and start pins with some of the DPad ones, and disable only the DPAD when the RGB led is active
2 (50%)
Other (post a message to tell me what you think).
2 (50%)

Total Members Voted: 4

  

Author Topic: JayBee DIY 4 IR Led Lightgun System (no calibration needed)  (Read 62501 times)

0 Members and 1 Guest are viewing this topic.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #640 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!

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:November 26, 2020, 05:55:02 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #641 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.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #642 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  :-\

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 262
  • Last login:Today at 08:07:30 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #643 on: October 04, 2020, 04:55:58 pm »
You need to turn lightgun to 1, not mouse.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:November 26, 2020, 05:55:02 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #644 on: October 04, 2020, 06:16:36 pm »
how do you send commands via serial with your GUI?
« Last Edit: October 04, 2020, 09:54:32 pm by Jardielsilva »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #645 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.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #646 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
« Last Edit: October 07, 2020, 11:19:57 am by JayBee »

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:November 26, 2020, 05:55:02 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #647 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.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 262
  • Last login:Today at 08:07:30 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #648 on: October 08, 2020, 10:01:31 pm »
Look here:
It's aimed at aimtrak users, but the procedure is the same for all guns basically.

Jardielsilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:November 26, 2020, 05:55:02 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #649 on: October 09, 2020, 07:57:56 pm »
Look here:
It's aimed at aimtrak users, but the procedure is the same for all guns basically.

thank you very much, it worked!

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #650 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

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #651 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!  ;)

lodoss118

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
  • Last login:October 25, 2020, 04:54:19 pm

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #653 on: October 26, 2020, 08:08:04 pm »
Great review video of my system by Ben!  ;D

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #654 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_
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.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #655 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

nicr4wks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:November 25, 2020, 09:28:10 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #656 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.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #657 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.

ZedEx48K

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:November 30, 2020, 07:47:56 am
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #658 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.


JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #659 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

ZedEx48K

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:November 30, 2020, 07:47:56 am
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #660 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.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #661 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 ;)

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #662 on: November 26, 2020, 07:47:04 pm »
2 nice videos by hyo2012 that show my system really well;  ;D


thetone

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:December 01, 2020, 01:13:00 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #663 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.

Vounomer

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:Today at 12:29:41 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #664 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

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 339
  • Last login:December 01, 2020, 09:35:12 pm
  • If I can't buy it, I build it.
    • Github
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #665 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 ;)

Vounomer

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:Today at 12:29:41 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #666 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 :)