Main > Lightguns
GUN4IR - The Ultimate 4 Points Lightgun System
<< < (30/227) > >>
Mysli0210:

--- Quote from: JayBee on January 15, 2020, 08:14:26 pm ---
--- Quote from: Mysli0210 on January 15, 2020, 09:06:55 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

--- End quote ---
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.

--- End quote ---

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.
JayBee:

--- Quote from: janderclander14 on January 16, 2020, 05:33:00 am ---
--- Quote from: JayBee on January 15, 2020, 08:14:26 pm ---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:

--- End quote ---

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
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
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

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/2-Units-Handle-Vibration-Rumble-Motor-Motors-Replacement-For-PS3-Move-Controller/122490167409?hash=item1c84fba071:g:d68AAOSwcB5ZFDxl

--- End quote ---
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.
JayBee:

--- Quote from: Mysli0210 on January 16, 2020, 06:35:48 am ---
--- Quote from: JayBee on January 15, 2020, 08:14:26 pm ---
--- Quote from: Mysli0210 on January 15, 2020, 09:06:55 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

--- End quote ---
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.

--- End quote ---

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.

--- End quote ---
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.
janderclander14:

--- Quote from: JayBee on January 16, 2020, 11:02:32 am ---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.

--- End quote ---

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

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

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!
JayBee:

--- Quote from: janderclander14 on January 16, 2020, 01:27:54 pm ---
--- Quote from: JayBee on January 16, 2020, 11:02:32 am ---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.

--- End quote ---

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

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

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!

--- End quote ---
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
Navigation
Message Index
Next page
Previous page

Go to full version