https://globalmeteornetwork.org//wiki/api.php?action=feedcontributions&user=Markmcintyre&feedformat=atomGlobal Meteor Network - User contributions [en]2024-03-28T19:00:44ZUser contributionsMediaWiki 1.39.3https://globalmeteornetwork.org//wiki/index.php?title=Focusing_your_camera&diff=627Focusing your camera2023-07-10T13:04:27Z<p>Markmcintyre: </p>
<hr />
<div>So you’ve built your wonderful meteor camera system and need to focus it. What do you do? Follow the tips below for (relatively) pain-free focusing.<br />
<br />
=== Things you might find handy… ===<br />
Either [https://www.dropbox.com/s/3r4fiqec6jpzwz3/CMS%20and%20Manual.rar?dl=1 CMS Windows] camera monitor software or [https://sourceforge.net/projects/onvifdm/ ONVIF Device Manager (ODM)]. We recommend the latter for viewing the live stream when the camera is running off the RPi.<br />
<br />
== Option 1: Steps for direct camera connection to PC (Windows) ==<br />
<br />
[[File:IP camera windows conf.png|thumb|Windows network settings]]<br />
# Download and install either CMS or ODM<br />
# Plug your camera into your POE injector and then into your PC’s ethernet port<br />
# Open ‘''Network & Internet Settings''’ and then click on ‘''Ethernet''’ in the left menu (assuming Windows 10 here)<br />
# To the right, click on ‘''Change adapter options''’ and watch as a new window pops up<br />
# Right-click the ‘''Ethernet''’ icon and select ‘''Properties''’<br />
# Scroll down to ‘''Internet Protocol Version 4 (TCP/IPv4)''’, select it and then click ‘''Properties''’<br />
# In the new window, set the IP address to: <br />
#* If you haven't changed the camera's default IP address, set the IP address to '''192.168.1.5''' and the Default Gateway to '''192.168.1.1'''. <br />
#* If your camera has already been setup to run on the Pi, then use '''192.168.42.5''' for the IP address and '''192.168.42''' for the Default Gateway.<br />
# Click OK to close that window, then OK on the next window<br />
# You can then run CMS or ODM and set them to point to 192.168.1.10 or 192.168.42.10 (with ODM, you click ‘Add’ at the bottom of the left column and then you’ll put something like http://192.168.1.10/onvif/device_service in for the URL)<br />
<br />
== Option 2: Steps for seeing the stream on a camera connected to a Pi ==<br />
<br />
# Download and install either CMS or ODM on your Windows PC<br />
# VNC into the Pi and run TunnelIPCamera.sh (on your desktop) in a terminal<br />
# Check the IP address of the Pi by running ‘ifconfig’ in a terminal window. You want the ‘inet addr’ under wlan0<br />
# On your PC (that is on the same network as your Pi) you can then run CMS or ODM and setup either to point to the IP address of the Pi. With ODM, click ‘Add’ at the bottom of the left column and then input http://192.168.1.10:8899 for the URL - just make sure the replace "192.168.1.10" with the IP address of your Pi.<br />
# Connect to the camera and view the live stream<br />
<br />
== Focusing ==<br />
<br />
Now that you have a live stream, you can open up your camera housing and adjust the lens by turning the lens clockwise or anti-clockwise until good focus is achieved. Good focus may be a bit subjective, but you want to aim for stars that are a few pixels across and uniform in size across the field. Sometimes we will actually defocus a bit. If the stars are too sharp (~1 pixel across) we have troubles extracting stars from the imagery. Likely, this won’t be an issue for you though.<br />
<br />
Once you’ve focused, close the camera up and shutdown CMS/ODM. If tunneling through the Pi, be sure to stop the tunnel script by hitting ‘any’ key while in the terminal that is running TunnelIPCamera.sh. Then you can either reboot the Pi or restart RMS_StartCapture.sh in a terminal window.<br />
<br />
== RE-Focusing Later ==<br />
You may find yourself needing to refocus the camera at some point after its been commissioned. At this point, the camera is configured for night-time operation and its therefore hard to focus in daytime. You can temporarily reset the camera to daytime mode by opening a Terminal window on the Pi, and typing the following commands: <br />
python -m Utils.CameraControl SetParam Camera Style type2 <br />
python -m Utils.CameraControl SetParam Camera DayNightColor 1 <br />
python -m Utils.CameraControl SetParam Camera ElecLevel 30 <br />
python -m Utils.CameraControl SetParam Camera ExposureParam LeastTime 100 <br />
python -m Utils.CameraControl SetParam Camera GainParam Gain 30<br />
<br />
To reconfigure back to night-time operation, run:<br />
python -m Utils.CameraControl SetParam Camera Style type1 <br />
python -m Utils.CameraControl SetParam Camera DayNightColor 2<br />
python -m Utils.CameraControl SetParam Camera ElecLevel 100<br />
python -m Utils.CameraControl SetParam Camera ExposureParam LeastTime 40000 <br />
python -m Utils.CameraControl SetParam Camera GainParam Gain 60</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=471Build A Camera2022-10-20T09:09:05Z<p>Markmcintyre: /* Focusing the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/1005002704227705.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area. The AliExpress store lists two RTC modules, one labelled "DS3231 module" and the other "mini DS3231 module." Select the "mini DS3231 module" option; it is designed for the Raspberry Pi. It has 5 pins and includes a battery.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. <br />
If the image is upside down in VLC, turn it through 180 degrees in the housing. do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter movement. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
You can usually do an initial focus with the camera assembled on a desk. Point it out a window during the hours of darkness and focus on a building at least 50m away. <br />
<br />
You can do this using the RMS utility ShowLivestream instead of VLC, if you have already fully configured the camera and Pi as explained in the next step. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place you MUST finalise focus at night. The filters slightly alter focus. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
'''Note that all RMS scripts MUST be run from the source/RMS folder as the Pi user. Don't be tempted to cd into a different folder! It won't work.''' <br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next open a terminal window and run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port, open a Terminal window and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=435Build A Camera2022-08-14T21:52:54Z<p>Markmcintyre: /* Using the RMS software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area. The AliExpress store lists two RTC modules, one labelled "DS3231 module" and the other "mini DS3231 module." Select the "mini DS3231 module" option; it is designed for the Raspberry Pi. It has 5 pins and includes a battery.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. <br />
If the image is upside down in VLC, turn it through 180 degrees in the housing. do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter movement. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
You can do this using the RMS utility ShowLivestream instead of VLC, if you have already fully configured the camera and Pi as explained in the next step. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place you MUST finalise focus at night. The filters slightly alter focus. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
'''Note that all RMS scripts MUST be run from the source/RMS folder as the Pi user. Don't be tempted to cd into a different folder! It won't work.''' <br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next open a terminal window and run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port, open a Terminal window and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=434Build A Camera2022-08-14T21:52:36Z<p>Markmcintyre: /* Using the RMS software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area. The AliExpress store lists two RTC modules, one labelled "DS3231 module" and the other "mini DS3231 module." Select the "mini DS3231 module" option; it is designed for the Raspberry Pi. It has 5 pins and includes a battery.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. <br />
If the image is upside down in VLC, turn it through 180 degrees in the housing. do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter movement. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
You can do this using the RMS utility ShowLivestream instead of VLC, if you have already fully configured the camera and Pi as explained in the next step. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place you MUST finalise focus at night. The filters slightly alter focus. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
Note that all RMS scripts MUST be run from the source/RMS folder as the Pi user. Don't be tempted to cd into a different folder! It won't work. <br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next open a terminal window and run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port, open a Terminal window and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=428Build A Camera2022-03-28T12:55:30Z<p>Markmcintyre: /* Focusing the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. <br />
If the image is upside down in VLC, turn it through 180 degrees in the housing. do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter movement. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
You can do this using the RMS utility ShowLivestream instead of VLC, if you have already fully configured the camera and Pi as explained in the next step. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place you MUST finalise focus at night. The filters slightly alter focus. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=427Build A Camera2022-03-28T12:54:50Z<p>Markmcintyre: /* Focusing the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. <br />
If the image is upside down in VLC, turn it through 180 degrees in the housing. do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter movement. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
You can do this using the RMS utility ShowLivestream instead of VLC, if you have already fully configured the camera and Pi. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place you MUST finalise focus at night. The filters slightly alter focus. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=426Build A Camera2022-03-28T12:52:50Z<p>Markmcintyre: /* Checking the Connection */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. <br />
If the image is upside down in VLC, turn it through 180 degrees in the housing. do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter movement. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=425Build A Camera2022-03-28T12:51:23Z<p>Markmcintyre: /* Attaching the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board or image of a stick man must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=424Build A Camera2022-03-28T12:50:24Z<p>Markmcintyre: /* Attaching the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you do not have to detach the cables or risk knocking focus later on. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. Otherwise: <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder, passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=423Build A Camera2022-03-28T12:48:59Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully push the filter out of the lens holder as shown in the image on the right. If you push from the front, the filter may come out intact. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the while filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you can check the cables and focus, and then do not have to detach the cables or risk knocking focus while installing the camera. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=422Build A Camera2022-03-28T12:47:32Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
* If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
* Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
* If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
* DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
* If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
* If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you can check the cables and focus, and then do not have to detach the cables or risk knocking focus while installing the camera. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=421Build A Camera2022-03-28T12:45:10Z<p>Markmcintyre: /* Using the RMS software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you can check the cables and focus, and then do not have to detach the cables or risk knocking focus while installing the camera. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS, as follows: <br />
<br />
* If you're not using the pre-built image, first install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Now plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
If you get any errors or timeouts, check the camera IP address, and check that the Pi is connected to your home network. <br />
<br />
* Next run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=420Build A Camera2022-03-28T12:43:15Z<p>Markmcintyre: /* Using the RMS software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you can check the cables and focus, and then do not have to detach the cables or risk knocking focus while installing the camera. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
* You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=419Build A Camera2022-03-28T12:42:28Z<p>Markmcintyre: /* Using the CMS Software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you can check the cables and focus, and then do not have to detach the cables or risk knocking focus while installing the camera. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will currently have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=418Build A Camera2022-03-28T12:41:34Z<p>Markmcintyre: /* Attaching the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
'''Note: I recommend installing the camera in the housing at this point so that you can check the cables and focus, and then do not have to detach the cables or risk knocking focus while installing the camera. However, you can proceed to test focus etc before installing the camera in the housing if you wish.''' If you prefer to do that, skip this section for now and come back later. <br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=417Build A Camera2022-03-28T12:38:43Z<p>Markmcintyre: /* Assembly */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=416Build A Camera2022-03-28T12:38:14Z<p>Markmcintyre: /* Assembly */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
'''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
'''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside the mechanism. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. Then remove the clear filter. You can leave the reddish daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
* Now reassemble the filter holder. Do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=415Build A Camera2022-03-28T12:36:48Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|single filter: punch out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
* '''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
* '''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside the mechanism. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. <br />
** Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Sliding type: Remove the filter entirely]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. <br />
** Carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Rotating type: Remove just the clear filter]]<br />
<br />
** Now reassemble the filter holder but do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=414Build A Camera2022-03-28T12:35:58Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
* '''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
* '''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside the mechanism. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. <br />
** Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Remove the glass entirely from the filter drawer]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. <br />
** Carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Remove just the clear filter]]<br />
<br />
** Now reassemble the filter holder but do not connect the power cable to the camera. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=File:Slidedrawer.jpg&diff=413File:Slidedrawer.jpg2022-03-28T12:34:28Z<p>Markmcintyre: </p>
<hr />
<div></div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=File:Rotatingfilter.jpg&diff=412File:Rotatingfilter.jpg2022-03-28T12:34:15Z<p>Markmcintyre: </p>
<hr />
<div></div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=File:Lensholders2.jpg&diff=411File:Lensholders2.jpg2022-03-28T12:33:55Z<p>Markmcintyre: </p>
<hr />
<div></div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=410Build A Camera2022-03-28T12:33:15Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
<br />
* '''Lens holder with single filter'''<br />
** If you have a lens like the one shown in the first image, unscrew the lens from the holder.<br />
** Then using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. <br />
** If it shatters, make sure there are no shards left. <br />
<br />
* '''Lens holder with electronic filter drawer'''<br />
* Some lenses come an electronic day/night filter drawer. These have a small cable to plug into the camera board. Two different types of these filter holders are shown here. <br />
[[File:lensholders2.jpg|thumb|right|Two sorts of lens holder with day/night filters]]<br />
<br />
** DO NOT try to punch out the filter directly as this may jam the mechanism or leave shards of glass inside the mechanism. <br />
** If your holder is the type with a rectangular sliding drawer, remove the drawer by undoing the screw on the end. <br />
** Then remove the filter glass entirely. <br />
[[File:slidedrawer.jpg|thumb|right|Remove the glass entirely from the filter drawer]]<br />
<br />
** If your holder is the other type, undo the three small screws on the top and take off the cover. <br />
** Carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
[[File:rotatingfilter.jpg|thumb|right|Remove just the clear filter]]<br />
<br />
** Now reassemble the filter holder but do not connect the power cable to the camera. <br />
<br />
RMS doesn't use either filter but the camera will place the now-empty clear filter slot in front of the lens at night, which is what we want. As you power the camera off and on you may hear the filter click as it is tested but this is normal. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=409Build A Camera2022-03-28T09:13:49Z<p>Markmcintyre: /* Using the CMS Software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. <br />
** If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
** RMS doesn't use either filter but the camera will place the now-empty clear filter slot in front of the lens at night, which is what we want. As you power the camera off and on you may hear the filter click as it is tested but this is normal. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
<table><br />
* If you have a Pi3, you will have to use CMS. <br />
* CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
* Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
</table><br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=408Build A Camera2022-03-28T09:13:19Z<p>Markmcintyre: /* Using the CMS Software */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. <br />
** If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
** RMS doesn't use either filter but the camera will place the now-empty clear filter slot in front of the lens at night, which is what we want. As you power the camera off and on you may hear the filter click as it is tested but this is normal. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
If you have a Pi3, you will have to use CMS. CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=407Build A Camera2022-03-28T09:12:59Z<p>Markmcintyre: /* Setting Camera Parameters */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. <br />
** If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
** RMS doesn't use either filter but the camera will place the now-empty clear filter slot in front of the lens at night, which is what we want. As you power the camera off and on you may hear the filter click as it is tested but this is normal. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If you have a Pi4, you can use a utility that's part of RMS. <br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Plug the camera into your router, open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC then you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=406Build A Camera2022-03-28T09:10:33Z<p>Markmcintyre: /* Preparing the Camera Housing */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. <br />
** If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
** RMS doesn't use either filter but the camera will place the now-empty clear filter slot in front of the lens at night, which is what we want. As you power the camera off and on you may hear the filter click as it is tested but this is normal. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
<br />
* We do not recommend that you put the whole cable inside the housing, as the LEDs on it will create light pollution inside the housing. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=405Build A Camera2022-03-28T08:58:54Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. <br />
** If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
** RMS doesn't use either filter but the camera will place the now-empty clear filter slot in front of the lens at night, which is what we want. As you power the camera off and on you may hear the filter click as it is tested but this is normal. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=404Build A Camera2022-03-28T08:57:20Z<p>Markmcintyre: /* Preparing the Lens */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws, 6mm long - for mounting lens holder <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 4x M2 screws, 12 mm long - for mounting camera module to bracket<br />
# 1x M3-.50 screw, 6mm long - for mounting camera module L-bracket to base plate<br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 4B is now the minimum spec. Previously, a Raspberry Pi Model 3B+ was considered the minimum but these do not have the performance or memory to handle busy meteor showers. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* Source suitable M2 and M3 screws. It might be possible to find these locally but in some places they are just odd enough to be quite hard to find. You could order some hardware from the [https://www.aliexpress.com/store/4714020?spm=a2g0o.detail.1000007.1.5fc666d9tN1f8i ScrewHome Store] on AliExpress. Each [https://www.aliexpress.com/item/32981714992.html?spm=a2g0o.store_pc_groupList.8148356.10.be65539dLjPgfh packet of 50 M2x6mm, M2x12mm, and M3x6mm] machine screws will cost only a few dollars.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. RMS doesn't use either filter. In normal night time operation the filter assembly will place the now-empty clear filter slot in front of the lens. As you power the camera off and on you may hear the filter click as it is tested. This is normal and can be ignored. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=394Build A Camera2021-11-21T14:22:42Z<p>Markmcintyre: /* Find its IP Address */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 6mm screws for lens holder (normally come with the lens)<br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible such as 'Koenig & Bauer AG' and 'Metrohm AG'. If none of the names look right you may need to experiment by trying to connect to each candidate in turn.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=393Build A Camera2021-11-20T16:16:56Z<p>Markmcintyre: /* Parts and Tools needed */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 6mm screws for lens holder (normally come with the lens)<br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
Finally, if you are operating several cameras, you can use a PoE switch instead of a PoE injector.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
[[File:rtc.jpg|thumb|RTC installation|200px]]<br />
<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
Once you plug it into the Pi (see image on the right) and make sure the current time is correct on the Pi, open the terminal and run:<br />
<br />
<pre><br />
sudo hwclock -w<br />
</pre><br />
<br />
This will set the current computer time to the RTC. Every time the Pi boots up, it will read the correct time from the RTC.<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12V socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. <br />
If the power input port has a small cap, then you can just cover it and use the PoE on the ethernet port. If it's open, then you will need a pair of PoE adapters (seen in that picture in the background).<br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Windows_Installation&diff=392Windows Installation2021-11-16T10:51:33Z<p>Markmcintyre: /* Install Required Tools */</p>
<hr />
<div>= Basic Instructions =<br />
There are more detailed instructions, with pictures, [[Detailed_Windows_Installation|here]] but the below should work for most users. <br />
<br />
'''Note: you will need about 2.5GB of space on your hard disk for the support tools. '''<br />
<br />
== Install Required Tools ==<br />
=== install MS Visual Studio Build Tools ===<br />
(updated Nov 2021)<br />
<br />
* Download Visual Studio 2022 Community Edition.<br />
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019. (this now takes you to the Visual Studio 2022 installation page)<br />
<br />
* Click the "Free Download" button to install Community edition. This will download and run the installer.<br />
* In the left panel, select Desktop Development with C++. <br />
* ''Note that you do not need python development''. <br />
* On the right panel ensure the latest versions of MSVC v143 - VS 2022 C++ x64/x86 build tools and Windows 10 SDK are selected. This should be automatic. You can also select CLI Tools. <br />
<br />
* Click install. Its a '''10.5GB''' package so it'll take a while.<br />
<br />
=== Install Anaconda for Windows ===<br />
* Download Anaconda from here https://www.anaconda.com/products/individual<br />
* Run the installer. <br />
* Unless you intend to use Anaconda for other python development, you can select the default options at every stage. <br />
* Its a 500MB download and installation may take 20-30 minutes. <br />
<br />
=== Install Git for Windows ===<br />
* Download Git from here https://git-scm.com/download/win<br />
* Again, select the default options unless you have some specific requirement.<br />
<br />
== Download RMS and Set it Up ==<br />
=== Clone the RMS code to your PC ===<br />
* From the Start Menu, open an Anaconda Powershell prompt and change directory to the place you want to keep the code.<br />
* Run this command:<br />
<pre> git clone https://github.com/CroatianMeteorNetwork/RMS.git</pre><br />
*This will create a new folder "RMS" containing the code.<br />
<br />
=== Create an Anaconda virtual environment ===<br />
* Still in the anaconda powershell window, type the following:<br />
<pre>conda create -n RMS python=3.8</pre><br />
* This will create a python virtual environment named "RMS" containing python 3.8<br />
<br />
=== Install the required Python packages === <br />
* Still in the anaconda powershell window type the following to activate the virtual environment:<br />
<pre>conda activate RMS</pre><br />
* the prompt should change to "(RMS) c:\source\" or something similar<br />
* change directory into the RMS folder.<br />
* Now install the required Python modules by running these commands:<br />
<pre><br />
pip install -r requirements.txt<br />
pip install PyQt5<br />
pip install opencv_python<br />
pip install rawpy<br />
</pre><br />
<br />
== Test RMS worked ==<br />
* To test that RMS worked, type the following in the same Window:<br />
<pre> python -m Utils.SkyFit2 </pre><br />
* The first time you run RMS it will compile various code modules, but at the end of the process you should see this message:<br />
<pre><br />
usage: SkyFit2.py [-h] [-c CONFIG_PATH] [-r] [-t TIME] [-f FPS]<br />
[-g CAMERA_GAMMA] [-p GEO_POINTS_PATH]<br />
INPUT_PATH<br />
SkyFit2.py: error: the following arguments are required: INPUT_PATH </pre><br />
* This indicates that RMS is installed properly. <br />
<br />
== Setting RMS up for your Cameras ==<br />
RMS reads its settings from a hidden file '''.config''' which is in the folder /home/pi/source/RMS on each Pi, and is also copied to the ArchivedFiles/ folder containing the night's data. You can copy this file to the RMS folder on your PC if you want. <br />
<br />
== Update Regularly!!! == <br />
The RMS code is FREQUENTLY updated and so its important that you update it too. On the Pi, this is automatic but on your PC you need to do it yourself.<br />
<br />
To update the code, open an Anaconda Powershell window, activate the RMS environment and then type:<br />
<pre><br />
git stash<br />
git pull<br />
git stash apply<br />
</pre><br />
This will 'stash' your local changes such as the config file, pull the latest code, and then reapply your local changes.<br />
<br />
== Thats It ==<br />
That's it! Any time you want to run RMS you just<br />
* open an Anaconda Powershell prompt<br />
* change directory to the RMS folder<br />
* activate the virtual environment<br />
<pre> conda activate RMS</pre><br />
* and then run the module you want to use.</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Windows_Installation&diff=391Windows Installation2021-11-16T10:49:56Z<p>Markmcintyre: /* install MS Visual Studio Build Tools */</p>
<hr />
<div>= Basic Instructions =<br />
There are more detailed instructions, with pictures, [[Detailed_Windows_Installation|here]] but the below should work for most users. <br />
<br />
'''Note: you will need about 2.5GB of space on your hard disk for the support tools. '''<br />
<br />
== Install Required Tools ==<br />
=== install MS Visual Studio Build Tools ===<br />
(updated Nov 2021)<br />
<br />
* Download Visual Studio 2022 Community Edition.<br />
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019. (this now takes you to the Visual Studio 2022 installation page)<br />
<br />
* Click to install Community edition. This will download and run the installer.<br />
* In the left panel, select Desktop development with C++. <br />
* ''Note that you don't need python development''. <br />
* On the right panel ensure the latest versions of MSVC v143 - VS 2022 C++ x64/x86 build tools and Windows 10 SDK are selected. You can also select CLI Tools. <br />
<br />
* Click install. Its a '''10.5GB''' package so it'll take a while.<br />
<br />
=== Install Anaconda for Windows ===<br />
* Download Anaconda from here https://www.anaconda.com/products/individual<br />
* Run the installer. <br />
* Unless you intend to use Anaconda for other python development, you can select the default options at every stage. <br />
* Its a 500MB download and installation may take 20-30 minutes. <br />
<br />
=== Install Git for Windows ===<br />
* Download Git from here https://git-scm.com/download/win<br />
* Again, select the default options unless you have some specific requirement. <br />
<br />
== Download RMS and Set it Up ==<br />
=== Clone the RMS code to your PC ===<br />
* From the Start Menu, open an Anaconda Powershell prompt and change directory to the place you want to keep the code.<br />
* Run this command:<br />
<pre> git clone https://github.com/CroatianMeteorNetwork/RMS.git</pre><br />
*This will create a new folder "RMS" containing the code.<br />
<br />
=== Create an Anaconda virtual environment ===<br />
* Still in the anaconda powershell window, type the following:<br />
<pre>conda create -n RMS python=3.8</pre><br />
* This will create a python virtual environment named "RMS" containing python 3.8<br />
<br />
=== Install the required Python packages === <br />
* Still in the anaconda powershell window type the following to activate the virtual environment:<br />
<pre>conda activate RMS</pre><br />
* the prompt should change to "(RMS) c:\source\" or something similar<br />
* change directory into the RMS folder.<br />
* Now install the required Python modules by running these commands:<br />
<pre><br />
pip install -r requirements.txt<br />
pip install PyQt5<br />
pip install opencv_python<br />
pip install rawpy<br />
</pre><br />
<br />
== Test RMS worked ==<br />
* To test that RMS worked, type the following in the same Window:<br />
<pre> python -m Utils.SkyFit2 </pre><br />
* The first time you run RMS it will compile various code modules, but at the end of the process you should see this message:<br />
<pre><br />
usage: SkyFit2.py [-h] [-c CONFIG_PATH] [-r] [-t TIME] [-f FPS]<br />
[-g CAMERA_GAMMA] [-p GEO_POINTS_PATH]<br />
INPUT_PATH<br />
SkyFit2.py: error: the following arguments are required: INPUT_PATH </pre><br />
* This indicates that RMS is installed properly. <br />
<br />
== Setting RMS up for your Cameras ==<br />
RMS reads its settings from a hidden file '''.config''' which is in the folder /home/pi/source/RMS on each Pi, and is also copied to the ArchivedFiles/ folder containing the night's data. You can copy this file to the RMS folder on your PC if you want. <br />
<br />
== Update Regularly!!! == <br />
The RMS code is FREQUENTLY updated and so its important that you update it too. On the Pi, this is automatic but on your PC you need to do it yourself.<br />
<br />
To update the code, open an Anaconda Powershell window, activate the RMS environment and then type:<br />
<pre><br />
git stash<br />
git pull<br />
git stash apply<br />
</pre><br />
This will 'stash' your local changes such as the config file, pull the latest code, and then reapply your local changes.<br />
<br />
== Thats It ==<br />
That's it! Any time you want to run RMS you just<br />
* open an Anaconda Powershell prompt<br />
* change directory to the RMS folder<br />
* activate the virtual environment<br />
<pre> conda activate RMS</pre><br />
* and then run the module you want to use.</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Windows_Installation&diff=390Windows Installation2021-11-16T10:47:46Z<p>Markmcintyre: /* install MS Visual Studio Build Tools */</p>
<hr />
<div>= Basic Instructions =<br />
There are more detailed instructions, with pictures, [[Detailed_Windows_Installation|here]] but the below should work for most users. <br />
<br />
'''Note: you will need about 2.5GB of space on your hard disk for the support tools. '''<br />
<br />
== Install Required Tools ==<br />
=== install MS Visual Studio Build Tools ===<br />
(updated Nov 2021)<br />
<br />
* Download Visual Studio 2022 Community Edition.<br />
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019<br />
<br />
* Run the installer.<br />
* In the left panel, select Desktop development with C++. <br />
* Note that you don't need python development. <br />
<br />
* On the right panel ensure the latest versions of MSVC v143 - VS 2022 C++ x64/x86 build tools and Windows 10 SDK are selected. You can also select CLI Tools. <br />
<br />
* Click install. Its a '''10.5GB''' package so it'll take a while.<br />
<br />
=== Install Anaconda for Windows ===<br />
* Download Anaconda from here https://www.anaconda.com/products/individual<br />
* Run the installer. <br />
* Unless you intend to use Anaconda for other python development, you can select the default options at every stage. <br />
* Its a 500MB download and installation may take 20-30 minutes. <br />
<br />
=== Install Git for Windows ===<br />
* Download Git from here https://git-scm.com/download/win<br />
* Again, select the default options unless you have some specific requirement. <br />
<br />
== Download RMS and Set it Up ==<br />
=== Clone the RMS code to your PC ===<br />
* From the Start Menu, open an Anaconda Powershell prompt and change directory to the place you want to keep the code.<br />
* Run this command:<br />
<pre> git clone https://github.com/CroatianMeteorNetwork/RMS.git</pre><br />
*This will create a new folder "RMS" containing the code.<br />
<br />
=== Create an Anaconda virtual environment ===<br />
* Still in the anaconda powershell window, type the following:<br />
<pre>conda create -n RMS python=3.8</pre><br />
* This will create a python virtual environment named "RMS" containing python 3.8<br />
<br />
=== Install the required Python packages === <br />
* Still in the anaconda powershell window type the following to activate the virtual environment:<br />
<pre>conda activate RMS</pre><br />
* the prompt should change to "(RMS) c:\source\" or something similar<br />
* change directory into the RMS folder.<br />
* Now install the required Python modules by running these commands:<br />
<pre><br />
pip install -r requirements.txt<br />
pip install PyQt5<br />
pip install opencv_python<br />
pip install rawpy<br />
</pre><br />
<br />
== Test RMS worked ==<br />
* To test that RMS worked, type the following in the same Window:<br />
<pre> python -m Utils.SkyFit2 </pre><br />
* The first time you run RMS it will compile various code modules, but at the end of the process you should see this message:<br />
<pre><br />
usage: SkyFit2.py [-h] [-c CONFIG_PATH] [-r] [-t TIME] [-f FPS]<br />
[-g CAMERA_GAMMA] [-p GEO_POINTS_PATH]<br />
INPUT_PATH<br />
SkyFit2.py: error: the following arguments are required: INPUT_PATH </pre><br />
* This indicates that RMS is installed properly. <br />
<br />
== Setting RMS up for your Cameras ==<br />
RMS reads its settings from a hidden file '''.config''' which is in the folder /home/pi/source/RMS on each Pi, and is also copied to the ArchivedFiles/ folder containing the night's data. You can copy this file to the RMS folder on your PC if you want. <br />
<br />
== Update Regularly!!! == <br />
The RMS code is FREQUENTLY updated and so its important that you update it too. On the Pi, this is automatic but on your PC you need to do it yourself.<br />
<br />
To update the code, open an Anaconda Powershell window, activate the RMS environment and then type:<br />
<pre><br />
git stash<br />
git pull<br />
git stash apply<br />
</pre><br />
This will 'stash' your local changes such as the config file, pull the latest code, and then reapply your local changes.<br />
<br />
== Thats It ==<br />
That's it! Any time you want to run RMS you just<br />
* open an Anaconda Powershell prompt<br />
* change directory to the RMS folder<br />
* activate the virtual environment<br />
<pre> conda activate RMS</pre><br />
* and then run the module you want to use.</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=385Build A Camera2021-10-25T12:13:16Z<p>Markmcintyre: /* Find its IP Address */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems', though other vendor names are possible (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=384Build A Camera2021-10-22T08:51:12Z<p>Markmcintyre: /* Final Steps */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
<br />
If there are any cable connections outside the casing, you should also seal these up thoroughhly. This writer can attest to the damage caused by water ingress into a PoE connector! Tape up or seal the connections tightly with some sort of waterproof product (I used electrical tape), but remember you may need to change the cable, so don't seal it irreversibly. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Main_Page&diff=381Main Page2021-09-29T21:10:10Z<p>Markmcintyre: /* For More Information */</p>
<hr />
<div>Welcome to the Global Meteor Network's wiki page!<br />
<br />
The Global Meteor Network (GMN) is a world wide organization of amateur and professional astronomers alike, whose goal is to observe the night sky using low-light video cameras and produce meteor trajectories in a coordinated manner. Here you will find information on the purpose and structure of the GMN, assembling and operating your own meteor camera, contributing to the development of RMS the GMN software, as well as information on how your observations as a citizen scientist can contribute to the further understanding of our solar system's formation and evolution. <br />
<br />
'''<span style="color:red">If you have come here to find out how to build and setup a camera from scratch, jump ahead to [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#How_do_I_obtain_a_camera.3F this] section !</span>'''<br />
<br />
<br />
== Global Meteor Network Overview ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=141 Our mission] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=363 A brief history of the Global Meteor Network] ===<br />
<br />
=== [https://www.youtube.com/watch?v=MAGq-XqD5Po Video introduction - Overview of the Global Meteor Network (IMC2020)] ===<br />
<br />
=== [https://youtu.be/oM7lfQ4nmyw Video overview - Meteor tracking and the GMN from Astro Imaging Channel presentation] ===<br />
<br />
=== [https://globalmeteornetwork.org/data/ Some 'live' GMN data products] ===<br />
<br />
== Meteor Detection Station ==<br />
<br />
=== What is an RMS GMN station? ===<br />
: A RMS-based GMN station that is the subject of this Wiki consists of a Raspberry Pi (RPi) single board computer, a low light level security video camera, and the RMS software package. The camera is securely mounted in a weatherproof housing, pointed at the sky, and connected to the RPi with a POE (Power Over Ethernet) cable. The RPi is connected to the Internet via WiFi, and to be a part of GMN network, you’ll need a fairly powerful Raspberry Pi (RPi 3B+, RPi 4 or better) and a reasonably fast Internet connection. The internet connection is primarily required to enable data upload to a central server each morning as well as provide automatic updates for the RMS software. <br />
<br />
: Nightly, the RPi starts recording video from the camera shortly after local sunset continuously compressing and storing the video data locally. Each morning before sunrise, after capture is complete, the RPi analyzes the video and extracts your nightly station’s meteor observations. These extracted video “clips” of detected meteors are then archived and uploaded to a server. The clips can total hundreds of megabytes on a “busy” night (e.g., in a heavy meteor shower, or a night with a lot of false detections--progress is being made on the detection software). The server finds meteors which were observed with more than one station and this enables the server to triangulate the meteor trails in 3D and calculate the orbits of the meteors.<br />
<br />
===[https://github.com/CroatianMeteorNetwork/RMS/blob/master/README.md What do I need?] ===<br />
<br />
You'll need a Raspberry Pi with the software on, and a camera kit. We strongly recommend the Pi4 model. The software will run on a Pi3 but it is much slower. <br />
<br />
=== How do I obtain a camera? ===<br />
There are two options:<br />
<br />
==== Buy a Camera ====<br />
You can buy a camera and Pi prebuilt and ready to install. These are available from a couple of suppliers. The Croatian Meteor Network sell prebuilt cameras as explained on [https://globalmeteornetwork.org/?page_id=136 this page]. Alternatively, if you're in the UK, you can obtain cameras from the [https://ukmeteornetwork.co.uk/ UK Meteor Network] <br />
<br />
==== Build your own from scratch ====<br />
This requires some basic DIY skills and some familiarity with the Raspberry PI, but don't be put off. The instructions are comprehensive and if you get stuck, you can ask for advice in the [https://groups.io/g/globalmeteornetwork groups.io] forum. <br />
<br />
Click on this link if you want to '''[[Build_A_Camera|build a camera from scratch]]'''. <br />
<br />
Once you've built the camera, You can '''[https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#Flash_a_pre-built_image flash a Prebuilt image]''' onto an SD card to set up the Pi with the software required to capture meteors and upload data to the network.<br />
<br />
=== Can I use a commercial all-sky camera? ===<br />
<br />
: Generally no due to the lack of sensitivity. [https://globalmeteornetwork.org/?p=163 But see this recent experiment]<br />
<br />
== Operating and maintaining your GMN station ==<br />
<br />
=== Overview ===<br />
<br />
: Please note that GMS is a nascent operation and you may share some growing pains if you choose to be involved -- we're still working out some bugs and making improvements here, which may be an opportunity to help if you have programming skills! ;-) So note that the workload of day-to-day operation can be non-zero, and might take a little bit of your time.<br />
<br />
: Ideally, you'll want to monitor your RMS RPi system(s) daily to look for freezes or glitches or other problems... like birds nesting or soiling the camera window, people accidentally unplugging the power cord, mice (or cats or dogs!) chewing on the camera Ethernet cable, etc.<br />
<br />
: Although we are getting close, this is not a "power up and forget about it" system yet.<br />
: However, by its very nature, the GMS network is inhabited by a lot of people who are willing to help newcomers getting started. So, here are some clues for daily operation of your RMS camera.<br />
<br />
=== So what does the meteor camera do over the course of 24 hours? ===<br />
<br />
: The RMS Python based system calculates the sundown to sunrise interval and schedules video camera capture all night long. Depending on the video camera and capabilities of the RPi, the camera captures 25 or more frames per second between evening and morning twilight. During the continuous image capture, the station begins processing captured image data, doing a pre-screening to target frames with a suitable number of stars (usually around 20) that makes it worth looking for meteor detections. Once data capture has finished, the station switches into processing all the promising frames for detections, then refining the astrometric accuracy of every positive detection. Using the station platepar (plate parameters) calibration file, processing iterates to find the best astrometry and photometry solution for each detected meteor. Once this process has analyzed each detection, summary files are created. <br />
: These summary files include text file data presentation in several widely accepted formats (CAMS and UFOorbit), as well as graphic plots of detection frequencies throughout the night, a set of thumbnail images of detections, a set of thumbnail images of data captured throughout the night, a single image with all detections stacked together, plots of photometry, astrometry, and camera pointing drift in arc minutes throughout the course of the night as the mount or building flexes, a flat file for correcting images, and a plot of all detections showing any identified radiants. Finally all results are combined into a single compressed archive, which is automatically uploaded each morning to the central server. Optionally, you can create a mp4 movie showing a time lapse of the night’s captured images.<br />
: Each morning you can review the result files on the RPi, and copy anything you want to your computer or tablet.<br />
<br />
===Archiving data and backing up configuration ===<br />
<br />
: Your primary scientific data is automatically uploaded to the central server every morning when data processing is done. However once it has done this, RMS will purge out the oldest data to free up space for the next night's run. <br />
<br />
: So, you may want to copy some of the data to a PC, NAS or cloud for further analysis of your own. The data you should consider backing up are the contents of '''~/RMS_data/ArchivedFiles''', which holds the individual files and data that RMS determined were probably meteors. Full detail on how to nbare beyond the scope of the GMN Wiki, but tools such as robocopy (for Windows) and rsync(for Linux/MacOS) are ideal. These tools can 'mirror' data across a network. If you want help configuring these, ask in the Globalmeteornetwork group on groups.io.<br />
<br />
: We've also built some automated tools that can help to back up any additional data to a thumb drive inserted into the RPi. Please ask in the group about these.<br />
<br />
=== Viewing the data ===<br />
<br />
: To view the data, you can use CMN_binViewer software[https://github.com/CroatianMeteorNetwork/cmn_binviewer] which is already installed in the RMS SD image. <br />
: There is also a Windows version[https://www.dropbox.com/s/4eutahlxojrkvsa/CMN_binViewer-setup64.exe?dl=1] you can install.<br />
<br />
: '''Important note''' : You can also open the images in astronomical FITS viewers such as FITS Liberator or Pixinsight, though the results may be surprising. For example in FITS Liberator, the image will be '''upside down'''. This is an artefact of how the software reads the image. In space, there's no 'up' or 'down' and so the FITS specification does not dictate whether the pixel (0,0) is at the bottom left or top left, or indeed one of the other corners. Some software, notably FITS Liberator, treats the top left as the origin and so terrestrial images will be displayed mirrored vertically.<br />
<br />
=== Tools and Utilities ===<br />
<br />
* [https://www.realvnc.com/en/connect/download/viewer/ RealVNC] or [https://anydesk.com/en AnyDesk] remote connect tool allows station access from anywhere. Access from outside your network is enabled by use of an OpenVPN connection address available to meteor stations. Alternatively, with VNC and Teamviewer, you can create an account and team on their websites, and then remotely access your station. <br />
* Samba data directory access, allows you to copy data results directly from your RPi to your computer or tablet.<br />
* [https://github.com/CroatianMeteorNetwork/cmn_binviewer CMN_binViewer] can be used to view standard fits image files containing meteor detections. It runs on the RPi, and is also available under Windows.<br />
* [https://sonotaco.com/soft/e_index.html UFO Orbit] allows you to process data from multiple stations and generate unified radiants of two or more stations seeing the same meteor. It can plot the shared object ground path, orbital characteristics, and can output a summary file of all objects seen by more than one station, which can be used for further analysis.<br />
* RMS software can be installed under Windows to allow much of the RMS python-based code to be executed on your computer, so it can be run against meteor station data you have transferred to your computer from the RPi.<br />
* You can run RMS Python jobs on the RPi to sample the image files captured all night long and condense them into a mp4 movie. This creates a sometimes mesmerizing summary that can run for over 2 minutes in length for winter time data.<br />
<br />
== Configuring and installing your camera ==<br />
<br />
=== [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick start guide] ===<br />
<br />
=== [[Focusing_your_camera | Focusing your IP camera]] ===<br />
<br />
=== [https://www.youtube.com/watch?v=N2sq1hBwcAA Video tutorial - Configuring your IMX291 IP camera] ===<br />
<br />
=== [https://docs.google.com/document/d/1TPotXcRstHz-XWIQYIW71xkRYy7Ca1UCoEiZsqdk9zw/edit?usp=sharing Different ways of connecting the camera] ===<br />
<br />
== What can I do with my GMN station? ==<br />
<br />
=== [https://www.youtube.com/watch?v=MOjb3qxDlX4 Video Tutorial - Using SkyFit2 to perform astrometric and photometric calibration + Manually reducing observations of fireballs and computing their trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=310 Generating a Google Earth KML file to show your station's field of view] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=253 Using UFO Orbit program to estimate meteor trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=221 Urban meteor observing] ===<br />
<br />
== RMS Software Installation ==<br />
<br />
=== Flash a pre-built image ===<br />
<br />
Pre-built Images are available with the RMS software pre-installed on Raspbian. Raspbian is the operating system typically used on the Raspberry Pi. <br />
<br />
A 128 GB microSD card is preferred, although smaller 64 GB cards will also work. The image is flashed to the microSD card using the Etcher utility for Windows (32 or 64-bit), MacOS or Linux (64-bit), which can be found [https://www.balena.io/etcher/ here]<br />
<br />
When you first boot up the Pi make sure you have a keyboard, monitor and mouse attached as you will be taken through a setup process by the RMS software. <br />
<br />
The current publicly released images of RMS are: <br />
[https://www.dropbox.com/s/sa9csd4m3jr1vqo/RMS_image_20191203.zip?dl=1 RPi3B+ ]<br />
and <br />
[https://www.dropbox.com/s/3pwwenty43dazq4/RMS_RPi4_image_20210626.zip?dl=1 RPi4 ]. <br />
<br />
Please see the [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick Start Guide] about how to flash them to an SD card.<br />
<br />
Notes: <br />
* The earlier versions of the Raspberry Pi, the 1 and 2, are not powerful enough to run RMS software.<br />
<br />
* the pre-installed RMS software images incorporate an auto-updating feature, so that the RMS software is updated to the current release whenever your Raspberry Pi RMS is booted. This way, your station is always running the most recent set of updates. <br />
<br />
* For installations into other Linux or windows environments, executing the command ''git pull'' will update to the most recent RMS release.<br />
<br />
* The code was designed to run on a RPi, but it will also run an some Linux distributions. We have tested it on Linux Mint 18 and Ubuntu 16. For information on installing into other Linux releases, check portions of the section listed below for installing on RPi, and also check installation instructions found on [https://github.com/CroatianMeteorNetwork/RMS GitHub]<br />
<br />
== Install the software from scratch ==<br />
<br />
'''Note: if you're setting up a Rspberry Pi you should use the prebuilt image as this comes with all necessary software installed and is ready to use.'''. If you really do want to install on the RPi from scratch, you can follow the instructions below:<br />
<br />
=== Install for Raspberry Pi 4 ===<br />
<br />
Detailed instructions [https://docs.google.com/document/d/19ImeNqBTD1ml2iisp5y7CjDrRV33wBeF9rtx3mIVjh4/edit?usp=sharing here]<br />
<br />
=== Install for Raspberry Pi 3 ===<br />
<br />
'''We no longer recommend the Pi3, as it doesn't have the performance or memory to handle busy meteor showers. '''<br />
<br />
Detailed instructions [https://docs.google.com/document/d/1ChaXx6WkuGfcQ_f5yRbwUOOMxEgIJrjq932UZE6cRjE/edit here].<br />
<br />
=== Install for Linux ===<br />
<br />
Detailed instructions [https://globalmeteornetwork.org/wiki/index.php?title=Installation_for_Linux here]<br />
<br />
=== Installation for Windows ===<br />
Data capture does not work under windows. However you can use the other tools on your PC, where its much quicker to run SkyFit2 to calibrate your camera to the sky, or you want to use BatchFFToImage to convert data to jpeg format to share on Social Media. <br />
<br />
Click '''[[Windows_Installation|here]]''' for detailed instructions. The instructions were tested on Windows 10 64-bit, but should work on any Windows version where git and Anaconda are available. <br />
<br />
Aside: If you are a Windows whizz, please feel free to investigate why data capture doesn't work!<br />
<br />
=== Installation for MacOS ===<br />
As with Windows, installation for MacOS is useful if you want to analyse the data offline. If you do want to install it, please follow the instructions '''[[MacOS_Install | here]]'''.<br />
<br />
== FAQ ==<br />
<br />
=== What should I back up when re-flashing an SD card? ===<br />
<br />
: The .config, platepar and mask files that are in the RMS source directory, plus the whole contents of the hidden directory /home/pi/.ssh. <br />
<br />
If your SD card fails or becomes corrupted, the config files can be fetched from the server as they are uploaded every day together with the data. However the contents of .ssh are essential for connection to the server, so you must also save these. Once you set up a new SD card, return the files in their original location.<br />
<br />
=== What are the values in FTPdetectinfo_* file designated as hnr mle bin Pix/fm Rho Phi? ===<br />
<br />
: Some of these values are not used in RMS (hnr mle bin), but they are in CAMS, so they are here to conform to the standard. Thus they are all zeros. The others are:<br />
<br />
: - Pix/fm - Average angular speed of the meteor in pixels per frame.<br />
<br />
: - Rho, Phi - Parameters that define the line of the meteor in polar coordinates, see [https://en.wikipedia.org/wiki/Hough_transform#Theory here] for more details. Rho is the distance of the line from the centre of the image, and phi is the angle of the line as measured from the positive direction of the Y axis (basically a line going from the center of the image to the top of the image), the positive angles are measured clockwise (I think, the CAMS standard might define these parameters a bit differently, the Y axis is flipped).<br />
<br />
: The intensity is the sum of all pixel intensities of the meteor on a given frame. Let's say I represent an area around the meteor on a given frame like this, where the numbers are pixel intensities on an 8-bit image (so they can range from 0 to 255):<br />
<br />
: [[File:Intensity_sum.png |Intensity_sum.png ]]<br />
<br />
: and the pixels values inside the red boundary represent the meteor blob on the frame, the intensity would be the sum of all numbers inside the red boundary.<br />
: This value is later used to compute the magnitude. The magnitude is computed as: mag = -2.5*log10(intensity sum) + photometric_offset. The photometric offset is estimated in SkyFit by fitting the line with slope -2.5 through pairs of known magnitudes of stars and logartihms of their pixel intensity sum. The photometric offset is basically the intercept of that line. The constant slope of -2.5 comes from the [https://en.wikipedia.org/wiki/Apparent_magnitude#Calculations definition of stellar magnitudes.]<br />
<br />
<br />
== GMN data policy ==<br />
<br />
The Global Meteor Network produces several levles of data products:<br />
* Level 1 - The lowest level data (i.e. as close to "raw" as possible) are the FF image and FR video files saved to the RPi by the capture code and the fireball detector.<br />
* Level 2 - The meteor detector uses these data to extract positional and brightness information of individual meteors (FTPdetectinfo file), and images are also used for astrometric and photometric calibration (platepar file). Meteor and star detections are used to generate a range of plots suchs as the single-station shower association graph, camera drift graph, etc. The calibrated meteors measurements get uploaded to the GMN server together with the raw images of individual meteors.<br />
* Level 3 - The software on the server correlates individual observations and computes multi-station meteor trajectories which are published daily on the GMN [https://globalmeteornetwork.org/data/ data website]. This data is made public under the [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0 license].<br />
<br />
Operators of individual GMN stations exclusivery own the Level 1 and Level 2 data their stations produce. In practice, this means that they are free to share this data with other meteor networks if they wish to do so. The data that gets uploaded to the GMN server will not be shared publicly nor with other parties without the operator's consent, but may be used internally by the GMN coordinators to manually produce other data products (e.g. trajectory of a meteorite dropping fireball, analysis of a meteor shower). All station operators will be credited for their data in all GMN publications.<br />
<br />
== IstraStream ==<br />
<br />
=== [http://istrastream.com/rms-gmn/ IstraStream GMN status website] ===<br />
<br />
: The IstraStream.com is an independent hosting site which is part of our world wide GMN. It is primarily a host for data from cameras sold by IstraStream, but other station operators can request that their data be included.<br />
To enable the IstraStream upload, simply change the config file as follows:<br />
<br />
<pre><br />
; External script<br />
; An external script will be run after RMS finishes the processing for the night, it will be passed three arguments:<br />
; captured_night_dir, archived_night_dir, config - captured_night dir is the full path to the captured folder of the night<br />
; the second one is the archived, and config is an object holding the values in this config file.<br />
; ---------------<br />
; Enable running an external script at the end of every night of processing<br />
external_script_run: true ; <--- CHANGE<br />
; Run the external script after auto reprocess. "auto_reprocess" needs to be turned on for this to work.<br />
auto_reprocess_external_script_run: false<br />
; Full path to the external script<br />
external_script_path: /home/pi/source/RMS/iStream/iStream.py ; <--- CHANGE<br />
; Name of the function in the external script which will be called<br />
external_function_name: rmsExternal<br />
<br />
<br />
; Daily reboot<br />
; ---------------<br />
; Reboot the computer daily after the processing and upload is done<br />
reboot_after_processing: false ; <--- CHANGE<br />
</pre><br />
<br />
Then, send an e-mail to [mailto:info@istrastream.com info@istrastream.com] with your:<br />
* Station_ID<br />
* Location or Name (if not secret)<br />
* Lens type/size<br />
<br />
For example, "CA0001; Elginfield Observatory, Ontario, Canada; 4mm". The IstraStream crew will enable the weblog page within a few days.<br />
<br />
Finally, this document explains what every plot on the IstraStream weblog means:<br />
<br />
=== [https://docs.google.com/document/d/132aHGn0QPzhpVN2s2n6FT6rJn39LAsPkchWJqXQb8Qk/edit?usp=sharing IstraStream Plots Explanation] ===<br />
<br />
== For More Information ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=43 Contact the Global Meteor Network] ===<br />
<br />
=== [https://groups.io/g/globalmeteornetwork Join the Global Meteor Network Forum] ===<br />
<br />
=== [https://github.com/markmac99/ukmon-pitools/wiki UK Meteor Network Wiki]===<br />
This wiki has numerous FAQs and tips on maintaining, monitoring and managing your system, and several explainers such as how to calibrate and create a mask, how to copy data and so forth. <br />
<br />
=== GMN talks ===<br />
<br />
: [https://www.youtube.com/watch?v=f6x9_WCVphY GMN talk at the European Space Agency's Fireball Workshop (June, 2021)]<br />
<br />
: [https://www.youtube.com/watch?v=QXBTLPnPDWs GMN Workshop (February, 2021)] - [https://www.dropbox.com/sh/ia9vagug5lxm8k9/AAB_i_1jcWThUdAHO_2gF_Ksa?dl=0 Link to slides]<br />
<br />
: [https://www.youtube.com/watch?v=MAGq-XqD5Po Overview of the GMN - IMC2020 (September, 2020)]<br />
<br />
: [https://www.youtube.com/watch?v=oM7lfQ4nmyw Overview of the GMN, Astro Imaging Channel presentation (May, 2020)]<br />
<br />
=== GMN related publications ===<br />
<br />
: [https://academic.oup.com/mnras/advance-article/doi/10.1093/mnras/stab2557/6368869 Moorhead, A. V., Clements, T., & Vida, D. (2021). Meteor shower radiant dispersions in Global Meteor Network data. Monthly Notices of the Royal Astronomical Society.]<br />
<br />
: [https://arxiv.org/abs/2107.12335 Vida, D., Šegon, D., Gural, P. S., Brown, P. G., McIntyre, M. J., Dijkema, T. J., Pavletić, L., Kukić, P., Mazur, M.J., Eschman, P., Roggemans, P., Merlak, A., & Zubović, D. (2021). The Global Meteor Network–Methodology and first results. Monthly Notices of the Royal Astronomical Society, 506(4), 5046-5074.]<br />
<br />
: [https://arxiv.org/abs/2003.05458/ Moorhead, A. V., Clements, T. D., & Vida, D. (2020). Realistic gravitational focusing of meteoroid streams. Monthly Notices of the Royal Astronomical Society, 494(2), 2982-2994.] <br />
<br />
: [https://globalmeteornetwork.org/wordpress/wp-content/uploads/2018/11/Kukic-et-al-2018-Rolling-shutter.pdf Kukić, P., Gural, P., Vida, D., Šegon, D. & Merlak, A. (2018) Correction for meteor centroids observed using rolling shutter cameras. WGN, Journal of the International Meteor Organization, 46:5, 154-118.]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_sun_skirter_final.pdf Vida, D., Mazur, M. J., Šegon, D., Kukić, P., & Merlak, A. (2018). Compressive strength of a skirting Daytime Arietid-first science results from low-cost Raspberry Pi-based meteor stations. WGN, Journal of the International Meteor Organization, 46, 113-118.] <br />
<br />
: [https://arxiv.org/pdf/1911.02979.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - I. Theory. arXiv:1911.02979v4 [astro-ph.EP] 21 Apr 2020]<br />
<br />
: [https://arxiv.org/pdf/1911.11734.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - II. Results. arXiv:1911.11734v1 [astro-ph.EP] 26 Novr 2019]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_first_results-final.pdf Vida, D., Mazur, M. J., Šegon, D., Zubović, D., Kukić, P., Parag, F., & Macan, A. (2018). First results of a Raspberry Pi based meteor camera system. WGN, Journal of the International Meteor Organization, 46, 71-78.] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Vida_IMC2016_proceedings_final.pdf Vida, D., Zubović, D., Šegon, D., Gural, P., & Cupec, R. (2016). Open-source meteor detection software for low-cost single-board computers. In Proceedings of the International Meteor Conference (IMC2016), Egmond, The Netherlands (pp. 2-5).] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Zubovic_IMC2015_priceedings_final.pdf Zubović, D., Vida, D., Gural, P., & Šegon, D. (2015). Advances in the development of a low-cost video meteor station. In Proceedings of the International Meteor Conference, Mistelbach, Austria (pp. 27-30).]</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Main_Page&diff=380Main Page2021-09-29T21:07:01Z<p>Markmcintyre: /* Archiving data and backing up configuration */</p>
<hr />
<div>Welcome to the Global Meteor Network's wiki page!<br />
<br />
The Global Meteor Network (GMN) is a world wide organization of amateur and professional astronomers alike, whose goal is to observe the night sky using low-light video cameras and produce meteor trajectories in a coordinated manner. Here you will find information on the purpose and structure of the GMN, assembling and operating your own meteor camera, contributing to the development of RMS the GMN software, as well as information on how your observations as a citizen scientist can contribute to the further understanding of our solar system's formation and evolution. <br />
<br />
'''<span style="color:red">If you have come here to find out how to build and setup a camera from scratch, jump ahead to [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#How_do_I_obtain_a_camera.3F this] section !</span>'''<br />
<br />
<br />
== Global Meteor Network Overview ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=141 Our mission] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=363 A brief history of the Global Meteor Network] ===<br />
<br />
=== [https://www.youtube.com/watch?v=MAGq-XqD5Po Video introduction - Overview of the Global Meteor Network (IMC2020)] ===<br />
<br />
=== [https://youtu.be/oM7lfQ4nmyw Video overview - Meteor tracking and the GMN from Astro Imaging Channel presentation] ===<br />
<br />
=== [https://globalmeteornetwork.org/data/ Some 'live' GMN data products] ===<br />
<br />
== Meteor Detection Station ==<br />
<br />
=== What is an RMS GMN station? ===<br />
: A RMS-based GMN station that is the subject of this Wiki consists of a Raspberry Pi (RPi) single board computer, a low light level security video camera, and the RMS software package. The camera is securely mounted in a weatherproof housing, pointed at the sky, and connected to the RPi with a POE (Power Over Ethernet) cable. The RPi is connected to the Internet via WiFi, and to be a part of GMN network, you’ll need a fairly powerful Raspberry Pi (RPi 3B+, RPi 4 or better) and a reasonably fast Internet connection. The internet connection is primarily required to enable data upload to a central server each morning as well as provide automatic updates for the RMS software. <br />
<br />
: Nightly, the RPi starts recording video from the camera shortly after local sunset continuously compressing and storing the video data locally. Each morning before sunrise, after capture is complete, the RPi analyzes the video and extracts your nightly station’s meteor observations. These extracted video “clips” of detected meteors are then archived and uploaded to a server. The clips can total hundreds of megabytes on a “busy” night (e.g., in a heavy meteor shower, or a night with a lot of false detections--progress is being made on the detection software). The server finds meteors which were observed with more than one station and this enables the server to triangulate the meteor trails in 3D and calculate the orbits of the meteors.<br />
<br />
===[https://github.com/CroatianMeteorNetwork/RMS/blob/master/README.md What do I need?] ===<br />
<br />
You'll need a Raspberry Pi with the software on, and a camera kit. We strongly recommend the Pi4 model. The software will run on a Pi3 but it is much slower. <br />
<br />
=== How do I obtain a camera? ===<br />
There are two options:<br />
<br />
==== Buy a Camera ====<br />
You can buy a camera and Pi prebuilt and ready to install. These are available from a couple of suppliers. The Croatian Meteor Network sell prebuilt cameras as explained on [https://globalmeteornetwork.org/?page_id=136 this page]. Alternatively, if you're in the UK, you can obtain cameras from the [https://ukmeteornetwork.co.uk/ UK Meteor Network] <br />
<br />
==== Build your own from scratch ====<br />
This requires some basic DIY skills and some familiarity with the Raspberry PI, but don't be put off. The instructions are comprehensive and if you get stuck, you can ask for advice in the [https://groups.io/g/globalmeteornetwork groups.io] forum. <br />
<br />
Click on this link if you want to '''[[Build_A_Camera|build a camera from scratch]]'''. <br />
<br />
Once you've built the camera, You can '''[https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#Flash_a_pre-built_image flash a Prebuilt image]''' onto an SD card to set up the Pi with the software required to capture meteors and upload data to the network.<br />
<br />
=== Can I use a commercial all-sky camera? ===<br />
<br />
: Generally no due to the lack of sensitivity. [https://globalmeteornetwork.org/?p=163 But see this recent experiment]<br />
<br />
== Operating and maintaining your GMN station ==<br />
<br />
=== Overview ===<br />
<br />
: Please note that GMS is a nascent operation and you may share some growing pains if you choose to be involved -- we're still working out some bugs and making improvements here, which may be an opportunity to help if you have programming skills! ;-) So note that the workload of day-to-day operation can be non-zero, and might take a little bit of your time.<br />
<br />
: Ideally, you'll want to monitor your RMS RPi system(s) daily to look for freezes or glitches or other problems... like birds nesting or soiling the camera window, people accidentally unplugging the power cord, mice (or cats or dogs!) chewing on the camera Ethernet cable, etc.<br />
<br />
: Although we are getting close, this is not a "power up and forget about it" system yet.<br />
: However, by its very nature, the GMS network is inhabited by a lot of people who are willing to help newcomers getting started. So, here are some clues for daily operation of your RMS camera.<br />
<br />
=== So what does the meteor camera do over the course of 24 hours? ===<br />
<br />
: The RMS Python based system calculates the sundown to sunrise interval and schedules video camera capture all night long. Depending on the video camera and capabilities of the RPi, the camera captures 25 or more frames per second between evening and morning twilight. During the continuous image capture, the station begins processing captured image data, doing a pre-screening to target frames with a suitable number of stars (usually around 20) that makes it worth looking for meteor detections. Once data capture has finished, the station switches into processing all the promising frames for detections, then refining the astrometric accuracy of every positive detection. Using the station platepar (plate parameters) calibration file, processing iterates to find the best astrometry and photometry solution for each detected meteor. Once this process has analyzed each detection, summary files are created. <br />
: These summary files include text file data presentation in several widely accepted formats (CAMS and UFOorbit), as well as graphic plots of detection frequencies throughout the night, a set of thumbnail images of detections, a set of thumbnail images of data captured throughout the night, a single image with all detections stacked together, plots of photometry, astrometry, and camera pointing drift in arc minutes throughout the course of the night as the mount or building flexes, a flat file for correcting images, and a plot of all detections showing any identified radiants. Finally all results are combined into a single compressed archive, which is automatically uploaded each morning to the central server. Optionally, you can create a mp4 movie showing a time lapse of the night’s captured images.<br />
: Each morning you can review the result files on the RPi, and copy anything you want to your computer or tablet.<br />
<br />
===Archiving data and backing up configuration ===<br />
<br />
: Your primary scientific data is automatically uploaded to the central server every morning when data processing is done. However once it has done this, RMS will purge out the oldest data to free up space for the next night's run. <br />
<br />
: So, you may want to copy some of the data to a PC, NAS or cloud for further analysis of your own. The data you should consider backing up are the contents of '''~/RMS_data/ArchivedFiles''', which holds the individual files and data that RMS determined were probably meteors. Full detail on how to nbare beyond the scope of the GMN Wiki, but tools such as robocopy (for Windows) and rsync(for Linux/MacOS) are ideal. These tools can 'mirror' data across a network. If you want help configuring these, ask in the Globalmeteornetwork group on groups.io.<br />
<br />
: We've also built some automated tools that can help to back up any additional data to a thumb drive inserted into the RPi. Please ask in the group about these.<br />
<br />
=== Viewing the data ===<br />
<br />
: To view the data, you can use CMN_binViewer software[https://github.com/CroatianMeteorNetwork/cmn_binviewer] which is already installed in the RMS SD image. <br />
: There is also a Windows version[https://www.dropbox.com/s/4eutahlxojrkvsa/CMN_binViewer-setup64.exe?dl=1] you can install.<br />
<br />
: '''Important note''' : You can also open the images in astronomical FITS viewers such as FITS Liberator or Pixinsight, though the results may be surprising. For example in FITS Liberator, the image will be '''upside down'''. This is an artefact of how the software reads the image. In space, there's no 'up' or 'down' and so the FITS specification does not dictate whether the pixel (0,0) is at the bottom left or top left, or indeed one of the other corners. Some software, notably FITS Liberator, treats the top left as the origin and so terrestrial images will be displayed mirrored vertically.<br />
<br />
=== Tools and Utilities ===<br />
<br />
* [https://www.realvnc.com/en/connect/download/viewer/ RealVNC] or [https://anydesk.com/en AnyDesk] remote connect tool allows station access from anywhere. Access from outside your network is enabled by use of an OpenVPN connection address available to meteor stations. Alternatively, with VNC and Teamviewer, you can create an account and team on their websites, and then remotely access your station. <br />
* Samba data directory access, allows you to copy data results directly from your RPi to your computer or tablet.<br />
* [https://github.com/CroatianMeteorNetwork/cmn_binviewer CMN_binViewer] can be used to view standard fits image files containing meteor detections. It runs on the RPi, and is also available under Windows.<br />
* [https://sonotaco.com/soft/e_index.html UFO Orbit] allows you to process data from multiple stations and generate unified radiants of two or more stations seeing the same meteor. It can plot the shared object ground path, orbital characteristics, and can output a summary file of all objects seen by more than one station, which can be used for further analysis.<br />
* RMS software can be installed under Windows to allow much of the RMS python-based code to be executed on your computer, so it can be run against meteor station data you have transferred to your computer from the RPi.<br />
* You can run RMS Python jobs on the RPi to sample the image files captured all night long and condense them into a mp4 movie. This creates a sometimes mesmerizing summary that can run for over 2 minutes in length for winter time data.<br />
<br />
== Configuring and installing your camera ==<br />
<br />
=== [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick start guide] ===<br />
<br />
=== [[Focusing_your_camera | Focusing your IP camera]] ===<br />
<br />
=== [https://www.youtube.com/watch?v=N2sq1hBwcAA Video tutorial - Configuring your IMX291 IP camera] ===<br />
<br />
=== [https://docs.google.com/document/d/1TPotXcRstHz-XWIQYIW71xkRYy7Ca1UCoEiZsqdk9zw/edit?usp=sharing Different ways of connecting the camera] ===<br />
<br />
== What can I do with my GMN station? ==<br />
<br />
=== [https://www.youtube.com/watch?v=MOjb3qxDlX4 Video Tutorial - Using SkyFit2 to perform astrometric and photometric calibration + Manually reducing observations of fireballs and computing their trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=310 Generating a Google Earth KML file to show your station's field of view] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=253 Using UFO Orbit program to estimate meteor trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=221 Urban meteor observing] ===<br />
<br />
== RMS Software Installation ==<br />
<br />
=== Flash a pre-built image ===<br />
<br />
Pre-built Images are available with the RMS software pre-installed on Raspbian. Raspbian is the operating system typically used on the Raspberry Pi. <br />
<br />
A 128 GB microSD card is preferred, although smaller 64 GB cards will also work. The image is flashed to the microSD card using the Etcher utility for Windows (32 or 64-bit), MacOS or Linux (64-bit), which can be found [https://www.balena.io/etcher/ here]<br />
<br />
When you first boot up the Pi make sure you have a keyboard, monitor and mouse attached as you will be taken through a setup process by the RMS software. <br />
<br />
The current publicly released images of RMS are: <br />
[https://www.dropbox.com/s/sa9csd4m3jr1vqo/RMS_image_20191203.zip?dl=1 RPi3B+ ]<br />
and <br />
[https://www.dropbox.com/s/3pwwenty43dazq4/RMS_RPi4_image_20210626.zip?dl=1 RPi4 ]. <br />
<br />
Please see the [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick Start Guide] about how to flash them to an SD card.<br />
<br />
Notes: <br />
* The earlier versions of the Raspberry Pi, the 1 and 2, are not powerful enough to run RMS software.<br />
<br />
* the pre-installed RMS software images incorporate an auto-updating feature, so that the RMS software is updated to the current release whenever your Raspberry Pi RMS is booted. This way, your station is always running the most recent set of updates. <br />
<br />
* For installations into other Linux or windows environments, executing the command ''git pull'' will update to the most recent RMS release.<br />
<br />
* The code was designed to run on a RPi, but it will also run an some Linux distributions. We have tested it on Linux Mint 18 and Ubuntu 16. For information on installing into other Linux releases, check portions of the section listed below for installing on RPi, and also check installation instructions found on [https://github.com/CroatianMeteorNetwork/RMS GitHub]<br />
<br />
== Install the software from scratch ==<br />
<br />
'''Note: if you're setting up a Rspberry Pi you should use the prebuilt image as this comes with all necessary software installed and is ready to use.'''. If you really do want to install on the RPi from scratch, you can follow the instructions below:<br />
<br />
=== Install for Raspberry Pi 4 ===<br />
<br />
Detailed instructions [https://docs.google.com/document/d/19ImeNqBTD1ml2iisp5y7CjDrRV33wBeF9rtx3mIVjh4/edit?usp=sharing here]<br />
<br />
=== Install for Raspberry Pi 3 ===<br />
<br />
'''We no longer recommend the Pi3, as it doesn't have the performance or memory to handle busy meteor showers. '''<br />
<br />
Detailed instructions [https://docs.google.com/document/d/1ChaXx6WkuGfcQ_f5yRbwUOOMxEgIJrjq932UZE6cRjE/edit here].<br />
<br />
=== Install for Linux ===<br />
<br />
Detailed instructions [https://globalmeteornetwork.org/wiki/index.php?title=Installation_for_Linux here]<br />
<br />
=== Installation for Windows ===<br />
Data capture does not work under windows. However you can use the other tools on your PC, where its much quicker to run SkyFit2 to calibrate your camera to the sky, or you want to use BatchFFToImage to convert data to jpeg format to share on Social Media. <br />
<br />
Click '''[[Windows_Installation|here]]''' for detailed instructions. The instructions were tested on Windows 10 64-bit, but should work on any Windows version where git and Anaconda are available. <br />
<br />
Aside: If you are a Windows whizz, please feel free to investigate why data capture doesn't work!<br />
<br />
=== Installation for MacOS ===<br />
As with Windows, installation for MacOS is useful if you want to analyse the data offline. If you do want to install it, please follow the instructions '''[[MacOS_Install | here]]'''.<br />
<br />
== FAQ ==<br />
<br />
=== What should I back up when re-flashing an SD card? ===<br />
<br />
: The .config, platepar and mask files that are in the RMS source directory, plus the whole contents of the hidden directory /home/pi/.ssh. <br />
<br />
If your SD card fails or becomes corrupted, the config files can be fetched from the server as they are uploaded every day together with the data. However the contents of .ssh are essential for connection to the server, so you must also save these. Once you set up a new SD card, return the files in their original location.<br />
<br />
=== What are the values in FTPdetectinfo_* file designated as hnr mle bin Pix/fm Rho Phi? ===<br />
<br />
: Some of these values are not used in RMS (hnr mle bin), but they are in CAMS, so they are here to conform to the standard. Thus they are all zeros. The others are:<br />
<br />
: - Pix/fm - Average angular speed of the meteor in pixels per frame.<br />
<br />
: - Rho, Phi - Parameters that define the line of the meteor in polar coordinates, see [https://en.wikipedia.org/wiki/Hough_transform#Theory here] for more details. Rho is the distance of the line from the centre of the image, and phi is the angle of the line as measured from the positive direction of the Y axis (basically a line going from the center of the image to the top of the image), the positive angles are measured clockwise (I think, the CAMS standard might define these parameters a bit differently, the Y axis is flipped).<br />
<br />
: The intensity is the sum of all pixel intensities of the meteor on a given frame. Let's say I represent an area around the meteor on a given frame like this, where the numbers are pixel intensities on an 8-bit image (so they can range from 0 to 255):<br />
<br />
: [[File:Intensity_sum.png |Intensity_sum.png ]]<br />
<br />
: and the pixels values inside the red boundary represent the meteor blob on the frame, the intensity would be the sum of all numbers inside the red boundary.<br />
: This value is later used to compute the magnitude. The magnitude is computed as: mag = -2.5*log10(intensity sum) + photometric_offset. The photometric offset is estimated in SkyFit by fitting the line with slope -2.5 through pairs of known magnitudes of stars and logartihms of their pixel intensity sum. The photometric offset is basically the intercept of that line. The constant slope of -2.5 comes from the [https://en.wikipedia.org/wiki/Apparent_magnitude#Calculations definition of stellar magnitudes.]<br />
<br />
<br />
== GMN data policy ==<br />
<br />
The Global Meteor Network produces several levles of data products:<br />
* Level 1 - The lowest level data (i.e. as close to "raw" as possible) are the FF image and FR video files saved to the RPi by the capture code and the fireball detector.<br />
* Level 2 - The meteor detector uses these data to extract positional and brightness information of individual meteors (FTPdetectinfo file), and images are also used for astrometric and photometric calibration (platepar file). Meteor and star detections are used to generate a range of plots suchs as the single-station shower association graph, camera drift graph, etc. The calibrated meteors measurements get uploaded to the GMN server together with the raw images of individual meteors.<br />
* Level 3 - The software on the server correlates individual observations and computes multi-station meteor trajectories which are published daily on the GMN [https://globalmeteornetwork.org/data/ data website]. This data is made public under the [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0 license].<br />
<br />
Operators of individual GMN stations exclusivery own the Level 1 and Level 2 data their stations produce. In practice, this means that they are free to share this data with other meteor networks if they wish to do so. The data that gets uploaded to the GMN server will not be shared publicly nor with other parties without the operator's consent, but may be used internally by the GMN coordinators to manually produce other data products (e.g. trajectory of a meteorite dropping fireball, analysis of a meteor shower). All station operators will be credited for their data in all GMN publications.<br />
<br />
== IstraStream ==<br />
<br />
=== [http://istrastream.com/rms-gmn/ IstraStream GMN status website] ===<br />
<br />
: The IstraStream.com is an independent hosting site which is part of our world wide GMN. It is primarily a host for data from cameras sold by IstraStream, but other station operators can request that their data be included.<br />
To enable the IstraStream upload, simply change the config file as follows:<br />
<br />
<pre><br />
; External script<br />
; An external script will be run after RMS finishes the processing for the night, it will be passed three arguments:<br />
; captured_night_dir, archived_night_dir, config - captured_night dir is the full path to the captured folder of the night<br />
; the second one is the archived, and config is an object holding the values in this config file.<br />
; ---------------<br />
; Enable running an external script at the end of every night of processing<br />
external_script_run: true ; <--- CHANGE<br />
; Run the external script after auto reprocess. "auto_reprocess" needs to be turned on for this to work.<br />
auto_reprocess_external_script_run: false<br />
; Full path to the external script<br />
external_script_path: /home/pi/source/RMS/iStream/iStream.py ; <--- CHANGE<br />
; Name of the function in the external script which will be called<br />
external_function_name: rmsExternal<br />
<br />
<br />
; Daily reboot<br />
; ---------------<br />
; Reboot the computer daily after the processing and upload is done<br />
reboot_after_processing: false ; <--- CHANGE<br />
</pre><br />
<br />
Then, send an e-mail to [mailto:info@istrastream.com info@istrastream.com] with your:<br />
* Station_ID<br />
* Location or Name (if not secret)<br />
* Lens type/size<br />
<br />
For example, "CA0001; Elginfield Observatory, Ontario, Canada; 4mm". The IstraStream crew will enable the weblog page within a few days.<br />
<br />
Finally, this document explains what every plot on the IstraStream weblog means:<br />
<br />
=== [https://docs.google.com/document/d/132aHGn0QPzhpVN2s2n6FT6rJn39LAsPkchWJqXQb8Qk/edit?usp=sharing IstraStream Plots Explanation] ===<br />
<br />
== For More Information ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=43 Contact the Global Meteor Network] ===<br />
<br />
=== [https://groups.io/g/globalmeteornetwork Join the Global Meteor Network Forum] ===<br />
<br />
=== GMN talks ===<br />
<br />
: [https://www.youtube.com/watch?v=f6x9_WCVphY GMN talk at the European Space Agency's Fireball Workshop (June, 2021)]<br />
<br />
: [https://www.youtube.com/watch?v=QXBTLPnPDWs GMN Workshop (February, 2021)] - [https://www.dropbox.com/sh/ia9vagug5lxm8k9/AAB_i_1jcWThUdAHO_2gF_Ksa?dl=0 Link to slides]<br />
<br />
: [https://www.youtube.com/watch?v=MAGq-XqD5Po Overview of the GMN - IMC2020 (September, 2020)]<br />
<br />
: [https://www.youtube.com/watch?v=oM7lfQ4nmyw Overview of the GMN, Astro Imaging Channel presentation (May, 2020)]<br />
<br />
=== GMN related publications ===<br />
<br />
: [https://academic.oup.com/mnras/advance-article/doi/10.1093/mnras/stab2557/6368869 Moorhead, A. V., Clements, T., & Vida, D. (2021). Meteor shower radiant dispersions in Global Meteor Network data. Monthly Notices of the Royal Astronomical Society.]<br />
<br />
: [https://arxiv.org/abs/2107.12335 Vida, D., Šegon, D., Gural, P. S., Brown, P. G., McIntyre, M. J., Dijkema, T. J., Pavletić, L., Kukić, P., Mazur, M.J., Eschman, P., Roggemans, P., Merlak, A., & Zubović, D. (2021). The Global Meteor Network–Methodology and first results. Monthly Notices of the Royal Astronomical Society, 506(4), 5046-5074.]<br />
<br />
: [https://arxiv.org/abs/2003.05458/ Moorhead, A. V., Clements, T. D., & Vida, D. (2020). Realistic gravitational focusing of meteoroid streams. Monthly Notices of the Royal Astronomical Society, 494(2), 2982-2994.] <br />
<br />
: [https://globalmeteornetwork.org/wordpress/wp-content/uploads/2018/11/Kukic-et-al-2018-Rolling-shutter.pdf Kukić, P., Gural, P., Vida, D., Šegon, D. & Merlak, A. (2018) Correction for meteor centroids observed using rolling shutter cameras. WGN, Journal of the International Meteor Organization, 46:5, 154-118.]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_sun_skirter_final.pdf Vida, D., Mazur, M. J., Šegon, D., Kukić, P., & Merlak, A. (2018). Compressive strength of a skirting Daytime Arietid-first science results from low-cost Raspberry Pi-based meteor stations. WGN, Journal of the International Meteor Organization, 46, 113-118.] <br />
<br />
: [https://arxiv.org/pdf/1911.02979.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - I. Theory. arXiv:1911.02979v4 [astro-ph.EP] 21 Apr 2020]<br />
<br />
: [https://arxiv.org/pdf/1911.11734.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - II. Results. arXiv:1911.11734v1 [astro-ph.EP] 26 Novr 2019]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_first_results-final.pdf Vida, D., Mazur, M. J., Šegon, D., Zubović, D., Kukić, P., Parag, F., & Macan, A. (2018). First results of a Raspberry Pi based meteor camera system. WGN, Journal of the International Meteor Organization, 46, 71-78.] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Vida_IMC2016_proceedings_final.pdf Vida, D., Zubović, D., Šegon, D., Gural, P., & Cupec, R. (2016). Open-source meteor detection software for low-cost single-board computers. In Proceedings of the International Meteor Conference (IMC2016), Egmond, The Netherlands (pp. 2-5).] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Zubovic_IMC2015_priceedings_final.pdf Zubović, D., Vida, D., Gural, P., & Šegon, D. (2015). Advances in the development of a low-cost video meteor station. In Proceedings of the International Meteor Conference, Mistelbach, Austria (pp. 27-30).]</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=379Build A Camera2021-09-27T15:05:46Z<p>Markmcintyre: /* Using the RMS software (only for Pi4 systems) */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal. Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=378Build A Camera2021-09-27T15:05:33Z<p>Markmcintyre: /* Using the RMS software (only for Pi4 systems) */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.O Once you see a timeout message, unplug the power and network from the camera. <br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=377Build A Camera2021-09-27T15:03:38Z<p>Markmcintyre: /* Checking for Obstructions */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* Temporarily close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=376Build A Camera2021-09-27T15:03:08Z<p>Markmcintyre: /* Checking the Connection */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to use firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down and the image then flipped, the shutter is working in the opposite direction to that expected by RMS and timings will be wrong. You '''must''' physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* You should also close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=MacOS_Install&diff=375MacOS Install2021-09-27T15:00:27Z<p>Markmcintyre: /* Basic Instructions */</p>
<hr />
<div>== Basic Instructions ==<br />
These instructions should work for most users. If they don't work for you, try the longer version below.<br />
<br />
* Open a terminal window and run the following command to install the developer tools. This may take some time. <br />
<pre>xcode-select --install</pre><br />
<br />
* Download and install Anaconda from https://www.anaconda.com/products/individual. Select the default options throughout unless you expect to be doing Python development.<br />
<br />
* In a terminal window, run the following commands:<br />
<pre><br />
conda create --name RMS python=3.7<br />
conda activate RMS<br />
git clone https://github.com/CroatianMeteorNetwork/RMS.git<br />
pip install -r RMS/requirements.txt<br />
pip install rawpy<br />
conda install -c conda-forge opencv<br />
conda install pyqt<br />
</pre><br />
And to test that it all worked:<br />
<pre><br />
cd RMS<br />
conda activate RMS<br />
python -m Utils.SkyFit2 --help<br />
</pre><br />
this should compile the code and print instructions for how to use SkyFit2. <br />
<br />
Note: Each time you want to use RMS, you must activate the Python virtual environment in a Terminal window and change directory into the RMS folder:<br />
<pre><br />
cd RMS<br />
conda activate RMS<br />
</pre><br />
<br />
== Longer Instructions == <br />
<br />
* Open a terminal window and run the following command to install the developer tools. This may take some time. <br />
<pre>xcode-select --install</pre><br />
<br />
* Download and install Anaconda from https://www.anaconda.com/products/individual. Select the default options throughout.<br />
<br />
* Open a terminal window and run the following commands:<br />
<pre><br />
conda create --name RMS python=3.7<br />
conda activate RMS<br />
git clone https://github.com/CroatianMeteorNetwork/RMS.git<br />
conda install -y numpy scipy gitpython cython matplotlib<br />
conda install -y -c conda-forge pyephem Pillow imreg_dft imageio pyqtgraph<br />
conda install -y -c astropy astropy<br />
pip install rawpy<br />
conda install -c conda-forge opencv<br />
conda install pyqt<br />
cd RMS<br />
python -m Utils.SkyFit2 --help<br />
</pre><br />
The last command should compile the code and print instructions for how to use SkyFit2.</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Main_Page&diff=374Main Page2021-09-27T14:58:44Z<p>Markmcintyre: /* Viewing the data */</p>
<hr />
<div>Welcome to the Global Meteor Network's wiki page!<br />
<br />
The Global Meteor Network (GMN) is a world wide organization of amateur and professional astronomers alike, whose goal is to observe the night sky using low-light video cameras and produce meteor trajectories in a coordinated manner. Here you will find information on the purpose and structure of the GMN, assembling and operating your own meteor camera, contributing to the development of RMS the GMN software, as well as information on how your observations as a citizen scientist can contribute to the further understanding of our solar system's formation and evolution. <br />
<br />
'''<span style="color:red">If you have come here to find out how to build and setup a camera from scratch, jump ahead to [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#How_do_I_obtain_a_camera.3F this] section !</span>'''<br />
<br />
<br />
== Global Meteor Network Overview ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=141 Our mission] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=363 A brief history of the Global Meteor Network] ===<br />
<br />
=== [https://www.youtube.com/watch?v=MAGq-XqD5Po Video introduction - Overview of the Global Meteor Network (IMC2020)] ===<br />
<br />
=== [https://youtu.be/oM7lfQ4nmyw Video overview - Meteor tracking and the GMN from Astro Imaging Channel presentation] ===<br />
<br />
=== [https://globalmeteornetwork.org/data/ Some 'live' GMN data products] ===<br />
<br />
== Meteor Detection Station ==<br />
<br />
=== What is an RMS GMN station? ===<br />
: A RMS-based GMN station that is the subject of this Wiki consists of a Raspberry Pi (RPi) single board computer, a low light level security video camera, and the RMS software package. The camera is securely mounted in a weatherproof housing, pointed at the sky, and connected to the RPi with a POE (Power Over Ethernet) cable. The RPi is connected to the Internet via WiFi, and to be a part of GMN network, you’ll need a fairly powerful Raspberry Pi (RPi 3B+, RPi 4 or better) and a reasonably fast Internet connection. The internet connection is primarily required to enable data upload to a central server each morning as well as provide automatic updates for the RMS software. <br />
<br />
: Nightly, the RPi starts recording video from the camera shortly after local sunset continuously compressing and storing the video data locally. Each morning before sunrise, after capture is complete, the RPi analyzes the video and extracts your nightly station’s meteor observations. These extracted video “clips” of detected meteors are then archived and uploaded to a server. The clips can total hundreds of megabytes on a “busy” night (e.g., in a heavy meteor shower, or a night with a lot of false detections--progress is being made on the detection software). The server finds meteors which were observed with more than one station and this enables the server to triangulate the meteor trails in 3D and calculate the orbits of the meteors.<br />
<br />
===[https://github.com/CroatianMeteorNetwork/RMS/blob/master/README.md What do I need?] ===<br />
<br />
You'll need a Raspberry Pi with the software on, and a camera kit. We strongly recommend the Pi4 model. The software will run on a Pi3 but it is much slower. <br />
<br />
=== How do I obtain a camera? ===<br />
There are two options:<br />
<br />
==== Buy a Camera ====<br />
You can buy a camera and Pi prebuilt and ready to install. These are available from a couple of suppliers. The Croatian Meteor Network sell prebuilt cameras as explained on [https://globalmeteornetwork.org/?page_id=136 this page]. Alternatively, if you're in the UK, you can obtain cameras from the [https://ukmeteornetwork.co.uk/ UK Meteor Network] <br />
<br />
==== Build your own from scratch ====<br />
This requires some basic DIY skills and some familiarity with the Raspberry PI, but don't be put off. The instructions are comprehensive and if you get stuck, you can ask for advice in the [https://groups.io/g/globalmeteornetwork groups.io] forum. <br />
<br />
Click on this link if you want to '''[[Build_A_Camera|build a camera from scratch]]'''. <br />
<br />
Once you've built the camera, You can '''[https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#Flash_a_pre-built_image flash a Prebuilt image]''' onto an SD card to set up the Pi with the software required to capture meteors and upload data to the network.<br />
<br />
=== Can I use a commercial all-sky camera? ===<br />
<br />
: Generally no due to the lack of sensitivity. [https://globalmeteornetwork.org/?p=163 But see this recent experiment]<br />
<br />
== Operating and maintaining your GMN station ==<br />
<br />
=== Overview ===<br />
<br />
: Please note that GMS is a nascent operation and you may share some growing pains if you choose to be involved -- we're still working out some bugs and making improvements here, which may be an opportunity to help if you have programming skills! ;-) So note that the workload of day-to-day operation can be non-zero, and might take a little bit of your time.<br />
<br />
: Ideally, you'll want to monitor your RMS RPi system(s) daily to look for freezes or glitches or other problems... like birds nesting or soiling the camera window, people accidentally unplugging the power cord, mice (or cats or dogs!) chewing on the camera Ethernet cable, etc.<br />
<br />
: Although we are getting close, this is not a "power up and forget about it" system yet.<br />
: However, by its very nature, the GMS network is inhabited by a lot of people who are willing to help newcomers getting started. So, here are some clues for daily operation of your RMS camera.<br />
<br />
=== So what does the meteor camera do over the course of 24 hours? ===<br />
<br />
: The RMS Python based system calculates the sundown to sunrise interval and schedules video camera capture all night long. Depending on the video camera and capabilities of the RPi, the camera captures 25 or more frames per second between evening and morning twilight. During the continuous image capture, the station begins processing captured image data, doing a pre-screening to target frames with a suitable number of stars (usually around 20) that makes it worth looking for meteor detections. Once data capture has finished, the station switches into processing all the promising frames for detections, then refining the astrometric accuracy of every positive detection. Using the station platepar (plate parameters) calibration file, processing iterates to find the best astrometry and photometry solution for each detected meteor. Once this process has analyzed each detection, summary files are created. <br />
: These summary files include text file data presentation in several widely accepted formats (CAMS and UFOorbit), as well as graphic plots of detection frequencies throughout the night, a set of thumbnail images of detections, a set of thumbnail images of data captured throughout the night, a single image with all detections stacked together, plots of photometry, astrometry, and camera pointing drift in arc minutes throughout the course of the night as the mount or building flexes, a flat file for correcting images, and a plot of all detections showing any identified radiants. Finally all results are combined into a single compressed archive, which is automatically uploaded each morning to the central server. Optionally, you can create a mp4 movie showing a time lapse of the night’s captured images.<br />
: Each morning you can review the result files on the RPi, and copy anything you want to your computer or tablet.<br />
<br />
===Archiving data and backing up configuration ===<br />
<br />
: Data backup is as much or as little as you like. Your primary data is automatically uploaded to the central server every morning when data processing is done. We've built some automated tools that can help to back up any additional data to a thumb drive inserted into the RPi.<br />
<br />
=== Viewing the data ===<br />
<br />
: To view the data, you can use CMN_binViewer software[https://github.com/CroatianMeteorNetwork/cmn_binviewer] which is already installed in the RMS SD image. <br />
: There is also a Windows version[https://www.dropbox.com/s/4eutahlxojrkvsa/CMN_binViewer-setup64.exe?dl=1] you can install.<br />
<br />
: '''Important note''' : You can also open the images in astronomical FITS viewers such as FITS Liberator or Pixinsight, though the results may be surprising. For example in FITS Liberator, the image will be '''upside down'''. This is an artefact of how the software reads the image. In space, there's no 'up' or 'down' and so the FITS specification does not dictate whether the pixel (0,0) is at the bottom left or top left, or indeed one of the other corners. Some software, notably FITS Liberator, treats the top left as the origin and so terrestrial images will be displayed mirrored vertically.<br />
<br />
=== Tools and Utilities ===<br />
<br />
* [https://www.realvnc.com/en/connect/download/viewer/ RealVNC] or [https://anydesk.com/en AnyDesk] remote connect tool allows station access from anywhere. Access from outside your network is enabled by use of an OpenVPN connection address available to meteor stations. Alternatively, with VNC and Teamviewer, you can create an account and team on their websites, and then remotely access your station. <br />
* Samba data directory access, allows you to copy data results directly from your RPi to your computer or tablet.<br />
* [https://github.com/CroatianMeteorNetwork/cmn_binviewer CMN_binViewer] can be used to view standard fits image files containing meteor detections. It runs on the RPi, and is also available under Windows.<br />
* [https://sonotaco.com/soft/e_index.html UFO Orbit] allows you to process data from multiple stations and generate unified radiants of two or more stations seeing the same meteor. It can plot the shared object ground path, orbital characteristics, and can output a summary file of all objects seen by more than one station, which can be used for further analysis.<br />
* RMS software can be installed under Windows to allow much of the RMS python-based code to be executed on your computer, so it can be run against meteor station data you have transferred to your computer from the RPi.<br />
* You can run RMS Python jobs on the RPi to sample the image files captured all night long and condense them into a mp4 movie. This creates a sometimes mesmerizing summary that can run for over 2 minutes in length for winter time data.<br />
<br />
== Configuring and installing your camera ==<br />
<br />
=== [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick start guide] ===<br />
<br />
=== [[Focusing_your_camera | Focusing your IP camera]] ===<br />
<br />
=== [https://www.youtube.com/watch?v=N2sq1hBwcAA Video tutorial - Configuring your IMX291 IP camera] ===<br />
<br />
=== [https://docs.google.com/document/d/1TPotXcRstHz-XWIQYIW71xkRYy7Ca1UCoEiZsqdk9zw/edit?usp=sharing Different ways of connecting the camera] ===<br />
<br />
== What can I do with my GMN station? ==<br />
<br />
=== [https://www.youtube.com/watch?v=MOjb3qxDlX4 Video Tutorial - Using SkyFit2 to perform astrometric and photometric calibration + Manually reducing observations of fireballs and computing their trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=310 Generating a Google Earth KML file to show your station's field of view] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=253 Using UFO Orbit program to estimate meteor trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=221 Urban meteor observing] ===<br />
<br />
== RMS Software Installation ==<br />
<br />
=== Flash a pre-built image ===<br />
<br />
Pre-built Images are available with the RMS software pre-installed on Raspbian. Raspbian is the operating system typically used on the Raspberry Pi. <br />
<br />
A 128 GB microSD card is preferred, although smaller 64 GB cards will also work. The image is flashed to the microSD card using the Etcher utility for Windows (32 or 64-bit), MacOS or Linux (64-bit), which can be found [https://www.balena.io/etcher/ here]<br />
<br />
When you first boot up the Pi make sure you have a keyboard, monitor and mouse attached as you will be taken through a setup process by the RMS software. <br />
<br />
The current publicly released images of RMS are: <br />
[https://www.dropbox.com/s/sa9csd4m3jr1vqo/RMS_image_20191203.zip?dl=1 RPi3B+ ]<br />
and <br />
[https://www.dropbox.com/s/3pwwenty43dazq4/RMS_RPi4_image_20210626.zip?dl=1 RPi4 ]. <br />
<br />
Please see the [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick Start Guide] about how to flash them to an SD card.<br />
<br />
Notes: <br />
* The earlier versions of the Raspberry Pi, the 1 and 2, are not powerful enough to run RMS software.<br />
<br />
* the pre-installed RMS software images incorporate an auto-updating feature, so that the RMS software is updated to the current release whenever your Raspberry Pi RMS is booted. This way, your station is always running the most recent set of updates. <br />
<br />
* For installations into other Linux or windows environments, executing the command ''git pull'' will update to the most recent RMS release.<br />
<br />
* The code was designed to run on a RPi, but it will also run an some Linux distributions. We have tested it on Linux Mint 18 and Ubuntu 16. For information on installing into other Linux releases, check portions of the section listed below for installing on RPi, and also check installation instructions found on [https://github.com/CroatianMeteorNetwork/RMS GitHub]<br />
<br />
== Install the software from scratch ==<br />
<br />
'''Note: if you're setting up a Rspberry Pi you should use the prebuilt image as this comes with all necessary software installed and is ready to use.'''. If you really do want to install on the RPi from scratch, you can follow the instructions below:<br />
<br />
=== Install for Raspberry Pi 4 ===<br />
<br />
Detailed instructions [https://docs.google.com/document/d/19ImeNqBTD1ml2iisp5y7CjDrRV33wBeF9rtx3mIVjh4/edit?usp=sharing here]<br />
<br />
=== Install for Raspberry Pi 3 ===<br />
<br />
'''We no longer recommend the Pi3, as it doesn't have the performance or memory to handle busy meteor showers. '''<br />
<br />
Detailed instructions [https://docs.google.com/document/d/1ChaXx6WkuGfcQ_f5yRbwUOOMxEgIJrjq932UZE6cRjE/edit here].<br />
<br />
=== Install for Linux ===<br />
<br />
Detailed instructions [https://globalmeteornetwork.org/wiki/index.php?title=Installation_for_Linux here]<br />
<br />
=== Installation for Windows ===<br />
Data capture does not work under windows. However you can use the other tools on your PC, where its much quicker to run SkyFit2 to calibrate your camera to the sky, or you want to use BatchFFToImage to convert data to jpeg format to share on Social Media. <br />
<br />
Click '''[[Windows_Installation|here]]''' for detailed instructions. The instructions were tested on Windows 10 64-bit, but should work on any Windows version where git and Anaconda are available. <br />
<br />
Aside: If you are a Windows whizz, please feel free to investigate why data capture doesn't work!<br />
<br />
=== Installation for MacOS ===<br />
As with Windows, installation for MacOS is useful if you want to analyse the data offline. If you do want to install it, please follow the instructions '''[[MacOS_Install | here]]'''.<br />
<br />
== FAQ ==<br />
<br />
=== What should I back up when re-flashing an SD card? ===<br />
<br />
: The .config, platepar and mask files that are in the RMS source directory, plus the whole contents of the hidden directory /home/pi/.ssh. <br />
<br />
If your SD card fails or becomes corrupted, the config files can be fetched from the server as they are uploaded every day together with the data. However the contents of .ssh are essential for connection to the server, so you must also save these. Once you set up a new SD card, return the files in their original location.<br />
<br />
=== What are the values in FTPdetectinfo_* file designated as hnr mle bin Pix/fm Rho Phi? ===<br />
<br />
: Some of these values are not used in RMS (hnr mle bin), but they are in CAMS, so they are here to conform to the standard. Thus they are all zeros. The others are:<br />
<br />
: - Pix/fm - Average angular speed of the meteor in pixels per frame.<br />
<br />
: - Rho, Phi - Parameters that define the line of the meteor in polar coordinates, see [https://en.wikipedia.org/wiki/Hough_transform#Theory here] for more details. Rho is the distance of the line from the centre of the image, and phi is the angle of the line as measured from the positive direction of the Y axis (basically a line going from the center of the image to the top of the image), the positive angles are measured clockwise (I think, the CAMS standard might define these parameters a bit differently, the Y axis is flipped).<br />
<br />
: The intensity is the sum of all pixel intensities of the meteor on a given frame. Let's say I represent an area around the meteor on a given frame like this, where the numbers are pixel intensities on an 8-bit image (so they can range from 0 to 255):<br />
<br />
: [[File:Intensity_sum.png |Intensity_sum.png ]]<br />
<br />
: and the pixels values inside the red boundary represent the meteor blob on the frame, the intensity would be the sum of all numbers inside the red boundary.<br />
: This value is later used to compute the magnitude. The magnitude is computed as: mag = -2.5*log10(intensity sum) + photometric_offset. The photometric offset is estimated in SkyFit by fitting the line with slope -2.5 through pairs of known magnitudes of stars and logartihms of their pixel intensity sum. The photometric offset is basically the intercept of that line. The constant slope of -2.5 comes from the [https://en.wikipedia.org/wiki/Apparent_magnitude#Calculations definition of stellar magnitudes.]<br />
<br />
<br />
== GMN data policy ==<br />
<br />
The Global Meteor Network produces several levles of data products:<br />
* Level 1 - The lowest level data (i.e. as close to "raw" as possible) are the FF image and FR video files saved to the RPi by the capture code and the fireball detector.<br />
* Level 2 - The meteor detector uses these data to extract positional and brightness information of individual meteors (FTPdetectinfo file), and images are also used for astrometric and photometric calibration (platepar file). Meteor and star detections are used to generate a range of plots suchs as the single-station shower association graph, camera drift graph, etc. The calibrated meteors measurements get uploaded to the GMN server together with the raw images of individual meteors.<br />
* Level 3 - The software on the server correlates individual observations and computes multi-station meteor trajectories which are published daily on the GMN [https://globalmeteornetwork.org/data/ data website]. This data is made public under the [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0 license].<br />
<br />
Operators of individual GMN stations exclusivery own the Level 1 and Level 2 data their stations produce. In practice, this means that they are free to share this data with other meteor networks if they wish to do so. The data that gets uploaded to the GMN server will not be shared publicly nor with other parties without the operator's consent, but may be used internally by the GMN coordinators to manually produce other data products (e.g. trajectory of a meteorite dropping fireball, analysis of a meteor shower). All station operators will be credited for their data in all GMN publications.<br />
<br />
== IstraStream ==<br />
<br />
=== [http://istrastream.com/rms-gmn/ IstraStream GMN status website] ===<br />
<br />
: The IstraStream.com is an independent hosting site which is part of our world wide GMN. It is primarily a host for data from cameras sold by IstraStream, but other station operators can request that their data be included.<br />
To enable the IstraStream upload, simply change the config file as follows:<br />
<br />
<pre><br />
; External script<br />
; An external script will be run after RMS finishes the processing for the night, it will be passed three arguments:<br />
; captured_night_dir, archived_night_dir, config - captured_night dir is the full path to the captured folder of the night<br />
; the second one is the archived, and config is an object holding the values in this config file.<br />
; ---------------<br />
; Enable running an external script at the end of every night of processing<br />
external_script_run: true ; <--- CHANGE<br />
; Run the external script after auto reprocess. "auto_reprocess" needs to be turned on for this to work.<br />
auto_reprocess_external_script_run: false<br />
; Full path to the external script<br />
external_script_path: /home/pi/source/RMS/iStream/iStream.py ; <--- CHANGE<br />
; Name of the function in the external script which will be called<br />
external_function_name: rmsExternal<br />
<br />
<br />
; Daily reboot<br />
; ---------------<br />
; Reboot the computer daily after the processing and upload is done<br />
reboot_after_processing: false ; <--- CHANGE<br />
</pre><br />
<br />
Then, send an e-mail to [mailto:info@istrastream.com info@istrastream.com] with your:<br />
* Station_ID<br />
* Location or Name (if not secret)<br />
* Lens type/size<br />
<br />
For example, "CA0001; Elginfield Observatory, Ontario, Canada; 4mm". The IstraStream crew will enable the weblog page within a few days.<br />
<br />
Finally, this document explains what every plot on the IstraStream weblog means:<br />
<br />
=== [https://docs.google.com/document/d/132aHGn0QPzhpVN2s2n6FT6rJn39LAsPkchWJqXQb8Qk/edit?usp=sharing IstraStream Plots Explanation] ===<br />
<br />
== For More Information ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=43 Contact the Global Meteor Network] ===<br />
<br />
=== [https://groups.io/g/globalmeteornetwork Join the Global Meteor Network Forum] ===<br />
<br />
=== GMN talks ===<br />
<br />
: [https://www.youtube.com/watch?v=f6x9_WCVphY GMN talk at the European Space Agency's Fireball Workshop (June, 2021)]<br />
<br />
: [https://www.youtube.com/watch?v=QXBTLPnPDWs GMN Workshop (February, 2021)] - [https://www.dropbox.com/sh/ia9vagug5lxm8k9/AAB_i_1jcWThUdAHO_2gF_Ksa?dl=0 Link to slides]<br />
<br />
: [https://www.youtube.com/watch?v=MAGq-XqD5Po Overview of the GMN - IMC2020 (September, 2020)]<br />
<br />
: [https://www.youtube.com/watch?v=oM7lfQ4nmyw Overview of the GMN, Astro Imaging Channel presentation (May, 2020)]<br />
<br />
=== GMN related publications ===<br />
<br />
: [https://academic.oup.com/mnras/advance-article/doi/10.1093/mnras/stab2557/6368869 Moorhead, A. V., Clements, T., & Vida, D. (2021). Meteor shower radiant dispersions in Global Meteor Network data. Monthly Notices of the Royal Astronomical Society.]<br />
<br />
: [https://arxiv.org/abs/2107.12335 Vida, D., Šegon, D., Gural, P. S., Brown, P. G., McIntyre, M. J., Dijkema, T. J., Pavletić, L., Kukić, P., Mazur, M.J., Eschman, P., Roggemans, P., Merlak, A., & Zubović, D. (2021). The Global Meteor Network–Methodology and first results. Monthly Notices of the Royal Astronomical Society, 506(4), 5046-5074.]<br />
<br />
: [https://arxiv.org/abs/2003.05458/ Moorhead, A. V., Clements, T. D., & Vida, D. (2020). Realistic gravitational focusing of meteoroid streams. Monthly Notices of the Royal Astronomical Society, 494(2), 2982-2994.] <br />
<br />
: [https://globalmeteornetwork.org/wordpress/wp-content/uploads/2018/11/Kukic-et-al-2018-Rolling-shutter.pdf Kukić, P., Gural, P., Vida, D., Šegon, D. & Merlak, A. (2018) Correction for meteor centroids observed using rolling shutter cameras. WGN, Journal of the International Meteor Organization, 46:5, 154-118.]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_sun_skirter_final.pdf Vida, D., Mazur, M. J., Šegon, D., Kukić, P., & Merlak, A. (2018). Compressive strength of a skirting Daytime Arietid-first science results from low-cost Raspberry Pi-based meteor stations. WGN, Journal of the International Meteor Organization, 46, 113-118.] <br />
<br />
: [https://arxiv.org/pdf/1911.02979.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - I. Theory. arXiv:1911.02979v4 [astro-ph.EP] 21 Apr 2020]<br />
<br />
: [https://arxiv.org/pdf/1911.11734.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - II. Results. arXiv:1911.11734v1 [astro-ph.EP] 26 Novr 2019]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_first_results-final.pdf Vida, D., Mazur, M. J., Šegon, D., Zubović, D., Kukić, P., Parag, F., & Macan, A. (2018). First results of a Raspberry Pi based meteor camera system. WGN, Journal of the International Meteor Organization, 46, 71-78.] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Vida_IMC2016_proceedings_final.pdf Vida, D., Zubović, D., Šegon, D., Gural, P., & Cupec, R. (2016). Open-source meteor detection software for low-cost single-board computers. In Proceedings of the International Meteor Conference (IMC2016), Egmond, The Netherlands (pp. 2-5).] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Zubovic_IMC2015_priceedings_final.pdf Zubović, D., Vida, D., Gural, P., & Šegon, D. (2015). Advances in the development of a low-cost video meteor station. In Proceedings of the International Meteor Conference, Mistelbach, Austria (pp. 27-30).]</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Main_Page&diff=373Main Page2021-09-27T14:58:26Z<p>Markmcintyre: /* Viewing the data */</p>
<hr />
<div>Welcome to the Global Meteor Network's wiki page!<br />
<br />
The Global Meteor Network (GMN) is a world wide organization of amateur and professional astronomers alike, whose goal is to observe the night sky using low-light video cameras and produce meteor trajectories in a coordinated manner. Here you will find information on the purpose and structure of the GMN, assembling and operating your own meteor camera, contributing to the development of RMS the GMN software, as well as information on how your observations as a citizen scientist can contribute to the further understanding of our solar system's formation and evolution. <br />
<br />
'''<span style="color:red">If you have come here to find out how to build and setup a camera from scratch, jump ahead to [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#How_do_I_obtain_a_camera.3F this] section !</span>'''<br />
<br />
<br />
== Global Meteor Network Overview ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=141 Our mission] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=363 A brief history of the Global Meteor Network] ===<br />
<br />
=== [https://www.youtube.com/watch?v=MAGq-XqD5Po Video introduction - Overview of the Global Meteor Network (IMC2020)] ===<br />
<br />
=== [https://youtu.be/oM7lfQ4nmyw Video overview - Meteor tracking and the GMN from Astro Imaging Channel presentation] ===<br />
<br />
=== [https://globalmeteornetwork.org/data/ Some 'live' GMN data products] ===<br />
<br />
== Meteor Detection Station ==<br />
<br />
=== What is an RMS GMN station? ===<br />
: A RMS-based GMN station that is the subject of this Wiki consists of a Raspberry Pi (RPi) single board computer, a low light level security video camera, and the RMS software package. The camera is securely mounted in a weatherproof housing, pointed at the sky, and connected to the RPi with a POE (Power Over Ethernet) cable. The RPi is connected to the Internet via WiFi, and to be a part of GMN network, you’ll need a fairly powerful Raspberry Pi (RPi 3B+, RPi 4 or better) and a reasonably fast Internet connection. The internet connection is primarily required to enable data upload to a central server each morning as well as provide automatic updates for the RMS software. <br />
<br />
: Nightly, the RPi starts recording video from the camera shortly after local sunset continuously compressing and storing the video data locally. Each morning before sunrise, after capture is complete, the RPi analyzes the video and extracts your nightly station’s meteor observations. These extracted video “clips” of detected meteors are then archived and uploaded to a server. The clips can total hundreds of megabytes on a “busy” night (e.g., in a heavy meteor shower, or a night with a lot of false detections--progress is being made on the detection software). The server finds meteors which were observed with more than one station and this enables the server to triangulate the meteor trails in 3D and calculate the orbits of the meteors.<br />
<br />
===[https://github.com/CroatianMeteorNetwork/RMS/blob/master/README.md What do I need?] ===<br />
<br />
You'll need a Raspberry Pi with the software on, and a camera kit. We strongly recommend the Pi4 model. The software will run on a Pi3 but it is much slower. <br />
<br />
=== How do I obtain a camera? ===<br />
There are two options:<br />
<br />
==== Buy a Camera ====<br />
You can buy a camera and Pi prebuilt and ready to install. These are available from a couple of suppliers. The Croatian Meteor Network sell prebuilt cameras as explained on [https://globalmeteornetwork.org/?page_id=136 this page]. Alternatively, if you're in the UK, you can obtain cameras from the [https://ukmeteornetwork.co.uk/ UK Meteor Network] <br />
<br />
==== Build your own from scratch ====<br />
This requires some basic DIY skills and some familiarity with the Raspberry PI, but don't be put off. The instructions are comprehensive and if you get stuck, you can ask for advice in the [https://groups.io/g/globalmeteornetwork groups.io] forum. <br />
<br />
Click on this link if you want to '''[[Build_A_Camera|build a camera from scratch]]'''. <br />
<br />
Once you've built the camera, You can '''[https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#Flash_a_pre-built_image flash a Prebuilt image]''' onto an SD card to set up the Pi with the software required to capture meteors and upload data to the network.<br />
<br />
=== Can I use a commercial all-sky camera? ===<br />
<br />
: Generally no due to the lack of sensitivity. [https://globalmeteornetwork.org/?p=163 But see this recent experiment]<br />
<br />
== Operating and maintaining your GMN station ==<br />
<br />
=== Overview ===<br />
<br />
: Please note that GMS is a nascent operation and you may share some growing pains if you choose to be involved -- we're still working out some bugs and making improvements here, which may be an opportunity to help if you have programming skills! ;-) So note that the workload of day-to-day operation can be non-zero, and might take a little bit of your time.<br />
<br />
: Ideally, you'll want to monitor your RMS RPi system(s) daily to look for freezes or glitches or other problems... like birds nesting or soiling the camera window, people accidentally unplugging the power cord, mice (or cats or dogs!) chewing on the camera Ethernet cable, etc.<br />
<br />
: Although we are getting close, this is not a "power up and forget about it" system yet.<br />
: However, by its very nature, the GMS network is inhabited by a lot of people who are willing to help newcomers getting started. So, here are some clues for daily operation of your RMS camera.<br />
<br />
=== So what does the meteor camera do over the course of 24 hours? ===<br />
<br />
: The RMS Python based system calculates the sundown to sunrise interval and schedules video camera capture all night long. Depending on the video camera and capabilities of the RPi, the camera captures 25 or more frames per second between evening and morning twilight. During the continuous image capture, the station begins processing captured image data, doing a pre-screening to target frames with a suitable number of stars (usually around 20) that makes it worth looking for meteor detections. Once data capture has finished, the station switches into processing all the promising frames for detections, then refining the astrometric accuracy of every positive detection. Using the station platepar (plate parameters) calibration file, processing iterates to find the best astrometry and photometry solution for each detected meteor. Once this process has analyzed each detection, summary files are created. <br />
: These summary files include text file data presentation in several widely accepted formats (CAMS and UFOorbit), as well as graphic plots of detection frequencies throughout the night, a set of thumbnail images of detections, a set of thumbnail images of data captured throughout the night, a single image with all detections stacked together, plots of photometry, astrometry, and camera pointing drift in arc minutes throughout the course of the night as the mount or building flexes, a flat file for correcting images, and a plot of all detections showing any identified radiants. Finally all results are combined into a single compressed archive, which is automatically uploaded each morning to the central server. Optionally, you can create a mp4 movie showing a time lapse of the night’s captured images.<br />
: Each morning you can review the result files on the RPi, and copy anything you want to your computer or tablet.<br />
<br />
===Archiving data and backing up configuration ===<br />
<br />
: Data backup is as much or as little as you like. Your primary data is automatically uploaded to the central server every morning when data processing is done. We've built some automated tools that can help to back up any additional data to a thumb drive inserted into the RPi.<br />
<br />
=== Viewing the data ===<br />
<br />
: To view the data, you can use CMN_binViewer software[https://github.com/CroatianMeteorNetwork/cmn_binviewer] which is already installed in the RMS SD image. <br />
: There is also a Windows version[https://www.dropbox.com/s/4eutahlxojrkvsa/CMN_binViewer-setup64.exe?dl=1] you can install.<br />
<br />
'''Important note''' : You can also open the images in astronomical FITS viewers such as FITS Liberator or Pixinsight, though the results may be surprising. For example in FITS Liberator, the image will be '''upside down'''. This is an artefact of how the software reads the image. In space, there's no 'up' or 'down' and so the FITS specification does not dictate whether the pixel (0,0) is at the bottom left or top left, or indeed one of the other corners. Some software, notably FITS Liberator, treats the top left as the origin and so terrestrial images will be displayed mirrored vertically.<br />
<br />
=== Tools and Utilities ===<br />
<br />
* [https://www.realvnc.com/en/connect/download/viewer/ RealVNC] or [https://anydesk.com/en AnyDesk] remote connect tool allows station access from anywhere. Access from outside your network is enabled by use of an OpenVPN connection address available to meteor stations. Alternatively, with VNC and Teamviewer, you can create an account and team on their websites, and then remotely access your station. <br />
* Samba data directory access, allows you to copy data results directly from your RPi to your computer or tablet.<br />
* [https://github.com/CroatianMeteorNetwork/cmn_binviewer CMN_binViewer] can be used to view standard fits image files containing meteor detections. It runs on the RPi, and is also available under Windows.<br />
* [https://sonotaco.com/soft/e_index.html UFO Orbit] allows you to process data from multiple stations and generate unified radiants of two or more stations seeing the same meteor. It can plot the shared object ground path, orbital characteristics, and can output a summary file of all objects seen by more than one station, which can be used for further analysis.<br />
* RMS software can be installed under Windows to allow much of the RMS python-based code to be executed on your computer, so it can be run against meteor station data you have transferred to your computer from the RPi.<br />
* You can run RMS Python jobs on the RPi to sample the image files captured all night long and condense them into a mp4 movie. This creates a sometimes mesmerizing summary that can run for over 2 minutes in length for winter time data.<br />
<br />
== Configuring and installing your camera ==<br />
<br />
=== [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick start guide] ===<br />
<br />
=== [[Focusing_your_camera | Focusing your IP camera]] ===<br />
<br />
=== [https://www.youtube.com/watch?v=N2sq1hBwcAA Video tutorial - Configuring your IMX291 IP camera] ===<br />
<br />
=== [https://docs.google.com/document/d/1TPotXcRstHz-XWIQYIW71xkRYy7Ca1UCoEiZsqdk9zw/edit?usp=sharing Different ways of connecting the camera] ===<br />
<br />
== What can I do with my GMN station? ==<br />
<br />
=== [https://www.youtube.com/watch?v=MOjb3qxDlX4 Video Tutorial - Using SkyFit2 to perform astrometric and photometric calibration + Manually reducing observations of fireballs and computing their trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=310 Generating a Google Earth KML file to show your station's field of view] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=253 Using UFO Orbit program to estimate meteor trajectories] ===<br />
<br />
=== [https://globalmeteornetwork.org/?p=221 Urban meteor observing] ===<br />
<br />
== RMS Software Installation ==<br />
<br />
=== Flash a pre-built image ===<br />
<br />
Pre-built Images are available with the RMS software pre-installed on Raspbian. Raspbian is the operating system typically used on the Raspberry Pi. <br />
<br />
A 128 GB microSD card is preferred, although smaller 64 GB cards will also work. The image is flashed to the microSD card using the Etcher utility for Windows (32 or 64-bit), MacOS or Linux (64-bit), which can be found [https://www.balena.io/etcher/ here]<br />
<br />
When you first boot up the Pi make sure you have a keyboard, monitor and mouse attached as you will be taken through a setup process by the RMS software. <br />
<br />
The current publicly released images of RMS are: <br />
[https://www.dropbox.com/s/sa9csd4m3jr1vqo/RMS_image_20191203.zip?dl=1 RPi3B+ ]<br />
and <br />
[https://www.dropbox.com/s/3pwwenty43dazq4/RMS_RPi4_image_20210626.zip?dl=1 RPi4 ]. <br />
<br />
Please see the [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick Start Guide] about how to flash them to an SD card.<br />
<br />
Notes: <br />
* The earlier versions of the Raspberry Pi, the 1 and 2, are not powerful enough to run RMS software.<br />
<br />
* the pre-installed RMS software images incorporate an auto-updating feature, so that the RMS software is updated to the current release whenever your Raspberry Pi RMS is booted. This way, your station is always running the most recent set of updates. <br />
<br />
* For installations into other Linux or windows environments, executing the command ''git pull'' will update to the most recent RMS release.<br />
<br />
* The code was designed to run on a RPi, but it will also run an some Linux distributions. We have tested it on Linux Mint 18 and Ubuntu 16. For information on installing into other Linux releases, check portions of the section listed below for installing on RPi, and also check installation instructions found on [https://github.com/CroatianMeteorNetwork/RMS GitHub]<br />
<br />
== Install the software from scratch ==<br />
<br />
'''Note: if you're setting up a Rspberry Pi you should use the prebuilt image as this comes with all necessary software installed and is ready to use.'''. If you really do want to install on the RPi from scratch, you can follow the instructions below:<br />
<br />
=== Install for Raspberry Pi 4 ===<br />
<br />
Detailed instructions [https://docs.google.com/document/d/19ImeNqBTD1ml2iisp5y7CjDrRV33wBeF9rtx3mIVjh4/edit?usp=sharing here]<br />
<br />
=== Install for Raspberry Pi 3 ===<br />
<br />
'''We no longer recommend the Pi3, as it doesn't have the performance or memory to handle busy meteor showers. '''<br />
<br />
Detailed instructions [https://docs.google.com/document/d/1ChaXx6WkuGfcQ_f5yRbwUOOMxEgIJrjq932UZE6cRjE/edit here].<br />
<br />
=== Install for Linux ===<br />
<br />
Detailed instructions [https://globalmeteornetwork.org/wiki/index.php?title=Installation_for_Linux here]<br />
<br />
=== Installation for Windows ===<br />
Data capture does not work under windows. However you can use the other tools on your PC, where its much quicker to run SkyFit2 to calibrate your camera to the sky, or you want to use BatchFFToImage to convert data to jpeg format to share on Social Media. <br />
<br />
Click '''[[Windows_Installation|here]]''' for detailed instructions. The instructions were tested on Windows 10 64-bit, but should work on any Windows version where git and Anaconda are available. <br />
<br />
Aside: If you are a Windows whizz, please feel free to investigate why data capture doesn't work!<br />
<br />
=== Installation for MacOS ===<br />
As with Windows, installation for MacOS is useful if you want to analyse the data offline. If you do want to install it, please follow the instructions '''[[MacOS_Install | here]]'''.<br />
<br />
== FAQ ==<br />
<br />
=== What should I back up when re-flashing an SD card? ===<br />
<br />
: The .config, platepar and mask files that are in the RMS source directory, plus the whole contents of the hidden directory /home/pi/.ssh. <br />
<br />
If your SD card fails or becomes corrupted, the config files can be fetched from the server as they are uploaded every day together with the data. However the contents of .ssh are essential for connection to the server, so you must also save these. Once you set up a new SD card, return the files in their original location.<br />
<br />
=== What are the values in FTPdetectinfo_* file designated as hnr mle bin Pix/fm Rho Phi? ===<br />
<br />
: Some of these values are not used in RMS (hnr mle bin), but they are in CAMS, so they are here to conform to the standard. Thus they are all zeros. The others are:<br />
<br />
: - Pix/fm - Average angular speed of the meteor in pixels per frame.<br />
<br />
: - Rho, Phi - Parameters that define the line of the meteor in polar coordinates, see [https://en.wikipedia.org/wiki/Hough_transform#Theory here] for more details. Rho is the distance of the line from the centre of the image, and phi is the angle of the line as measured from the positive direction of the Y axis (basically a line going from the center of the image to the top of the image), the positive angles are measured clockwise (I think, the CAMS standard might define these parameters a bit differently, the Y axis is flipped).<br />
<br />
: The intensity is the sum of all pixel intensities of the meteor on a given frame. Let's say I represent an area around the meteor on a given frame like this, where the numbers are pixel intensities on an 8-bit image (so they can range from 0 to 255):<br />
<br />
: [[File:Intensity_sum.png |Intensity_sum.png ]]<br />
<br />
: and the pixels values inside the red boundary represent the meteor blob on the frame, the intensity would be the sum of all numbers inside the red boundary.<br />
: This value is later used to compute the magnitude. The magnitude is computed as: mag = -2.5*log10(intensity sum) + photometric_offset. The photometric offset is estimated in SkyFit by fitting the line with slope -2.5 through pairs of known magnitudes of stars and logartihms of their pixel intensity sum. The photometric offset is basically the intercept of that line. The constant slope of -2.5 comes from the [https://en.wikipedia.org/wiki/Apparent_magnitude#Calculations definition of stellar magnitudes.]<br />
<br />
<br />
== GMN data policy ==<br />
<br />
The Global Meteor Network produces several levles of data products:<br />
* Level 1 - The lowest level data (i.e. as close to "raw" as possible) are the FF image and FR video files saved to the RPi by the capture code and the fireball detector.<br />
* Level 2 - The meteor detector uses these data to extract positional and brightness information of individual meteors (FTPdetectinfo file), and images are also used for astrometric and photometric calibration (platepar file). Meteor and star detections are used to generate a range of plots suchs as the single-station shower association graph, camera drift graph, etc. The calibrated meteors measurements get uploaded to the GMN server together with the raw images of individual meteors.<br />
* Level 3 - The software on the server correlates individual observations and computes multi-station meteor trajectories which are published daily on the GMN [https://globalmeteornetwork.org/data/ data website]. This data is made public under the [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0 license].<br />
<br />
Operators of individual GMN stations exclusivery own the Level 1 and Level 2 data their stations produce. In practice, this means that they are free to share this data with other meteor networks if they wish to do so. The data that gets uploaded to the GMN server will not be shared publicly nor with other parties without the operator's consent, but may be used internally by the GMN coordinators to manually produce other data products (e.g. trajectory of a meteorite dropping fireball, analysis of a meteor shower). All station operators will be credited for their data in all GMN publications.<br />
<br />
== IstraStream ==<br />
<br />
=== [http://istrastream.com/rms-gmn/ IstraStream GMN status website] ===<br />
<br />
: The IstraStream.com is an independent hosting site which is part of our world wide GMN. It is primarily a host for data from cameras sold by IstraStream, but other station operators can request that their data be included.<br />
To enable the IstraStream upload, simply change the config file as follows:<br />
<br />
<pre><br />
; External script<br />
; An external script will be run after RMS finishes the processing for the night, it will be passed three arguments:<br />
; captured_night_dir, archived_night_dir, config - captured_night dir is the full path to the captured folder of the night<br />
; the second one is the archived, and config is an object holding the values in this config file.<br />
; ---------------<br />
; Enable running an external script at the end of every night of processing<br />
external_script_run: true ; <--- CHANGE<br />
; Run the external script after auto reprocess. "auto_reprocess" needs to be turned on for this to work.<br />
auto_reprocess_external_script_run: false<br />
; Full path to the external script<br />
external_script_path: /home/pi/source/RMS/iStream/iStream.py ; <--- CHANGE<br />
; Name of the function in the external script which will be called<br />
external_function_name: rmsExternal<br />
<br />
<br />
; Daily reboot<br />
; ---------------<br />
; Reboot the computer daily after the processing and upload is done<br />
reboot_after_processing: false ; <--- CHANGE<br />
</pre><br />
<br />
Then, send an e-mail to [mailto:info@istrastream.com info@istrastream.com] with your:<br />
* Station_ID<br />
* Location or Name (if not secret)<br />
* Lens type/size<br />
<br />
For example, "CA0001; Elginfield Observatory, Ontario, Canada; 4mm". The IstraStream crew will enable the weblog page within a few days.<br />
<br />
Finally, this document explains what every plot on the IstraStream weblog means:<br />
<br />
=== [https://docs.google.com/document/d/132aHGn0QPzhpVN2s2n6FT6rJn39LAsPkchWJqXQb8Qk/edit?usp=sharing IstraStream Plots Explanation] ===<br />
<br />
== For More Information ==<br />
<br />
=== [https://globalmeteornetwork.org/?page_id=43 Contact the Global Meteor Network] ===<br />
<br />
=== [https://groups.io/g/globalmeteornetwork Join the Global Meteor Network Forum] ===<br />
<br />
=== GMN talks ===<br />
<br />
: [https://www.youtube.com/watch?v=f6x9_WCVphY GMN talk at the European Space Agency's Fireball Workshop (June, 2021)]<br />
<br />
: [https://www.youtube.com/watch?v=QXBTLPnPDWs GMN Workshop (February, 2021)] - [https://www.dropbox.com/sh/ia9vagug5lxm8k9/AAB_i_1jcWThUdAHO_2gF_Ksa?dl=0 Link to slides]<br />
<br />
: [https://www.youtube.com/watch?v=MAGq-XqD5Po Overview of the GMN - IMC2020 (September, 2020)]<br />
<br />
: [https://www.youtube.com/watch?v=oM7lfQ4nmyw Overview of the GMN, Astro Imaging Channel presentation (May, 2020)]<br />
<br />
=== GMN related publications ===<br />
<br />
: [https://academic.oup.com/mnras/advance-article/doi/10.1093/mnras/stab2557/6368869 Moorhead, A. V., Clements, T., & Vida, D. (2021). Meteor shower radiant dispersions in Global Meteor Network data. Monthly Notices of the Royal Astronomical Society.]<br />
<br />
: [https://arxiv.org/abs/2107.12335 Vida, D., Šegon, D., Gural, P. S., Brown, P. G., McIntyre, M. J., Dijkema, T. J., Pavletić, L., Kukić, P., Mazur, M.J., Eschman, P., Roggemans, P., Merlak, A., & Zubović, D. (2021). The Global Meteor Network–Methodology and first results. Monthly Notices of the Royal Astronomical Society, 506(4), 5046-5074.]<br />
<br />
: [https://arxiv.org/abs/2003.05458/ Moorhead, A. V., Clements, T. D., & Vida, D. (2020). Realistic gravitational focusing of meteoroid streams. Monthly Notices of the Royal Astronomical Society, 494(2), 2982-2994.] <br />
<br />
: [https://globalmeteornetwork.org/wordpress/wp-content/uploads/2018/11/Kukic-et-al-2018-Rolling-shutter.pdf Kukić, P., Gural, P., Vida, D., Šegon, D. & Merlak, A. (2018) Correction for meteor centroids observed using rolling shutter cameras. WGN, Journal of the International Meteor Organization, 46:5, 154-118.]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_sun_skirter_final.pdf Vida, D., Mazur, M. J., Šegon, D., Kukić, P., & Merlak, A. (2018). Compressive strength of a skirting Daytime Arietid-first science results from low-cost Raspberry Pi-based meteor stations. WGN, Journal of the International Meteor Organization, 46, 113-118.] <br />
<br />
: [https://arxiv.org/pdf/1911.02979.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - I. Theory. arXiv:1911.02979v4 [astro-ph.EP] 21 Apr 2020]<br />
<br />
: [https://arxiv.org/pdf/1911.11734.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - II. Results. arXiv:1911.11734v1 [astro-ph.EP] 26 Novr 2019]<br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_first_results-final.pdf Vida, D., Mazur, M. J., Šegon, D., Zubović, D., Kukić, P., Parag, F., & Macan, A. (2018). First results of a Raspberry Pi based meteor camera system. WGN, Journal of the International Meteor Organization, 46, 71-78.] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Vida_IMC2016_proceedings_final.pdf Vida, D., Zubović, D., Šegon, D., Gural, P., & Cupec, R. (2016). Open-source meteor detection software for low-cost single-board computers. In Proceedings of the International Meteor Conference (IMC2016), Egmond, The Netherlands (pp. 2-5).] <br />
<br />
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Zubovic_IMC2015_priceedings_final.pdf Zubović, D., Vida, D., Gural, P., & Šegon, D. (2015). Advances in the development of a low-cost video meteor station. In Proceedings of the International Meteor Conference, Mistelbach, Austria (pp. 27-30).]</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=372Build A Camera2021-09-27T14:51:13Z<p>Markmcintyre: /* Checking the Connection */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* If the image is upside down, do '''not''' be tempted to the firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down the shutter is working in the opposite direction to that expected by RMS and timings will be wrong, even if the image is flipped in software. You must physically rotate the camera. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* You should also close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=371Build A Camera2021-09-27T14:49:56Z<p>Markmcintyre: /* Checking the Connection */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up. If the image is upside down in VLC, turn it through 180 degrees in the housing. <br />
<br />
* Do *not* be tempted to the firmware settings to flip or mirror the image. These cameras have a 'rolling' shutter and to work out precise timings of meteors, the RMS software compensates for the shutter. If the camera is upside down the shutter is working in the opposite direction to that expected by RMS and timings will be wrong, even if the image is flipped in software. <br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* You should also close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=370Build A Camera2021-09-27T14:46:34Z<p>Markmcintyre: /* Attaching the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see advice in the section on Testing and Focusing. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up...<br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* You should also close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=369Build A Camera2021-09-27T14:46:05Z<p>Markmcintyre: /* Attaching the Camera */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "No lens":<br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
Always buy a lens separately from the list in the following section.<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
If you live in an area with heavy light pollution, other options are available. We wholeheartedly recommend only using lenses from the following list, as others might not be as sensitive or might have large distortion. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. If you live in North America, buy your SD cards at Costco.<br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that on some camera models, the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. To be sure you have it the right way up, see the next section. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up...<br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* You should also close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyrehttps://globalmeteornetwork.org//wiki/index.php?title=Build_A_Camera&diff=358Build A Camera2021-09-12T21:20:50Z<p>Markmcintyre: /* Power Over Ethernet Injector */</p>
<hr />
<div><br />
= Parts and Tools needed = <br />
[[File:01_annotated.jpg|thumb|right|Annotated Parts List]]<br />
<br />
Click on the image to the right to see a larger version with the parts labelled<br />
<br />
# IMX291 sensor board<br />
# Lens with the lens holder - 4mm, 6mm are M16 mount as pictured, while other lenses might be CS which have a different holder<br />
# 2x M2 screws <br />
# Camera housing<br />
# Small cable gland (supplied with the housing)<br />
# Large cable gland (supplied with the housing)<br />
# Camera Power over Ethernet (PoE) cable (sometimes called a network cable by the sellers)<br />
# Camera board holder (supplied with the housing)<br />
# Holder metal plate (supplied with the housing)<br />
# 3x M2 screws, 12 mm long <br />
# 1x M3-.50 screws, 6mm long <br />
# Metal plate screws (supplied with the housing)<br />
# Transparent weatherproof silicone <br />
# Housing mounting bracket (supplied with the housing)<br />
# Waterproof ethernet cable protector<br />
# PoE injector to supply 48v to the camera (not shown)<br />
# Raspberry Pi 4 Model B 2GB (or at least a 3B+ with 2GB) with official power supply (not shown)<br />
# Raspberry Pi housing (not shown)<br />
# 128 GB or greater microSD card (not shown)<br />
# Self-amalgamating tape (not shown)<br />
<br />
== Purchasing Parts ==<br />
For consistency across the network and to make collaborative support possible, it is recommended that the camera and lenses listed below are used in preference to random handy bits that are cobbled together. The selected components are proven and known to work well. Other components can be sourced from any convenient seller. <br />
<br />
Many components such as the Pi and microSD cards are are readily available in most locations. For other items such as lens, camera and housing, AliExpress - the Chinese equivalent of eBay - is the preferred online source as it serves most of the globe and has been reliably suppling parts to date.<br />
<br />
NB: Links are given to current sellers, but stock levels vary and if the link is dead or the seller is out of stock, you should be able to find an equivalent from another seller on AliExpress.<br />
<br />
=== Sensor ===<br />
The bare IP security camera featuring a Sony IMX291 has been selected for the RMS system. This is available from many sellers on AliExpress. Out of the options offered, choose "With 48V POE cable" and "4mm lens" if available, or "no lens" and then buy a lens separately. For example . <br />
* [https://www.aliexpress.com/item/1005002315913099.html IVG-HP203Y-AE]<br />
<br />
=== Lens ===<br />
Most cameras available on Aliexpress come with a choice of lenses. The preferred lens is a 4mm f/0.95 M16 lens providing ~88x45° field of view, which can also be bought separately for example via this link.<br />
* [https://www.aliexpress.com/item/32876034491.html 4mm f/0.95 M16]<br />
<br />
Other options are available however you should avoid zoom lenses which tend to slip as they heat and cool. See [[Lens Options|this page]] for more lens options.<br />
<br />
=== Housing ===<br />
A security camera housing is used, providing weather-tight protection without distortion introduced by plastic domes. From the options offered, select "Plate and Bracket" to get a plate for mounting a 38x38mm bare IP camera module, and an L-shaped mounting bracket. <br />
* [https://www.aliexpress.com/item/32355130687.html IP66 CCTV Camera Housing with Plate and Bracket] This will also provide a pair of cable glands and some essential screws.<br />
<br />
=== Power Over Ethernet Injector ===<br />
This connects by network cables to both the Raspberry Pi and the camera sensor, and injects 48V DC onto the network cable to the camera to supply it with power. Pick a suitable plug style for your location from the options offered. An example unit is:<br />
* [https://www.aliexpress.com/item/32787153455.html PoE Injector 48V 0.5A]<br />
<br />
Note that over short lengths of up to about 5m you can also use plain PoE connectors. These simply feed 12V from a power supply into the ethernet and extract it at the other end. Over short distances this will supply the camera with adequate power without the need for 48V injectors.<br />
<br />
=== Cooled Housing for Raspberry Pi ===<br />
This is one of the rare cases that fulfills our needs. It has a fan which is relatively quiet, it’s sturdy, and it can fit the RTC with the addition of riser pins. '''Please buy this case''', we have tried many others, but they are not as good. From the options offered, make sure you select one that says "for Pi 4" if you are using a Raspberry Pi 4, or "for Pi 3B Plus" if you are using a Raspbery Pi 3B+. Additionally there is a case variation that is fully enclosed and has no fans; do not select this option.<br />
* [https://www.aliexpress.com/item/32959825297.html Raspberry Pi Aluminium Enclosure with fans]<br />
<br />
=== Real Time Clock for Raspberry Pi ===<br />
Very precise timing is essential to processing the meteor data, so unless you are confident in your internet connection an RTC module ensures the Raspberry Pi always has the precise time, even when power or internet is unreliable. AliExpress sells a pack of 10 but they are inexpensive - maybe share the extras among other camera constructors in your area.<br />
* [https://www.aliexpress.com/item/32770348851.html DS3231 RTC]<br />
<br />
=== Pin Headers ===<br />
Required to raise the height of the Raspberry GPIO bins to allow the RTC to sit proud of the Raspberry Pi case. You only need 1 but the pack of 20 is available for only a dollar or so. <br />
* [https://www.aliexpress.com/item/32549850046.html Tall header pins]<br />
<br />
=== Network cabling === <br />
You will need two lengths of network cabling, one (probably quite short) between the Raspberry Pi and the PoE injector and the other between the PoE injector and the camera. You can purchase suitable lengths locally or on AliExpress. Some people have found the following thin flat network cable to be useful for sneaking the wire through a window or door to avoid drilling holes in walls or eaves, although it will require some extra attention to seal the cable at the camera's PoE connector:<br />
* [https://www.aliexpress.com/item/1005002311509668.html Cat6 Flat Ethernet Cable]<br />
<br />
=== Waterproof Cable Connector ===<br />
One end of the network cable will be outside, connected into the PoE cable from the camera. This is not only carrying data but 48V DC power and needs to be kept sealed. This waterproof connector is fitted over the end of the network cable connector then after the network cable is plugged into the camera's PoE cable, the connector is locked into the end of the PoE cable. For extra weatherproofing, wrap in self-amalgamating tape. <br />
* [https://www.aliexpress.com/item/32834472563.html RJ45 Waterproof Connector Cap]<br />
<br />
=== 128GB Micro SD Card ===<br />
You need at least a 64GB card but a 128GB is recommended as 20+ GB of data is collected every night. Make sure it is a fast card eg Class 10 UHS-1 or better. A card can either be purchased locally or [https://www.aliexpress.com/item/32676225311.html from AliExpress]. Be warned that there is an [https://photographylife.com/fake-memory-cards ongoing problem with the production and sale of fraudulent memory cards misreporting the available storage] and even supplies from a reputable outlet can be affected - test the card you purchase. The AliExpress link has been used successfully to obtain suitable micro SD cards. <br />
<br />
=== Raspberry Pi 4 ===<br />
These are likely to be available to be purchased locally or from a domestic online source. You need at least a 2GB RAM model. The Raspberry Pi Model 3B+ is the minimum specification, and a Raspberry Pi Model 4B is preferred. Purchase the official 5.1V 3A 15.3W power supply to go with it - most problems with Raspberry Pi units are due to inadequate power supplies being used instead of purchasing the official power pack. Note: to connect a RPi 4B to a monitor you will also need a micro-HDMI cable, so that might be necessary to add to the shopping cart also.<br />
<br />
=== Additional items and tools ===<br />
* If the camera lens does not arrive with two small screws to mount the lens to the camera, you will need to locate two suitable small screws.<br />
* A tube of silicone sealant is used to seal the glass window for the housing and the front screws in the housing.<br />
* Self-amalgamating tape can be used to wrap and seal the cable connector(s) to ensure they remain weathertight in all conditions.<br />
* Tools such as small wire cutters or a sharp knife, various sized screwdrivers, a drill and screws to mount the camera bracket will be required.<br />
<br />
Deprecated shopping list: [https://docs.google.com/document/d/1XBSdrkwrOGPONIn5PBJ7YzH2vr7pUIxW3l8S62BQXEQ/edit LINK]<br />
<br />
Some cameras come with a slightly different cable with a separate 12v socket for power input as shown [https://globalmeteornetwork.org/wiki/images/d/dc/Alternatecable.jpg here]. If you have this cable you will need a pair of PoE adapters (seen in that picture in the background). If your camera has a single cable as shown in the main picture, you will need a PoE injector or single adapter. <br />
<br />
To test and focus the camera you will need VLC. This software is preinstalled on the Pi but is also available for Mac, Windows or Linux from [https://www.videolan.org/vlc/ here].<br />
<br />
= Assembly = <br />
[Note: there's a longer version of the camera assembly section of this page available on Google Docs. Please refer to [https://docs.google.com/document/d/18TT-Jm7z9kYskl5ua07jQWD91OiyBemBnOosiNdW6nY/edit?usp=sharing this] if you need more information.]<br />
<br />
<table><tr><td><br />
== Preparing the Lens == <br />
[[File:Irblock.jpg|thumb|right|Punching out the filter]]<br />
* Start by removing protective covers from the sensor and lens. Take care not to touch the sensor after this is removed. <br />
<br />
* The cameras come with an IR Block filter in the lens holder. We don't want this.<br />
* If you have a lens like the one shown, unscrew the lens from the holder and using a screwdriver, carefully punch out the filter from the front as shown in the image on the right. If it shatters, make sure there are no shards left. <br />
<br />
* Some lenses come with two filters, one for day and one for night. You'll be able to tell because the lens holder will have a small cable to plug into the camera board. If your lens is like this DO NOT try to punch out the filter. Instead remove the cover from the lens holder and carefully remove the clear filter. You can leave the other, reddish, daylight filter. <br />
<br />
* Next look on the underside of the lens holder where you will see two plastic nubbins. These get in the way, so using the wire cutters snip them off. Make sure you get the base completely flat. <br />
<br />
* Then screw the lens back into the lens holder.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Attaching the Lens to the Camera == <br />
[[File:lensattaching.jpg|thumb|right|Attaching the Lens]]<br />
<br />
* Carefully unclip the circuit board from the plastic holder but do not detach the ribbon cable.<br />
<br />
* Using the supplied screws, attach the lens to the sensor. <br />
<br />
* Replace the circuit board in the plastic holder. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Preparing the Camera Housing = <br />
[[File:glands.jpg|thumb|right|Glands in Place]]<br />
* Fit the small cable gland to the housing and pass the loose ends of the Camera PoE cable up through, but don't tighten it up yet. Remember to slip the cap over the cable first!<br />
<br />
* Fit the large cable gland in the other opening, and push a piece of plastic packing foam into it. Don't seal it up completely though this is to keep insects from getting in, but allow moisture out.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Attaching the Camera ==<br />
[[File:camerafitted.jpg|thumb|right|Camera In Mount]]<br />
<br />
* Connect the metal camera holder to the metal plate using one 6mm M3 screw. Note the orientation of the plate as shown in the photo. <br />
<br />
* Using three 12 mm M2 screws, connect the camera board to the metal holder passing the lens through the square hole from the back. <br />
<br />
* Note that the writing on the camera board must be UPSIDE DOWN to get the correct orientation of the camera. In this orientation, the sockets for power and networking will be at the bottom of the rear of the camera board. <br />
<br />
* Finally, remove the plastic cap on the lens. <br />
See image for the proper camera board orientation, so the video is not sideways or upside down.<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Installing the Camera in the Housing ==<br />
[[File:camerainhousing.jpg|thumb|right|Camera In Housing]]<br />
<br />
* Remove the plastic plate from inside the housing and discard it.<br />
<br />
* Fit the camera on its metal plate into the housing, as close to the front glass as you can get it without actually touching. A few millimetres away should be good. <br />
<br />
* Looking at the camera from the rear, attach the largest connector (often with blue/green wires) to the right hand socket. <br />
<br />
* Attach the power connector to the left hand socket. This connector has several pins but only two are connected (red/black).<br />
<br />
* The third connector (two pins, red/black) is for a powered lens and is not used so tape it back out of the way.<br />
<br />
* Once you've secured the camera in position, you can tighten up the cable glands. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Testing and Focusing =<br />
At this point, your camera must be tested and focused. There's no point sealing up the housing and screwing it to the wall if its not working or isn't focused ! <br />
<br />
== Testing the Camera ==<br />
* If your camera came with a single PoE cable, connect this to a netork cable and plug the other end of the network cable into your PoE injector. <br />
<br />
* if your camera came with a cable with separate network and power sockets, plug the "output" PoE adapter into the camera cable and plug a network cable into the PoE adapter, then connect the other end of the network cable into the other PoE adapter.<br />
*. Connect the PoE adapter or injector into a spare socket on your home router and connect the camera power supply to it.<br />
<br />
The Camera PoE cable lights should come on, indicating traffic is flowing. After a few seconds, it should steady down to irregular flashing. If you don't see flashing lights then check the cable connections to make sure everything is plugged in properly.<br />
<br />
=== Find its IP Address ===<br />
[[File:ip-scan.jpg|thumb|right|Finding the Camera Address]]<br />
The camera should now appear as a device on your network and to test it properly you will need to find its IP Address. The easiest way to do this is using a free piece of software called [[https://www.advanced-ip-scanner.com/|Advanced IP Scanner]]. Download and run it (no need to install). Click "Scan" and wait till it finishes. The camera can usually be identified by Manufacturer 'ICP Internet Communications' or 'Motion Control Systems' (see screenshot - i have five cameras!). If none of the names look right you may need to experiment by trying to connect.<br />
<br />
=== Checking the Connection ===<br />
[[File:vlcconfig.jpg|thumb|right|VLC Network Stream]]<br />
* Once you have the IP Address, open VLC on your Pi, Mac or Windows machine, and from the "Media" menu, select "Open Network Stream". <br />
<br />
* Enter the following into the address box, replacing '''1.2.3.4''' with the address you got in the previous step<br />
<br />
<blockquote>rtsp://'''1.2.3.4''':554/user=admin&password=&channel=1&stream=0.sdp</blockquote><br />
<br />
* After a second or two, you should get a view through the camera. If nothing comes up, check you have got the right IP address, and that the cables are secure. <br />
<br />
* You can now double-check that you installed the camera the right way up...<br />
<br />
* Note that its entirely normal for the image to be very red and overexposed in daylight. We've removed the IR Block filter, so the camera picks up a lot of red light. This is exactly what we want. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Checking for Obstructions ==<br />
[[File:vlcview.jpg|thumb|right|Obstructions]]<br />
* You should also close the housing case up and check if it can be seen obstructing the view anywhere. <br />
<br />
* Move the camera around on the mount to minimise the obstructions, and if necessary bend or tilt the bracket to angle the camera down a bit. <br />
<br />
* However, don't worry if you can't eliminate all obstructions. Later on you will create a software mask to prevent these areas causing false detections. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Focusing the Camera ==<br />
<br />
There's a whole separate section of the Wiki on [[Focusing_your_camera|focusing]], but here's the short version !!<br />
* connect the camera to your network as above.<br />
* Open VLC.<br />
* Aim the camera at something at around 30-50 metres away. <br />
* Screw the lens in and out slowly to get best focus. <br />
<br />
Note that there's a short lag due to the network, so you should wait a second or two after each adjustment to allow the change to be reflected in VLC.<br />
<br />
Important note: if your camera came with an electronic filter, and you have left the 'daytime' filter in place, you MUST finalise focus at night. The filters slightly alter focus, so the daytime view is not focused when the nighttime view is!. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
== Setting Camera Parameters ==<br />
To operate at night, the camera must be reset to the correct gain, colour mode and video mode. There are two ways you can do this:<br />
<br />
=== Using the CMS Software ===<br />
CMS is a security camera software package you can [https://learncctv.com/download-cms-software/ download] from the internet. You can use the CMS software as explained in [https://www.youtube.com/watch?v=N2sq1hBwcAA this] video by Denis Vida. <br />
Note however that you should reset the network as the LAST thing you do. The video does it a bit soon.<br />
<br />
=== Using the RMS software (only for Pi4 systems) ===<br />
[[File:Ping-camera.JPG|thumb|right|Making sure the Pi can see the Camera]]<br />
<br />
* If not using the pre-built image, install RMS on the Pi as explained [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].<br />
<br />
* Open a Terminal window on the Pi and, using the address of your camera, first make sure the Pi can ping the camera:<br />
<pre>ping a.b.c.d</pre><br />
<br />
* Run this script to reset the camera IP address. You will lose connection to the camera and see a bunch of error messages. Thats normal.<br />
<pre> python -m Utils.SetCameraAddress a.b.c.d 192.168.42.10</pre><br />
<br />
* Now plug the camera directly into the Pi's ethernet port and run the following script to update the camera gain, video mode, and other settings. <br />
[[File:Setting-camer-params.JPG|thumb|right|Setting Camera Params]]<br />
<pre>Scripts/RMS_SetCameraParams.sh</pre><br />
<br />
* Note: If you have RMS installed on your PC, you can change the camera address from your PC instead, then connect it to the Pi and run the 2nd script. <br />
<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
<br />
= Final Steps = <br />
== Sealing the Housing ==<br />
[[File:sealedhousing.jpg|thumb|right|Sealing the Housing]]<br />
Depending on your climate, its usually advisable to seal up the camera housing against rain and snow. <br />
<br />
From the outside, carefully go round the edge of the glass with silicone sealant. Also squirt sealant into any screw holes visible on the front of the camera housing, where it will be most exposed to rain. <br />
<br />
But DONT seal up the hinged door because you will occasionally need to maintain the camera, and you don't want to have to prise it open with a chisel!<br />
</td></tr></table><br />
<br />
<table><tr><td><br />
== Mounting Outside ==<br />
Mount the camera somewhere with a good view of the sky and without too many 'terrestrial' obstructions such as trees, hills and buildings. Take special care to angle well away from security lights. These lights emit infrared and without the IR Block filter, the IMX cameras are extremely sensitive to this. <br />
<br />
When locating the camera, bear in mind that you will need to be able to get to the camera to maintain it. The cameras do not need to be high up as long as they have a good view of the sky. Mine are at eye-level on my observatory shed. <br />
<br />
As before, don't worry if its not practical to eliminate all obstructions as you can mask off any that can't be avoided. <br />
<br />
=== Aiming the Camera ===<br />
[[file:cameraview.jpg|thumb|right|Aiming the Camera]]<br />
The cameras have a field of about 40-45 degrees vertically and 90 degrees horizontally so angle the camera upwards at between 35-45 degrees, higher if you have lots of nearby hills or trees. This should maximise meteor detection. <br />
<br />
If you can arrange so that the camera view overlaps with other RMS users, thats even better. Check with the network to get an idea of a good direction.<br />
<br />
In this photo, the camera is aimed up at about 40 degrees, just above the top of the hill behind the camera location. The parts of the hill that are visible will be masked off in the software to avoid 'meteor-wrongs' due to dog-walkers with head torches! <br />
</td></tr></table><br />
<br />
= Thats it! =<br />
Once the camera is installed, connect up the PoE adapter, attach a long network cable and run it to wherever you are going to keep the Raspberry Pi. Remember to ask permission before drilling holes in the walls... :)<br />
<br />
<br />
= Now install the Software =<br />
Now you can finish configuring the Raspberry Pi by installing a prebuilt image. This is covered in a separate guide [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#RMS_Software_Installation here].</div>Markmcintyre