real actual dragon (θΔ). follow for weird photography stuff and the occasional rawr


i set up the current revision of the ls-8000 controller hardware not really thinking about leveraging the MCU's hardware acceleration because i'm Arduino Brained and used to chips that have absolutely crackerjack hardware controllers for everything and i figured i'd be better off just bit banging it.

turns out, if I'm reading this datasheet correctly I should be able to configure the chip to drive the CCD (which takes a wacky 3-phase clock input), trigger and read the ADCs for each column, write all 30,000 pixels into memory, and stop the CCD clock all without even getting the CPU involved. like the CPU would be doing nothing when that happens. why didn't anyone TELL me modern chips can do this


You must log in to comment.

in reply to @wolf-apparatus's post:

well i'm gonna try at least

even getting one of those things moved to hardware will dramatically decrease the core load, though i don't think any of them are strictly necessary other than the ADC read (and that's SPI so the hardware SPI block had better fuckin work). being able to pull off the whole thing would be magical though

it's an old Nikon Coolscan right? i looked in to them when you made your film scanning video and it seemed like they were kinda a pain to work with, so having a modern/hackable stack to breath new life in to them is pretty neat. i definitely don't need more hobbies (and don't have the space for film development or a scanner) but the general idea of taking old, high-quality hardware that needs some digital glue to perform its best with modern equipment is a fantastic idea.

i'm interested to see how you deal with the color science challenges, a fair amount of the look and feel off the sensor of these things is how the nonlinearities in the analog to digital conversion process are mapped in to 24/48bpp color i think. i know a little about debayering for 2D CCDs but I assume it's a whole other beast for line sensors

(replying over here because it's getting quite squished)

yeah the scanner is a Nikon Coolscan 8000, one of the best medium-format scanners on the planet. you're right on the money with them being a pain to work with - not only are they FireWire only, but they're extremely picky about your host-side FireWire controller (somehow) and notorious for electrical unreliability. in fact, the control board on mine is completely broken, and that's what's going to happen to every Coolscan 8000 in existence over the next decade or so. they just don't last on the electrical side. getting to put a USB port on the back is nice but the real goal is making sure the scanner will still work in a couple centuries because it's definitely capable of it

that's because the hardware is completely fine. the only truly irreplaceable part of the scanner is the lens, which is widely regarded as the best macro lens ever made (in fact, people used to take these apart for the lens in the early '10s as medium-format film finally started to leave the professional space. regrettable practice, in hindsight), and those don't break on their own. the rest of the system is just the CCD, the lamp, and a bunch of motors and photogates that basically amount to a 3D printer rotated 90 degrees

the color science shouldn't be a problem, actually. in a digital workflow all the "look" happens on the computer and you want the scanner to output linear RGB, which should be pretty easy to calibrate in. and there's actually no debayer involved with this CCD, the pixels are all monochrome and color information comes in by making separate exposures with different illumination colors - the 3 analog output channels are actually three identical rows of pixels (it's a red herring, i'm actually getting four color channels out of this thing because it also scans an infrared channel for defect detection)

huh, changing the illumination color makes perfect sense and now that you mention it i'm reminded of a video of how they scan for iMAX and it's the same thing -- though they use a high-res 2D CCD, it's also done with 3 exposures for RGB.

maybe the 3 rows are for alignment, unless there's some other high-precision closed-loop control system for the film advance?

i bet there's plenty of other old-ish hardware where the expensive bit is still good (the optical assembly in this case, but i'm reminded of the high-speed HP plotter that @atomicthumbs posts about occasionally) that could be revived with a smattering of modern control electronics.

oh there is so much hardware like that

the 3 rows are actually just for scanning faster, as I understand it. don't need high precision closed loop control thanks to the power of the inclined plane, the high-precision film advance is on a 1 mm pitch lead screw so your garden-variety 1.8 degree stepper motor can position it down to the 1/10000 inch with even a little bit of microstepping control (and i wouldn't be surprised if the motor on that axis is one of the fancy ones that does less than 1.8 degrees per step)

8000 ED right? from the sketchy manual site i found it's quoted at 14bit accuracy and from a quick search those are still multi-dollar parts today. maybe it was worth spinning an ASIC for that in 2001 but it's probably not anymore. Nikon is definitely cozy with a fab or two given they make their own CCDs IIRC, and they have likely had/have some expect analog designers on staff. so they might have spun one for the hell of it.

it's also possible that's just a de-branded FPGA or something which i think would have been fairly expensive in that era...

anyway if you need help with the software and have stuff that doesn't require the hardware to be in front of you to work on i'm a decent hand at rust and might have some spare cycles to poke at it

8000 ED, yeah (there's no other 8000), and you're correct on the ADC prices - the ones I've specced for the replacement board are about 7 bucks each in low quantities (TI ADS7056).

the big ASIC on the original controller has nothing to do with the analog side, though. it manages driving the CCD clocks, reading parallel data out of the discrete ADC on the board (an Analog Devices AD9822, which presumably wasn't cheap but it's at least off-the-shelf), sending that data back to the computer, and i think doing a bit of DSP on it as well but don't quote me on that. i don't believe it's a FPGA, there doesn't appear to be anywhere for bitstream storage and all the literature i can find calls it an ASIC

i'll be good on the code side, but thanks for offering