Sunday 26 January 2014

Instrumented Telescope with Raspberry Pi and orientation sensor

A "Push To" telescope mount is like a fully automated "Go To" telescope mount, but without the motors. You must manually move the telescope, but because the telescope knows where it is pointed, you get live tracking telling you where it needs to go.

I'm using a Raspberry Pi with a GY-80 orientation sensor to turn my basic SkyWatcher EQ2 mount into a computer assisted "Push To" telescope - which can pass this information to planetarium software like SkySafari on my iPad/iPhone. To do this I've written a little Python script (telescope_server.py) which runs on the Raspberry Pi, and translates the orientation sensor information into RA/Dec angles. The Raspberry Pi listens to Meade LX200 (or Nexstar) serial protocol commands received over TCP/IP, and responds with the orientation information.
SkySafari Plus v4, showing telescope direction from a Raspberry Pi

Indoor testing has gone well so far... I can rotate the Raspberry Pi and watch the blue cross-hairs on SkySafari change position. The locations look sensible (and drift naturally due to sidereal rotation). There is a bit of jitter which may need some smoothing.

Part of the idea came from reading how easy it is to have SkySafari talking to telescope via a Raspberry Pi running a WiFi to serial port bridge (similar blog post), mimicking SkySafari's expensive but neat SkyFi box. I was also impressed with Simon Box's instrumented Dobsonian telescope (measuring altitude-azimuth angles directly) connected to Stellarium (Update: and this similar instrumented telescope project called scopebox), and Leon Rozengarten's project building an Arduino telescope controller using the HMC6352 and ADXL345 sensors (videocode).

This project meant integrating lots of different stuff - serial communication protocols, I2C sensor chips, Inertial measurement unit (IMU) / Attitude and heading reference system (AHRS) calculations, quaternion mathematics for rotations, sidereal time, angle conversions, etc. Here are a few notes... my Python script telescope_server.py is on GitHub.

Friday 10 January 2014

GY-80 orientation sensor on a Raspberry Pi

As I don't yet have a "Goto Mount" for my telescope, I've spent a frustrating amount of time trying and failing to find objects of interest by star hopping. Perhaps I just need more practice, but if accurate enough, an orientation sensor might give me a shortcut by telling me where my telescope is pointing? (Update - see next blog post.)

There are plenty of guides from people using I2C interface sensors from a Raspberry Pi, so this seemed worth a try. I bought a GY-80 on eBay for £7.50 shipped from China.
GY-80 sensor attached to Raspberry Pi
The GY-80 is tiny, only about 27x17mm in size, and has following I2C sensors:
  • HMC5883L (3-Axis Digital Compass), I2C Address 0x1E, datasheet
  • ADXL345 (3-Axis Digital Accelerometer), I2C Address 0x53, datasheet
  • L3G4200D (3-Axis Angular Rate Sensor / Gyro), I2C Address 0x69, datasheet
  • BMP085 (Barometric Pressure / Temperature Sensor), I2C Address 0x77, data sheet
Buying an all-in-one unit may allow a more accurate orientation sensor, but I was also intrigued if the digital compass would be helpful for polar alignment of my equatorial telescope mount?

Wednesday 8 January 2014

A Japanese-style kotatsu made in Scotland

Traditional Japanese wooden houses don't have central heating - instead some rooms have air conditioning (イアコン), the toilet seat is usually heated, while the living room often has a kotatsu heated table (炬燵, こたつ). Modern kotatsu heaters are compact electrical units mounted on the underside of a low table, which is then covered with a quilt hanging down to the floor to trap the heat. Family life in winter is centred on the kotatsu, for watching TV, eating dinner, etc - with everyone sat round the table with their legs and lower body nicely warm.

A kotatsu heater is probably my best souvenir purchase from Japan to date. The heaters are small enough to bring back in a suitcase (unlike a complete kotatsu table unit), maybe even in hand luggage? To create a kotatsu here in Scotland I've attached the heater to an Ikea LACK coffee table, and added a large duvet and voltage transformer:

The kotatsu is a welcome addition to the traditional stone-built Scottish cottage where we live, which is hard to get warm in winter - despite retro-fitted central heating with radiators. If this winter gets really cold, we'll move the kotatsu in front of the open fire place...