← Back to Projects

360° UAV Imaging

A line sensor for a panorama: one scan is 128 brightness values, and the live plot is still the plan.

Robotics, Sensing, & Controls Research Intern · Aug. 2026 – Present · In progress · GRASP Laboratory

  • TSL1401
  • nRF54L15
  • nRF Connect SDK
  • J-Link

Key outcomes

  • 128 photodiodes expose together. The ADC sample is where each analog voltage becomes a number.
  • The source loops every 25 ms, subtracts a dark frame, and can average a second pair 12.5 ms later.
  • That hardware readout and the Bluetooth packet have not been run on this board.
nRF board wired through a breadboard to a J-Link, with a note labeled TSL1401 imager
TSL1401 bring-up. J-Link on the left, nRF board above the breadboard. Not the rotating mount.

Project overview

Finger test: 128 pixels vertically, time horizontally, broad dark bars
Vertical is the 128 pixels. Horizontal is time. Not a panoramic image.

The board is an HJ-N54L-SIP_EVB with an nRF54L15. It has no debugger of its own. An external J-Link on SWD programs it, and that probe also supplies 3.3 V today. Do not connect that Vcc clip and another supply at the same time. The source is the bluetooth branch, revision r3, built for nrf54l15dk/nrf54l15/cpuapp with nRF Connect SDK v3.4.1.

System architecture

Vertical stripes from 120 Hz room-light flicker
120 Hz room light, before the paired exposures.

Light, photocurrent, a held voltage on AO, one ADC sample, then pix[128]. The laptop is the step after that, and it is not connected yet. A panorama needs one more number, the angle, which is also not recorded.

TSL1401
128 photodiodes in one row. They expose together, then AO steps through the analog voltages.
nRF54L15
SI, CLK, and one ADC sample per pixel. Full scale is 3.6 V, 12 bits. The board target is nrf54l15dk/nrf54l15/cpuapp.
J-Link
SWD, and the only 3.3 V supply on the bench right now. Unplugging it removes power, flashing, and the text log.
Laptop
Planned. A finished scan would show up as pixel index against brightness. That plot has not been run.

Engineering decisions

DecisionAlternativeWhy
Subtract a dark frame, then average a second pair when it fitsPlot the raw ADC burst and treat the offset as part of the scene.The source does the dark subtraction every line, and the second pair when it fits.
Clock the pixels in hardware, and finish the line before any radioToggle CLK in a CPU loop and read the ADC from that same loop.READOUT_HW is 1.
Leave the J-Link as the only supply until the probe comes offClip a second 3.3 V supply onto VCC while the J-Link Vcc lead is still attached.One flash with the J-Link, confirm "bluetooth advertising as 360imager (0)" while the probe is still on, then a separate 3.3 V supply and the probe disconnected.

Implementation

Stationary scene after paired exposures removed the flicker stripes
After the 12.5 ms pair. Still time along the horizontal axis.

I am integrating the TSL1401 with the nRF54L15. Samples come in on the ADC and the GPIO timing pins, not SPI. The hardware readout and the Bluetooth path are in the bluetooth-branch source and have not been run on this board. The HJ-N54L-SIP_EVB and the TSL1401.

Debugging and validation

The stripes were the lights

Problem
An earlier stationary scene came out as vertical stripes.
Diagnosis
Room lighting flickers at 120 Hz.
Fix
On the earlier still scene, the notes report 0.8% from line to line and 1.2% of drift over 60 seconds.

The flash never took

Problem
Everything looked plugged in, and there was no sign the board was taking a program.
Diagnosis
The note from that session: the wires had come loose, and one attachment passed power and not data.
Fix
Not fixed.
Handheld multimeter on the bench, probes held on a wired board, display not a recorded reading
Probes on the wired board. The display is not a voltage I wrote down.

Results and future work

Earlier lines, not this readout. The finger test shows a sensor responding, with no lens. Vertically, 128 pixels. Horizontally, time. It is not a run of the hardware-timed readout, and it is not a panorama. No live scan yet.

