EFX-TEK

TEK Talk => Hacking the HC-8+ => Topic started by: youngti on September 26, 2012, 03:53:05 PM

Title: Cauldron Skeleton
Post by: youngti on September 26, 2012, 03:53:05 PM
At your request I have started a new topic to deal just with the Cauldron Skeleton prop.  This will use an HC-8+ and the AP-16+ to control 4 servos, and two LED lights.  There will be two shows, one that is playing while the prop is at rest and the other plays after activation from a PIR.

Planned operation;
Prop at rest, LED eyes light, prop mutters and moves head around while stirring cauldron (cauldron motor is not hooked up to prop controller)

After activation;
Prop looks up then right, starts speaking to the TOT's and head moves back and forth "looking around".  Once done speaking a short 2 to 4 second delay and then it starts the first at rest show.

How I plan to hook devices up to HC-8+;

Pin setup
   TTL out0 = Left/Right servo
   TTL out1 = Jaw servo
   TTL out2 = Nod servo
   TTL out3 = Head Tilt servo

   TTL out4 = LED eyes, state is either on or off.
   TTL input0 = PIR

DMX set to 1,2,4,8 on for 180 degree servos
Use the EFX-TEK uSD adapter and code
    vixen00.bin &  vixen01.bin on card and set for programed movements using the VEX.

Use AP-16= for sound connected to the serial pins
  SFX00.wav and SFX01.wav the only files on the card.

Everything works for recording now patiently waiting for code.

Thank you.
Title: Re: Cauldron Skeleton
Post by: youngti on October 02, 2012, 03:01:11 PM
I am not trying to hurry you.  I know you have a lot going on.  Just wanted to make sure you are not waiting on me for something.

Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 03, 2012, 12:42:07 PM
Haven't forgotten -- just been buried. Almost to the surface (like a vampire re-birth....)
Title: Re: Cauldron Skeleton
Post by: youngti on October 03, 2012, 12:52:17 PM
Like the Kraken coming up from the great depths to crush the Black Pearl.  I understand I was just concered that you were waiting for an input from me. 
Title: Re: Cauldron Skeleton
Post by: youngti on October 19, 2012, 09:12:04 PM
I hate to bug you and I know how busy you are but do you think you might have something in the next day or 2?
Title: Re: Cauldron Skeleton
Post by: youngti on October 23, 2012, 10:16:34 PM
Okay so I am slowly sinking into the spin pit.  I was trying to figure things out using your examples and trying to build my own code but I am losing focus on this.

In one of your previous comments in the other post you talked about using some high level code to interpret the data on the SD card.  For the life of me I can't see what that is.  I have been reading and I can do some simple things like blink the LED eyes but I am getting lost.

I am also unclear on how to address the audio files and sync them with the data.  At this point I am so frustrated right now.  I was up until about 2am last night with this and don't feel I am any closer.  Maybe I am over thinking this, I felt pretty confident with pbasic but this is just not jelling in my brain.

I know that Halloween is just around the corner and I am not the only customer, but any help would be greatly appreciated. 


Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 26, 2012, 09:12:15 PM
Hopefully, the chat we had yesterday helps with prepping your files and the attached program does what it intends. As ever, this was "harder than it looks" so re-wrote it a couple times. I trust the comments will make the code as clear.
Title: Re: Cauldron Skeleton
Post by: youngti on October 27, 2012, 12:18:02 AM
As always thank you so much.  I will try this out tomorrow and let you know how it goes.  Then I just need to take the vixen files and import them into vixen to modify for the eyes.

And yes the talk was very helpful.  Still need to sit down and go over my notes (yes I take notes) and then see if I can implement some of the stuff.  As you always say start small and build.
Title: Re: Cauldron Skeleton
Post by: youngti on October 28, 2012, 10:40:39 PM
Okay so I have been running around trying to get things done.  Everything is taking twice as long because of my knee so tonight I was just able to test it out. I set the AP16 to 38,400 and I have the servos connected to out-0 to 3, LED eyes connected to out-4,AP 16 connected to the TTL serial and the PIR connected to In-0.

I turn on the AP-16 and then the hC-8.  Servos have power and sfx00 starts.  The head tilts to one side but mouth isn't moving and the pir will not interupt HC-8and play sfx01.  It plays all the way through once and then stops, will not repeat.  It will not stat again even when I turn off the HC-8 and then back on.  It will only start again when I turn off both the HC-8 and AP-16.

The four servos have their own separate power supply. AS well as the HC-8 and AP-16.  It works with the VEX code to record but not working here.  Any ideas?

