Hubble Telescope With Polar Mount and ESPCAM

by luisferniño in Circuits > Cameras

2635 Views, 18 Favorites, 0 Comments

Hubble Telescope With Polar Mount and ESPCAM

FFCUMEMKUY3KA29.png
contra.png

This project is a camera telescope inspired by the Hubble telescope, it has a polar mount controlled with 2 servos to modify its direction and can be charged with solar panels or USB charger.

Supplies

1x ESPCAM with 160° extended camera

1x Lipo battery 3.7 V - 600mAh

2x Servomotors 

1x ESPCAM programer (you can also use an Arduino)

2x 5V Solar panels

1x M3 10mm screw

1x M3 15mm screw

12x Screws 2mm diameter by 8mm 

1x 3.7V lipo battery charger

2x 2mm by 10cm diameter rods 

3D printed parts

Silver and gold paint 

Hot Silicone 

Super Glue

Sandpaper 

Soldering iron 

Cutter

3D Printed

p1.png

Print with good resolution the parts of the telescope in a 3D printer, then use the sandpaper to file irregularities and have a smoother surface, also with the cutter remove excess plastic.

Print:

ACO x1

BASE x1

BODY x1

CAMSUP x1

PANELB x2

MOUNT x1

OPTICALTUBE x1

Painting

p2.png

Paint the two pieces of the telescope body silver, you can use vinyl or spray paint, with gold nail polish paint the mount and carefully paint the details of the telescope body, also paint the servo cable that will go on the base.

Base

p3.png

Screw the servo motor to the base and cut the cable, pass it as shown in the figure through the base and the mount, and then screw the mount to the servo. The cable has enough space to move freely between -90° to 90°.

Is important to set the two servomotors angles to 90° before screw them.

Solar Panels

p4.png

Hot glue the brackets to the solar panels, solder the wires and pass them through the middle hole, then pass the metal rods through the two holes at the ends of the optical tube as shown in the picture and pass these rods through the holes at the ends of the brackets. Then pass the panel wires through the holes in the middle of the optical tube and tape the inside of the bars to prevent short circuits.

ESPCAM Considerations

PINOUT.png

The ESP32 has multiple GPIOs but some of them have specific functions or assigned especially at the time of power on, so you have to be careful when choosing the pins, to control the servos select the GPIO015 and GPIO16. If you want to know more about the GPIO functions and which ones you can use, I recommend the following video: https://www.youtube.com/watch?v=LY-1DHTxRAk&t=179s&ab_channel=AndreasSpiess

Circuit Connections

p5.png
SCHEMATIC.png

Solder the wires from the solar panels to the input of the charger with a diode as shown in the schematic picture, solder to the output a connector for the battery and in parallel a wire to power the ESPCAM and the servos.

To extend the servo shaft, screw the printed part as shown in the figure, then put the screws on the ends of the mount and screw them until they are level with the inside of the telescope body.

With the screws in place put Super Glue on the inside of the servo shaft and on the part of the screw that remains to be inserted, then quickly insert the servo motor into the telescope body and align its shaft with the screw and tighten with the screwdriver until they are fixed, finally strip the servo wires from the base and pass them through the hole in the bottom of the body.

Charger Location and Wires Conection

p6.png

Hot glue the charger to the base and make sure the USB connector is aligned with the hole on the back of the body, then apply more hot glue to secure it. 

Remove the servo female connectors from their black cover and solder the positive and negative wires together, solder one of the connectors from the wire you cut to the orange servo terminal on the base, then cover them with thermofit and you will have one positive, one negative and two connectors for the servo signals as shown in the figure.

Code

To program the ESPCAM we will use the Arduino IDE, we must have installed the ESP board manager and the "ESP32Servo" library by Kevin Harrington. In the board manager select "AI Thinker ESP32-CAM" and load the code "Hubble.ino".

In this code the camera parameters are configured and a Web page is run where the stream is transmitted and the position of the servomotors is controlled by 4 buttons.

Downloads

ESPCAM Programming

PROG.png

Connect the ESPCAM as shown in the schematic, you can use a TTL programmer or an arduino in reset mode (RST-->GND), don't forget to set GPIO00 to GND when programming and remove it when you have uploaded the program. Finally restart the ESPCAM to run the program and check on the serial monitor the link where the webApp will be available with the streamming, your WiFi router will give you a local IP, if you want to be able to access your camera from anywhere in the world you can configure your router to assign you a public IP, the process varies depending on the model you have. Also if you want your camera to be isolated from the internet you can configure the ESPCAM as AccessPoint and access from your cell phone to the new private network.

Final Assembly

p7.png

Connect the battery and put it under the servo in the telescope body, pass the cables over the bars inside the optical tube as shown in the figure, join the body with the tube and screw the two parts together. 

Connect the wires to the ESPCAM and bend the terminals inwards a bit so that they can better fit inside the tube, insert the ESPCAM into the tube leaving the antenna close to the cover and insert the other wires well. 

Insert the cover aligning the guides of the cover as shown in the figure, press until you reach the locks that stop it and screw it on.

Final View

final.png

Finally you will have a telescope-camera to monitor the place you prefer, do not forget that the more sunlight it receives the more autonomy the battery will have.

Tests

CAM.png

Here you can see some Streamming screenshots, part of the distortion and the small horizontal lines are due to the fact that we are powering the ESPCAM with a 1 cell battery (4.2-3.7[V]), but powering with a voltage of 5.5-7[V] we will get a better image. These fixes will be available in the second version, also with a better graphical interface for the WebbApp.