The BLE packet is specified: 206 bytes, sync A5 5A, version 1, line number, exposure, 128 pixels at 12 bits, checksum, no retransmission. Nothing on this board has advertised as 360imager, and nothing has been plotted from that packet. The spinner

Still open. The hardware readout and the Bluetooth path have not been run on this board. There is no build output in the tree.

  • Flash the BLE image once over the J-Link and confirm the advertising log before touching the supply.
  • If that log dies after the readout line, switch the BLE clock source to the internal RC and flash again.
  • Only then connect a separate 3.3 V supply and disconnect the J-Link.

Related work

Full engineering log

Context

What this is for

The objective is a panoramic image from one line of pixels, light enough for a UAV. I am integrating a TSL1401, 128 photodiodes in one row, with an nRF54L15. Earlier bench figures show a finger crossing the row and a still scene after a flicker test. The next milestone is one live scan, pixel index against brightness, with the board on its own 3.3 V.

The row exposes together, then AO steps through the analog voltages. The ADC sample is the line of 128 numbers. Stacking those lines against time is not a panorama. A panorama needs each line tagged with angle, and that tag is not in the data yet.

Requirements

  • One scan is 128 brightness values, from one shared exposure.
  • Sample AO after it settles, once per pixel, and keep the CPU out of the clock burst.
  • Subtract a dark frame so offset and light collected during the flush do not sit in the line.
  • Stream a finished scan to a laptop only after the line is complete. That stream has not been run.
  • Pair each scan with a viewing angle once the sensor is actually turning. That pairing is not in the data.

System Overview

How the system fits together

The board is an HJ-N54L-SIP_EVB with an nRF54L15. It has no debugger of its own. An external J-Link on SWD programs it, and that probe also supplies 3.3 V today. Do not connect that Vcc clip and another supply at the same time. The source is the bluetooth branch, revision r3, built for nrf54l15dk/nrf54l15/cpuapp with nRF Connect SDK v3.4.1. The bench photo is still the breadboard and the J-Link, not a sensor spinning on its own supply.

01

TSL1401

128 photodiodes in one row. They expose together, then AO steps through the analog voltages.

02

nRF54L15

SI, CLK, and one ADC sample per pixel. Full scale is 3.6 V, 12 bits. The board target is nrf54l15dk/nrf54l15/cpuapp.

03

J-Link

SWD, and the only 3.3 V supply on the bench right now. Unplugging it removes power, flashing, and the text log.

04

Laptop

Planned. A finished scan would show up as pixel index against brightness. That plot has not been run.

Data flow

Light, photocurrent, a held voltage on AO, one ADC sample, then pix[128]. The laptop is the step after that, and it is not connected yet. A panorama needs one more number, the angle, which is also not recorded.

Control flow

The source loops every 25 ms, about 40 lines a second. Each output line is not one raw ADC burst. expose() flushes, waits, reads a lit frame, flushes, and reads a dark frame. Lit minus dark takes out offset, fixed pattern, and light collected during the flush. When that pair fits in 12.5 ms, it takes a second pair and averages, which is how 120 Hz flicker is supposed to cancel. The result is pix[128], clamped to 12 bits. Auto-exposure starts at 1000 us and aims the brightest raw pixel at 1000 to 2000 counts. This path has not been run on this board.

Bench
nRF board on a breadboard, wired to a J-Link, with a handwritten note that says TSL1401 imager

Bring-up on the bench. The note on the photo says TSL1401 imager. The black box is a J-Link, and it is also the 3.3 V supply.

Signal path
  1. Light

    A narrow strip of the scene lands on 128 photodiodes. Absorbed photons make electron-hole pairs.

  2. Charge

    The junction field collects that charge as a photocurrent. The pixel integrates it for the exposure.

  3. AO

    All 128 expose together. The sensor then holds the readings and outputs the analog voltages one at a time.

  4. ADC

    The nRF samples AO once per pixel after the voltage settles. This is where the line becomes numbers. Full scale is 3.6 V, 12 bits.

  5. pix[128]

    Dark frame subtracted, and a second pair averaged when it fits in 12.5 ms. Written. Not run on this board.

  6. Laptop

    Planned over BLE. The first plot is pixel index against brightness. A panorama needs the angle, which is later.

