Targeting Light Photon Cannon from AndyMark

My team is thinking of using the Targeting Light Photon Cannon from AndyMark to shine a light on the target to aim better; however, I am unsure of how to program it nor how to electrical wire the light due to lack of documentation. Does anyone have experience utilizing this in the past?
Here is the exact link the light:

In general, you just wire the two leads to a PDP port to 12v to turn it on, no programming needed.

If you want the ability to turn it on and off, add a 5v controlled relay in series with it. These relays can be driven off of DIO ports from the roboRIO (in java, use the digitalOutput() classes to set the pin high or low).

This is the same circuit we use to control our vision processing green LED ring.


You can also use the relay and following the coding in the WPIDocs library.

Is that relay legal under R29B because lights aren’t considered an “actuator” per R27?

That’s a good point. All I can say is that inspectors have allowed it in the past. I don’t know if it is because it is legal or because the rules have changed since. Either way, the relays that @gerthworm suggested are cheaper anyways.

As I read it, R29 is targeted at ensuring the roboRIO has the ability to de-energize any motion-creating electronics on the robot (ie, capable of executing an ESTOP).

The setup I was mentioning would be classified as a CUSTOM CIRCUIT and subject to a handful of R* rules, but I believe the setup I described is legal.

Anecdotally, we passed inspection twice with that circuitry last weekend.

1 Like

This is correct and a legal way to control flashlights or LEDs.

1 Like

Becareful where you point it, we had one in 2017 pointed at the ground and still had people complaining about the brightness so we had to take it off…

In 2017, we used a focusable flashlight to line up with the loading station and the spring peg. It projected a square about 8" across at about 20’. From the side, one could not really see anything. It was controlled using a Spike relay. We mounted it low (below the bottom of the clear panels of the driver station) and parallel to the ground and got no complaints from anyone.

The thing to watch out for is that some of these flashlights have a controller that would go into a flashing mode if the power was cycled quickly.

  • R29 limits how you may control actuators, not how you may control non-actuators.
  • R30 (last row of table) indicates that you may use the legal relay modules to control CUSTOM CIRCUITs such as this light.
1 Like

Thank you @GeeTwo for the clarification. Our setup is legal :slight_smile:

We use a motor controller. Victor SPX to be exact. Allows us to control voltage and run on the can bus.

In the case of LEDs, you’re controlling duty cycle rather than voltage, but it would achieve the desired effect.

1 Like

When I programmed the relay, I put it to DIO port 0 and when I say relay.set(true); the light would still not turn on.

We are using a SPIKE to programmatically turn the light on and off.

1 Like

Use a Relay port not a DIO port
Bottom edge of the roboRIO beside the RSL port.

but how would I program it with the replay ports? I thought in order to use the DigitalOutput class it would have to be connected on the DIO??

You seem to be calling a relay, but that may just be your naming convention.
When using a relay use the Relay calls.
That affects the relay outputs not the DIO.

Relay outputs (signal, signal, ground) operate differently than DIO(signal,+5v,ground)

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.