using OpenMV to assist in astrophotography
work in progress
Required:
Optional:
There are other screws that might be required depending on how you plan on mounting the camera
There’s a 3D printed mount you can print out to hold the camera. The 3D model is available in the mech folder of my GitHub repo. It requires additional drilling and thread-tapping. Use a M3 thread tap on all the holes. The 1/4”-20 threaded insert being used is McMaster-Carr 90594A024.
If you do decide to use this 3D printed mount, you should enlarge the holes on the OpenMV with a 1/8” drill bit. Otherwise, the M3 screws will not fit.
When you buy everything, remove the default lens from the OpenMV, place the O-ring on the threads of the telephoto lens, and screw in the telephoto lens into the mount.
(you may want to clean the sensor, but according to the creators of OpenMV, newer cameras are already cleaned at the factory)
Attach the WiFi shield to the OpenMV. This may require soldering.
Download and install OpenMV IDE
Plug in the OpenMV to your computer, use OpenMV IDE to update the firmware of the OpenMV. You MUST use my firmware from this GitHub repo file
Download everything from the file system directory, and copy it into the OpenMV’s flash memory. (it should have appeared as an USB drive)
Simply power the device by a USB power bank and a USB micro cable
By default, the WiFi is not configured. It will run as a soft-access-point with SSID similar to OpenMV-XXXX
. Connect to it with a smartphone, the password will be 1234567890
. When you are connected, you can access the web interface with the address http://192.168.1.1/
.
Otherwise, you can also create a file on the flash memory drive named wifi_settings.json
, with the contents similar to:
{
"ssid": "your-router-ssid",
"mode": "home",
"password": "1234567890",
"security": "wpa"
}
Which will allow you to connect to a router. You will need to check the router to see which IP address is assigned to the OpenMV. For example, if the router assigned it the IP of 192.168.1.123
then you can access the web interface with the URL http://192.168.1.123/
If you want to run in soft-access-point mode (which requires no router) while customizing the SSID and password, the contents will look like:
{
"ssid": "new-name",
"mode": "soft-ap",
"password": "new-password",
"security": "wep"
}
(only WEP is supported for soft-AP mode)
At night, you have pointed the camera at the stars, and you are looking at the web interface. The first thing you need to do is make sure the lens is focused correctly.
Use the web interface to turn on Real Image
mode, then rotate the lens until the stars are in focus. You may also change the zoom level and the camera exposure settings.
The camera’s exposure settings may be changed to get the best image. The best image is one in which the code can detect the most amount of stars without detecting any noise as if they were stars. If you are pointing at Polaris already, seeing 15 to 20 stars should be an excellent result.
There are three settings: gain, shutter, and threshold.
Gain is the electronic amplifier of the camera sensor. The higher it is, the brighter the overall image becomes. This will help dark stars be seen but it will also amplify noise. Changing it will not affect the frame-rate of the camera.
The shutter speed adjustment will affect how much light is gathered by the camera sensor. The longer the shutter time is, the more light is gathered, and stars will be brighter without collecting noise. But a longer shutter time (i.e. slower shutter speed) will slow down the frame-rate.
The threshold adjustment tells the code “how bright a star is”. The higher the setting, the less stars will be detected. You want to raise it high enough that noise is not confused for stars. If you leave it at zero, then the code will make a best-guess of the threshold based on the overall image darkness.
Calibration must be done every time you attach the camera to a tracking mount. If you calibrate it and then leave it mounted, you shouldn’t need to re-calibrate. (but it might still be a nice idea)
You must be pointed at Polaris. Polaris and NCP must be positively identified (you will see a red marker on the NCP and a green dot over Polaris).
Register that image with the button Register Image Data
.
Rotate the R.A. axis of your tracking mount (ideally with the electric motor, not using your hand) about 90°, Polaris and NCP must still be in-view. Do not move the tripod.
Click the Calibrate
button. The yellow crosshair on the image should have moved to the new calibrated location.
If Polaris and the NCP are detected properly, you will see a red marker on the NCP and a green dot over Polaris. There should also be an artificial horizon in the corner of the image indicating which way is up and down.
Use the latitude and azimuth adjustment knobs on your tracking mount to move the yellow crosshair into the center of the red marker. You may use the different zoom levels for extra precision.
If you want to enable atmospheric refraction compensation, go into the “Time and Location” tab and enable it via the checkbox. Make sure you’ve inputted the correct geographic location. The settings can be saved for next time.
If you think you have good camera exposure settings but you see stars that don’t move even if the camera is being moved, then you are seeing hot-pixels. Go into the “Hot Pixels” tab, cover up the lens completely, raise the camera gain a little bit higher, and click “Capture Hot Pixels”. After that, the code will remove the hot pixels from view.
You may use OpenMV IDE to do whatever you want. The whole project is open source. You can run the default camera viewing demo code and use your computer to check the camera if you wish.
There’s a polarscope_settings.json
file. You can make manual edits to it if you wish but you do need to reset OpenMV, and then refresh the web interface, to make the changes take effect.
If you ever mess up, you can always just delete everything and start all over.