• First recorded footage... blurry

    Jacob David C Cunningham05/18/2023 at 05:46 0 comments

    I wanted to get out there and get some footage recorded with the ML Hat Cam so in this case it's just a video recorder.

    I manually determined fixed zoom points for near, mid and far. However they were not good the next day. I turned the auto-focus code off and voice control. Just bound manual controls with fixed zooms.

    Anyway it was a great day and I got sun burnt. I need to update this code. I'm also dealing with reality though (job hunting).

    I saved a turtle today, was on the road, ran out and moved it to the other side where it was trying to go.

    YT is having problems right now but these will render later

  • Voice control (speech intent) with Picovoice AI Rhino

    Jacob David C Cunningham02/26/2023 at 00:40 0 comments

    So I need a way to control the zoom with my voice.

    I tried some different libraries initially eg. sphinx and vosk but they were bad in terms of accuracy.

    Also I was probably using them for the wrong thing (not intent).

    Someone mentioned picovoice to me and that's what I'm using now.

    I got a model of two intents: ZoomIn and ZoomOut (for the utterance Zoom in and Zoom out)

    I got this running locally, verified it works offline (since it requires an access key) by turning wifi off.

    Then I paired it with the stepper control

    See recent video/demo below

    My code flow/architecture is still garbage at this point, still bridging things.

    The display for example is messed since it needs a single instance and I have to propagate that all the way down.

    I added battery life tracking too (based on max measured uptime and CRON 5min increment). I also went away from the box drawn around the active choice in the menu to color, since the box has to be drawn one piece at a time (4 draw calls) with the current code I'm using.

    I also fixed an audio issue, in the above you can kind of see that the 3.5mm audio jack plug does not have a ground going to the speaker, that was causing my constant buzzing/hissing issue.

    It got really bad when the speech intent listener loop was running.

  • Body assembled

    Jacob David C Cunningham02/19/2023 at 18:12 0 comments

    Finally... no more box of wires

    Ooh the side view looks good, it looks like an old TV camera

    I gotta design the hat hanger part and then the rest is software work.

    Gotta take out to the field later in the year when it's warmer and I fix my DLG

    God this is so cringe

  • Battery pack done, onto body design

    Jacob David C Cunningham02/18/2023 at 02:01 0 comments

    Unfortunately the split 18650-cell holders are not tight enough so the battery can slip out hence zip tie. A more long-term solution is a clip/sandwich deal with screws.

    What I'll do here is keep one of the zip ties and use a bread tie to keep them down (pos side).

    Here's the body layout. I'm working on the shell design.

  • Modeling parts

    Jacob David C Cunningham02/17/2023 at 02:13 0 comments

    Made good progress on modeling the parts so I can design the case that holds everything together.

    I also designed and printed the parallel battery box (pictured above middle).

    I have to make a model of the Pi 4B still and then do the designing... aiming to get the entire body done by end of this week if no printing/measuring mistakes.

    I also cut the first holes into the hat for the bolt mounts.

    And... I already made a mistake, the part I printed is the wrong thing. I used the black battery cell holder plastic things instead of the wrapper design that goes around it... so I gotta redesign that and print it again... great. Was only a 2 hour print though.

  • Dpad and soldering

    Jacob David C Cunningham02/15/2023 at 02:24 0 comments

    Starting to put the stuff together, turned on the OLED

    And have a design in mind it's not what I wanted but trying to keep it small

    The bottom picture shows the general flow of the parts eg. dpad -> OLED -> speaker

    underneath that is the Pi 4B, then the two stepper boards oriented 90 degrees

    I'm keeping all the ports open and not soldering anything to the Pi 4B so it's not stuck in this project

    Although once together I probably would not take it apart

    I want to get the case done by the end of this weekend... will see because it's a bit of design work (spacing) and print time (if I get it right first try or two).

    Mostly I don't want a box of parts anymore, so I want to speed up the physical assembly and then can dial in the software over time

    I still have to write the code for the dpad, speakers and other stuff... and more but making progress.

    This was the old design/thought I had.

    speaker on left

  • Autofocus with Laplace Variance

    Jacob David C Cunningham02/12/2023 at 22:14 0 comments

    Initially I was trying to use canny edge but it was suggested to me to use laplace variance (and others). I just went with this one for now since it's a basic one-liner from OpenCV.

    It works pretty well of course this is one test case (my desk). I need to try it out and add catches for the field case (clear blue sky).

    This is good for now, I was able to integrate the camera stream with the steppers/make a control loop.

    I'm going to proceed with new parts of the project eg. the OLED disply, speakers and d-pad mostly because I need to make sure I have enough pins and then design the case that holds all these parts together.

    That'll be nicer to work with than a box of parts and a breadboard.

  • More manual stepping and Sqlite3

    Jacob David C Cunningham02/10/2023 at 03:19 0 comments

    So.... this took me a bit longer than it should have. I also had an oversight where I did not add a zero-position bumper. I still need to make sure I have enough pins left for the d-pad and display.

    I decided to store the positions of the steppers so they could be resumed/rezeroed on boot. Also allows you to make sure you don't go too far.

    Had some problems with Python to split a class/have everything work still.

    So at this point I'm going to move forward with the frame sampling and based on "zoom intuition" write an algorithm to auto zoom.

    The steppers are slow, so I have a basic goal of being able to zoom/keep up with some motion.

    I'm largely relying on narrow aperture and far zooming to keep something in focus.

    I have not sampled a frame from a video feed before and need to limit processing under 30ms I believe... so it'll be interesting.

    So far it seems the farthest the plane can be at 1/3 frame is around 100ft... which is not great... but maybe 1/3 is too big anyway... so you could do 200 ft... which your ceiling is 400ft and I normally fly around 200' or so from a launch.

  • Lens stepper assembly built

    Jacob David C Cunningham01/29/2023 at 05:33 0 comments

    This was a quick design and had problems. I overlooked the middle open/close ring being taller than the diameter of the lens barrel. So the telephoto ring gear I had to sand... I also had to sand the front-lens support part. I had to sand it a lot... so it would fit.

    Then I had problems with the stepper GPIO's interfering with the camera detection for some reason. If they're plugged (ground connected specifically) on boot, the camera cannot be detected, I don't know why.

    So I'll put a switch in for that, I know you could do an electron switch, maybe even a relay but not worth it for me.

    Now I can actually do the frame by frame analysis to try and autozoom this thing.

  • Steppers not servos

    Jacob David C Cunningham01/25/2023 at 04:05 0 comments

    So... I started printing parts and getting rough sizing... I was planning on using some left over MG90D servos... however they only rotate 180 deg (with this pwm code I'm using) and also the gearing cuts it in half... the focus ring rotates the most on the 8-50mm lens. So I have to switch to these steppers that I already have and they are kind of big... oh well. This thing will be chonk.

    After this I'll design the camera mount which also supports the lens and the steppers will attach to that.

    I will have a programmable unit sometime this week. The software is the hardest part about this project.