Standalone CNC line scan camera
I use my line scan camera to take cool pictures of trains and other stuff.

Show figure 1 detailsClose figure 1 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/5.0
- Shutter
- 1/56 s
- ISO
- ISO 3200
- Software
- Digital Camera GFX100S Ver2.13
- Date
Line scan camera

Show figure 2 detailsClose figure 2 details
Piccadilly line.
For more information about how it works and the algorithms I use to process the images, see: line scan camera image processing.
But heretofore I had to plug it into my laptop, which was kinda annoying for many reasons.
- I have to carry a laptop around
- The Macbook Air I was using has only a 256GB SSD which necessitates bringing an external SSD
- On the Macbook Air, there were some bugs with sometimes the camera negotiating only a 480 MB/s USB2 link instead of the 5 Gbps one, leading to dropped frames
- It just doesn’t look cool and stylish like a custom made standalone camera
- Screen isn’t bright enough

Show figure 3 detailsClose figure 3 details
- Camera
- Apple iPhone 14 Pro Max
- Lens
- iPhone 14 Pro Max back triple camera 6.86mm f/1.78
- Aperture
- f/1.8
- Shutter
- 1/147 s
- ISO
- ISO 64
- Software
- 26.0
- Date
Dongle hell with the Macbook.

Show figure 4 detailsClose figure 4 details
A dropped frame can really ruin a capture. Here, the end of car 5519, near 5521, was missing a slice.
1 The camera
OK here it is!

Show figure 5 detailsClose figure 5 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/3.5
- Shutter
- 1/80 s
- ISO
- ISO 2000
- Software
- darktable 5.5.0+1479~g9e36df0344
- Date
Left side.

Show figure 6 detailsClose figure 6 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/3.5
- Shutter
- 1/85 s
- ISO
- ISO 2000
- Software
- darktable 5.5.0+1479~g9e36df0344
- Date
Right side.

Show figure 7 detailsClose figure 7 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/5.0
- Shutter
- 1/34 s
- ISO
- ISO 2000
- Software
- darktable 5.5.0+1479~g9e36df0344
- Date
Front side.

Show figure 8 detailsClose figure 8 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/5.0
- Shutter
- 1/80 s
- ISO
- ISO 2000
- Software
- darktable 5.5.0+1479~g9e36df0344
- Date
Rear side.
Here are slightly older pics with worse 3D printed battery holder, bezel, and no wifi hat.

Show figure 9 detailsClose figure 9 details
- Camera
- FUJIFILM GFX100S
- Lens
- GF55mmF1.7 R WR
- Aperture
- f/11.0
- Shutter
- 1/42 s
- ISO
- ISO 640
- Software
- darktable 5.3.0+959~gf86f0af591
- Date
Trying it out.

Show figure 10 detailsClose figure 10 details
- Camera
- FUJIFILM GFX100S
- Lens
- GF55mmF1.7 R WR
- Aperture
- f/11.0
- Shutter
- 1/42 s
- ISO
- ISO 640
- Software
- darktable 5.3.0+959~gf86f0af591
- Date
Rear side.
1.1 Bill of materials
Here’s the BOM (prices are approximate):
| Component | Approx. Cost |
|---|---|
| Alkeria Necta N4K2-7C | $2000 |
| NVIDIA Jetson Orin Nano Super | $250 |
| Intel 670P 2TB SSD | $55 back in 2022, probably like $300 now lol |
| CNC case | $110 |
| Three-key Bluetooth macro pad | $20 |
| 7 inch 1080P 2000 nit touchscreen | $70 |
| Short USB-A to USB-C cables | $5 |
| Short USB-A to right angle micro USB 3 cable | $5 |
| Short HDMI cable | $15 |
| USB-C PD to barrel plug adapter | $7 |
| Anker power bank | $60 |
Show figure 11 detailsClose figure 11 details
Block diagram of how it’s connected. The SVG was generated by AI but it looks right to me.
1.2 Case design
I modelled the case in Rhinoceros 3D.
I ordered it from JLC CNC for about RMB 831, which is like $110.

Show figure 12 detailsClose figure 12 details
JLCCNC order screenshot

Show figure 13 detailsClose figure 13 details
Sendcutsend would have cost ten times as much.

Show figure 14 detailsClose figure 14 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/8.0
- Shutter
- 1/15 s
- ISO
- ISO 3200
- Software
- darktable 5.3.0+959~gf86f0af591
- Date
3D printed prototype

Show figure 15 detailsClose figure 15 details
- Camera
- Apple iPhone 14 Pro Max
- Lens
- iPhone 14 Pro Max back triple camera 6.86mm f/1.78
- Aperture
- f/1.8
- Shutter
- 1/40 s
- ISO
- ISO 320
- Software
- 26.3
- Date
A pile of 3D printed rejects.

