A High-Performance Apriltag Solution: Beelink Mini PC + Photonvision Guide

I’m tired of linking back to the increasingly sprawling raw testing results, so I have condensed the information here in this guide: Mini PC Photonvision Guide - Google Docs

This guide explains how to set up a Beelink Mini PC for Apriltag detection using Photonvision. For someone as Linux-averse as me, this was fairly easy, and I have tested everything in the guide except setting a static IP (added as an issue to PV here) because that looked like it would take an hour and would be fixed before the season anyway.

For under $200 total including cameras, you can create a very high performance vision system that far outperforms Raspberry Pi-based solutions. My favorite configuration at this time is a combo of:
  1. AR0144 localizing tags at 1280x720p at 15fps, 57ms latency, detecting tags 27ft away
  2. OV2710 at 320x240 at 60fps, 9ms latency, detecting tags 11ft away for game piece scoring
  3. Lifecam-3000 at 320x240 used as a driver camera at 30fps

Many other configurations are possible if you have other USB webcams available. The PS3 Eye worked well, for example, albeit with a limited FOV. Single-camera performance is excellent, with the OV9281 achieving 20fps, 42ms latency with a 29ft detection distance at 1280x800 - far enough to localize the 2022 high goal from anywhere on the field. Plus, all distance tests were done with 36h11 tags, so the official 16h5 tags should yield ~21% more detection range than what’s in the guide. This means that you could have multiple 640x480 cameras each doing 60fps detection of tags up to 28ft away.

With no more need for green LEDs blasting the target, and with such an excellent open-source resource in Photonvision, these types of mini PCs represent excellent value. I am convinced that higher performance will only lead to very marginal competitive gains. Hopefully the use of more powerful coprocessors such as these catches on - Raspberry Pi’s are great, but the sky’s the limit with mini desktop computers.

19 Likes

In the other thread you mentioned having issues with multiple cameras and a OV9281 on the same system. Can you describe the problems, was it only multiple OV9281 or was it any other camera and a OV9281 ? Did it only happen when adding a camera and if the system comes up with 2 it is ok?

I haven’t done as much testing as you with the Beelink and OV9281 but I did notice some issues when changing things while having a OV9281 and AR0144 on the system but not if I was just running it.

Also do we know if the issues can be fixed in photon or if they are camera firmware?

2 Likes

My experience was that having ANY camera other than the OV9281 plugged in and processing, then changing ANY setting on the OV9281, would brick the OV9281 output. This brick would persist across power cycles and only went away if I reinstalled Photonvision from scratch. It could sometimes be cleared by moving the OV9281 to another port. If you are getting the AR0144 and OV9281 to play nice, that means the problem is on my end - possibly a bugged camera module.

This should be fixable in Photonvision, but I don’t know who is free to do so. Kind of a shame, given how cheap and high performance the OV9281 can be.

1 Like

You should be quoting the camera lens on the board cameras for everything you do. For instance, you talk a lot about the 3.8mm lens on the AR0144 but say people should get the 100deg lens. I probably would agree, but changing the lens will strongly affect the max distance for the tag detection.

2 Likes

Be warned that Beelink mini pcs are not rugged and I would be cautious running them on an FRC robot. I’ve had issues with internal components/cables coming loose while relocating one.

3 Likes

What do you recommend for a power supply? Do we need to get any extra hardware or can we just do grab 12V straight out of the PDP? Is a battery pack any good for ensuring a graceful shutdown?

1 Like

Rule R602 would prohibit using a battery pack for 12V output.

I would guess that you don’t want to connect it directly to the PDP, since it will not produce enough voltage when the motor load drags down the whole system. You want a buck converter to try to make sure to have 12V, independent of the “battery” voltage, but I don’t have a Beelink and don’t know how sensitive they are to the supply voltage.

You really want a buck/boost converter to provide a steady 12V regardless of the battery voltages seen during a match. They automatically switch between buck and boost function as needed. There are a ton of them on Amazon but many of the descriptions are wrong. The simplest buck/boost designs will have 2 inductors on the PCB, like those marked in yellow below:

The converter shown is from Amazon and I’ve run them at 12V and 3A out. They claim it’s a 4 ampere converter but those diodes marked SS34 are 3A diodes, so you probably don’t want to go there. The PCB is 1.8" long. If you see one inductor on the PCB, it very likely isn’t a buck/boost converter. I’m not counting the puny one marked 2R2, which is probably to knock down the output ripple.

2 Likes

All tests were done with the 100deg. I can make this more clear, thanks!

Do you think opening one up to glue down connections would be worthwhile?

Battery pack isn’t FRC legal, unfortunately. I link a good buck boost converter and barrel jack on the second page. The PDP has far too many voltage swings from the battery to be useable without damaging the mini PC.

I saw the comment about the Beelink’s not being rugged enough & looked for alternative mini PC’s (like this one) and noticed there are some (maybe a bit more expensive) with the Celeron N5105, and then I searched and found this, which says “the faster Celeron N5105 is notable for being more energy efficient (10 W TDP vs N5095’s 15 W) yet featuring a faster iGPU model (24 EU UHD Graphics versus 16 EU UHD Graphics, with a higher clock rate to boot).” Maybe worth investigating.

What about the PC’s-on-a-stick like this that take 5V USB-C?

1 Like

The J4125 in your second link will be fairly underpowered unfortunately, 30-50% slower. It’ll be about the same as a Pi4 probably.

N5105 is a good choice if you want to try it out. I expect it would get similar performance. I don’t think GPU acceleration is currently supported for these in Photonvision.