Title: Re: Cauldron Skeleton
Post by: youngti on October 28, 2012, 11:09:40 PM
Just tried the VEX again and it worked fine for a while.  But about 30 seconds into it everything stops.  I have the servos on a separate power supply that is 5v, and I think 8 amps.  But it worked before.  I even recorded 5 or six shows.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 29, 2012, 09:55:56 AM
When things are wonky like that I have always found it to be the uSD card -- I suffered for several hours through this while working on the VEX rececorder code.  After I sorted that I was able to record and playback shows over 5m long (my target length).   This is a very tricky prop.  Can you ZIP and send your files to me so I can try to duplicate here?
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2012, 10:27:17 AM
Here are the files.  I am using a SanDisk 4GB micro SD card.
Title: Re: Cauldron Skeleton
Post by: livinlowe on October 29, 2012, 12:18:12 PM
Quote from: youngti on October 29, 2012, 10:27:17 AM
Here are the files.  I am using a SanDisk 4GB micro SD card.
What class card is it? I think they have to be at least class4 or 6? Not sure
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2012, 01:07:52 PM
So in regards to the SD card.  It is almost impossible to find 4GB cards locally.  I was able to find the ones I got at Fry's.  But they are about 30 minutes away.  If you put a larger one in will it still work?  Can it read it?  I am more than willing to go down to Best Buy and get a better quality one. What brand do you recommend?
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 29, 2012, 02:39:16 PM
The key to look for is a speed rating which is a number in a C on the card. If this number is missing it means the card vendor may not in fact be a part of the SD card association and the card may not quite be up to specs.  Again, I've seen this in my own experiments. Kingston is good, so is ScanDisk.
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2012, 05:27:08 PM
Sure enough it is a 2.  Can you put a larger capacity card and have it work in the HC-8?  So long as it's a 4 or 6?
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 29, 2012, 06:36:09 PM
Yep, I once ran a 16G card in a test.
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2012, 06:43:25 PM
okay, i wll have to see if I can drag myself over to best buy.
Title: Re: Cauldron Skeleton
Post by: JackMan on October 29, 2012, 07:42:40 PM
Yep, I'm using an 8GB  Sandisk Ultra in mine, works fine.
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2012, 08:41:41 PM
What about class 10?
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 29, 2012, 08:59:14 PM
That would be fantastic! I use Class 10 cards for HiDef video recording in my HDSLR.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 12:13:50 AM
So I got a Sandisk class 6 4 GB and started the recording process.  Formated the card as fat.  It went about 1 minutes into the first recording and then the servos stopped responding and just would jerk every few seconds.  I did get a couple recording before but now I can't seem to get one.  I am using the same separate power supply which is a 5v 8amp but it will not complete a recording.  Any suggestions would be great.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 08:43:16 AM
This is happening during the recording process?
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 09:53:36 AM
Yes.  Also the two vixen files I sent you I was able to record.  But when I used your code the results were as I explained before in my posts.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 10:16:14 AM
Tim,

I just checked my email (inbox and trash in case of accidental deletion) and I don't see the files. Can you ZIP and send the audio and Vixen files (first group) so I can attempt to play them on my system?

jwilliams at efx-tek dot com
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 11:08:47 AM
here is the vixen.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 11:15:20 AM
I am trying to send the audio but both seem to be too large for your system even zipped.  One is aroung 4800kb and the other is 2078kb.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 11:55:21 AM
I am unable to send the audio
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 02:28:20 PM
No worries.

