November 22, 2024, 03:12:42 PM

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.


Having trouble with input

Started by Deathtouch, April 19, 2010, 08:36:08 PM

Previous topic - Next topic

Deathtouch

Thank you.  I didn't think it would be that complicated.  I thought that what I had would have worked.  Thank you very much!

Deathtouch

Ok, you will have to excuse me.  I am not understanding what the trigger is.  What is the trigger connected too?
And are you saying that pin7 and 6 have to be shorted for DN?  How is the Pin5 connected for pull down?

SYMBOL  Trigger         = PIN7                  ' SETUP = DN
SYMBOL  Limit1          = PIN6                  ' SETUP = DN
SYMBOL  Limit2          = PIN5                  ' ULN is pull-down

JonnyMac

Please download and read the Prop-1 docs -- my comments that follow will make more sense.

P6 and P7 have SETUP jumpers that preset the open state of the input (note that if the ULN is in place this acts like jumpers in the DN position).  It's important, for active-high inputs, that the SETUP jumpers be in the DN position.  Since we need a third input for this program we're using P5 and the input resistors of the ULN are acting as the pull-down for us. 

The critical thing is to have the SETUP jumpers in the DN position -- if they're in the UP position you'll be fighting the pull-down effect of the ULN which could lead to false starts.

For your inputs you will use NORMALLY OPEN buttons between the W and R pins on the input header (male, 3-pin).  The easiest way to do this is to get some of our 14" extension cables and cut them in half, giving you two connectors.  Add your switch (using speaker wire to extend to the length your prop needs) between the red and white wires (you can remove the black).
Jon McPhalen
EFX-TEK Hollywood Office

Deathtouch

Let me rephrase my question.  What is the function of Trigger?  I understand the funciton of the other two inputs, which allows the prop-1 to know the limits of the motor but what does the trigger do?

Deathtouch

April 21, 2010, 07:23:17 AM #19 Last Edit: April 21, 2010, 10:53:07 AM by Deathtouch
I did read about the up and DN setup, which makes sense but didn't when we were talking about the trainer mod. Specially when I had to pull the jumper off to allow the trainer to work. Unless the trainer already has a pulldown. Which I don't remember if it does.  When you brought up the subject again about making these inputs, I thought the same problem would occur.

JonnyMac

The Trigger input allows you to control when the prop activates.  You would typically use a PIR or floor mat (both are compatible with the code I wrote) to detect your "victims."

The Trainer is not compatible with all projects -- like this one; your requirements dictating three inputs (trigger + two limits) make it incompatible.  Pull it off and connect your normally-open buttons/switches as I described above.

The Trainer circuitry is shown it its documentation.  There are no pull-up or pull-down on the button input; being connected to P6 which has a SETUP jumper, this would be redundant.

I strongly suggest you spend a couple free hours reading through the Prop-1 forum, even projects that don't seem to pertain to what you're doing -- you'll learn a lot from the exchanges.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

QuoteIsn't the goto main acceptable?

The GOTO Main command is fine and typically what is used but as I mentioned and so did Jon, you didn't have any type of trigger to start your prop. This would be fine if you just want the prop to continually cycle, but if you want it to come to life when someone approaches or you want manual control for starting it, you need a trigger, (PIR, Mat Switch, Manual Switch, etc). You mentioned in your first post that your program just keeps looping, the absence of any trigger at the start of the code is the reason why.

Deathtouch

Actually that is what I was planning on doing but after he put in the trigger, I thought it would be a good idea.  Plus I can use the jumper and by pass it when I need it to run continous.

JonnyMac

The reason I use GOTO Reset is this clears all the pins to the desired starting state and creates the one-minute post-trigger delay.  This is dropped into the beginning of the program so that using a PIR you can get out of the field before it drops into the trigger routine.

Please trust that I have 30+ years of programming experience and every line of code that I write is deliberate; I won't steer you wrong.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Deathtouch,
          I wasn't implying that you should change any of the code that Jon provided, by all means, use what he gave you cause he is the man when it comes to code!  ;)

Deathtouch

Sorry.  I trust you guys fully.  I was just confused is all.  Thanks.