Overview - florindumitrescu94/DashBoard_PowerBox_V3 GitHub Wiki
Project description
Abstract
The is the evolution of the DashBoard PowerBox V2 project (my other repo). Based on my personal observations, as well as others' suggestions, I've improved the design and functionality of this power box, by having control over each port separately (1 2 and 3 are separate, 4 and 5 are linked), an Always-On port, two optocouplers to control external equipment, a dedicated Control Center app, outside of NINA/APT and sensorless PWM automation, with different levels of aggresiveness for each PWM port.
This project was born out of the need to automate my astrophotography sessions At the end of the night, I did not want to leave everything running (mount, dew heaters, camera, etc) and have them shut down as soon as the sequence in NINA ends.
This would require an ASCOM connected power box, capable of switching power outputs on and off and control two PWM outputs for my dew heaters. I also wanted to be able to remotely monitor outside temperature and humidity, as well as the power usage of my setup. Lastly, since I would already get the outside temperature and dew point, I wanted to also automate the power delivery to my dew heaters by monitoring their temperature and adjusting the power automatically, so that the dew heaters stay just a few degrees above the dew point.
I have built this device around an Arduino Nano board, since it is easy to source, has a low price point and has an adequate number of GPIO pins, both digital and analog.
Requirements
If you want to follow these instructions and create your own power box, you will need some skills and knowledge, in order to build and/or alter it to your needs.
-Reading schematics
-Soldering
-PCB Etching and drilling (if diy)
-3D printing (if diy)
-Circuit measurements and diagnostics
-Software debugging
-Arduino programming
-C# (if you wish to modify the driver)
You will also need the following tools:
-Soldering iron
-3D printer (if you wish to build the box from the models provided)
-Laser printer, transfer paper, etching solution and dremmel tool (if you wish to make the PCB yourself)
-ESD safe tweezers
-Flush cutter
-Hobby knife or box cutter
-Electronics vise (usefull to have)
-Pliers
-Drill and drillbits
Also, the following software will be required:
-ASCOM Platform ASCOM
-Arduino IDE Arduino IDE
-Visual Studio (if you want to modify the driver)
-An astrophotography software capable of using Switch devices (like N.I.N.A
Block Diagram
The astrophotography software can connect and communicate with the power box device via an ASCOM driver. Inside this driver, we connect to the Arduino via a COM port, then communicate with the microcontroller through Serial commands. The commands are embedded in the driver and Arduino code.
The astrophotography software will send certain commands to the driver, which, in turn, will send back the response to those commands.
For example, let's take the action of turning the DC Jacks on:
NINA will send SetSwitch(0,1) to the ASCOM Driver. When receiving this command, it will run the SetSwitch function with the given parameters.
In our case, the function will send "SETDC1_1#" to the Arduino via serial. Once received by the Arduino, it will trigger the SET_DC_JACKS function. This function will set the variable DC1 to 1, then set the corresponding digital pin to high.
In order for the action to be complete, the Arduino must respond back to the driver with the current state. So, we send the DC_JACK_STATE via serial to the computer. Once received, the driver completes the function and sets the UI switch in NINA to "ON". We will not go in depth about how the ASCOM drivers are built, but we now have an idea about what each step of the process expects to happen.