Having had a little rest between today and the last version, I found a couple "gotchas" and decided to simplify the architecture a bit.  With the debugging information I added and used, it seems to be working on my end (did not try the audio since I don't have yours and I have tested/used those routines with others).

I disabled the terminal debug so you don't have to worry about that.  What you'll notice now is that when the ambient file is playing the big LED on the board will flash fast red; when your main file is playing it will flash fast green.  I did in fact connect a button to IN0 and verified that it interrupts the ambient show and jumps to the main.

Hopefully, we're very close if not there -- and just in time!  Also, after you download the program you may want to power down for 10s and then power back up, just to ensure the uSD card resets properly.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 02:29:29 PM
BTW... slow red blinks are uSD or file errors.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 02:57:58 PM
Got your SFX00.WAV file via email, popped it into my AP-16+ and connected it to the SERIAL terminal on the HC-8+. It works. I have a simple test file for SFX01.WAV but I verified that it played and then went back to your ambient show. I'm feeling much more confident in the code.

Note that I'm using the VIXENxx.BIN files attached here in the forums.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 03:15:20 PM
okay so it started to work.  After I replaced the HC-8 with the spare I have.  The first one would not program, I would check if the hardware is identified (it was) then F11 and it would say can't find.  After i repaced it it loaded the code.  And started up.

This is what it did.  Started playing show 1, everything seems to be working.  Then show 2 started, plays for about 30 seconds then goes back to show 1, plays for a bit then show2, goes back to show 1 after 30 seconds, then show 1 repeats it's self over and over but only the first 30 seconds.  I took a video but I am having trouble getting it uploaded.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 03:42:52 PM
Sounds like an electrical problem -- do you have any servos binding that could can noise or other electrical disturbance in the system?  If something causes the board to reset it will look like you're going back to the ambient show (though you should notice a start-up delay as the program waits on the AP-16+).
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 04:31:15 PM
Well I have each servo in the skull soldered to a 22gauge shielded line.  That goes down the spine of the skeleton to one of your water proof boxes.  They are then coiled in a loose 4" roll zip tied to the lid of the box.  I have the HC-8 next too the AP-16 in the box as well as an LED darklight flicker controller.  Each board is powered by their separate power supply going out of the box.  The servo power supply is a 5v, 8amp and is in a radio shack project box outside of and underneath the main box.  Is it possible that the servo lines are creating interference from being coiled up and in the lid of the box?  The HC-8 and the AP-16 are powered by 12v 1amp power supply. 

Here is the video link.  http://youtu.be/HQR-Af7Ath8
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 04:59:45 PM
You may need a bigger supply for the AP-16+ -- what could be happening is that at a loud part the power supply is being stressed and causing the HC-8+ to reset.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 30, 2012, 05:00:21 PM
QuoteHere is the video link.  http://youtu.be/HQR-Af7Ath8

Video is set to private.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 05:11:17 PM
set to public now.

sorry it's side ways.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 05:59:13 PM
Wondering if it would be better to directly connect the + and - of each servo directly to the servo power supply it would be better.  Rather than cutting the trace under the HC-8 board.  Connect the signal on the HC-8.
Title: Re: Cauldron Skeleton
Post by: youngti on October 30, 2012, 08:38:40 PM
Quote from: JonnyMac on October 30, 2012, 04:59:45 PM
You may need a bigger supply for the AP-16+ -- what could be happening is that at a loud part the power supply is being stressed and causing the HC-8+ to reset.

So I missed this.  i went out to check and I actually have the HC-8 on a 18.5v, 2.5a and the AP-16 on a 18v, 3.3a.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 31, 2012, 09:48:35 AM
Try the show without servos to see if it plays all the way through.  As I indicated, I was able to run the Vixen files you posted in the forums without problems. To be fair, I only had two small servos connected but my goal was to test program logic.
Title: Re: Cauldron Skeleton
Post by: youngti on October 31, 2012, 10:09:18 AM
okay so that works.  So do you think I should just pull the servo power and ground and hook that directly to the power supply?  With the signal connected to the HC-8?
Title: Re: Cauldron Skeleton
Post by: youngti on October 31, 2012, 10:17:45 AM
I also imported the bin files into vixen and copied the channel 2 (which is the jaw movement) into channel 5 (which should be the LED eyes)  but that didn't work.  I have the + connedted to ttl pin 4-+ and the - to ttl pin 4 -.  I am very new to vixen most of what I have done it in VSA.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 31, 2012, 11:18:29 AM
Since you have a stout power supply going into the HC-8+ you might have success. We use a 5A 5V regulator on the board for servos.  You will of course have to re-bridge the cut you made for external power.

Moving a servo to channel 5 without changing the code will no work -- it can't read your mind <wink!>  The code sets up a servo controller with four outputs and a dimmer with four outputs.  You need to adjust the code if you're moving servos around.  Since we know it's a power-related issue, I would suggest you go back to the original files and code (4 servos and 4 dimmers).
Title: Re: Cauldron Skeleton
Post by: youngti on October 31, 2012, 11:30:25 AM
Quote from: JonnyMac on October 31, 2012, 11:18:29 AM
Moving a servo to channel 5 without changing the code will no work -- it can't read your mind <wink!>  The code sets up a servo controller with four outputs and a dimmer with four outputs.  You need to adjust the code if you're moving servos around.  Since we know it's a power-related issue, I would suggest you go back to the original files and code (4 servos and 4 dimmers).

I was not moving the servos.  I was trying to get the LED's to blink in time to the jaw movements.  Since I am running out of time with this prop I thought that just copying the vixen channel 2 to the vixen channel that has the LED eyes attached would work.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 31, 2012, 11:33:51 AM
Okay, I understand.

I've attached an update that lets you set the number of servo channels and the rest are declared as dimmers.  You'll find the settings in the CONstants section near the top.

Note that if you set DEBUG to YES and keep the programming cable connected, you can press F12 to get a terminal. Set it to your programming port # and 115200 baud -- this will show you the status of the program.
Title: Re: Cauldron Skeleton
Post by: JackMan on October 31, 2012, 02:51:36 PM
QuoteWondering if it would be better to directly connect the + and - of each servo directly to the servo power supply it would be better.  Rather than cutting the trace under the HC-8 board.  Connect the signal on the HC-8.

Don't forget you'll need a common GND between the HC-8+ and your servo power supply.  ;)
Title: Re: Cauldron Skeleton
Post by: youngti on October 31, 2012, 05:47:25 PM
Thank you for all your help but I think I am going to have to scrap this prop for this year.  I am concerned that I did something wrong with the HC.  I bridged the cut with solder and then hooked everything back up and the prop just sits there. 