My part

What I took on

I am integrating the TSL1401 with the nRF54L15. Samples come in on the ADC and the GPIO timing pins, not SPI. The hardware readout and the Bluetooth path are in the bluetooth-branch source and have not been run on this board.

Work I did

  • TSL1401 on the nRF54L15. The samples come in through the ADC and the GPIOs.

Already there

  • The HJ-N54L-SIP_EVB and the TSL1401.
  • The readout and BLE source on the bluetooth branch, revision r3. No build output in the tree, and neither path has been run on this board.
  • Earlier bench figures of a finger and of room-light flicker. Those figures are not a run of this hardware readout.

Engineering Breakdown

Broken down by discipline

Each block is the requirement, how that part works, what I checked, and what is still open.

01Acquisition

Acquisition

Goal

Turn one exposure of 128 photodiodes into pix[128], with the analog-to-digital step on the ADC.

Design

Pins, from the overlay: AO on P1.11 (AIN4), SI on P1.12, CLK on P1.08. READOUT_HW is 1. TIMER21 and GPIOTE make CLK. SI is a CPU pulse, high only across rising edge 1. The falling edge triggers an SAADC sample through DPPI, and EasyDMA writes the buffer in pixel order. TIMER22 stops the burst on rising edge 129. Pixel clock is 125 kHz. The flush clock is 4 MHz. Acquisition is 2 us. The CPU must not bit-bang CLK, and it must not send Bluetooth from inside the readout. Pixels 0 through 3 are copies of pixel 4. The hardware path programs the SAADC directly and hardcodes AO as P1.11. The overlay channel is only used if READOUT_HW is 0. This readout has not been run on this board.

Challenges

  • The J-Link is power, programming, and the text log. Unplugging it removes all three.
  • A blocking RTT print will stall the scanner when no debugger is reading, and the BLE image still prints every line.
  • If the log stops after the readout line, the board may have no 32.768 kHz crystal. The BLE config would then have to use the internal RC. That has not been tried here.

Iterations

  • Bench photo: breadboard, sensor note, J-Link on the left.
  • Hardware-timed readout written, with a dark frame and a 25 ms loop.
  • Not run on this board. There is no build output in the tree.

Final implementation

The source describes a 128-value scan. I am not calling that scan done. The finger-test figure is an earlier check, with no lens: 128 pixels on the vertical axis, time on the horizontal.

02Light

Light

Goal

Keep 120 Hz room light from looking like structure in the line.

Design

The source takes a lit frame and a dark frame, subtracts, and when that pair fits in 12.5 ms it takes a second pair and averages. One cycle of 120 Hz is about 8.3 ms, so 12.5 ms is 1.5 cycles. For an ideal sine, that lands the second lit frame on the opposite phase. It is not half a cycle, and it does not cancel an arbitrary lamp waveform. A log line that says "dark 0" means the values are already subtracted. Earlier still-scene figures, from before this readout, report 0.8% line-to-line jitter and 1.2% drift over 60 seconds, with the sensor sitting still.

Challenges

  • Locking the line rate to 120 Hz took out the sharp stripes and left slow waves, on the order of 15 seconds, because the lamps do not hold 120 Hz perfectly.
  • The pair mixes two angles if the sensor moves between the shots. The sensor is not turning yet.
  • Auto-exposure, aimed at 1000 to 2000 counts, can still change the brightness from line to line.

Iterations

  • Stripes, before the timing change. Earlier figure.
  • Line rate locked to 120 Hz. Sharp stripes gone, slow waves left.
  • Paired exposures 12.5 ms apart, written into the current source and not run on this board.

Final implementation

