Showing posts with label hardware. Show all posts
Showing posts with label hardware. Show all posts

Friday, June 1, 2012

Controling Devices With JSON

RTS2 has an XMLRPC which also supports JSON. This make it very easy to poll and control devices external of the driver. Here is a simple example of controlling the Tban fan controller based on temperature difference between inside the dome and the outside ambient temperature.




from rts2json import jsonProxy, createJsonServer 
import socket
import xmlrpclib
import json
import httplib

#connect to server
createJsonServer('localhost:8889','','')

#get temps from devices
externalTemp = jsonProxy().getValue('S0','TEMP_AMB')
internalTemp = jsonProxy().getValue('S2','DS1')

#calc the difference
diffTemp = internalTemp - externalTemp

#set the fan speed based on rules
if diffTemp < 0:
    jsonProxy().setValue('S2','MFanCon',0)

elif diffTemp > 7:
    jsonProxy().setValue('S2','MFanCon',3)

elif diffTemp > 4:
    jsonProxy().setValue('S2','MFanCon',2)

elif diffTemp > 0:
    jsonProxy().setValue('S2','MFanCon',1)

The rts2json is in the RTS2 repo. Simply connect via a JSON proxy and get and set values of devices. The script is set to a 15 minute cron and adjust fans speeds accordingly.

Wednesday, February 8, 2012

First light....

Last Monday we finally got first images running through RTS2. The only missing part of the image acquisition is automatic focusing. Focuser still needs testing which we will probably get to end of this week.

Our Proof

Though this is quite a milestone there is still loads of work left to do. There are several software pieces that need work before BORAT can really achieve a primitive autonomous state.

Tuesday, February 7, 2012

Flood Lights


So far the surveillance/security system is coming along smoothly. We finished setting up a Bluecherry BC-H16480A capture card (16 ports!) and hooked up the flood lights. They're impressively bright and can be toggled with the web switch (I need to buy one of these for home).

Now, we just need to finish writing the Arduino driver to talk to RTS2 and hook it all up to the main building's security system. We need to figure out the logic and what constitutes an alarm or just a warning, as well as calibrate the PIR sensors.

Here's a pano view of the new floodlights:
Lee was moving around, but it still turned out OK

Dome in Motion



Lee closes up the dome after we finished some testing.

Monday, September 26, 2011

Problems of 9/25/2011

Got a lot accomplished since last list but as usual more problems creep up over time.

Software
  • Focus driver - implementing in RTS2 - DONE
  • AstroHaven dome driver needs update to stop spamming error messages and to add feedback from new dome control hardware
  • TBan driver needs code to handle when device is not there rather than spam messages - DONE
  • Add user friendly GUI to control primitive features of the system
  • Possibly add Android app interface/add
Hardware
  • Ordered another Webswitch, they are so cool - DONE
  • Mount Telescope and pier - DONE
  • Buy cabling management for inside of dome
  • Repair crack in AstroHaven Dome
  • Still need to spec out computer capable of extreme temperatures. Computer still needs to have PCI slots and serial ports. Don't want to use USB<->Serial
  • Draw a plan for UPS during extreme temps - put off
  • Add lens heater on LX200GPS to reduce night dew.
  • Corrosion on BigNG board - ordered new one - DONE

Wednesday, August 17, 2011

The Instrument

Our system will be using an instrument composed of a custom focuser, filterwheel, and CCD. These pieces must be assembled each time we attach it to the telescope. When the security system matures and we have the fence installed we will be able to leave it at the site in one piece.

The focusing device is essentially two motors on a specially constructed piece of metal to operate the telescope's focus knobs. It's in the upper right of the photo.

The filterwheel is a USB Apogee AFW50-9R. It takes 50mm round filters (we have U, V, B, R, and I). The driver had to be tweaked a bit but now it works well in RTS2.

Our CCD is an Apogee Alta U47. For all the details you can see their official specs here. We have three of these devices at our observatory and use them in several projects. We're currently having some issues with the RTS2 integration (some binning issues) but expect to have it sorted out soon. 

The actual assembly of this instrument takes about 15 minutes to an hour, depending the experience of the person doing the assembly. It takes a total of 5 different hex wrenches to complete! The CCD connects to a mounting plate and then to the filterwheel. The filterwheel is screwed into an adaptor plate and this is bolted to the focus ring. After this, all you have to do is carefully screw it onto the back of the telescope and attach the cables and belts. I personally can't wait until we can put everything together and leave it at the observatory.

The completed instrument with all the rings and equipment connected weighs about 10 pounds. Our counter weight system only went to 6 pounds and this proved to be a problem when it comes to tracking on the Meade forkmount. That is a problem for another post, though!