Not having much luck with Halloween this year.  Out of the 6 animatronic props that I have only two are working the way it should.  Can't get my singers or door greeters to work.  I am tired and frustrated and ready to just sit this one out.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 31, 2012, 05:51:36 PM
Darn.  Perhaps after a bit of a break we can try again converting what is not a Halloween prop into something appropriate for the Christmas season. 
Title: Re: Cauldron Skeleton
Post by: youngti on November 01, 2012, 11:21:27 PM
Oh and as far as Christmas that was the deal I made with my wife.  i can do the stuff I do for Halloween but she just wants me to put out the lawn figures and lights on the house.  No animation and no light show.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on November 02, 2012, 06:59:22 AM
Check out my column in the November 2012 issue of Nuts & Volts. I show how I used the HC-8+ to controller a string of RGB LEDs for a Hollywood prop shop.  Pictures are in this thread:

http://www.efx-tek.com/php/smf/index.php?topic=1943.0

Here's the deal: Minion's Web and other companies offer those same LED drivers in Christmas lights. I'm trying to get my pal John Barrowman to buy some for his Snoopy doghouse Christmas decoration. You can have lights -- and you can animate them, too!
Title: Re: Cauldron Skeleton
Post by: youngti on November 02, 2012, 10:24:13 AM
Quote from: JackMan on October 31, 2012, 02:51:36 PM
QuoteWondering if it would be better to directly connect the + and - of each servo directly to the servo power supply it would be better.  Rather than cutting the trace under the HC-8 board.  Connect the signal on the HC-8.

Don't forget you'll need a common GND between the HC-8+ and your servo power supply.  ;)

Common ground.  How would you suggest this?   I am thinking to gather all the com lines of the servos and then pulling them and the com of the power supply to one of the com ttl pins.
Title: Re: Cauldron Skeleton
Post by: JackMan on November 02, 2012, 02:34:20 PM
If you are going to use a totally separate power supply for servos, you can combine all of the positive servo leads (R) and all of the negative leads (B) and connect them directly to the designated power supply. Each individual servo signal lead (W) gets connected to the appropriate W pin of the HC-8+ (or whatever controller you are using). Then connect a common GND between the designated power supply and the HC-8+ (negative side of the PS to GND on the HC-8+). This is a nifty alternative if the host controller can't handle the amount of current needed to run a lot of servos at once.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on November 02, 2012, 03:16:45 PM
The HC-8+ has a separate servo power supply input that feeds the R pins of the TTL headers and ties the external supply into the system ground. I believe Tim was using that.
Title: Re: Cauldron Skeleton
Post by: youngti on November 02, 2012, 06:23:46 PM
I was but seeing how the prop was acting I was concerned that there was interference using the power supply on those alternate solderpads.  The program seems to work with out any servos connected so I though I would separate the power supply completely from the Hc=8
Title: Re: Cauldron Skeleton
Post by: JonnyMac on November 02, 2012, 11:25:32 PM
As Jack pointed out you must have common ground. The only thing those pads connect to are the servo R pins and ground (B pins).
Title: Re: Cauldron Skeleton
Post by: youngti on September 27, 2013, 02:03:32 PM
Okay so I am ready to revisit this for this year.  I think the biggest issue is using a power supply that will provide more than the 5amp I have been using.  I am going to try this weekend or next to get one localy and then rewire everything.  Question I have is I have already cutting the trace under the HC-8 board.  I am not having much luck re-bridging that, do I really need too?
Title: Re: Cauldron Skeleton
Post by: JackMan on September 27, 2013, 07:04:58 PM
If you are using a separate power supply for the servos, I don't believe you need to re-bridge that trace. Just an FYI, an easy way to re-bridge a cut trace is with a small piece of copper wire soldered across the gap.
Title: Re: Cauldron Skeleton
Post by: youngti on October 13, 2013, 12:25:43 AM
Okay i think i am really close now.  I have the servos connedted to a 7v 1.2Amp power supply.  The signal wires are connected to Outs-0,1,2,3, LED eyes connected to out-4.  The AP16+ is connected to the HC8+ serial to serial.  I have SFX00.wav and SFX01.wav on the SD card.  I have the show on a micro SD card on the HC8+.  I power it up and the skeleton starts to talk and it  pulls the SFX00.wav file and plays all the way through, pauses and plays the same file again.  I have a PIR connected to the Int1. 

