-
Notifications
You must be signed in to change notification settings - Fork 0
Block Diagram

The astrophotography software communicates with the Arduino through the ASCOM driver. The ASCOM driver communicates with the astrophotography software via Get/Set commands or functions (we will expand later). The ASCOM driver communicates with the Arduino via serial commands.
Example: When NINA wants to know the state of a switch, it will send a GetSwitch(id) command to the Switch device through the driver. In this driver, this command will run the GetSwitch(id) function. In our code, this function will send the serial command "GETSTATUSDCJACK#" to the Arduino via the USB cable, then switch the driver into serial "listening" mode. In our arduino code, we have created the following condition: If the "GETSTATUSDCJACK" command is received, the Arduino will send the state of the DC Jacks switch (1 or 0) thorugh a Serial message. The driver will receive this command and the function ends and returns True or False to NINA, which, in turn, will set the UI switch to the corresponding value.
It is up to the ASCOM driver developer to write whatever they want to do inside this GetSwitch(id) function, as long as it returns True or False. For other functions/commands, we will see that the parameters are different.

The Arduino is the layer that translates the software commands into electrical events.
The green lines represent connectsion between the digital pins of the Arduino Nano board and the input/output pins of different modules.
The orange lines represent the connection between the analog pins of the Arduino Nano board and the output of the voltage and current sensing modules.
The red line is the 12 V supply that comes through the input DC jack, passes through the voltage and current sensing modules, then gets distributed to the two N-MOSFETs for PWM output and the relay or two P-MOSFETs for the 4 DC output jacks.
The blue line represents the 5V some of these modules need in order to run. For the Relay/Mosfet section, the 5V is needed only if a 5V relay is used. If a P-MOSFET, or a 12V relay is used, this connection is no longer necessary.