November 24, 2024, 07:06:00 AM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Converting a Robo-Ware program to an HC-8+

Started by JackMan, June 22, 2012, 08:56:22 PM

Previous topic - Next topic

JackMan

Well, on pins and needles I gave it go, no dice. Right at the point where things should have started moving (about 20s into the program) I got a couple of weird servo movements and I killed the power. The MiniSSC's have a green LED that lights on initial power up and stays lit until the first serial command is received, then it goes out, all the servos are held in the "Home" position by the SSC's until then. I have Vixen programmed with the "Home" position for all servos whenever they are not moving so technically the green LED should have gone out as soon as the HC-8+ was triggered, it didn't. The SSC's are set to 9600 baud. I ran the RoboWare just to make sure I didn't ruin anything and it looks fine. I don't have a clue as to what to look for in the Spin code. At this point I think I'm gonna stay with the RoboWare for this season as I'll be starting to set up my display in a couple weeks.

JonnyMac

Darn, I expected this to work. I have created lots of shows in Vixen and played them from a uSD card. I have always played servos directly from the outputs, though, never through a servo controller.  Still, the protocol to the Mini-SSC is pretty simple and there's no reason why it shouldn't work.

Do you want me to switch the code to using the SERIAL header to the Mini-SSCs and then use a powered output to the AP-16+ 12-24v input?  My only concern about this is the 150ms debounce cycle on the AP-16+.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Let's give that a try. I'm not worried about the 150ms debounce, I can shorten or lengthen the beginning of the sound file to get the sync timing dead on or maybe we can add an adjustable delay to the start of the Vixen file.

JonnyMac

Jon McPhalen
EFX-TEK Hollywood Office

JackMan

August 14, 2012, 02:18:46 PM #64 Last Edit: August 14, 2012, 05:26:27 PM by JackMan
On the serial header I assume I'm using W (serial) B (ground) ?

UPDATE:  I loaded V2 and it's not triggering the AP-16+. I changed the pulse out pause to 2s and reloaded the program, still not triggering the AP-16+. I'm getting a 2s LED on OUT0 but when I check the pulse out voltage it's only .41v. With one lead connected to V+ all I need to do is touch the other lead to GND and the AP-16+ triggers so that's working.

JonnyMac

Quote from: JackMan on August 14, 2012, 02:18:46 PM
On the serial header I assume I'm using W (serial) B (ground) ?

UPDATE:  I loaded V2 and it's not triggering the AP-16+. I changed the pulse out pause to 2s and reloaded the program, still not triggering the AP-16+. I'm getting a 2s LED on OUT0 but when I check the pulse out voltage it's only .41v. With one lead connected to V+ all I need to do is touch the other lead to GND and the AP-16+ triggers so that's working.

Yes, W (white) is the serial signal, B (black) is ground.

You should be using the OUT0/GND terminal block into the 12-24v terminal on the AP-16+ -- this is the safest connection.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

DUH.....Can you tell I'm in Prop-1 land? It triggers now.  ::) Should the BR switch on the HC-8+ be on or off?

bsnut

Quote from: JackMan on August 14, 2012, 08:18:59 PM
DUH.....Can you tell I'm in Prop-1 land? It triggers now.  ::) Should the BR switch on the HC-8+ be on or off?
That's OK.  Based on this first comment in the Spin file that Jon did for you they need to be in the off position
Quote
For playback of exported files the EFX-TEK microSD adapter must be connected to the option
  pins located just above the Options switch.  All Option switches must be moved to the OFF
  postion for microSD card access.
William Stefan
The Basic Stamp Nut

JonnyMac

On your AP-16+ you should have the following configuration:

BR = On
A1 = Off
A0 = Off
EN = don't care
?   = don't care
@ = On if you want it to loop AMBIENT.WAV between shows

As William pointed out, for the HC-8+ all configuration switches must be off to use the uSD card.
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Duh, I'm back in serial mode. 

For the AP-16+ you should name your file SFX00.WAV and then set the SELECT switch to 0.  The loop switch still matters if you want to play AMBIENT.WAV between shows. 
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Well, I guess this just isn't gonna work with the SSC's. I did have all the configuration switches off on the HC-8+. I had already made the changes to the AP-16+ and that part works fine but the SSC's are not responding correctly to the serial commands. This time as soon as I triggered the HC-8+ the LED on the SSC went out and started to flicker which indicates it is receiving serial commands but one of the eye servos immediately went full tilt over-drive in one direction, not what should have happened. Unless you see something obvious in the code I think I'm gonna give up on this for now before I ruin something. I appreciate all the effort, maybe we can figure this out for next year or maybe it's just not doable with the SSC's.  ;)

JonnyMac

I'm sorry, Jack, I'm flying a little blind because I don't have a Mini-SSC; if I did it would have been easier for me to verify everything.  That said, I've been coding for 30+ years and this stuff is pretty easy.  Since K.C. created the raw export facility I have done lots of things with the HC-8s and show data on a card.

If you had a second HC-8+ we could have eliminated the servo controllers and just use the outputs directly.  It's easy to link to HC-8s together through the RS-485 port (I created a 24-channel show with three boards). 

Just for grins, I'll write that code (it's easy).  I know you probably won't use it, but it will be available in case you have a change of heart.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Hey no sweat Jon, we gave it a good try. Going with two HC-8+'s is gonna be a lot of work for me because they won't fit in the skulls with 5 servos in there.  ;)

JonnyMac

Hold the presses -- I think I found the problem.

While having lunch it dawned on me that Scott Edwards uses Inverted serial serial on his products which lets him hook to a PC serial port through a resistor. I automatically use True mode serial and did this in your original program.

The attached version uses the SERIAL header for the AP-16+ and the OUT0 TTL header for the Mini-SSCs -- and the serial for the Mini-SSCs is set for Inverted mode.  Give this a try.  Please....
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

I knew you'd find the problem! That's it buddy, it's working but now I have a new dilemma. The program is not staying in sync with the sound track. It starts out fairly close, which I can adjust, but it gets progressively worse. By the end of the track the servo movements are about 8 seconds ahead of the sound track. The Roboware plays at 20 FPS and that is what I programmed in Vixen so now I'm at a loss as to how to correct this without a lot of trial and error.