The problem is I can't seem to trigger the second part of the show.  No matter what I do the PIR will not trigger.  I have tried int0,1,2,3,4,5,6,7 and it will not start the second show.  any help would be appreciated.
Title: Re: Cauldron Skeleton
Post by: bsnut on October 13, 2013, 01:28:07 AM
OK, can you post your program code so we can help you better and refresh are memories what you are trying to do?
Title: Re: Cauldron Skeleton
Post by: youngti on October 13, 2013, 01:37:57 AM
it is the last post on page three from JonnyMac
Title: Re: Cauldron Skeleton
Post by: JackMan on October 13, 2013, 06:43:35 AM
Just thought I'd mention, be careful with that 7v power supply, you're approaching dangerous voltage for most servos.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 13, 2013, 09:07:14 AM
QuoteI have the servos connedted to a 7v 1.2Amp power supply.

1.2A is not a lot of current for servos. While at Parallax we did tests that show a standard servo -- when under load -- can draw nearly 0.5A by itself. One servo. Amps matter more than volts.
Title: Re: Cauldron Skeleton
Post by: youngti on October 13, 2013, 12:20:32 PM
Thanks that is what I have been reading.  Anyway the servos no longer go into what I call a reset mode where the servos will just sit there after playing once and then just jerk a little.  I just want to be ale to trigger the second show now.  Oh and get the led's to light with the spoken words. 

Any suggestions will be greatly appreciated.

Title: Re: Cauldron Skeleton
Post by: JackMan on October 13, 2013, 05:07:18 PM
I didn't realize you were powering multiple servos with that 1.2A supply. I agree with Jon, it's probably not enough. While having enough current available is important, voltage that is too high can cause servo damage or at the very least make them jittery. Ususally at around 7.5 volts this will become apparent.
Title: Re: Cauldron Skeleton
Post by: youngti on October 13, 2013, 05:29:31 PM
Okay if I need to I can split the servos up.  I have two of the 7v and two 6v.

But what I really need help with it getting the second show to trigger.  Right now it is only playing the first show over and over again (servos seem to work fine).  I have used two different pir's and still will not trigger the second show. 

Once I have that fixed then I can work more on the servos and seeing if I need to split them up between two power supply's.

Later I will make up a hand trigger and see it I can trigger but I am not sure this will work.  I think there is something in the code but I can't tell what it is.

Again any help is appreciated.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 13, 2013, 10:32:06 PM
I uploaded fresh show streamer and player code a couple weeks ago. Are you using that?
Title: Re: Cauldron Skeleton
Post by: youngti on October 13, 2013, 11:00:30 PM
No, I will try that.  I just download that and add it to the library and when I compile it will pick it up?
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 12:04:51 AM
Okay so even after using the update files it will only plays the first file and ignore any other input from the PIR.  I was looking through the code and I can see where it plays the first show and checks for the PIR and if it is active.  But I don't see where it runs the second program if the PIR gets triggered.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 14, 2013, 09:49:27 AM
Let me ask as this started a long time ago... were you originally using our standard software or did I do something custom for you? If the latter, please tell me the name of the file I sent you.
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 10:51:13 AM
Yes you created this for me, you sent me a file in post 3, the last post on that page. Which was a new version of the orgianal file you posted for me.

hc-8+_cauldron_v3.spin

And so you don't have to look at the first post this is the description of what I am trying to do.

Planned operation;
Prop at rest, LED eyes light, prop mutters and moves head around while stirring cauldron (cauldron motor is not hooked up to prop controller)

After activation;
Prop looks up then right, starts speaking to the TOT's and head moves back and forth "looking around".  Once done speaking a short 2 to 4 second delay and then it starts the first at rest show.

How I plan to hook devices up to HC-8+;