The cancellation is in the source. The pictures on this page are earlier still-scene figures, and the horizontal axis on them is still time.

Before
Grayscale image of tight vertical stripes from room-light flicker

Earlier figure, before the timing change. Vertical stripes are the 120 Hz room lights, sampled at a different phase on each line.

Locked to 120 Hz
Grayscale image with the sharp stripes gone and broad slow brightness waves remaining

Earlier figure. Line rate locked to 120 Hz. The sharp stripes are gone. Slow waves remain.

Paired exposures
Grayscale image of a stationary scene after paired exposures, without the sharp flicker stripes

Earlier still-scene figure. Two exposures 12.5 ms apart, averaged. The notes on it report 0.8% line-to-line jitter and 1.2% drift over 60 seconds. The sensor was not rotating.

03Off the probe

Off the probe

Goal

Run the board and the sensor on their own 3.3 V, with the J-Link gone, and plot one live scan.

Design

Two images are in the source. The plain build has no Bluetooth. It prints text over SEGGER RTT, which the J-Link reads out of RAM: "dark 0" every 40 lines, the exposure, and one CSV of pix[]. The BLE build advertises as 360imager. After pix[] is complete it queues a 206-byte packet and a lower-priority thread sends it on the Nordic UART Service TX characteristic. The packet is little-endian: sync A5 5A, version 1, line number, exposure, 128 pixels packed at 12 bits, and a checksum. Splits follow the MTU. Nothing is retransmitted, so a drop is a gap in the line number. The receiver script already knows this packet, and today it draws a scrolling image. The plot we want is the latest valid line, index against brightness. Wireless firmware update is not on this image.

Challenges

  • The J-Link Vcc clip and a second 3.3 V supply must not be connected at the same time.
  • Legacy advertising is 31 bytes. A later update image would have to advertise the name and the SMP UUID, and the plot script would find the UART service after it connects.
  • MCUboot can run on this chip in this SDK. It is not enabled, it cannot install itself, and secure boot stays off. An application that never starts Bluetooth still needs the probe.
  • The lens has to get smaller and then stay fixed. If it moves, the picture changes, and the row does not collect enough light. It is on the bench. It is not on the sensor.

Iterations

  • J-Link attached. That is the earlier bench photo.
  • A spinner turns on the bench, as a stand-in for the flyer. The line sensor is not mounted on it, and no speed is written down.
  • BLE image written. A later try never got a flash through. The wires had come loose.
  • Own 3.3 V supply, probe disconnected, one plotted scan. Not done. Angle and a panorama come after that.

Final implementation

The acquisition source is written. The rotating panoramic imager is not, and neither is a live plot with the probe unplugged.

Key Design Decisions

Design decisions

DecisionAlternativeWhy
Subtract a dark frame, then average a second pair when it fitsPlot the raw ADC burst and treat the offset as part of the scene.The source does the dark subtraction every line, and the second pair when it fits.
Clock the pixels in hardware, and finish the line before any radioToggle CLK in a CPU loop and read the ADC from that same loop.READOUT_HW is 1.
Leave the J-Link as the only supply until the probe comes offClip a second 3.3 V supply onto VCC while the J-Link Vcc lead is still attached.One flash with the J-Link, confirm "bluetooth advertising as 360imager (0)" while the probe is still on, then a separate 3.3 V supply and the probe disconnected.
Notes on these decisions

Subtract a dark frame, then average a second pair when it fits

A raw burst still carries offset, fixed pattern, and light collected while the sensor is flushing. Room light at 120 Hz can also land on a different phase every line.

The second pair cancels one cycle of 120 Hz flicker and costs another integration. It mixes two views if the sensor has moved. A log line that says "dark 0" only means the subtraction already happened.

The source does the dark subtraction every line, and the second pair when it fits. That code has not been run on this board. The still-scene figures above are earlier, with the sensor sitting still.

Clock the pixels in hardware, and finish the line before any radio

Bit-banging CLK, or sending Bluetooth from inside the readout, stretches the pixel timing and the exposure.

