Main > Lightguns
Lichtknarre: Unmodified Wii remote as a sight accurate Lightgun using 2/4 LEDs
<< < (28/68) > >>
RandyT:

--- Quote from: Howard_Casto on January 09, 2023, 10:39:18 pm ---This is just an idea off the top of my head but wouldn't the easiest way to implement a fix for the distortion be a distortion lookup table?  I think the wiimote uses a 1024 by 1024 "image", so have a 1024 by 1024 array and with each ir coordinate look up that array coordinate to get a pre-calculated correction of where that point really is sans-distortion.   I'm sure the distortion amount is documented for various lens specs and if not, it'd be possible to take two pictures on a tripod, one with an unmolested image (proboably of a grid) and then one using the clip-on lens to determine where each point in the grid lines end up after the lens.

--- End quote ---

This is sort of how lens correction works for VR.  The lens distortion is profiled, and an inverse shape is created upon which the image is mapped.  This neutralizes the curve, but the lower resolution where there is image compression from the distortion, is not changed. 

A good graphics card is required to do this for VR, but in this case, we're just looking at up to 4 data points.  So yes, I think that is a viable approach.   A lower resolution data table of X and Y offsets within a zone may be able to get it close enough, without needing to map every pixel.  I can almost see imaginary concentric circles, getting tighter as they reach the edge, to create the zones.

*Edit*  Better yet, just profile the lens and feed that information to OpenCV and let it figure it out with the "undistort" function :)
Howard_Casto:
So I had a few minutes and I played around with the software and mamehooker to see how well they get along.  Everything seems to work ok!   Obviously, you'll have to turn off the rumble feature in lichtknarre but rumble and leds can be controlled fully by mamehooker which means any external program should be able to control them as well.  I can't do a full test yet (haven't built my led harness) but I fired up both terminator 2 and rev x, the two games that pulse gun recoil faster than any other, and the humble wiimote seems to keep up just fine.   So with that confirmed, a totally wireless pistol at least, seem feasible. 

Keeping that in mind I might be willing to experiment with the hardware side of things a little.   So in terms of a battery and step-down solution, what do you guys think would work to keep... let's say a 5 volt solenoid and wiimote powered for a reasonably long gameplay session?   I'm just looking for ideas.  I think a pistol with recoil that you can turn off or switch back to the rumble motor to save power might be a pretty nice bit of hardware.

In other news I couldn't resist, and the price started to go up, so I bought one of those uzis.   It's supposed to come in thursday.  I still need to buy the sacrificial wiimotes, mosfets, power supply and solenoids but one thing at a time.   
RandyT:
Good news on the Mamehooker stuff working!

On the battery pack, you'll probably need to do some testing with a meter or a bench supply and do some math. 

Basically, the formula (I think...double check my work):

(3600 / [Solenoid Pulse Time in Seconds]) / (Voltage x [Average Solenoid Current Over Pulse Duration])

will give you a rough idea as to number of actuations to expect per Watt-Hour.  For example;

If the solenoid operates from 5v and consumes 2 amps on average when actuated, and the pulse duration is .5 seconds, the formula would look like this:

(3600 /.5) / (5 x 2) =720 actuations per Watt-Hour

So, you would need to decide how many times you want to be able to fire per session, and plug in accurate numbers for the power used by your solenoid.  Of course, it would be less than that as heat starts to kick in, so you probably would want to go a little larger than the answer you come up with.  Then do the same with the remote and add that to the equation, accounting for losses from whatever regulation method you decide on.

*Edit* 

Also make sure that whatever battery you choose is able to deliver the instantaneous current levels you require on a repeated basis.  Some Li-Ions will heat up and can do bad things if you try pulling more than what they are rated to deliver.  And I would also be sure to correctly install a snubbing diode on the solenoid to deal with the collapsing magnetic field, otherwise any electronics on the same supply as the solenoid could be short-lived.
Howard_Casto:
Sounds like I've got homework this weekend.   I'm wondering if it'd be more efficient if the wiimote used a separate battery pack from the solenoid to eliminate the need for power regulation.   I've got to think stepping it down would wear on the power reserves a little.   

My uzi came in.  For only 30 bucks I'm rather amazed at how nice it is.   The plastic isn't arcade quality or anything, but it is very sturdy.  The trigger is a nice microswitch and it feels really smooth.   It's a little on the small side compared to a T2 gun or anything like that, but I think for something you'll be holding up your hand it's about right as anything else would get heavy.  There are rails on the top and bottom of the gun and I plan to make use of the bottom one for a removable grip for those rare games like aliens extermination that have three fire buttons.  The size is about perfect to house a wiimote with the upper chamber having just barely enough room width and height wise. There might be enough space for some foam to hold it snuggly or perhaps some 3d printed rails like the ones inside the nyko perfect shot.   I'll most likely have to remove the barrel though and replace it with something shorter.  Not by much though.  The thing came with like 50,000 balls so I'm going to try and go through them all before I tear it apart.   
Howard_Casto:
Ugh... never start a project around Chinese new year.   All the solenoids on fleabay and aliexpress won't arrive until mid-February.   I managed to find a decent 6v one at harfington.com.

https://www.harfington.com/products/p-1002575

Since I'm using the gel blasters as shells anyway, the plan is to take the 7.5v battery pack from those and use it to power these solenoids in the pistols.  7.5v should be within the tolerances of the solenoids, especially since they'll never be on for more than a split second at a time. The wiimote itself will power from a separate power pack.  I really don't have a clue how many times one would fire in the typical non-machine gun, light gun game so I guess this is a try it and find out deal.   

As for the machine gun solenoids, I'm looking for an alternative that I can actually get delivered before the month is out.   I'll have to scour through some arcade manuals to figure out the values.  It'd be nice to find 12v alternatives as well.  24v would make it difficult to find a cheap battery pack but 12v should be doable. 

The beauty of those values is that they can both be powered with an old pc power supply.   12v obviously but if I recall 7v can be accessed via a combination of the 12, 5, and gnd lines of a pc power connector.  Can't remember the wiring but I can look it up.   
Navigation
Message Index
Next page
Previous page

Go to full version