Pin setup
   TTL out0 = Left/Right servo
   TTL out1 = Jaw servo
   TTL out2 = Nod servo
   TTL out3 = Head Tilt servo

   TTL out4 = LED eyes, state is either on or off.
   TTL input0 = PIR

DMX set to 1,2,4,8 on for 180 degree servos
Use the EFX-TEK uSD adapter and code
    vixen00.bin &  vixen01.bin on card and set for programed movements using the VEX.

Use AP-16= for sound connected to the serial pins
  SFX00.wav and SFX01.wav the only files on the card.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 14, 2013, 11:49:41 AM
I found version 3 on my computer and can see no reason why it should not start the main file. One thing I did find is a note saying it was monitoring IN1 when it's actually monitoring IN0.

I made a couple clean-ups to the attached file, but nothing that changes the behavior. Everyone knows my abject hate for PIRs, especially in testing. Please grab one of our WRB cables, cut off one end, then solder a normally open push-button between the red and white wires. Push the connector onto IN0 and give it a go. If this works, smash the PIR into a million pieces and replace it with a mat switch.  :D
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 12:26:13 PM
Thank you I will try this tonight when I get home.
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 09:54:42 PM
okay so no joy.  I verified that the switch is working correctly.  Ohms are at 0 when touching both poles with out activating and show higher when pushed.  I have checked and both set of files are on the cards.  In the AP16 SFX00 and SFX01 and in the HC8 VIXEN00.bin and VIXEN01.bin.  I tried renaming the bin files and swapping the shows (vixen01 to vixen00).  The servos play the second show after the rename but the audio is the first one.  I though maybe the files are damaged so I used ones from my backups.  Same thing.

I have the song selector switch at the 0 and the ambient off.

any thoughts?
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 14, 2013, 10:01:41 PM
Please ZIP up your show and audio files and attach them so I can try on my side.
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 10:42:59 PM
I uploaded the files but the post isn't showing
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 10:55:09 PM
let me try again one at a time
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 11:01:36 PM
okay so I can't send you the audio files, they are too big even zipped
Title: Re: Cauldron Skeleton
Post by: youngti on October 14, 2013, 11:22:18 PM
okay so I did another test.  I put just the second show bin and wav file on the cards.  Renamed them to the first show names and turned everything on.  Nothing, no show no audio.  If I leave just the audio in and change back to the fist bin show file.  It plays the second show audio and the first show bin.  I am perplexed.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 14, 2013, 11:56:46 PM
Actually, I can live without the audio files -- will try again tomorrow.
Title: Re: Cauldron Skeleton
Post by: youngti on October 17, 2013, 05:33:42 PM
Just wanted to check.  Are you waiting for me to send you something else?  I was not sure.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 17, 2013, 05:35:28 PM
No, just very busy with lots of customers. Doing my best.
Title: Re: Cauldron Skeleton
Post by: youngti on October 17, 2013, 05:43:31 PM
No worries I understand.  I just wanted to make sure I had not dropped the ball.  I have done it before.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 17, 2013, 06:48:20 PM
I was able to take a break from another project so I had a fresh look.

I made some edits that shouldn't have changed the behavior of the code, but I can verify that this one seems to work with your files. The LED flashes red when the ambient file is playing, then changes to green when the main file plays. Note that I set the PIR hold-off to 20s -- that seems more reasonable with PIRs.

I left the debugging window active. You can download the program then press F12 to open a terminal. Set it to 115200 baud and the program will tell you what it's doing (though the red/green LED should do the same).
Title: Re: Cauldron Skeleton
Post by: youngti on October 17, 2013, 11:04:41 PM
First of all thank you so much for working on this.

I must have something messed up or not hooked up right.

Debug shows this over and over again.

Starting program...

Playing: vixen00.bin
-- 8 channels
-- 20ms

Playing: vixen00.bin
-- 8 channels
-- 20ms

Okay so I have it set-up this way


On HC8
DMX address switch 16 to 256 all off, all others on
Option select switch and header all off
SD card adapter installed on Option select header with vixen00 and vixen01 bins
TTL Out 0 swivel
TTL Out 1 Jaw
TTL Out 2 Nod
TTL Out 3 Tilt
TTL Out 4 LED Eyes (not programed yet)

All servos are connected by signal wire only and the red and black connected to a 7v 1.2 amp wall wart

Trace on board had been cut originally and not re attached for TTL outs

IN 0 PIR

AP16 connect from TTL Serial to HC8 TTL serial