The hardware path is less flexible, and it hardcodes AO as P1.11. It also keeps the CPU out of the burst. The radio waits until pix[] is complete, then a lower-priority thread sends a copy. Dropped packets are not retried.

READOUT_HW is 1. CLK is hardware-timed at 125 kHz, the sample is triggered through DPPI, and Bluetooth is not sent from inside the readout. This has not been run on this board.

Leave the J-Link as the only supply until the probe comes off

The goal is a board and sensor on their own 3.3 V, with no J-Link, streaming scans. Today the probe is also the supply.

Two supplies on that rail at once can fight. Taking the probe off also takes away RTT and the ability to flash. The BLE image has to already be advertising before that unplug means anything.

One flash with the J-Link, confirm "bluetooth advertising as 360imager (0)" while the probe is still on, then a separate 3.3 V supply and the probe disconnected. That sequence has not been run.

When It Broke

What failed

The stripes were the lights

Problem
An earlier stationary scene came out as vertical stripes. The spacing followed the line rate, not an edge in the room.
Diagnosis
Room lighting flickers at 120 Hz. Lines taken at different phases recorded that flicker as if it were the image.
Fix
On the earlier still scene, the notes report 0.8% from line to line and 1.2% of drift over 60 seconds. That sensor was not rotating.
How I checked this

Those earlier figures compare a free-running line rate, a rate locked to 120 Hz, and two exposures 12.5 ms apart. The locked rate cleared the stripes and left slow waves. The 12.5 ms spacing is 1.5 cycles of an ideal 120 Hz sine.

A dead pixel column or a loose analog wire can also make a vertical feature. Those would not move when the line rate changes. Pixels 0 through 3 in the current source are copies of pixel 4, which is a different edge effect.

The same pair on this board, and the same pair during rotation. If the sensor moves between the two exposures, the average mixes two angles.

The flash never took

Problem
Everything looked plugged in, and there was no sign the board was taking a program. I couldn't tell whether it even had power.
Diagnosis
The note from that session: the wires had come loose, and one attachment passed power and not data. I didn't write down which connector that was.
Fix
Not fixed. I don't have a later log that shows a successful flash, or a line that says the board is advertising.
Handheld multimeter on the bench, probes held on a wired board, display not a recorded reading
Probes on the wired board. The display is not a voltage I wrote down.
How I checked this

I checked the board with a multimeter. There is no voltage written down from that check, and the meter in the photo is not a number I'm quoting.

A missing toolchain path can look like a board that never answers. The laptop log says it can't detect the toolchain path from the build. The note, separately, says the wires had come loose.

A flash that actually lands, with the probe still on, before any second supply is connected.

Results & Validation

What held up

What worked in the end, what I can show for it, and where it's still limited.

Earlier lines, not this readout

The finger test shows a sensor responding, with no lens. Vertically, 128 pixels. Horizontally, time. It is not a run of the hardware-timed readout, and it is not a panorama.

Finger test
Finger-test plot: dark bars across time, 128 pixels along the other axis

Earlier figure. Vertically, the sensor's 128 pixels. Horizontally, successive acquisitions over time. No lens. Not a run of the current readout, and not a panoramic image.

No live scan yet

The BLE packet is specified: 206 bytes, sync A5 5A, version 1, line number, exposure, 128 pixels at 12 bits, checksum, no retransmission. Nothing on this board has advertised as 360imager, and nothing has been plotted from that packet.

Over the spinner
A wired perfboard and green board held over a black spinner on the lab bench

The wired board held over the spinner. The row is not mounted, and this is not a scan.

The spinner is not the imager

A motor that already spins is the stand-in for the flyer. The clip shows that assembly turning. The line sensor is not on it, the lens is still on the bench, and no angle is paired with a scan.

Lens
A black lens sitting on the bench, not mounted on a sensor

The lens on the bench. It still has to get smaller, and it has to stay fixed. It is not on the row.

More stills from this build
Round board
A small round purple board held in a white printed ring

