Main > Lightguns |
GUN4IR - The Ultimate 4 Points Lightgun System |
<< < (22/227) > >> |
Zebra:
--- Quote from: thet0ast3r on December 30, 2019, 03:35:19 pm ---Ok, Zebra. Here we go again. You removed the IR Shield from the 4 sensors on the tiny pcb that is in the nozzle of the gun. What you also removed, is a rectangular ( maybe/probably square ) iris ( some plastic cap with a square hole in it). This plastic cap has its opening in the middle of these 4 sensors which are just 4 flat photodiodes. If you shine a light on these photodiodes with the cap on, depending on which angle you shine, the amount of light that hits each individual sensor varies. if you happen to point the light straight at it, all 4 sensors get the same amount of light. The sega ir II system uses this difference in measured brightness to calculate the ANGLE of ONE* light source. This is why the IR diodes mounted on the screen are connected to the pcb, and not just to some power source. The ic`s of the gun system are synced, so that the gun can read all angles of the ir lights ONE after another. With this information ( all angles of all light sources) (and the position of the light sources which is obviously known since they are fixed) the system calculates its 6 degrees of freedom in relation to the screen, and converts the screen coordinates to 2 analog outputs for x and y. It also knows (just like ems topguns) when it is pointed offscreen, and returns that aswell. I am 99% confident this is the way the ir II system works. * I do not know how exactly they deal with outside light sources. Maybe they just read the photodiodes while no light is active, and subtract the intensities. --- End quote --- Again? Nobody has done this before or we wouldn't be having this discussion. The pic wasn't mine. I've never taken off my IR shields (the part you call "a plastic cap"). They're Twisted Symphony's pics: http://solid-orange.com/1643 The exact workings of the system is what we're trying to establish but I'm 99.9% sure it doesn't work how you said. The LED angles are irrelevant to the set-up and the board has no idea of coordinates (or that a screen exists). It doesn't transmit any data at all. It's only output is 0-5v for X and 0-5v for Y. Just like an analog joystick pot. It does this even if it's not connected to a computer. It relies on the user to establish where 0v and 5v is on the screen. The IR LEDs are used to mark the screen edge for the screen-out feature and as a reference point to track motion inside the perimeter (of LED boards).That is all. |
Howard_Casto:
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. |
JayBee:
--- Quote from: Howard_Casto on December 30, 2019, 07:38:00 pm ---I'll try one more time, you've had two separate people explain this to you. The end output is created after processing. What do you think the cpu on that board is for? Yes it results in two analog values for x and y but that is just for ease of interface, it has nothing to do with how the sensors work. If there are indeed 4 photodiodes/transistors on the gun pcb, then it's working as I described before.... it turns on a led (or group of leds), reads all four values to guestimate it's position based upon the differences between those values, then moves to the next led/group of leds. Then all of the readings are compared and processed via some formula to give the screen position, then that position is converted back to an analog value so it can be interfaced out to the game pcb. Again, back to my original post, the trick is determining what formula they used and what combination of sensors and leds work similar enough for the rig to be replicated. Someone good at trig (i.e. not me) could probably put together a formula solution. --- End quote --- 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. |
thet0ast3r:
--- Quote from: JayBee on December 31, 2019, 05:56:20 am ---If I understand correctly what has been explained here about this tech, the sensor is only measuring the distance with each led (light one by one in sync), and then calculates the aim with a trig calculation? It's actually very similar to what I am doing in my arduino sketch, so I guess if someone can find a cheap way to get those sensor, we could maybe make it work? But to be honest, my IR cam and 4 led system is already on the way to become very reliable and stable, so I'm not sure it's worth the trouble. --- End quote --- 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 :) |
JayBee:
--- Quote from: thet0ast3r on December 31, 2019, 06:20:35 am --- --- Quote from: JayBee on December 31, 2019, 05:56:20 am ---If I understand correctly what has been explained here about this tech, the sensor is only measuring the distance with each led (light one by one in sync), and then calculates the aim with a trig calculation? It's actually very similar to what I am doing in my arduino sketch, so I guess if someone can find a cheap way to get those sensor, we could maybe make it work? But to be honest, my IR cam and 4 led system is already on the way to become very reliable and stable, so I'm not sure it's worth the trouble. --- End quote --- 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 :) --- End quote --- Thanks for the info, makes more sense now! Actually you can calculate an estimation of the aim with only 3 LEDs, but only if you already detected which one is which, but yeah it's not very precise. Right now what I am solving is the gun tilting that don't work well for more than 30° tilt on my system (because of the lack of tilt sensor). I found a trick for that, so with this update this system should work in any situation, any angle, any tilt, and a very reduced distance from the screen. All that without needing any calibration of course :lol Happy New Year guys, hope this year will be as full as interesting dev as the last one :cheers: |
Navigation |
Message Index |
Next page |
Previous page |