November 22, 2024, 10:07:15 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.


Trouble with a Solenoid

Started by davisgraveyard, September 21, 2008, 08:41:26 PM

Previous topic - Next topic

davisgraveyard

I am trying to rattle a solenoid on a Prop-1.  This is code that used to work but now I have a new Solenoid.  Nothing is currently happening.

THe main code that does the work looks like this

FOR i=1 to 10
   HIGH 0
   PAUSE 100
   LOW 0
   PAUSE 100
NEXT

in the main part of the code I am doing

DIRS "%00111110"

I have the solenoid wires connected to PIN0 on the terminal block and to GRND

I am able to touch the wires to V+ and GRND and the solenoid fires fine.  It is a low amp 12VDC solenoid for an older model car lock.  I am using a 12VDC 1A  power supply.

Why wouldn't this be doing anything.   If I put my volt meter on P0  and GRND the voltage never shows when the HIGH 0 is being called?

What am I doing wrong?


Jeff









JonnyMac

You may have already killed the output connected to P0.  The only way to tell is to put a Prop-1 Trainer on it and try to run the program; if the LED blinks, consider yourself lucky.  If not, there is nothing you can do but abandon the use of P0.

I'm not terribly rules based, but here's one to live by: NEVER connect an inductive (i.e., anything with a coil of wire) to the TTL output pins; they are not protected and can only provide about 20ma -- this is probably a lot less than your coil takes.  And... here's the kicker: since you only supplied it with 5v (instead of 12v that it's spec'd for) and it wants a certain number of watts (volts x amps) to operate the current draw was even larger than you think.  I'm pretty certain you have a dead pin.

Lesson: If it has a coil -- no matter what the load -- connected it to OUTx.

BTW, HIGH and LOW make the associated pin an output so it doesn't matter what was previously written to the DIRS register.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

I'm not sure if I don't understand what you are saying or if you didn't understand what I was saying?

What do you mean I only supplied it with 5V?   What do you mean by TTL output pins?    I connected the solenoid to the 12V header block?  When I said P0 I meant PIN 0  programatically.  I was using the OUT0  termnial block and the GND to connect the Solenoid. 

My issue is that if I take my volt meter and measure OUT0 and GND when the code is firing I see no voltage on the HIGH 0.  But I AM able to connect the solenoid to V+ and GND and it fires. 

I am pretty sure that the solenoid doesn't take much to run I was able to fire it stand alone with a 12VDC 200ma power supply.   This particular solenoid for the car door lock has a very small DC motor in it that is geared up to push the rod out.  You can hear the gears move when it pushes out.  You have to reverse the polarity to pull it back.  In my case I am only interesed in the push since I am rattling a gate with it.   Sounds like a pretty small low powered motor. 

I can still run the trainer to see if the board is working right but I think it is?

Jeff



JonnyMac

Quote from: davisgraveyard on September 21, 2008, 08:41:26 PM
I have the solenoid wires connected to PIN0 on the terminal block and to GRND

This line lead me to believe that you have the solenoid physically connected to the TTL header (to me PIN0 means TTL header, OUT0 means the terminal block).  Whew!  I'm relieved and now I understand the question.

The OUTx terminals switch ground, not V+, so you will never see anything with a meter connected between OUTx and GND.  If you put the red lead of your meter on V+ and the black lead on OUT0 you will see activity.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

So I am still confused about what my real problem is?   Are you saying I should test the V+ and OUT0 with the volt meter and see if there is activity to prove that things are working and if so that there must not be enough power to run the solenoid?  I'll give that a try but can't help but think there is something else basically wrong.  This used to work with another 12V solenoid hooked up?

Jeff

JonnyMac

I guess I don't understand the question -- we're both confused....

You will never see 12v (given a 12v supply) by checking between OUT0 and GND, no matter what state P0 currently holds.  Think of the ULN2x03 as a switch that connects between GND and the OUTx terminals.  When you make P0 an output and on with the HIGH command the GND terminal is routed through OUT0.  So if you put a meter between OUT0 (ground side) and V+ (hot side -- make sure power switch is in P2) you will see about 12 volts.  When you make P0 and output and off with LOW it's like opening the switch between GND and OUT0 -- like pulling one of your meter leads free; you won't read anything.

As for the solenoid, if it will activate between V+ and GND it should work between V+ and OUTx.  I say "should" because there is a small voltage drop between GND and the OUTx terminal through the ULN (about 0.7 volts); in most cases this never bothers the external circuit.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

OOHHH!!!  I knew what I was doing was something stupid!!!!

I had the leads of the solenoid connected to OUT0 and GND not OUT0 and V+.   I'll swap it and I bet it works!

We just weren't communicating there for a bit.  Thanks for turning the lightbulb on "so to speak".

Jeff


JonnyMac

<southern accent>What we had here was a failure to communicate....</southern accent>   ;D
Jon McPhalen
EFX-TEK Hollywood Office