×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

INDI & Arduino

1 month 4 weeks ago
miksoft
Fresh Boarder
Fresh Boarder
Posts: 5
More
Topic Author
INDI & Arduino #55639
Hello everyone from Russia! I am new to this forum and am very glad that there is such a project as INDI. Thanks to him, we almost finished the construction of a robotic observatory. THANKS to INDI developers!

Now about the problem. It is necessary to make control of a self-made rolling roof through the indi_rolloff_dome driver (for example). Use Arduino as a controller with a relay that is connected via USB to the INDI server. I can’t find the driver documentation anywhere, or the protocol, or the examples.

Please help with an example of Arduino firmware for working with drivers:
- indi_rolloff_dome OR Talon6
- indi_snapcap

You are my last hope ...
Attachments:

Please Log in or Create an account to join the conversation.

1 month 4 weeks ago
knro
Administrator
Administrator
Posts: 8215
Karma: 51
INDI & Arduino #55640
Hello Mike & welcome to INDI forums.

So for INDI rolloff driver to work you need your Arduino to provide the following:
1. Open roof command.
2. Close roof command.
3. Open roof sensor (roof is fully opened).
4. Close roof sensor (roof is fully closed).

Do you have this already implemented?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You miksoft

Please Log in or Create an account to join the conversation.

1 month 4 weeks ago 1 month 4 weeks ago by miksoft.
miksoft
Fresh Boarder
Fresh Boarder
Posts: 5
More
Topic Author
INDI & Arduino #55648
Thank you very much for your reply!

Yes, I made a roof drive using a gearbox and a stepper motor. Now the roof is controlled by a remote control.

I wrote a program on Arduino + Ethernet W5100 + 2 relays. This program creates a web server where there are two buttons, they control the relays, which in turn close the contacts of the roof drive and the roof closes / opens. I want to make it controlled via INDI (for example, I saw in INDI the possibility of NOT closing the roof while the telescope is NOT parked).

The following commands are implemented:
1. Opening the roof
2. Closing the roof
3. Contact position sensor "ROOF CLOSED"
4. Contact position sensor "ROOF OPEN"

I don’t understand how INDI drivers (for example indi_rolloff_dome OR Talon6) send commands to the microcontroller (Arduino). For example on TTL port? Any text commands? For example, if I knew that the indi_rolloff_dome driver sends the OPEN command via the TTL port, I could easily accept it on Arduino and close the necessary relay.

Help understand what commands send drivers to the microcontroller?

Attachments:

Please Log in or Create an account to join the conversation.

1 month 4 weeks ago
wotalota
Gold Boarder
Gold Boarder
Posts: 176
More
INDI & Arduino #55655
I can offer: github.com/wotalota/indi-rolloffino.git as an example from which you can develop your own.
It is a INDI rolloff roof driver and includes two different implementations of Arduino programs communicating over
USB. It presently only works using USB, I have not looked into what it would take especially on the Arduino side to
support Ethernet. The driver is packaged as a third party driver except for the install directions being from the
perspective that it is not already included. I mean to ask Jasem if it can be included as an option.

See readme.txt for a brief overview of the protocol and INSTALL for build directions.
After the build you should be able to see the rolloffino as an option under Dome when you edit the EKos profile.
The driver works with the Observatory module and weather drivers as you would expect. I am presently using it with
the Vantage, WeatherMeta and WeatherProxy for a rain detector.

If you study the included rolloff.ino programs I think it will be straight forward to include the I/O interface into your own.
rolloff.ino.boutons written by forum member Christophe, maintains state and controls relays to stop roof movement
when end of travel is detected. rolloff.ino.ar1450 which I use relies on the stop built into an external motor controller.
Both will signal the fully opened/closed condition back to the driver.

Regards
Tom

Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
The following user(s) said Thank You knro, miksoft

Please Log in or Create an account to join the conversation.

1 month 4 weeks ago
miksoft
Fresh Boarder
Fresh Boarder
Posts: 5
More
Topic Author
INDI & Arduino #55702
Thank you so much! I think this is exactly what I needed. I will need to study and try for several days, then I will write about the result. Thank!

Please Log in or Create an account to join the conversation.

2 weeks 4 days ago
miksoft
Fresh Boarder
Fresh Boarder
Posts: 5
More
Topic Author
INDI & Arduino #57421
Thank you so much, everything worked out! I figured out how to write drivers and how INDI interacts with Arduino thanks to you! I wrote my own firmware for Arduino, because the algorithm of the roof is slightly different for me. Now, one of these days I will install the telescope parking sensors, limit switches for the roof position and I will install all of this. The main thing is that now everyone is working. Thank! When I finish, I'll post the photos and show the result.

Please Log in or Create an account to join the conversation.

2 weeks 3 days ago
wotalota
Gold Boarder
Gold Boarder
Posts: 176
More
INDI & Arduino #57448
Mike
Congratulations on getting it all figured out and working. When you update to KStars 3.4.3 and INDI 1.8.6 there will be an error from the roof driver. The roof driver build procedure will need to be repeated. I just made the correction today, it was using a routine which is no longer available to check for a weather alert before opening the roof. The watchdog driver now provides improved handling to protect the observatory against bad weather.
If you wish, I can add your Arduino sketch and any notes about the motor control you provide as another example in the git repository.

Regards
Tom
Tom

Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro

Please Log in or Create an account to join the conversation.

Time to create page: 0.405 seconds