A round board in a printed ring. The notes don't give this part a name, so this is not the TSL1401.

Limitations

  • The hardware readout and the Bluetooth path have not been run on this board. There is no build output in the tree.
  • No live plot of pixel index against brightness. The receiver script, as it stands, draws a scrolling image.
  • No 360° reconstruction. Lines are not tagged with angle, and the sensor is not rotating.
  • The J-Link is the 3.3 V supply, the programmer, and the text log. Wireless flashing is not enabled.
  • No UAV flight. The spinner is a bench stand-in. The line sensor is not mounted on it.
  • The lens is not on the row. It still has to be made smaller and then held fixed.
  • The latest flash didn't land. The meter check has no number written down.
Bench notes

The longer design notes, the timeline, and the revisions. The sections above are the system and what I measured.

Evolution

How it got here

The steps I can put in order from the notes. A clip opens from its still.

  1. Bench

    An earlier pipeline check

    A finger across the sensor, no lens. The figure shows broad dark bars. That checked an earlier acquisition, not this hardware readout, and not the focus.

  2. Light

    Stripes, then a timed pair

    120 Hz room light drew vertical stripes on a still sensor. The current source subtracts a dark frame and averages a second pair 12.5 ms later when the first pair fits. That source has not been run here.

  3. Readout

    Hardware clock, not a CPU loop

    CLK on P1.08 is timer-driven at 125 kHz. The ADC samples on the falling edge. The loop is 25 ms. Pixels 0 through 3 copy pixel 4. No build of this path is in the tree.

  4. Green board wired to a perfboard with magnet wire, held over the bench
    Green board wired to a perfboard with magnet wire, held over the bench
    Magnet wire between the green board and the perfboard. The note says the wires had come loose.

    Bench

    The wires, then no program

    The boards on the bench are tied with magnet wire. The note says those wires had come loose, and one attachment passed power without data.

  5. A small assembly spinning on the bench, with a ribbon cable off the center
    The assembly turning. The line sensor is not mounted on it. No speed is written down.

    Mechanics

    A spinner, without the row

    The plan is to put the line sensor on a slip ring, on a motor that already spins, so the bench can stand in for the flyer.

  6. Next

    One scan, off the probe

    Flash the BLE image once with the J-Link, read "bluetooth advertising as 360imager (0)", then power the board from its own 3.3 V and unplug the probe. The plot is index against brightness.

Reflection

Looking back

What surprised me, what I'd redo, and questions I'm still chewing on.

What surprised me

  • The pixel is still an analog voltage on AO. The image does not start until the ADC samples it, and a stack of those lines is still not a panorama.

What I would redesign

  • Plot the latest valid pix[] as index against brightness, instead of a scrolling image, once a packet actually arrives.
  • Record angle with the line, instead of assuming a constant spin after the fact.

Future improvements

  • Flash the BLE image once over the J-Link and confirm the advertising log before touching the supply.
  • If that log dies after the readout line, switch the BLE clock source to the internal RC and flash again.
  • Only then connect a separate 3.3 V supply and disconnect the J-Link.
  • After a live scan, one more probe flash can add MCUboot for later updates. Secure boot stays off. That bootloader is not on this image.

Questions that emerged

  • Once the sensor is turning, does the 12.5 ms pair still cancel flicker, or does it blend two angles?
  • How short does the exposure have to be before one pixel smears by one angular step?
  • After the lens is smaller, what holds it in one place so the picture and the light on the row stay the same?

Notes

  • Charge is the brightness, until the converter. The photodiode integrates current for exp_us. The voltage on AO is that charge, still analog. The SAADC sample, 12 bits across 3.6 V, is the first digital value. pix[128] is a line. It becomes a column of a panorama only after it has an angle.
  • Forty lines a second is a time base. It becomes an angular step only while the rotation speed is known. A stall, or a spin that is not constant, would pack those lines into the wrong angles. The spinner in the clip is turning. The line sensor is not on it, and no speed is written down.

Same work