IoT Developer's Studio: Stargazing

IoT Developer's Studio: Stargazing

Automating my observatory

I have an observatory that is primarily used for imaging (http://www.astrobin.com/users/manojkoushik/) that is powered by Particle. There are 5 photons used for the automation. One monitors weather conditions (rain, clouds, and sky quality through FWHM measurements etc.), two control power, and two control the dome (one for dome rotation and the other for dome slit automation and azimuth measurement).

observatory1-5bbecb.JPG

Power control

As you can see in the image below, there are a lot of wires and equipment. The red light and Photon in the photo is a master power controller through 30 amp relays. These high-amperage relays control the cameras in the observatory. The cameras are very high-amperage because the cameras are scientific and require multistage cooling to -20 or -25°c for thermal noise control. A photon controls the power to all equipment groups — dome, mount, scopes, weather station, and an AC unit.

observatory2-8fdf92.JPG

Climate control

The observatory contains sensitive, expensive equipment and requires climate control for California’s 100F+ days. If the temperature inside gets too hot, there’s risk of equipment failure. To address this, I’ve put in a climate control system. A simple temp probe is used by the photon to control the AC through a relay.

To further save energy, I am currently working on a staged temperature control inside the observatory. If the temperature is moderately high, the dome is vented by partially opening the upper shutter. If it hits a higher temperature threshold, the venting is stopped by closing upper shutter, and the AC is turned on.

There are additional safety controls so the vent only opens if the weather station (with another Photon, a weather shield and various other sensors like MLX90614 and TSL237) reports that it it is safe to open. The weather station is controlled by a ShutterController Photon. This uses a motor shield to operate a brushed DC motor on the upper shutter and linear actuators on the lower shutter. It also controls the sequence of opening and closing the shutters, using limit switches to determine when they are open or closed.

Imaging control

There is a second photon on the mount that controls a set of 30amp relays that power the equipment on the scope used for imaging (ie. cameras, angle Rotators, focusers, filter wheels, flat fielders etc.). Also, the sequencing of equipment power is controlled.

observatory3-f810fa.JPG

My rig carries multiple imaging trains on it, but I only use one of them at a time. The photon allows me to automate which train is turned on, ensuring that it will be turned on in the right sequence.

Weather station

Along with a weather shield (which allows temp, humidity, pressure, rain and wind measurements), I also use a MLX90614 IR temp probe and Hydreon RG-11 sensor. The sensors detect ambient conditions for tabulation and later analysis. They also trigger an automatic shutdown and closure of the observatory when unsafe conditions are present.

The RG11 is used to detect rain and the Photon helps to measure the cloud cover.

There are two temperature sensors on the Photon; the first one is on the weather shield and the second one is the MLX90614, which is a contactless IR temp probe.

When we measure the temperature of the sky (point MLX90614 straight up) and the ambient temperature, the difference between the two (after some calibration) will determine the cloud coverage. I am using a 50 degree FOV version of the MLX so I can measure a large patch of the sky. Triggers are fired by the photon for various cloud coverage percentages, so appropriate actions can be taken by the imaging software. Similar triggers exist for rain, wind speeds, temperature, lux levels etc.

All of the interaction between Photons and the astronomy software happens through standard interface called ASCOM. The drivers needed for this are the hardest part of the project. The ASCOM driver presents a standard interface to connect this software to the Photons. This will either read data (ie.“is it raining?”) or take action (ie. “close up the observatory,” “shutdown equipment” or “park everything to predetermined positions”).

Dome control (Work in progress):

The two photons controlling the dome are primarily motor drivers driving brushed DC motors or linear actuators to rotate the dome or open the dome slit. It is important to position the dome so the scope can see out of the slit. This is controlled by the two photons. One is stationary, mounted on the wall, controlling the rotation of the dome. Another is mobile, attached to the dome roof and controls the slit operation and measures the dome position. Power is supplied through a solar panel attached to the dome. The Shutter controller photon uses a 6DOF sensor (LSM303DLHC) to get a tilt compensated compass heading. This is then offset with the magnetic declination to get the true azimuth of the dome slit.

Now, I have a fully automated system. I can fire off scripts to start a full night of imaging with automatic protections in place if things go south weather-wise. If I want to image the Orion Nebula, I fire off a script which turns on all the right equipment, moves the dome and the scope, and starts imaging. Once the session is done, it powers everything down and sets it to safe state or position. It includes safety controls, so if it starts to rain at 3 o’clock in the morning, it will shut automatically. It’s unattended automation and unattended equipment.

It can also send me a notification on my phone, saying, “Hey something went wrong.” Because the photon has an IFTTT integration, I can monitor for variables that I publish. Some of the code can be found at https://github.com/manojkoushik/

Manoj Koushik's Picture

About Manoj Koushik

Wide ranging experience in the systems, web services and SAAS spaces, both as an individual contributor and as a leader.

Palo Alto, CA tw33tingmanoj

Comments