Show figure 16 detailsClose figure 16 details
- Camera
- FUJIFILM GFX100S
- Lens
- GF55mmF1.7 R WR
- Aperture
- f/16.0
- Shutter
- 1/42 s
- ISO
- ISO 1000
- Software
- Digital Camera GFX100S Ver2.13
- Date
Transferring the guts from the old 3D printed prototype to the shiny metal one.
1.3 Setting up the Jetson
I picked the Jetson because it has a low price and great compute compared to the similarly priced Raspberry Pi 5.
I wanted to only use the NVME M2 2280, and apparently the only way to do so is to use the NVIDIA SDK Manager, which requires an x86_64 Ubuntu 24.04 machine. It was really annoying. I couldn’t do it from my Arch Linux machine (must be Ubuntu), another Jetson (not x86), or my Windows machine, but was eventually able to do it by actually using an Ubuntu desktop. The process was also really finicky with its USB cable requirements. I had to plug the cable into the back of the PC.
Another unanticipated issue was that the Jetson doesn’t keep time when powered off due to not having an RTC battery. Sometimes, my photos end up being out of order.

Show figure 17 detailsClose figure 17 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/2.8
- Shutter
- 1/70 s
- ISO
- ISO 125
- Software
- Digital Camera GFX100S Ver2.13
- Date
My friend soldering an RTC battery
Actually, you can just bridge R560 with solder. Some people online painstakingly solder a 560 mΩ SMD resistor which is super difficult. I think the actual resistance is supposed to be 1 kΩ and the “R560” is just the name of the part and not the resistance.
Show figure 18 detailsClose figure 18 details
Pinout

Show figure 19 detailsClose figure 19 details
- Camera
- FUJIFILM GFX100S
- Lens
- SIGMA 70mm F2.8 DG MACRO A018
- Aperture
- f/2.8
- Shutter
- 1/160 s
- ISO
- ISO 100
- Software
- Digital Camera GFX100S Ver2.13
- Date
It works.
1.4 Touchscreen

Show figure 20 detailsClose figure 20 details
- Date
Touchscreen specs
The good news is that the touchscreen is super bright (2000 nits), so it is easily legible in daylight unlike the Macbook.
Also, it is powered by 5V USB (you can also power it by a barrel plug if you want), so I could just plug it into the Jetson and it just works.
1.5 Capture UI
It’s implemented in C++ with Dear ImGui.
I set up a systemd thing to launch it automatically upon boot.

Show figure 21 detailsClose figure 21 details
- Camera
- Apple iPhone 14 Pro Max
- Lens
- iPhone 14 Pro Max back triple camera 6.86mm f/1.78
- Aperture
- f/1.8
- Shutter
- 1/1321 s
- ISO
- ISO 80
- Software
- 26.3
- Date
Live debugging in the field.
I set up a keybinding to toggle capture on/off with the spacebar so that I can control it wirelessly with a Bluetooth macro pad, to avoid shaking the camera when capturing.
2 Future ideas
I’d do these differently next time:
- Add screw threads to the CNC case
- My wifi hat protrudes weirdly because my screws aren’t long enough and again, no screw threads. So I had to use standoffs.
Another idea is to add a regular video camera (i.e. an area-scan camera) to the thing. That would help measure the speed of the train as well as help me see which part of the scene the line scan camera is looking at.
Right now, the tripod quick release plate (a Peak Design plate) is attached by a single M4 screw. I’d like to use two screws instead attached to the Alkeria camera for better strength.
3 Other people's line scan cameras
3.1 Adam Magyar
Adam Magyar’s “Einstein’s Camera” is perhaps the most famous one.
Adam Magyar’s “stainless” project

Show figure 22 detailsClose figure 22 details
Adam Magyar and his line scan camera.
His monochrome line scan camera takes really clean images even in low light, but is huge and needs a backpack. To be fair, it was over a decade ago.
3.2 Seth Itow
My former colleague Seth created his handheld battery-powered line scan camera independently after being inspired by my previous stuff.

Show figure 23 detailsClose figure 23 details
Seth’s line scan camera.
3.3 Philomena
Philomena (aka FlamingSpork) has a neat one too. She wrote a really good writeup with lots of details and explanations.

Show figure 24 detailsClose figure 24 details
Philo’s line scan camera
4 FAQ
Do you actually carry it with a strap attached to those Peak Design anchor links?
Good heavens no! It’s just a meme.
What lenses do you use?
In customizing my line scan camera I mentioned that I converted it to Sony E mount (manual only, no electronic contacts).
I use a Cheecar 50mm f/1.2 and a Samyang 85mm f/1.8 CS, both manual focus for Sony E mount (APS-C). The line is 28mm long so an APS-C lens covers it while being affordable.
I also have a variety of full frame lenses that I occasionally use on both this and my Fuji GFX camera, including:
- Voigtlander Ultron 35mm f/1.7
- Voigtlander Apo Skopar 90mm f/2.8
- Voigtlander Apo Lanthar 125mm f/2.5
My Cheecar and Samyang have an IR-block filter, but the Voigtlanders don’t. Actually, I had one for the 90mm, but I smashed it accidentally.

Show figure 25 detailsClose figure 25 details
Before vs after putting on the IR-block filter.
How long does the battery last?
The Anker battery lasts about 1 hour. It is nice because it has a display indicating the amount of charge remaining, and it has a built-in USB-C cable capable of outputting PD 20 V and more than the 35 W needed for the setup.