Flat box question

As I understand it, only Alnitak flat boxes are supported by SGP and there is no ASCOM standard for flat boxes. I have a flat panel that works very well for me and is a tiny fraction of the cost of an Alnitak box, which is appreciable since I have a 14" scope. What I would like to do is build an Arduino-based controller for my flat panel that would consist simply of on/off and brightness settings. I have my “park” position set such that the scope points directly at the flat panel and I would like it to simulate an Alnitak controller so SGP can control it remotely. I am assuming that SGP uses a serial command set to communicate with the Alnitak boxes, but I have no idea what that command set is. Does anyone know?

Thanks.

Tim

1 Like

You can find the “Flip-Flat and Flat-Man Generic Commands” right there: http://www.optecinc.com/astronomy/catalog/alnitak/resources/Alnitak_GenericCommandsR3.pdf

I created an arduino implementation of this a while back. You can find it here:

Thanks,
Jared

Perfect. Thanks, guys.

Tim

I just thought I would follow up on this. I took this panel:

I bypassed the control circuitry, took an Arduino Uno I had lying around, loaded Jared’s code, and output the PWM pin through a transistor, and I now have a flat panel big enough for my Edge 14 that SGP can control for about 1/10 the price of a Flat-Man XL.

It works beautifully. One more step toward fully-remote imaging!

Tim

Hi,

I hope Jerad can take a look at the new https://www.optecinc.com/astronomy/catalog/alnitak/resources/Alnitak_GenericCommandsR4.pdf command. The arduino firmware that Jerad created can’t connect to SGpro anymore.

Thanks.

Hi Tomastro & Jared,

Welcome Tomastro to the group.

Jared,
Having just constructed a prototype flats panel using your Alnitak code in an Arduino I’ve just experienced the same problem.
Testing the code using the Serial Monitor shows, as I’d expect, that using either the ‘\n’ or ‘\r’ codes duly returns the expected response from the Arduino, thus emulating SGPro talking to an Alnitak panel.

When actually connecting to SGPro, however, the Arduino does not connect to what is for me COM5. Can you tell me whether or not I need any other s/w installed on the target PC first, e.g. one or more of the Alnitak drivers?

Thanks in anticipation

Dave,
Are you by chance using a Leonardo or arduino that utilizes the ATmega32u4? You’ll want to go with an Uno, or model that utilizes the ATmega328P, because of how the ATmega32u4 handles the serial connection.

Thank you,
Jared

Hi Jared,

Thanks for your swift response.

I’m using a genuine brand new Arduino Uno, and looking at the two main surface mounted chips, one reads: Atmel M328PU-CN, the other near the USB socket reads: Atmel Mega 16U2, so neither appear to match the chip you mention?

Does this mean I have to source an alternative Uno, assuming I can specify the chip usage needed during purchase, or is there additional code I can add to make this function as required? The editor I used was the default app from the official site version 1.8.10, if this is significant.

Cheers Dave

Dave,
Editor shouldn’t matter. Can you send me a link to the Arduino you’re using?

Thanks,
Jared

Hi Jared,

I purchased the surface mounted version, not by specific choice it’s just the one that I first found when searching, https://store.arduino.cc/arduino-uno-rev3-smd

Cheers,
Dave

Hi Jared,

Have you had any opportunity to look into this little anomaly as yet?

Thanks
Dave

Other than verifying it works with the Uno I have on hand, I have not. The main purpose of the Alnitak implementation is to interface with the actual FlipFlat devices. If it doesn’t break the actual FlipFlap usage I may make some changes which will allow the Leonardo to work and that also may address the issue that you’re having. But without having the same device it’s difficult to test.

Thanks,
Jared

Hi Jared,

Many thanks for your response, which is much appreciated. Correct me if I’m wrong but I’m using a Uno rather than Leonardo and apart from the main chip being surface mounted there would appear to be no other differences compared to the standard Uno, that has the long pug-in chip instead?

Indeed, it was from reading the posting of spokeshave from May '16, but it was not until I spotted tomatro’s more recent posting that my suspicions were aroused.

I readily profess to being new to the Arduino arena and thus would be very interested to hear from others that have successfully using similar LED panels and your code with respect to the model & version of Arduino being used.

Thanks

Hi Dave,
I have been using the UNO R3 Board with the ATmega328P chip with my flat panel since 2016 and it works wonderful. I use a LITENERGY 32.5 Inch Diagonal A2 Drawing Light Box I got off of Amazon. I use the Alnitak code that Jared posted a while back. I have it mounted on the wall of my little shed observatory. When the mount is parked, scope parallel to the ground, I’m able to take my flats. All I needed to do to the panel was to bypass the on/off switch and added a small wall power adapter. I run the panel at 9Vdc. It is very bright panel when using a 12Vdc source. The 9V source seems to give me the best control over the brightness levels in SPG.

Hope this helps,
Mark

Hi Mark,

Thanks for joining in, and offering your experiences of using this very handy project. I’m glad to know that it works so well as indeed this is what I’m hoping for myself.

I’m intrigued to know what’s different about the way I’m doing things that’s causing my issue. Accordingly, I hope you don’t mind my asking:

On your PC that hosts SGPro, did you install any additional software associated with the Arduino Uno, e.g. an Arduino USB drivers, any addition ASCOM s/w, the Arduino environment, any of Jared’s s/w over and above the ‘LEDLightBoxAlnitak.ino’ file from GitHub R3 or GitHub R4?

I took a guess and loaded the Arduino environment onto my observatory PC, and now seem to be able to connect to the USB, which I could not do beforehand. So one positive change there.

Once the circuit connects however I seem to be suffering undemanded variations in the panel brightness. This I’m guessing is due to the MOSFET being triggered via RF interference? I recall reading that this can happen, so I’ll have to re-read about that but I assume a capacitor will be needed somewhere.

Thanks for taking the time to respond to my enquiry and I look forward to hearing back from you.

Hi Jared, et al,

I’d just like to tell you that I’ve now fixed the issue I was having when trying to connect the home made flat panel to SGPro, see my original post above.

It transpires that the years have caused a number of my grey cells to develop rust, such that I didn’t notice the oversight I’d introduced when implementing your code. My mistake was in rationalising some of the code to make it specific to the sub-set of Alnitak commands I needed. In doing so, the Status word was left with an argument missing. This, of course, caused SGPro to reject the resulting tell-back and thus fail to connect.

All fixed now and working very well thank you, and at a fraction of the cost of a full blown panel.

Kind regards,
Dave

Greetings,

I have built this project and it will connect with NINA just fine, but when I use it with my preferred software (SGP) it returns an error saying “Failed to get device status”. Using the serial monitor I can send the command “>SOOO” and I get the appropriate response, but SGP won’t have it. Any thoughts? I see a lot of commented out code in there, but not a lot of explanation about what should be taken out or remain if I am not using a flip flat type setup but just a panel.

Thanks

Tom

What type of Arduino are you using? SGP currently will not work with ATmega32u4 based boards (Leonardo, Micro, others). Your best bet is to use an Uno that uses the ATmega328P chip. We will likely address this in the near future, but the main purpose of our Alnitak implementation is to support the actual Alnitak devices so any change to that code would also have to be tested against those devices.

Thank you,
Jared

Thanks Jared!

I am using an Uno R3 from Amazon:

I just realized that you put a link to the right device in the comments in the code - my bad! I will order it now.

While I have you here, will the flats wizard control both panel brightness and exposure to dial in the ADU target?

Thanks again!

Tom