AP16
Option switches BR on all others off
Audio select switch at 0
SD card inserted and SFX00 and SFX01.wav on card
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 18, 2013, 12:19:39 AM
QuoteI must have something messed up or not hooked up right.

I've written what I believe are multiple working versions for you and yet it doesn't work on your end. The code fragments I use are well worn -- in use by many people including very big commercial customers (I tend to stick to what works).

I don't mind customizing for one person, but I think I've gone as far as I can go. You tell me, what else do you think that I could logically do to solve this problem? I'll do it if I can.
Title: Re: Cauldron Skeleton
Post by: youngti on October 18, 2013, 07:49:37 AM
i appreciate al the work you have done, there is no criticism in anything I said.  I just wanted to ask you to confirm that I have all these thing set-up correctly.

i had a thought last night, looking at the other HC8 (not working) that I have.  it looks like when you cut the trace to add external power in to the TTL out, that it cuts the power to the In0's as well.  Since the PIR needs power, hmmmm.  Everything else is working except the triggering.......
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 18, 2013, 09:13:36 AM
The 5v trace runs from the regulator, through the INx pins, then to the TTL headers -- the cut point is between the INx headers and the TTL output headers.

Have you tried another INx pin? Maybe you damaged that input.  If you look in the main play routine you'll find a line

  if (ttl_pin == 0)

This is looking to see if IN0 is active; you can change the 0 to 1..7 to try the other inputs.

Title: Re: Cauldron Skeleton
Post by: livinlowe on October 18, 2013, 11:46:19 AM
You could try using a manual pushbutton to see if it triggers with that. PIR's being the beast they are
Title: Re: Cauldron Skeleton
Post by: youngti on October 18, 2013, 09:41:30 PM
yes still a problem.  I broke down and ordered a new HC8 today.
Title: Re: Cauldron Skeleton
Post by: bsnut on October 19, 2013, 02:46:12 PM
Quote from: youngti on October 18, 2013, 09:41:30 PM
yes still a problem.  I broke down and ordered a new HC8 today.
What's is the problem, is the board or is it the connections? Another thing that would be great is to provide a photo of your connections to verify that you have everything connected right.
Title: Re: Cauldron Skeleton
Post by: youngti on October 20, 2013, 05:03:13 PM
I appreciate the help but the problem is it works right for Jonny and not for me.  Here is how I have it hooked up.  I've attached a picture.

On HC8
DMX address switch 16 to 256 all off, all others on
Option select switch and header all off
SD card adapter installed on Option select header with vixen00 and vixen01 bins
TTL Out 0 swivel
TTL Out 1 Jaw
TTL Out 2 Nod
TTL Out 3 Tilt
TTL Out 4 LED Eyes (not programed yet)

All servos are connected by signal wire only and the red and black connected to a 7v 1.2 amp wall wart

Trace on board had been cut originally and not re attached for TTL outs

IN 0 PIR( I have tried 0 through 7 changing this line in program,  if (ttl_pin == 0))

AP16 connect from TTL Serial to HC8 TTL serial


AP16
Option switches BR on all others off
Audio select switch at 0
SD card inserted and SFX00 and SFX01.wav on card

it will play the first bin and correct song.  Will not trigger to play the second either with PIR or NO switch.
Title: Re: Cauldron Skeleton
Post by: youngti on October 28, 2013, 07:38:02 PM
just put in the new HC8......IT WORKS!  so I have two HC*'s both bad.  I probably did something to them.  I think I will never cut the trace again.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 28, 2013, 08:26:29 PM
Congrats!

After the Halloween crush you should contact the main office so that you can get those boards repaired.
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2013, 01:03:56 AM
So I know you spent a lot of time with this and I really appreciate all your help.  It has been more than a year trying to get this to work and now it does.

Thank you so much
Title: Re: Cauldron Skeleton
Post by: livinlowe on October 29, 2013, 06:14:38 AM
Its good to know you got it working!
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2013, 10:30:15 AM
okay so I know you have given me a lot of help.  But I need some advice.  This morning I tested it again and now the servos are jittering.  I have them on a separate 7v 1.2amp power supply.  Only the signal is connected to the HC8.  It was working great, I tried to put them on a 6v, 2amp to see if maybe the 7v was too much,  But it was worse.  Wondering if this is a power issue or interference.   thinking of splitting the 4 servos into two groups and putting them on separate 7v 1.2amp supplies.

