Communication issues ATEM 1ME & Arduino for tally

24 posts / 0 new
Last post
Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Communication issues ATEM 1ME & Arduino for tally

Hello all - apologies if this is in the wrong section, but I hope it is correct.

I have an ATEM 1ME which we have bult a custom tally box based on the Skaarhoj GPIO 2 x 8 GPI tally using an Arduino Uno with ethernet shield.

This drives a MCP23017 via the I2c buss and then onto a 8 way relay board.

In priciple the system functions very well, but from time to time the tally outputs stop following the ATEM switcher - this is especially noticiable when using crossfades but occurs les frequently when doing straight cuts.

We have searched through the forums and found a few posts which seem to mention a similar problem, but we have not actually found a resolution.  Has anyone else experienced this and can anyone offer any suggestions?

Thanks for all the great information so far!

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 102
Hi Simon, I suggest you use

Hi Simon,

I suggest you use the newest ATEM library (ATEMstd/ext/max versions, not the old "ATEM") because we recently fixed a bug that could make your controller and even the ATEM crash.

 

- kasper

 

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 102
BTW, when a transition can

BTW, when a transition can throw it off, it's because during a transition a lot of packages are sent forth and back which needs to be responded to. If you Arduino is not programmed well in order to handle a large amount of sudden communication, you will get problems. This is a subtle thing, something you need to understand well and make sure to respect. The most basic rule for instance is to NOT introduce normal "delay()"s in your code - always make sure you are constantly calling the ATEM runloop functions during delays (so make your own delay function) so any communcation gets served.

 

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Newest ATEM library

