EFX-TEK

TEK Talk => Prop-SX => Topic started by: HauntedWolf on October 25, 2009, 05:47:11 PM

Title: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 05:47:11 PM
Hi all,

I have a couple of VSA routines I run through the Prop-SX.  I am wanting to add a 12VDC LED spotlight the will blink on and off during part of the show...basically making the light in a Jack O Lantern turn on and off with it's part of the show.  I have tried everthing I can think of and the LED lights but will never be controlled.  Want am I missing?  Probably something simple, it usually is.  ;)

Thanks in advance!

Title: Re: Controlling an LED vis VSA on a Prop-SX
Post by: JonnyMac on October 25, 2009, 08:04:18 PM
Probably, I've been working the past couple days with local haunt that is using a reprogrammed EZ-8 and VSA -- they have four servos and four PWM channels and everything works great.

1) Which program are you using in the Prop-SX?
2) How do you have the channel defined in VSA? -- should be MiniSSC Dimmer with a 0 to 254 range
Title: Re: Controlling an LED vis VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 08:36:36 PM
I'm not sure of which program since I loaded it last year.  However, I have servos in P1 - P8, so I think I might be using the prop-sx_servo_16 file...I need to use the servo8-Digital8 file instead, huh?  My problem is that P0 is loose and the connection is not reliable. 

I just tried setting the channel as you suggested, and no luck.

Thanks again!
Title: Re: Controlling an LED vis VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 08:39:46 PM
Sorry, I meant to say I should probably use Servo8_PWM8 instead, right?

How hard is it to modify to only have p13-p15 be pwm?
Title: Re: Controlling an LED vis VSA on a Prop-SX
Post by: JonnyMac on October 25, 2009, 08:40:42 PM
Keep in mind that JB and I are great programmers but we played hooky on the day that mind reading was taught!  ;D

What do you want?  Servos plus digital outputs or servos plus PWM outputs?  I can easily whip up a custom program for you to dump into your Prop-SX, you just need to tell me what the outputs are supposed to do.
Title: Re: Controlling an LED vis VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 08:47:47 PM
OK...fine!!!!    ;D

My routines currently use servos in p1-p8.  I need 3 outputs that can control LEDs (PWM, right?).  P0 is not available to me because it is loose.  So lets make P13-P15 LED outputs.

Also, I'm going to need a link to the "how to put this new, awesome program into the SX" instructions...it's been too long ago for me to remember how I did it last time.   :)

Thanks again!
Title: Re: Controlling an LED vis VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 08:51:24 PM
Let's leave everything but p13-p15 servos...I just wanted to be clear.
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: JonnyMac on October 25, 2009, 10:10:57 PM
Clear as mud, my friend!

I just updated one of the original VSA programs for the Prop-SX that does what you want.  You can find it in this thread:

http://www.efx-tek.com/php/smf/index.php?topic=517.msg2631#msg2631

It does eight servos (P0 - P7) and eight pwm/digital (P8 - P15).  You can use a pwm channel in digital mode by defining the channel in VSA as a MiniSSC relay (0 = off, 254 = on).

Now... I'm betting you don't have the latest version of SX/B installed so I pre-compiled the program and attached it to that thread (VSA_Servo8_PWM8.SXH).  To load this into your Prop-SX:

1. Open the SX-Key IDE
2. Run\Device\Load Hex
   -- load the .SXH file
3. Connect your SX-Key or Blitz to the Prop-SX
4. Click the Program button on the Device dialog -- the program will be downloaded
5. Disconnect the SX-Key and have a good time!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 10:47:00 PM
Quote from: JonnyMac on October 25, 2009, 10:10:57 PM
Clear as mud, my friend!


It does eight servos (P0 - P7) and eight pwm/digital (P8 - P15).  You can use a pwm channel in digital mode by defining the channel in VSA as a MiniSSC relay (0 = off, 254 = on).


I did see this one, the problem with it is that I have a bad connection on P0, so I cannot use that as one of my servos.  I need P8 to be a servo control.  

So Ideally for me, what I need is P0-P12 to be servo control and P13-P15 to be able to handle LEDs.  Is that possible?  ;)

Thanks for your help, I REALLY do appreciate it!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: JonnyMac on October 25, 2009, 10:54:02 PM
No it's not clear.  How many servos do you need?  How many PWM channels?
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 25, 2009, 11:19:14 PM
13 Servos, 3 PWM.  Please make P13, P14, P15 the PWM channels.

Thanks again!  Sorry for not communicating well.  ;)
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: JonnyMac on October 26, 2009, 09:23:01 AM
Okay, this was a little easier with some sleep.  Give this a go -- and I hope to Heaven that you have an external power supply for all those servos because there is no way the regulator on the Prop-SX can handle that many.
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 26, 2009, 09:25:28 AM
Thanks Jon!  I'll give this a try tonight when I get home!

I have a power supply for every 4 servos....works great!!!  ;)

As always, you guys rock!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 26, 2009, 09:29:04 AM
So all I need to do is load the .SXH file using the instructions above and I'm good to go, right?  Do I need to do something about the .sxb file?  The .vsa file is just a sample VSA routine, right?

Thanks again!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: JonnyMac on October 26, 2009, 10:31:14 AM
Yes, load the Prop-SX using the Device dialog with the .SXH file.

The .SXB file is for reference -- details the connections and shows off my big brain!  ;D

The VSA file is setup for this program, 13 servos, 3 PWMs, all with the correct settings.  You may have to adjust the COM port for your system.

Have fun, and take pictures and video of your project.  About two weeks ago I delieverd 11 Prop-SX controllers that form a network (using our RS-485 baord) to control 88 channels on a huge animatronic (24 valves, 64 servos!).  I'm looking forward to seeing video of that, too!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 26, 2009, 11:25:43 PM
OK...LED is working!   Thanks!.

Any chance you could save the .vsa in VSA 3 format?  I don't have VSA 4 yet.

I am finding that my mouth servos are no longer responding.  I'm sure that it is just a setting I need to tweak, but since I can't open the .vsa I can't see what it should be.  :)  The other servos appear to be working fine.

Thanks again!!!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 26, 2009, 11:44:59 PM
I forgot to mention that I currently have the jaw servos set to a max of 108 and min of 0 because of the way they are mounted.  I was able to open the .sxbin a text editor (duh!) and I could see that you are expecting a range of 60 to 240 which will not work in my current setup...at least without having to take skull apart which I just don't have time to do.  Is there something else I can do?

Thanks!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: JonnyMac on October 27, 2009, 09:09:59 AM
Zero is a bad value with our servo driver -- it equates to no pulse to the servo.  What you need to do is test the servo within VSA to find out what the limits are within the range that our program uses -- and this rannge (60 to 240) is the full 180-degree range for Hitec servos. This means you servo will fit in there somewhere, you just have to find it.
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 27, 2009, 09:14:04 AM
OK...I'll play with it...

I did play with the values in VSA last year...that's how I came up with the 0 to 108 range...hopefully this won't be a huge time eater.  ;)

Thanks again for all the great help!
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: JonnyMac on October 27, 2009, 09:19:41 AM
You've got three days... no problem!  ;D
Title: Re: Controlling an LED via VSA on a Prop-SX
Post by: HauntedWolf on October 28, 2009, 08:21:53 AM
Quote from: JonnyMac on October 27, 2009, 09:19:41 AM
You've got three days... no problem!  ;D

:P

Everything is working now.  I have to recapture the mouth movements to get them to work, but that is doable.  I also had to rewire one of the jaws...not sure why, but it wouldn't work other wise....does now!

I'll be taking video on Halloween and will post sometime after.

Thanks again for all the help!