Any suggestions?
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 29, 2013, 11:31:21 AM
Again, 1.2A is not cutting it. Servos routinely draw more than a half amp each. Voltage is less important than current. If you can find a 6V, 5A supply you would be better off.
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2013, 12:02:39 PM
thank you.  Now to search for one that I can fine today or tomorrow.  Do you think it would help if I split the four servos onto two 6v, 2amp?  That way each would be getting 1 amp each.
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 29, 2013, 12:11:49 PM
Chances are that they're not all drawing max amperage at the same time. If you can find a 5-7 volt, 2A supply, give it a go.
Title: Re: Cauldron Skeleton
Post by: JackMan on October 29, 2013, 01:16:20 PM
Just curious, are the servo power supplies you are using/testing regulated? Typically voltage that is too high will cause jittery servos.
Title: Re: Cauldron Skeleton
Post by: livinlowe on October 29, 2013, 01:21:44 PM
http://www.amazon.com/Power-Adapter-2-1mm-Regulated-Supply/dp/B006QYWHIM

But, you would have to overnight it  :(
Title: Re: Cauldron Skeleton
Post by: youngti on October 29, 2013, 01:32:13 PM
how can you tell regulated vs not?
Title: Re: Cauldron Skeleton
Post by: bsnut on October 29, 2013, 02:41:45 PM
Congrats is in order.
Quote from: youngti on October 29, 2013, 01:32:13 PM
how can you tell regulated vs not?
It would say it "Switching" or "Regulated on the power supply itself.

BTW, can you tell us or post a photo of what trace you mistakenly cut so other forum members don't make the same mistake you made
Title: Re: Cauldron Skeleton
Post by: JackMan on October 29, 2013, 05:11:03 PM
Quotehow can you tell regulated vs not?

They're not always labeled. If you're not sure, the only real way to tell is to check the voltage output with a meter without a load. If it's not regulated, the voltage output will be substantially higher than the rating. A non-regulated power supply will output the rated voltage when the load is equal to the rated mA on the power supply. A load larger than the rated mA's will drop the voltage output below the voltage rating and in turn, if the load is less than the rated mA's, the voltage will be higher.
Title: Re: Cauldron Skeleton
Post by: youngti on October 05, 2016, 10:53:43 AM
hi all.  I have a question and maybe you guys can help.  This prop has been up and running for a couple of seasons.  It starts to work great, does everything that I wanted.  But a few hours into the night I notice that it is acting tired.  What I mean is it is still working but the head and jaw barely move.  I have the servos on a separate 7 volt 2 or 3 amp power supply form the HC8+.  I checked the servos when this was happening and they were not hot, so I am not sure where to go with this. 

Any suggestions?  is it possible there is some regression in the code?  looking at it myself I cant see anything in the code that would cause it but I am far from an expert.  I was originally thinking that maybe the servos were getting overloaded but I would think then they would be hot.
Title: Re: Cauldron Skeleton
Post by: JackMan on October 05, 2016, 01:08:48 PM
7 volts to the servos raises a flag for me, most standard servos can't tolerate more than 6v.
Title: Re: Cauldron Skeleton
Post by: youngti on October 06, 2016, 10:44:31 AM
Okay, I will check that.  But JonnyMac did say that voltage was less important than amps and suggested a power supply in the range of 6 to 7V and 2amps. 
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 06, 2016, 06:38:47 PM
So it's either my code getting tired or my bad suggestion for servo voltage?   :o

I know of some servos that run fine at 7.2 volts but I don't know what the long term implication is, nor what servos you're actually using (I hope you consulted the manufacturer data sheet [and in future I will not make recommendations that can be used against me or EFX-TEK]). The code base you have is identical to what is running in major amusement parks and neither has ever commented on things misbehaving after running several hours.
Title: Re: Cauldron Skeleton
Post by: youngti on October 06, 2016, 07:06:45 PM
Wow, Okay so I never said anything about the code being tired I said the prop.  I certainly didn't mean to insinuate you did anything wrong.  I am just looking at options.  I think I said I am far from an expert in the coding and just was asking if its possible.  Also I just said you suggested the option not recommended it and I had no intention of using anything against EFX-TEK or anybody.

Sorry if I upset anybody.
Title: Re: Cauldron Skeleton
Post by: JackMan on October 06, 2016, 07:21:22 PM
What brand and model servos are you using?
Title: Re: Cauldron Skeleton
Post by: JonnyMac on October 06, 2016, 08:45:09 PM
I'm a writer and an actor and the meaning of words are important to me. From my point of view, I felt I was being blamed when I only tried to help. That said, I was being jokey with my response and even used one of those silly face things.

I refreshed the last version I found posted with my latest drivers.
Title: Re: Cauldron Skeleton
Post by: youngti on October 10, 2016, 09:52:30 AM
Thank you.