Hi Kasper - many thanks for such a quick response.  It is my friend who has actually built the unit for me so I will pass this information on to him, but I am sure that this afternoon when he was here (he lives 120 miles away so can't try things right away) we did try the new library but still had the proble,.  I will let him know your reply and I will post up here as soon as we can get back together which is going to now be a few weeks sadly, and let you know how we got on.

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Transitions throwing off the system

Thank you again Kasper for replying so quickly to my problem.

This information is of great help in trying to track down the problem and I will forward this on to my friend who can implement your suggestions.

As mentioned in my other reply, I shall post up how things went as soon as we can get back together.

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
CPU processor speeds?

Hello Again,

I am still waiting for my friend to visit to
see what can be found, but when I spoke to him he suggested that he had
not made any changes to the scripts that would affect how the Arduino
handled large amounts of sudden data such as when a transition occurred
other than inverting the output from a MCP23017 chip to drive the relay
board for the tallies.

We are using an Arduino Uno with an
Ethernet Shield expansion board - could this be the source of the
problem?  Are there better models of Arduino that have paster CPU clock
speeds?  One thing I have noticed looking at specs of Arduinos is that the amount of SRAM and flash memory in an UNO is significantly less than others - could this be a factor?

Thank you again for your time and input.

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Ongoing issues with tally reliability

Hello again.

We have now tried a new Arduiono Uno revision 3 with new ethernet shield which if anything seems less reliable than the original.

All the networking components have also been swopped out to rule out network issues.

We are definately using the latest libraries.

Most times the tallies work fine on cuts, but almost every time we do an auto fade, the tallies lock for some time - (on the newer Arduino, sometimes it takes a reset to restore)

We are stuggling to find a reason for the apparent lack of reliability.  Could this be related to any firmware revisions (which are the latest)?

Does anyone have experience of this combination?

Any thoughts or suggestions greatfully received

 

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Budapest
Hungary
Joined: 16/07/2013
Posts: 24
Use JustMacros and a PCI relay card for Tally

We have tried to solve the almost same issue with zero result. 
 
The only solution was to forget the Skaarhoj GPIO 2 x 8 GPI and use JustMacros and a PCI relay card for Tally. (see more in this Forums...)
 
Regards:
rlajos
 
 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
There's no reason why this

There's no reason why this shouldn't work.  For us to help you'll have to post the Arduino code you're using.

EDIT: I would suggest adding some serial reporting to show the tally status.  This would show whether the issue is with the communication to the arduino or to the MCP23017 / relay board.

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Thank you riajos for your

Thank you riajos for your reply - I am still hopeful that we can resolve this with what we have but have passed on your suggestion to my friend if we can not get it going.

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Hello bradders and thank you

Hello bradders and thank you so much for your suggestion for the serial reporting.  I have passed on your comments to my friend and will post up the code as soon as he tells me what we are using.

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Arduino file sent, but how do I post here to show you?

Hello again bradders,

My friend has replied saying:- "I can't currently, with our set up, use the
serial console without risking problems with powering.  The MCP23017
has been changed and ruled out.  The relay board is just following
the '23017 outputs."

He has also sent me a .ino file but how can I post that to show you what it contains?

It is called Skaarhoj_GPIO2x8_GPITally.ino

Again, many thanks

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Is the

Is the "Skaarhoj_GPIO2x8_GPITally.ino" the same one included in the Skarrhoj ATEM example?  If it is then I already have it, if it has been altered then you'd need to send it via dropbox, google drive or some other file sharing site.

Also, I just wanted to check.  Does your arduino system ONLY control the 8 tally lights or do you have it doing other stuff?

Thanks,

Colin

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Long Shot but...

Hi Simon,

Am I right in saying you are using 8 relays for 8 tally lights which light when inputs 1-8 are live on the Program output of 1 M/E?

If so, read on...

This may be a REALLY long shot but, here's a link to one of Skaarhoj's sketches which I've just moddified to provide the tally output as outlined above.  I could be WAY off the mark but I guess it's worth a shot.  Obviously you'll have to enter your Arduino MAC & IP address and ATEM IP address.

LINK

Let me know how you get on.

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Hello Colin, I believe that

Hello Colin,

I believe that the ino file is the same one that is included in the Skarrhoj example.  The arduino is only controlling the 8 tally lights, nothing more.  We have built it into a box with comms as well for camera operators.

Yes, we are using the 8 relays for 8 tallies when inputs 1-8 are live on the Program output of 1 M/E

I have forwarded the information in the link you gave to my friend and will let you know what he says as he now has the unit with him, so hopefully he will be able to look at it and see.

Thanks for your help Colin!

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
OK, well either this new code

OK, well either this new code will fix the issue as the one you're using uses the old ATEM.h library which as Kasper said, is out of date with the current ATEM firmware.  If this doesn't fix the issue then I would suggest forgoing the MCP23017 and just using a board like THIS ONE.  The only reason an MCP23017 was used originally was to allow for expanding the number of IO by using the I2C bus.  As you only need 8 outputs (the Arduino UNO has 12 available, the ethernet sheild uses 4 but you're still left with 8) you would cut potential issues with the I2C communications.

Good luck!

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Thanks Colin, My friend

Thanks Colin,

My friend says:-  "The answer to his question about the ino file is yes, but with the
outputs inverted."

We have that relay board you link to, and I have passed on your comment about using the MCP23017 (but I think he is using it to invert for some reason)

Thanks again
Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
It's simple to invert the

It's simple to invert the outputs of the Arduino.  One way is to swap the all of the "HIGH:LOW" to "LOW:HIGH".

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Thanks again Colin for your

Thanks again Colin for your input.

My friend telephoned me earlier and said that following your information on the library, he checked what was programmed into the arduino and noticed that he had only got one of the atem libraries - (something about mid and low) from memory of the conversation and that the link you showed us, there was both compiled.  He has now gone and compiled them and the arduino has accepted that but as yet he has not had time to actually go further and do an actual test.

I will update you again as soon as he has had a chance - probably early next week.

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Cues issues RESOLVED!!

Hello again Colin.

My friend has visited and brought everything with him and uploaded the firmware that you suggested.

I am really pleased to say that this has completely resolved the problem!

100% reliable even on transisitions.

The only thing if I am being super critical is that the cue for the "mixed to" camera on a transition only goes live at the end of the transition and not from the begining.  In other words, you see on the multiscreen display the two camera sources as being live, but only one source seems to be indicated live at a time from the Arduino.  Is there a way to get the two sources as showing live whilst the transition is under way or if you do a crossfade and stop mid way to have two cameras overlayed?  Also, if a camera is used as a key source, it shows as being so on the multiscreen, but not seen as a live source via the Arduino.

Thank you so much for this.  It does very much look like a library issue despite us thinking we had the latest installed, your modifications are very sleek and are working well.

Thank you again.

Kind regards.

Simon

 

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Hi Simon, Glad it worked out

Hi Simon,

Glad it worked out ok.  I've modified the code so the tally matches the multiview tally so whether you're mid-transition or keying a source, it will tally.

Download HERE.

Thanks,

Colin

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
Colin -thank you so much!

Hi Colin,

Thank you SO much!!

My friend is actually here with me now so he will enable the new code that you have very kindly done.

I see you are in Leeds - not a million miles from us - I will have to come over and buy you a pint!

Kind regards

Simon

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 81
Did you get a chance to test

Did you get a chance to test the new code today?

i just wanted to check that everything is working as expected. 

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Hull,
United Kingdom
Joined: 30/06/2016
Posts: 21
All working well!

Hi Colin,

Yes, thank, you, my friend was actually here so we were able to implement the code you kindly provided and it works exactly as I had hoped.

I next need to do a shake down of all the equipment with some of the cameras out and the cues & comms all running and I will make a video to go on Youtube to show it in action.

Again, thank you so much and I owe you a big drink!

Kind regards.

Simon.

Live multicamera streaming via Decklink Mini Recorder and 4K ingest via Intensity Pro 4K