TeslaBoard
Ascom Alpaca Dome Switch coverCalibrator control with a ESP32
Install / Use
/learn @StefanoTesla/TeslaBoardREADME
Ascom Alpacha Switch, Dome, CoverCalibrator Board ESP32
Do you have a remote observatory? This board is made for you! The Ascom-compatible WiFi board using the Alpaca protocol is here!
Main Feature:
- Dome controller (Only R.O.R)
- Switch Controller
- CoverCalibration (flat frame)
Each device is recognized by Ascom via the Alpaca protocol, with no need for USB connection or drivers, just WiFi!
A USB cable is only required for the first software upload; after that, a WiFi Manager will help you connect the board to your WiFi network (this board cannot be used as an access point).
- Automatic WiFi reconnection in case of disconnection (e.g., after a router reboot).
- OTA updates allow firmware updates without cables.
Dome
Dome support only R.O.R. type.
You can use a normal gate board or two realy to provide open and close functions.
If you have a gate board, you don't have to do nothing. If you have two realy to command a motor directly, you need to do some steps:
- Open main.cpp
- comment the line
#define GATE_BOARDadding two \ before;
Open the directory
The board provide the signals:
- Move (open/close)
- Halt And need back the shutter state:
- Open
- Close
Features:
- Since gate boards do not have directional feedback, if the roof moves in the wrong direction, the board will detect it and send a correction command.
- You can enable an automatic closing system, which will close the roof if there is no communication between the board and Ascom or the PC (you can set the timeout duration).
- Automatic fault detection if the movement doesn’t complete within a set time (you can configure the timeout in seconds).
Switch
You can configure up to 16 Switch which can be: -Gauges -Switch -PWM signal -Analog Input
A configuration page with validation is provided, so you don’t need to manually modify the software! :D
[!IMPORTANT] You can't use a Switch Output for more device, ex pwm output as switch can't be the same for CoverCalibrator
[!IMPORTANT] At the state of art, this board work only with PNP relay boards or any things you want, the reason is to be sure that command will be executed when you decide, using NPN board will bring you in strange problem (ex: with NPN realy board, if ESP32 is borken, your ralay will be activated)
CoverCalibration (aka Automatic Flat Panel)
You can have a PWM signlat to handle a mofset to encrease or decrease the flat panel brightness, for a bettere experience (avoid led flickering) you can command a led power supply with the PWM or a mofset The CoverCalibrator is a must have to have perfect flat frame!
Tested with
- Voyager
- N.I.N.A
- Sequence Generator Pro
Changelog
💥 3.0.0 - BREACKING NEWS! Now switch, calibrator and dome are modules, if you don't plan to use it, you can disable it!, the web page and the discovery will hide it for you. Also pin validation during the setup is better now If you don't use a module you can comment the respective row at the beginning of the main.cpp:
#define DOME
#define SWITCH
#define COVERC
You don't use the dome?
\\#define DOME
#define SWITCH
#define COVERC
2.0.0 - Now all the board can be setupped by the browser. Dome I/O and Switch setting is now editable from the browser and you can save the confi files. Before update write in a memo all your setting. Web pages run now alpine.js and all the js under the hood is rewrited in a modern way. Now Dome and switch are in the same page, olso settings now are in the same page! New dome function: Auto Close if anyone is talking with the board (browser or ascom alpacha driver) [IS UNDER DEVELOPMENT], you can enable or disable this featur by browser setup page.
ToDo List:
- Make Web Pages Translatable
How to use
First time board installation
First of all we need to install Visual Studio Code and add Platformio extension.
Download Visual Studio Code from: https://code.visualstudio.com/
Install it.
One installation is finish, Go to Extension and search Platformio, then install it.
And wait until restart vs code is needed:
At this point, download the software from this page, go up click on Code and click on Download Zip
Extact the folder where you want, BE CAREFUL, don't extract the files inside the folder! extract directly the folder!
Go to VsCode and click on the Platformio Icon, click on Pick a Folder and select the extracted folder
At this point wait platformio will download all the necessary things needed to make the board work:
Once is finish on the right you will have this menu:
Click build and wait until you will not have this message:
Now we are ready to upload the firmware!
If it is your first time connecting an esp32 to the pc you need to install serial driver depending on your bard serial chip:
CH340 driver: https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all (download at the buttom of the page) CP210x driver: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
(check the video on the CH340 page to see wich COM port is used by your device)
Connect your esp32 board to a usb port On the menu we seen before we need to click:
Upload Filesystem Image
After some while the board will rebot.
Now we need to click on Upload
Wait for success printed out.
Connect the board to your own wifi
If is your first time setup, you need to connct the board to your wifi, don't check into the code, the board will manage everything for you! Open your WiFi and you will have TeslaBoard wifi, connect to him
Open a brwoser and type http://192.168.4.1, once the portal is ready click on Configure Wifi
Click on your WiFi, type the password and click on save
In few seconds the board will be up and running, go to your route setting and check the board IP. From this moment, the board will try yo connect everytime to your wifi without asking nothing.
Using the board with Ascom driver.
First of all we need to install the last Ascom platform (version 6 or higher) from here: https://ascom-standards.org/Downloads/Index.htm
Not every software as ex. NINA, open the Ascom Device Selector, and the board cannot be founded, in this case we need to crate a new ascom dynamic driver:
Open ASCOM Diagnostic:
Click on Choose Device>Choose device to connect:
Select the device type:
This operation is needed for each device Dome,Switch,Cover Calibrator (you can skip the device you are not planning to use.
Click on Alpaca and then Enable Discovery
Once is green, open the list and you will see New Device:
Open the setting menu, and check the Manage conncetion as well:
Click OK and then OK again.
The board is ready to use! Go to your software (in my case N.I.N.A) and the device will appear:
Board web server
To acces to the Board page, type on your browser the IP of the board.
Home Page
Dome Section
From here we can see the state of our Dome cover and you can send Open Close or Halt commands.
Switch Section
.
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
