Nice work JayBee, can't wait to check out your code.Actually this time I'm not sure I will share the source code yet, for ease of use, update and prevent any problem.
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.
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.:applaud: :applaud: :applaud:
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.
You got it done before I even had a chance to sit down and work on it. :afro:It wasn't so hard, your tool makes things so much more simple :cheers:
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.
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 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 :-\
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.
I can send you the Arcade Guns Aimforce dongle software to look at if it would be helpful?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.
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.
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'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 ;)
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?
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.As I already told you, none of the options you suggest are available here in Japan where I live.
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.
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".The jolt gun I found + sending fees was more than 100$ in total.
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.
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 ;)
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".The jolt gun I found + sending fees was more than 100$ in total.
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.
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.
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.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".The jolt gun I found + sending fees was more than 100$ in total.
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.
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.
Thanks, @JayBee @Samco @Hifi and all others involved, you're awesome!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.
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 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.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.
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.
Congratulations JayBee, great work :applaud:Thanks :)
Will you update the source code at GitHub later on, or is the project closed source now?
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.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".The jolt gun I found + sending fees was more than 100$ in total.
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.
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.
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.
Oh I see! My bad, I guess I didn't search well enough ::)
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.
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 ;)
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.That's a lot of info, thanks! :D
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.
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 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).
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]]
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.Not saying this market doesn't exist, far from it. Just saying that for different reasons they don't sell lightguns.
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
Sooooo.... after doing a tiny bit of research... i found out that the nintendo Switch has got a pretty sweet ir camera.Dude that's very interesting research you are doing there :lol
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.
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
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!
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? ???
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?
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.
Thats exactly what I'm telling you 8-)That's really cool dude! Would you have a kind of schematics for that? Would love to test it :D
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
Awesome, can't wait to see your schematic ;)
: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.?
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 they wanted to keep it simple for everyone to use, even everyone's grandma, while keeping it low cost for them? :lol
I guess the obvious answer is that they didn't intend to design it to be a light gun.
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?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
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.
Not really an answer to all of the above.. (quoting is hard on the phone)Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol
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
Not really an answer to all of the above.. (quoting is hard on the phone)Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol
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
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.
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)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.
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 :-)
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.Not really an answer to all of the above.. (quoting is hard on the phone)Yeah was thinking about that too, but decoding this communication protocol seems to be such a pain :lol
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
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).
JayBee, Can you add analog input feature on firmware? 2 axis are ok.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.
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.
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).
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.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.
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 😅
Well i think seeing as it would be so easy to implement it and totally omittable during the specific build.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.
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.
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.Doesn't look that bad to me, but might be because I am terrible at it :lol
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)
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.
Doesn't look that bad to me, but might be because I am terrible at it :lolIt 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 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
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.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.
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)
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.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
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.
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.
JayBee, Can you add analog input feature on firmware? 2 axis are ok.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.
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.
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.
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'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.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 used KiCad to design the schematics.None of the buttons in my guns have 4 leads, they aren't arcade guns.
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 ;)
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.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.
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.
Well i cant really see whats going on behind that hot-snot glue (which you can remove with rubbing alcohol, if need be ;))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.
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.
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.
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.
JayBee, Can you add analog input feature on firmware? 2 axis are ok.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.
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.
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.Yes we were. Where did we speak about the aimtrak?
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.
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.
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’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
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.
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?That's a good suggestion, I might try to see how it will react with a kind of half sphere filter.
the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.
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?That's a good suggestion, I might try to see how it will react with a kind of half sphere filter.
the wii remote sensor bar and my ems topgun sensor bars seem to have pretty uniform brightness, mostly independent of viewing angle.
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.
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?
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?
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.
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.
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?
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.
Thanks for the info, makes more sense now!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 :)
Finally recieved my 5mm 940nm leds :D
And can confirm that they do work fine from at least 1 meter.
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 particularActually it's on the work right now, I've finally found a pretty good solution that works well in any situation.
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 :)
All of the aboveI got these, actually nothing special.
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 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 ;DFor 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!I will share the diagrams later when I finally find the time to do them.
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
Only the Atmega32u4 5V/16MHz work with my firmware, the other boards miss some functionalities.
Well, i was kind of waiting for you to share it with me, not the general public. As you told me you would earlier.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 ;DFor 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).
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.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.
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.
the ItsyBitsy boards miss some functionalities needed for this system to work flawlesslyDoes your firmware use any of the unconnected ports (pins) mentioned above, JayBee, or are the "functionalities" you mentioned something else? :dunno
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.Sounds good. ;D
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.I agree that open-sourcing the project would be great.
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.
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.You mean mirrored with my sketch? Or just as is? Did you test with samco's test sketch?
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:
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:
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.
That image is the Rosetta Stone for your OP. :applaud:Yeah I should have joined it.
- 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
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. ::)
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
- 8* SID1K10CM led or similar specs (they have an angle of only 30° but are very powerful)
@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.
Did a little testing tonight (rotated my camera 180)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 ;)
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
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
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).
Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.Did a little testing tonight (rotated my camera 180)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 ;)
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
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
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 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.
Well reflections could make some interference. but remember, IR light does not pass through all glasstypes equally.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 I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.Are your TV and games 16/9 or 4/3?
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
To answer to your questions:
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]
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:
Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.Are your TV and games 16/9 or 4/3?
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
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.
Very nice, you've been doing some good research too on the subject ;DBut 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)
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.Well I placed them as you see in the pictures I posted, they are around 10 mm off the border of the screen.Are your TV and games 16/9 or 4/3?
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
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.
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 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).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!
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.
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.Thanks for the pics! And very nice cab by the way :applaud:
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, it has a few super neat secrets within, which you'll get pics of later :)Yeah the eeprom wearing out was one of my concerns for this sketch.
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
Thanks, it has a few super neat secrets within, which you'll get pics of later :)Yeah the eeprom wearing out was one of my concerns for this sketch.
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
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!Glad it worked! ;D
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?
This looks like a really awesome project, I'm definitely gonna build one.That's a good question, I definitely have to take some time measuring it ;D
how close can you get to a 55 inch without sacrificing accuracy?
i'm installed arduino ide but in \AppData\Local\Arduino15\
dir packages not present,
do I have to install anything else?
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)
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"Quoteavrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.confMAC: Change "tty.usbmodemXXXX" to the bootloader device used by your Arduino i.e. "tty.usbmodem1411"Quote#!/bin/shLinux: Change "ttyACMX" to the bootloader device used by your Arduino i.e. "ttyACM0"
avrdude -p atmega32u4 -P /dev/tty.usbmodemXXXX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.confQuote#!/bin/sh8. Rename "miniArcade2.txt" to "miniArcade2.bat" (Windows) or "miniArcade2.sh". (MAC or Linux)
avrdude -p atmega32u4 -P /dev/ttyACMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
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)
avrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -C avrdude.conf
Assuming that the dfrobot cam is the same as the wiimote camera (which I think I proved by building my gun with it)Your calculations look accurate, thanks :applaud:
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)
Yeah I have to improve the explanation for that in my post, to make it more clear and convenient.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).QuoteArduino 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")Quote6. 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"Quoteavrdude -p atmega32u4 -P COMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.confMAC: Change "tty.usbmodemXXXX" to the bootloader device used by your Arduino i.e. "tty.usbmodem1411"Quote#!/bin/shLinux: Change "ttyACMX" to the bootloader device used by your Arduino i.e. "ttyACM0"
avrdude -p atmega32u4 -P /dev/tty.usbmodemXXXX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.confQuote#!/bin/sh8. Rename "miniArcade2.txt" to "miniArcade2.bat" (Windows) or "miniArcade2.sh". (MAC or Linux)
avrdude -p atmega32u4 -P /dev/ttyACMX -c avr109 -U flash:w:MINIARCADE2.hex -U eeprom:w:EEPROM.eep -C avrdude.conf
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.Quoteavrdude -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.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.That might be handy for boards like the Pro Micro that don't have an onboard reset button. ;D
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. ;DThat'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
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
Guess i dont have to create that avr-dudess guide anyways :PI just tested my gun with the last firmware, it still has the B button as middle click.
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've connected the buttons according to your diagram.It's weird, I tested my GCon 1&2 with the same diagram, they both work perfectly with middle button.
I didnt connect the pedal pin to anything.
just needed left, right and middle mouse button.
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 ;)
I've connected the buttons according to your diagram.It's weird, I tested my GCon 1&2 with the same diagram, they both work perfectly with middle button.
I didnt connect the pedal pin to anything.
just needed left, right and middle mouse 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).
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?I've connected the buttons according to your diagram.It's weird, I tested my GCon 1&2 with the same diagram, they both work perfectly with middle button.
I didnt connect the pedal pin to anything.
just needed left, right and middle mouse 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.
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 ;)
@jaybee please where can I buy the same LEDs that you used? ;DActually I bough mine in a local shop here in Tokyo, and I think this model is japanese only.
@jaybee please where can I buy the same LEDs that you used? ;DActually 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:
Not bad, they look like they'd work nicely!@jaybee please where can I buy the same LEDs that you used? ;DActually 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!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
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.
It might be hard to show anything more than the pics in the OP :PNot bad, they look like they'd work nicely!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
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.
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,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.
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 ;)
Yes you understand correctly, each circuit has its own power and is connected to the corresponding arduino pin.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?
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.
Hello JayBee news ? ;DI'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.Hello JayBee news ? ;DI'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.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).
Looking forward to building this gun. Any tips about mounting everything in a guncon 1 or guncon 2?
Hello JayBee news ? ;DI'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 :-\
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.
https://photos.app.goo.gl/AcDxtFS8RYcwP36XAReally nice setup, good job! :applaud:
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:
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 calibrationReinstalling 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.
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.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.
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? :)
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.
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
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 problemI see, it's indeed not normal, it might have something to do with the way Mame is configured.
https://photos.app.goo.gl/ChUJJa1RvkU63Gwf9 (https://photos.app.goo.gl/ChUJJa1RvkU63Gwf9)
Inviato dal mio Redmi Note 5 utilizzando Tapatalk
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 ;)
Did you do the same for the top and bottom leds too? ;DOnly on top :D
I see, it's indeed not normal, it might have something to do with the way Mame is configured.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
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?
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 ;)
Only on top :DYou 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 configurationOk so let me test my groovymame machine once I finished setting it up again, I will send you the file.
You means the bottom leds are not facing the gun either? ;D
Ok so let me test my groovymame machine once I finished setting it up again, I will send you the file.
Any thoughts about these leds:Wait, 1190mW/sr?? That's insane :lol
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.
maybe connect ten of those in series and use a 34V 1Amp ac adapter?Why would you want to use 10 of them? :lol
I'd also like to know if there's any danger associated with these leds.
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.I'm glad you manage to build it! :cheers:
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 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
thanks, but setting mouse as device for the lightgun should be seen as axes and mouse buttons right?I don't understand either, Mame is a bit obscure for me too sometime.
I don't understand why he doesn't read it like this
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?
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.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;
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 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
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?Try setting offscreen_reload to 0 in mame.ini and check.
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.Yes! It was that! So should never be used offscreen_reload?
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).
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 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.
Oh so Foxhole's solution did work? nice, thanks! :DTry 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.
Got tons of things to add and work on :lolcould 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
Use it only on games that require it, like lethal enforcers for example.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 :)
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?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
most of the issues start on the second half of the video.
Yeah that's actually a good idea of features.Got tons of things to add and work on :lolcould 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 :)
Oh I see what's happening!Use it only on games that require it, like lethal enforcers for example.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 :)
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.
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.
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.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 :-\
My room is only 3 meter large, so I can't really go beyond :lolTried 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.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 :-\
JayBee, according to the specs of the dfrobot ir cam it can detect up to 3 meter, have you managed to go beyond that?
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.
The calibration data should still be there after update ;)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 ;)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?
Perfect!!! :DYes, your guess was very good ;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
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?
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)
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.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:
Here the video where at the end you see the duplicate cursor
https://photos.app.goo.gl/vjxYt4Wt9gqoVFi18 (https://photos.app.goo.gl/vjxYt4Wt9gqoVFi18)
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)The Biogun Xbox port is 5v
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.
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:
The Biogun Xbox port is 5vIf they are truly powered in 5v and don't use so much current you can use the Arduino vcc.
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
I do use a very similar solenoid, so yeah it should work fine!
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?
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,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.
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.
- 10k resistorDoubt...10k or 100k ? Because in the scheme there is a 100k resistance
Doubt...10k or 100k ? Because in the scheme there is a 100k resistanceI'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 ;)
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 ;)
Thanks for your testing and videos :cheers:
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)
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 ;)
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.Sadly the IRF540 isn't the same, it's a power gate instead of a logic level gate.
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.ahhhhhhhrgghhhhh! At the shop they told me it was the same ...: D oh well but the solenoid works the same even if underpowered?
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 10k resistor should not be between the mosfet and the ground, but between the Gate pin and the Source pin of the mosfet.ah ok, thanks! As soon as IRL540 mosfets arrive that I ordered today I change the connections
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.
JayBee, I'm trying your test firmware with the pde file but i get the exact same issues.You don't have any other device connected that might be using a serial port?
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.
myPort = new Serial(this, Serial.list()[0], 9600);
By this line (if 13 is your arduino serial port):myPort = new Serial(this, "COM13", 9600);
That fixed it, it's working now.No it detects them only once, the second ones (slightly grayed ones) are with the tilt correction, it makes thing easier to check.
From what i can see it seems to detect each point twice(?)
gonna post a video soon.
Also, i installed the 12 leds, 3 in each point, with 100ma current going through them, they are brighter than before.I made another update, managed to find other causes of issues and fix them, it should work a lot better and more stable now.
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'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.Thanks for your video, I can see more clearly what's happening now :cheers:
https://drive.google.com/open?id=15bZ7yGlOgKJ37o0zE1ZBFgGQ65oOLFps (https://drive.google.com/open?id=15bZ7yGlOgKJ37o0zE1ZBFgGQ65oOLFps)
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);
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.3MWait, I don't see any issues in your videos :lol
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)
Thing is, when trying to play close this causes issues.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.3MWait, I don't see any issues in your videos :lol
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)
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.Yes I know, that's why I'm putting back the 2 leds detection function now.
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.
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.
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?Sorry for the confusion, I was talking about 2 points detection when going back onscreen, not 2 leds.
but is it normal that this happens in the test tool?Not normal at all... what's your screen resolution/refresh rate?
https://photos.app.goo.gl/pjzWq4PuFxzNEPZr7 (https://photos.app.goo.gl/pjzWq4PuFxzNEPZr7)
Not normal at all... what's your screen resolution/refresh rate?Windows 1024x240 60hz and Mame resolution is 2560x240 60hz :D
Great, i'll try the new firmware and report.Done! 2 points detection is back ;D
Windows 1024x240 60hz and Mame resolution is 2560x240 60hz :DOh, that explains the issue :laugh2:
it is a 15khz arcade monitor...
can the test window be set to fullscreen?
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
Unfortunately, with the new firmware, it still has issues when trying to play close.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.
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'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.
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?
To be honest, when i had the issues i didn't intentionally cause them, it just happened during gaming.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:
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.
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.Yeah that's what I was talking about, the 2 points detection got messed up, then messed up the rest.
Video: https://drive.google.com/open?id=1zWEkAIouOJjYLIhZeE1PaEPkSsSMsr9- (https://drive.google.com/open?id=1zWEkAIouOJjYLIhZeE1PaEPkSsSMsr9-)
Thank you.That's interesting, do you know any good way to make donations?
As for the patreon, to be honest never used it but others may be on board.
Personally, i just prefer donating without any middleman.
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
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
Sorry I forgot that the windows resolution is not 1024x240 but 1024x480: DIt'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 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)
https://photos.app.goo.gl/bUEDRdhdgwJJy2rT9 (https://photos.app.goo.gl/bUEDRdhdgwJJy2rT9)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).
but the black dots indicate that there is a problem with the detection of the leds?
Yeah the 5v looks correct for me.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 ;)
But I just realized something funny: your gun is clearly picking up the scrolling light under your cab, and it messes with it :laugh2:
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.
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
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?
rumble + to pin1Sorry I have no idea, I don't know this type of component so much :P
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?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.
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?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.I have arcade ones, but how is it connected to the power supply and the solenoid? :D
Like the buttons in arcade controls.
Be careful that it's strong enough to not get damaged by the 24v tho.
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.I meant a push switch, only closing the circuit when you push.I have arcade ones, but how is it connected to the power supply and the solenoid? :D
Like the buttons in arcade controls.
Be careful that it's strong enough to not get damaged by the 24v tho.
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.
I use only the left one on the picture, because my power supply already has connector like on the right.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 ;)
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
Thank you, i'm gonna give it a good challenge :cheers:Yes both are updated.
Is the IR Test also updated?
Yes both are updated.
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.Glad it's becoming better! :cheers:
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.
I'm actually doing another version that can work with pretty much any resolution/COM port ;)
If you have time, could you make a 1024x480 version of the tool to test the LEDs? Thanks :)
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.Gotcha. So is this issue the same as before or kind of new with the last firmware?
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.
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.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.Gotcha. So is this issue the same as before or kind of new with the last firmware?
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.
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.Indeed, the 2 points detection is great to aim in corners but obviously more prone to errors if there are any tracking issues :banghead:
1.65 was pretty stable because 2 point detection was off, so there were less mistakes when playing from afar.
If you'd like i can test firmware 1.65 more extensively from afar to see how it holds up in long gaming sessions.Ah, house of the dead 3, a very nice one to test ;D
I think i'll try it on House of the dead 3.
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 :PNo problem, let me know when it's up and i'll try it.
Do you think making this system an 8 point system would allow better stability when playing close?Yeah I really wish this cam could see more than 4 points at a time, it would be far better.
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.
Will try this firmware.That's good to know! I wonder if I should disable the 2 points detection automatically when playing from afar.
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 cool this firmware ...: DAwesome! We are almost there! ;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!
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 ;)
Ok, i tested the new firmware from close distance, and i edited the video to highlight the issues.Very interesting to watch the video frame by frame to see what's going on! :cheers:
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.
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).Hmm, reflection... the monitor is on a glass table.
It looks like the IR cam picked up something else, like a reflection of the leds on something?
Oh I see!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).Hmm, reflection... the monitor is on a glass table.
It looks like the IR cam picked up something else, like a reflection of the leds on something?
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.
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?
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.
Kill_one, what is the distance between your gun and the LEDS?
Tested the gun on a 42" inch 16:9 plasma.I'm glad we got it working the way it is, thanks for your careful testing it really helped :cheers:
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.
https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA (https://photos.app.goo.gl/h7n7cBqrzTkwGjpRA)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
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? :lolThen covered or did not do the same problem and that is it moves down but rarely with the latest firmware: D
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: DYou 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 ;)
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 ;)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.
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
what resistance would it take then? and would the 5v 1a power supply suffice?Wait, before building more hardware let's do a bit more testing with your current setup to be sure of what to do.
could the fact of the dim light of the upper and right LEDs be that sometimes the cursor duplicates or moves?
@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?Yes, it should work no matter the resolution ;)
Yes, it should work no matter the resolution ;)Last firmware test not work... It's normal
What do you mean by not working?Yes, it should work no matter the resolution ;)Last firmware test not work... It's normal
flashing the attached test firmware does not show the LEDs but only the mouse cursor, I attach the link to the videoWhat do you mean by not working?Yes, it should work no matter the resolution ;)Last firmware test not work... It's normal
I just tested both the last firmware with the last fullscreen tool, it works perfectly.
Did you change the com port to match yours? (It changes alone sometime)flashing the attached test firmware does not show the LEDs but only the mouse cursor, I attach the link to the videoWhat do you mean by not working?Yes, it should work no matter the resolution ;)Last firmware test not work... It's normal
I just tested both the last firmware with the last fullscreen tool, it works perfectly.
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)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? :lolyes... :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 :DDid 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! : DAnd by the way why do you have a crosshair ? Is that a Windows cursor? :lolyes... :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)
I have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't workNo no, you just have a value to modify at the beginning of the pde file now, there is even an explanation written in it ;)
In my opinion you should put a note on this on the first page ...: D
ah ok! thanksI have to put this string "myPort = new Serial (this, "COM1", 9600);" otherwise it doesn't workNo no, you just have a value to modify at the beginning of the pde file now, there is even an explanation written in it ;)
In my opinion you should put a note on this on the first page ...: D
The "comPort" value. Replace the 0 by whatever your port number is.
Yep, is very cool! I love it ;)That's a really cool cursor pack! I'm going to try it on my arcade PC :DDid 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! : DAnd 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)
https://photos.app.goo.gl/24YUJ6pBf3WQqWne6 (https://photos.app.goo.gl/24YUJ6pBf3WQqWne6)I think the dim leds are more because of the angle, on your tests it seems to be picking them up ok.
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.tonight i try.. ;)
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.
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!!! :DYes, it looks ok! :applaud:
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.
* 2020/02/16 - 1.75Thanks, JayBee, i haven't fully tested this firmware yet but i did run into two issues that i haven't faced before.
- 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.Thanks for the bug report! :cheers:
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.
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 would totally be possible once implemented!
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.
Yes, it looks ok! :applaud: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.
In the version 1.7 I restored the cursor accuracy, now it should be as smooth as before ;)
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!!! :DThe 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
(http://killone.myqnapcloud.com/sp/soleno.jpg)
Glad it's finally working for you!Yes, it looks ok! :applaud: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.
In the version 1.7 I restored the cursor accuracy, now it should be as smooth as before ;)
https://photos.app.goo.gl/6uXxnmVPUGW2mBTW8 (https://photos.app.goo.gl/6uXxnmVPUGW2mBTW8)
Do you have a continuity tester or a multimeter to test every connection?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!!! :DThe 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
(http://killone.myqnapcloud.com/sp/soleno.jpg)
Do you have a continuity tester or a multimeter to test every connection?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
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.
(http://killone.myqnapcloud.com/sp/sole.jpg)Where did you connect the solenoid power supply ground?
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?
No no, the solenoid connection is ok. I mean the 24v power supply ground ;)
Where is it connected?
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.
Yes it looks correct.
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.
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.yes there is an onoff switch but how should i connect it? : D
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.
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)
DO you have any ideas about what I might be doing wrong , or is ther another way of doing this?
Thanks
Software needed:Don't install avrdude nor some dll, and don't change the installation files inside the zip file, just install Arduino IDE ;)
- Arduino IDE (this will just be needed to flash the firmware)
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.Oh I see!
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.
No need, everything is working perfectly, no point risking damaging it.Yeah the sparkfun model is actually the same as the generic ones I use, but 3~4 times more expensive somehow :lol
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.
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?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?indeed it's not normal, I will test tonight.
DO you have any ideas about what I might be doing wrong , or is ther another way of doing this?
ThanksSoftware needed:Don't install avrdude nor some dll, and don't change the installation files inside the zip file, just install Arduino IDE ;)
- Arduino IDE (this will just be needed to flash the firmware)
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,Yeah you probably have to install the drivers that Foxhole suggested for your model ;)
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
I removed the installation of avrduse, removed the audrino ide and reinstalled it.Which version of windows and arduino IDE do you have?
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 . . .
---
C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17
Inside the bin and etc subfolders (replace the <User folder> by your own folder name)
JayBee, do you have any idea how much current the arduino takes from the usb?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.
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?
* 2020/02/18 - 1.76Yeah!!! Top!!! :D
- 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)
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.
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.@Foxhole
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 is right, your board doesn't seem to like the 6 seconds timing.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 :)
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.
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 fireAh I see what you meant.
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
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
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?
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 :)
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 :)I have only 2 ini files fully setup so far, the 2 I have been testing mamehooker with; Time Crisis and Terminator 2 8)
thanks a lot!!!
I added a poll about the upcoming RGB led support if you are interested ;)
I added a poll about the upcoming RGB led support if you are interested ;)
It means you can't have both, since they are using the same pins.
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?
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/)
From what I understand the only pro micro PWM pins are 3-5-6-9-10,It means you can't have both, since they are using the same pins.
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?
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.
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
The other solution of hacking new pins is very nice too, but definitely not user friendly
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? : DIt 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?
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 detectedIt's normal, Mamehooker doesn't "recognize" anything on serial ports.
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 ;)
Yeah if you configured mamehooker and mame correctly, it should work.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.
Yeah it should work.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?
* 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.Which version of windows and arduino IDE do you have?
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 . . .
---
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-arduino17
Inside 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.
I don’t have the avrdude folder. It’s windows 10 64 bit.* 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.Which version of windows and arduino IDE do you have?
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 . . .
---
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-arduino17
Inside 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
I set it up like this my mamehooker default.iniyou shouldn't change the default file, or else it will overwrite the game settings ;)
[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 ... :(
#
# OSD OUTPUT OPTIONS
#
output windows
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.Yes!
Like this:Code: [Select]
#
# OSD OUTPUT OPTIONS
#
output windows
[Output]
Player1_Gun_Recoil=
Player2_Gun_Recoil=
P2_Start_lamp=
the ini file it must be so ?[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=
however, there are games where nothing comes out, such as Point Blank 1 while the JAP Gunbarl version does and Point Blank 2 as wellPoint 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.
r0 e r1Yes those are correct ;)
if I want to use the rumble?
A0 in my case because I have the 4: 3 monitor
these settings are correct?
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...I haven't found any :(
is there a list of supported games?
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.
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
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.
I meant a lose connection of the camera wires.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.you mean SDA and SCL? Because the red led of the cam is always on
I mean any of the wires.I meant a lose connection of the camera wires.you mean SDA and SCL? Because the red led of the cam is always on
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.
Are you sure the Arduino isn't on the same com port as another device anymore?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:
Sorry for reporting this only now but i had a lot going on.Thanks for reporting the bug :cheers:
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?
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.
Still the same.That's weird, I tested my 4 guns and they all worked fine :dunno
I'm using the dpad firmware.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.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).
Typing D or ZC on the serial monitor brings no results whatsoever.
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.Yeah the serial should answer something only to the D command, but it's ok as long as the clear did work.
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.
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)
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)?
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.gives me an error in the compilation, collect.exe -1 while reading the card no problem
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).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
Try on another computer too just in case.
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.Are you sure the Arduino isn't on the same com port as another device anymore?YesIf 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.gives me an error in the compilation, collect.exe -1 while reading the card no problem
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).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
Try on another computer too just in case.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?
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 :)With the dpad 4 direction this gun has 7 buttons (8 with the pedal). It will also need a 9th button for calibration.
Could the button associated with the Pedal still be used by connecting it to the A button or am I wrong?
Thanks so much :)
@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.
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
now that I have found the gun problem, we come to another doubt that I have ... the connection of the TMP36 sensorYes exactly, +5V and GND of the arduino power the 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 :)
HiYeah no problem, I could try to make that work ;)
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.
Thanks!Ok, I will look into it when I have a bit more time ;)
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/
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?No problem, we all started somewhere ;)
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
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
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.
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
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.
This seems to be the cheapest Pro Micro I can find in Canada including shipping. Can you confirm this should work?Yes it should :D
https://www.universal-solder.ca/product/arduino-pro-micro-atmega32u4-5v-sparkfun/
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?
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.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?
I have two aimtracks in namco point blank guns.Short answer: yes. and no :lol
Now I'm not 100 percent satisfied.
Will this be an update that is worth the huge effort of rebuilding everything?
I have two aimtracks in namco point blank guns.Short answer: yes. and no :lol
Now I'm not 100 percent satisfied.
Will this be an update that is worth the huge effort of rebuilding everything?
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.Yeah it def a huge improvement. The only thing missing now is a tool with a proper UI to configure the guns.
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 ;)
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.I meant fullauto when holding trigger, not autofire.
No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
Ah.I meant fullauto when holding trigger, not autofire.
No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
But yeah it's already doing that, including the offscreen shoot that don't trigger the solenoid.
You don't need the controller remap utility nowadays, you can use ctrlr file to remap your guns and make them stable.Ah.I meant fullauto when holding trigger, not autofire.
No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
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.Ah.I meant fullauto when holding trigger, not autofire.
No what I mean is one impulse when triggered. No autofire. Shooting of screen will not trigger.
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.
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
I did, but haven't found a way yet to use them in an efficient and harmless way.
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.
Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
During my tests, one of the led became so hot it melted a hole in my TV screen border :lol
My screen bravely suffered for the sake of science :laugh2:I did, but haven't found a way yet to use them in an efficient and harmless way.
Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
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:I did, but haven't found a way yet to use them in an efficient and harmless way.
Did you keep looking into this? I'm in the market for IR Leds. That's why I'm asking.
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.
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.
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
Hey Jaybee4mW/sr is way too weak
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
better ;)
These may be a better option:
https://www.digikey.ca/product-detail/en/osram-opto-semiconductors-inc/SFH-4546/475-2870-ND/2205956
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).
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.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)
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.
SQ Arcade. About 90 bucks for one. How's the quality of the shell? Did you find a good part for the microswitch?Not the same seller as mine, that's good!
If you could link me to any AliExpress ir LEDs that should work I'd be super thankful.
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 advanceYes, 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.
Thank you very much for this great work!! :applaud: :applaud: :applaud:Thanks ;)
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!
Thank you very much for this great work!! :applaud: :applaud: :applaud:Thanks ;)
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!
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!Yeah this calculation is very old, unoptimized and doesn't work well, even for the 2 points calculation.
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!! ;) ;)
Another video I just made in pov to show the pinpoint accuracy of this system:I commend you sir on a properly done lightgun accuracy demonstration.
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.Thanks ;D
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 ownThanks a lot Ryoken, I'm very happy to hear that :cheers:
Hello, i'm gonna buy these IR LEDSLooks like that datasheet has some conflicting info on pg 3. :dizzy:
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
If i would like to buy these https://pdf1.alldatasheet.com/datasheet-pdf/view/89554/KINGBRIGHT/L-53F3C.htmlThat datasheet covers eight different LEDs with different ratings. :dunno
Is it correct entering the following ?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)
Source voltage 5
diode forward voltage 1.5
diode forward current (mA) 50
number of LEDs in your array 8
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 dataOnce again, that datasheet is for a series of eight different LEDs with four different sets of specs. :banghead:
diode forward voltage 1.5Look at the four "Forward Current vs. Forward Voltage" charts on pages 3-5.
diode forward current (mA) 20
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.
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 protectionYour link is still not working.
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
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
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.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.
@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 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.
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.
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.
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?
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 ;)
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.
Amigo, fiz o processo para adquirir seus arquivos. Poderia conferir?I already sent it to you earlier ;)
avrdude -C avrdude.conf -v -patmega32u4 -cavr109 -PCOM12 -b57600 -D -Uflash:w:"JayBee_IRLightGun_4Points_2.26.ino.jbgunpm1.hex":i
Hi,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 ;)
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
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.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.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?
Used Sparkfun Pro Micro / ATMega32U4 (5V, 16Mhz) during uploading the empty sketch. Board info shows: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 :lolCode: [Select]BN: Unknown board
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.
[b]VID: 1B4F
PID: 9206[/b]
SN: Upload any sketch to obtain it
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 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).
Final piece of the puzzle landed on my desk today, the IR sensor! Can't wait to get home and put everything together.Thanks a lot! :cheers:
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?
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;
estou usando arduino pro micro Atmega32u4 5v/16hz.Games won't work with a test firmware, it's just for testing. You have to flash the full firmware to play.
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
como faço, onde posso encontrar o firmware atualizado?Can you please speak english? I don't understand Italian.
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 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.
my doubt is how to load the .hex files on the arduino.Tools => Flash Firmware...
The firmware 1, 2, 3 & 4 are for the player 1, 2, 3 & 4, the ones you select on the bottom part.
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.
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.
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 ;)
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).
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.
hello, i decided to use mame, i went to mame .ini i modified #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 :-\
# 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.
how do you send commands via serial with your GUI?You don't. You use mamehooker like written in my guide.
You need to turn lightgun to 1, not mouse.
Look here: https://youtu.be/mcnBxqiJzD8
It's aimed at aimtrak users, but the procedure is the same for all guns basically.
Hi, i was wondering if someone could build me a gun with this module, i am in the uk and wanted this gun converted: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.
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_)
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
Nice! That makes another good alternative option for the led system ;DI'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.
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-/251960157859Yes, 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.
I think that will give me the basics to build one of these, budgets a bit tight atm is all, thanks.
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.
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 ;)
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.
Alright, finally got it going.that's great, I'm glad to hear the system is working well for you :D
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.
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 youYes I will provide a complete schematics as soon as I test it better ;)
Yes I will provide a complete schematics as soon as I test it better ;)
Ho guys how can i set/mount the temperature sensor near the solenoid?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.
Inviato dal mio Redmi Note 8T utilizzando Tapatalk
Can you post a photo of this?Ho guys how can i set/mount the temperature sensor near the solenoid?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.
Inviato dal mio Redmi Note 8T utilizzando Tapatalk
Be careful tho to not make any contact between the sensor pins and the metal part.
This is just too dang cool! I just read all 17 pages, LOL.You're welcome ;)
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.
Hi to everybody!This model won't work, you need very specific specs.
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!
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
https://discord.com/invite/HJyfYja
First of all, hello to everybody.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
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.
First of all, hello to everybody.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
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.
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
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.
Thanks for your reply.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
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.
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.
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 :dunnoI'm not sure anyone did that yet, although some people considered the option before using other gun shells.
any one else having problems with the arduino disconnecting from the computer or the ir camera not reading when using the solenoid recoil?
What do you see in the GUI? Does the camera test fail randomly?
What do you see in the GUI? Does the camera test fail randomly?
i dont have the GUI
can we use the IR camera from AIMTRACK?I don't know honestly, they is no doc on which model they are using.
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 ;)
Can a previously modified Gcon2 with a Samco board work with your system?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.
Thanks
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. :)Yes I'm french ;D
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 :) )
Finally something is strangeThat looks like you flashed the wrong firmware version :o
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 ?
:applaud: :applaud:Yeah the detection should be automatic but sometime pro micro don't come with the correct factory firmware flashed on it :P
I think it's automatic , you're right everything is nice now :applaud:
Is there any DIY sensor to replace DFRobot IR camera? it is too big for me。
After a long time to find the correct sensor place it's work very well on my ARCADE 25'' CRT :applaud:This kit is very cheap and nice;
I want to try a lens for have better distance ( it's also great but ) have you got a link to a good model ?
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 can't believe I didn't stumble upon this before this week. This is awesome!Merci ;D
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.
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!
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.
Hi,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 ;)
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
@JayBee do you know if we need the whole front surface of the dfrobot camera?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:
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)
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)
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.
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.
I noticed your youtube presence has exploded lately. Everyone seems to agree that your system is better than the sinden. Sweet vindication. ;)Thanks!
Anyway I look forward to building one in the future.
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.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.
HiIf 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
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)
@Bluetooth HC05/RNThat'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).
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.
I thought the 'raw' pin was directly connected to the USB 5V..?
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.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
@Gun Aspect Ratio ModeWhen 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.
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.
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.Thanks, I was going to say exactly that but you were faster ;)
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
@LED to signal aspect ratio modeYes in the manual I am writing about the RGB led, I thought that was obvious.
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.
hi JayBee, the project is beautiful.For the setting not staying, it sounds like a software issue, the mice input enumeration not being stable or something similar.
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:
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:
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?
Built my first gun last night. Went for simplest approach which was standard guncon45 without recoil.
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.Very clean, great job! :cheers:
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.
From what I understand the only pro micro PWM pins are 3-5-6-9-10,It means you can't have both, since they are using the same pins.
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?
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.
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
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.
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
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 ;)From what I understand the only pro micro PWM pins are 3-5-6-9-10,It means you can't have both, since they are using the same pins.
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?
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.
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!
My first Lightgun project ever. Thanks to Jaybee for all the hard word.Really nice job! :cheers:
You can watch a short Build log here on YouTube
https://www.youtube.com/watch?v=NpYPi1N9pug
Thanks JayBee
//Cosmodk
Here's mine.Great job! It's always nice to see old broken hardware being put back to life in some way :cheers:
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:Thanks
Added a solenoid circuit and extra button to my guncon45 tonight.I have a similar solenoid, but no gun shell that would fit it... Lol
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?
Added a solenoid circuit and extra button to my guncon45 tonight.For that I recommend using a temp sensor you can put against the coil.
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?
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.Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
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.
Added a solenoid circuit and extra button to my guncon45 tonight.I have a similar solenoid, but no gun shell that would fit it... Lol
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?
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?
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.Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
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.
They are only good for full auto.
Yeah it's a setting in my GUISome 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.Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
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.
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.
Added a solenoid circuit and extra button to my guncon45 tonight.For that I recommend using a temp sensor you can put against the coil.
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?
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?
Yeah it's a setting in my GUISome 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.Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
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.
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.
It's also possible to do that ;DYeah it's a setting in my GUISome 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.Yeah I already made several guns with motorized recoils, but those are pretty terrible for single shot feedback, due to the way they work.
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.
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.
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.
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 outThese guns are looking great. That's a full recoil?
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 outThese guns are looking great. That's a full recoil?
Can you post pictures of the insides?
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.
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'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'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:Are 1w infrared LEDs safe to look at?
https://www.aliexpress.com/item/32869020004.html?spm=a2g0s.9042311.0.0.ea094c4dE9i0qU
They were delivered within a couple of weeks to the UK.
From the research we did, yes they are.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:Are 1w infrared LEDs safe to look at?
https://www.aliexpress.com/item/32869020004.html?spm=a2g0s.9042311.0.0.ea094c4dE9i0qU
They were delivered within a couple of weeks to the UK.
Ah my first gun build!That's awesome, super cool result! :cheers:
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:
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
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.
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 :)
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.Yeah since that cam is using old stock of sensors, it seems like the stock is slowly drying out...
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...That is not good news...
For a while I've been investigating on replacement for the cam module, that is still being produced.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?
Last resort, there is always wiimote scavenged parts...Dfrobot sensors ARE wiimote salvaged cams, repackaged :lol
But the dfrobot form factor seems like it was made purposely for building lightguns
Keep us posted in any developments.
I thought it was new stock from the supplier, repackaged.Last resort, there is always wiimote scavenged parts...Dfrobot sensors ARE wiimote salvaged cams, repackaged
But the dfrobot form factor seems like it was made purposely for building lightguns
Keep us posted in any developments.
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?
Hello Jaybee,Thanks for your interest!
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 the information.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.
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.
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:For the LEDs use this;
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.
Thanks for the information.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.
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.
However it's in my to do list for the next firmware.
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.
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.
Do you have to change calibration after installing it?
This one works fine:
https://es.aliexpress.com/item/1005002606066666.html
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.
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.
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.
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.I'd like if we could remap buttons. Would solve things like that.
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.
Check in the download firmware section in github
Built my first gun last night
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.You can already remap it. It's bound to the reload button that is remappable like every other buttons.
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.
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.
Selling the gun without authorization and proper licensing is strictly prohibited and will result in legal action against the seller.Built my first gun last night
can you make ones for anyone in the UK, rpegelectronics only does US.
Hi!JayBeeSorry, 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.
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!
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 hardYou can find all those info and more in my Discord server ;)
is there anyway to make Gun4IR work with 2 screens, 1 for 4:3, the other for 16:9.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.
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.
ok i will look into the discord server.The camera sees the LEDs. The camera doesn't see the monitor.
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.
can you not simply extend the LEDs to make a 2390x768 3.1:1 aspect ratioThat'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.
(https://i.ibb.co/j6ZKqkF/solution.jpg) (https://ibb.co/C1sd4KF)
then no fiddiling around with it.
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
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.
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.I don't think you understand how this system work.
as i understand 2 player is being worked on with an adapter, once finished why not a single wider screen.
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.You can already remap it. It's bound to the reload button that is remappable like every other buttons.
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.
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.Selling the gun without authorization and proper licensing is strictly prohibited and will result in legal action against the seller.Built my first gun last night
can you make ones for anyone in the UK, rpegelectronics only does US.
User license are for personal use only.
If you want to buy a gun in EU contact Gustavo, from the link in my GitHub.
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
Please check the pin connection of the crystal oscillator in your PDF diagramPretty harsh way of asking someone to explain when you fail to read schematics correctly, but ok
Please give an accurate pin connection diagram. Thank you
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:
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
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 guys,Yeah it should work as well.
I started my gun4ir building. Can I use mosfet IRLZ34N instead IRL540 for recoil circuit ?
Thanks!
How did you solve the 32u4 software installation problemWhat software, and what problem?
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.
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.
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.
Hey all.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.
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
Hey all.It's very hard to say which one is better or not since it's a very subjective thing :lol
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
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;
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.His space is big enough, but there are too many places to transform. An opening is also required to install the microswitch.
Does it look like it'd have the space for the components and width needed for the camera etc?
https://youtu.be/uit9swnczMo
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
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).It flashes when you shoot or change modes.
That said, maybe I misunderstood what the rgb one is for. it just flashes when you fire right?
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.Excluding the shell, how much do you need to refit a part? Calculate it in detail.
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.
Just about to start and I found I need a couple more questions answered.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.
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
The pieces I have imported are finally arriving! Now it's time to plan how to build my GUN4IR :DYeah 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).
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?)
Hi,You can use 0.3 square 6-core cable or network cable.
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,
Hi,For PS4 rumble you can power it from the main USB cable, no issues ;D
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,
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)
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?
For PS4 rumble you can power it from the main USB cable, no issues ;D
Hello,You can use the same resistors, they only control the operation of the MOSFET, and not the solenoid
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)
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.
I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.Could you give a link or directions to find this?
(https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
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.I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.Could you give a link or directions to find this?
(https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device. :-[
Hi,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.
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?
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 diameterThe electromagnet is the problem. It's too big. The camera is not a problem.
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.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.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.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.
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.I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.Could you give a link or directions to find this?
(https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device. :-[
I can't find the model number. It's second-hand. You have to consider long distances and shipping costs. And slow transportation.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.I found the smallest second-hand IR sensing part, and the test was successful. The assembly has been completed.Could you give a link or directions to find this?
(https://z3.ax1x.com/2021/11/13/Isbfkn.jpg) (https://imgtu.com/i/Isbfkn)
I bought the electronic components and spent some hours trying to solder the leds. I ended up with a very unreliable device. :-[
Could you still provide us with the part number or a link to where you ordered it?
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.Awesome, it looks great! Glad you are enjoying it ;D
Looks good don't ya think :)
Awesome to now have the light gun games available.
Thanks again.
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
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
@JayBee,The project is in no way based on samco system.
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
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.
I've got a spare DFRobot SEN0158 camera if anyone needs one. £25 + UK postage. Just message if you'd like it.
Yea sucks. There's a Worldwide shortage in a lot of parts.Gyro aiming have awful drift and literally stops being accurate few seconds of playing after calibration, even on recent hardware.
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.
to further my dual monitor 4:3 and 1.78 setupYou do understand that if the gun camera sees the other monitor leds, it won't work, right?
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.
(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:
may i ask when you will be selling new ones, your website is out of stock.To answer your questions;
will you sell one without solenoid/rumble at a reduced cost.
may i ask why guncon2 is more expensive than guncon 1.
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 greatSure, 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.
will you ever go wireless, with no rumble/feedback.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.
do you think guncon 2 or 1 is better?
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.
Found this Chinese supplier for the Camera, is this the right part?
https://www.chxchips.com/en/dfrobot_SEN0158.html
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?
@JayBeeThe 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 ;)
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.
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.Sorry for the late reply.
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
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.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.
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.
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.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
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?
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?
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 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.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.
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.
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.
Putting LEDs in parallel is generally a bad idea for few reasons;
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
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.
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.Those are most likely different sensors and probably won't work I'm afraid :-\
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 got89 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.
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.
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.
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 ;)
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.
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.
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 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.
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
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.
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 ;)
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.
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 I wanted a sluggish and unreliable light gun system I would have stayed with a wiimote+software solution :dunno
(that black plastic in front of the sensor on the wiimote isn't just for show)
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 ;)
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.
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.
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?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.
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.
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.
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.
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.
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?
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.
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.
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 :)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.
Given the age of the device, however, It's doubtful anyone will bother to make something as polished as you have in that regard.
You can see the tracking lagging behind a little bit.
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.
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
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.
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.
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
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.
but there is a "special" setting to do on windows, that gun can work with retropie?Once flashed the gun works perfectly natively on RPi, it uses generic mouse/KB input so it's compatible with anything that support those.
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?
is there anyway to make Gun4IR work with 2 screens, 1 for 4:3, the other for 16:9.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.
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.
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.
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.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.
I let you draw the conclusions you want with it ;)
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).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. :)
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.
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.
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.
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.
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.
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.
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.
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.
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.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.
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.
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.)Thanks, you too ;)
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. :)
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 outi will plan for a double pair of tc 3 or 4 guns...
Salut JayBee,Merci :cheers:
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?
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.
Salut JayBee,Merci :cheers:
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?
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.
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.Salut JayBee,Merci :cheers:
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?
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.Salut JayBee,Merci :cheers:
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?
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.
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.
It's discontinued but you can still find plenty of clones online ;)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.Salut JayBee,Merci :cheers:
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?
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.
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
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 thinkWhat do you believe I think of people using my work to make money without even crediting me or giving me anything in return?
the buttons seem cool, maybe the arcade guns are a better option than the guncon 2 shell.
No problem, I'll buy a new board or ditch the DPad.
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.
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
Hi everyone,Hi,
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!
- 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?
- 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.
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! ThanksIf 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.
- 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.
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.
I noticed your website shows New slim IR LED pointsYes they are brand new, I haven't uploaded any image yet.
are these the same as the ones I've already seen or are they new SLIM ones, i would like to see them.
Hello Everybody and to JayBee of course.To answer your questions:
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
do you plan to make the slim LED creation available to your distrubutors, in particular you europeans distributor.Yes, that's the plan.
is there any reason why the other distributors couldn't have made it slim, is there some special workings involved?
I have made a donation as instructed on the forum link.Bud, don't post your email on a public forum ;)
please will you send me the licence + link to latest software.
My details:
Discord user name: discord#6956
Full name: Kwok Lee
Thanks.
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?
Inspired by the recent time crisis 2 mame fixes, I've dived head first into gun4ir.Several of my users made that mod, you can see them on my discord server.
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?
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)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.
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.
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 ;)
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.Thanks guys, I did send you everything, but please keep your private info in private message ;)
Name: Mark Godfrey
Discord: MarkJG
Transaction ID: 5BW697646B3640237
Thanks.
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.Thanks guys, I did send you everything, but please keep your private info in private message ;)
Name: Mark Godfrey
Discord: MarkJG
Transaction ID: 5BW697646B3640237
Thanks.
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.Thanks guys, I did send you everything, but please keep your private info in private message ;)
Name: Mark Godfrey
Discord: MarkJG
Transaction ID: 5BW697646B3640237
Thanks.
Hi, so I just follow the paypal link and the software will be emailed to me? Thanks
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:
Hi,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.
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
Bonjour Jean-Baptiste,Oui il le seront, il en aura quelques uns de disponibles cette semaine ;D
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 !
@JayBee I've been using GUN4IR for a little over a year now and really love it.Yeah it's already in the feature list for future updates.
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
Ok so it's been a couple of years since I donated. Is this still the most up to date version from my link?yes that's the last version so far.
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