Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help: Digital Polarity Inverter

Status
Not open for further replies.

freeskier89

New Member
Hi! I am trying to make a 3d scanner for a science project and for this, I need to move motors back and forth across a threaded track. In order to move the 12V DC geared motors back I would need to put (-) to the (+) terminal of the motor. Doing this physically with your hands would be easy; just cross the wires, but I have had a bit more difficulty doing this with a parallel port of a computer. My thoughts are using 4 transistors as seen below in the picture attached.

Basic Idea:
My thoughts would be send 5V through one data terminal on the parallel port to 2 transistor bases and have the emitter connected with the parallel port ground. Then the motor would go forward. To make the motor go back I would send 5V through a different data pin to the other 2 transistor bases. I wouldn't send current to the first 2 transistors. This is description is vague and incomplete, but writing another page or 2 of description would probably be boring to read (even more than it already is! :D )

I tried this with a 3V watch battery as a parallel port output and a 9V battery input, but it didn't work. (I tested with a multimeter not 12V motor)
-Is my logic off?
-Did I accidently fry the transistors in soldering process?
-Is 3V and 9V above the limits of a tipical NPN transistor?
-Did I mess up some where in the soldering process?

Sorry for the lengthy post! If anyone could offer any assistance that would be awesome! :D I am fairly new to electronics if you can't tell, so this one is getting quite frustrating.

Thanks! Please tell me if you have any questions!
 

Attachments

  • electronics_diagram.gif
    electronics_diagram.gif
    5.1 KB · Views: 994
Errr your BJT's are bypassed - they are not even used!!!!, well when i say not used, i mean not used as they shoudl

When you turn them on you would have shorted the supply => potentially blown BJT!!!!!

those voltages would not have damaged the BJT's
You are missing freewheel diodes
the top BJT's will not turn on fully since they are NPN and not from a isolated/floating supply

search this board, there has been alot of chatter abt H-bridges
 
Here is a circuit that will do the job. With a logic of 0V the motor will turn one way. With 5V it the motor will turn the opposite direction.
 

Attachments

  • logic_contorl.jpg
    logic_contorl.jpg
    8.5 KB · Views: 965
Hey thanks for all of your replies! :) This really helps. One problem with your circuit k7elp60 is that how could I turn it off? I am going to need to know how to turn on other components (ex. lasers) easily with transistors. These will need to be either "on" or "off". If I knew how to do this, I could turn the motors off (just use a transistor in front of the circuit you showed). I am hoping there will be a simple answer to this. How does this schematic actually work? (I know I am a newbie :lol: ) And what are the circle things up at the top right? AND when you specify logic common, does this mean the -12V is connected to logic 5V? Ok, one final question: On the 12V DPDT relay, would this work: https://www.radioshack.com/product.asp?catalog_name=CTLG&product_id=275-249? If so, are 2 for current and the other 4 to hold it?

Again thanks for all of your help you guys! Sorry for my lack of intelligence in this area! :lol:
 

Attachments

  • transistor_377.gif
    transistor_377.gif
    1.6 KB · Views: 862
For turning something on and off with a transistor is this kind of how you do it? Or am I way off again!

No no no, you sort of got the idea, but not quite.

The transistor requires a 'base resistor' between your 5V logic and the base. Also, don't use "in" and "out". They are meaningless in this context. If you have the emitter grounded, then your load must go between your positive supply and the collector.

The "circle things" you mention, are simply schematic representations of switch contacts.
 

Attachments

  • transistor_145.gif
    transistor_145.gif
    1.8 KB · Views: 870
Looking at the original circuit that I posted. With the logic at 0 Volts the motor has one polarity across its terminals. With the logic of 5 volts the relay energizes and supplys the opposite polartity of voltage to the motor. As a result the motor turns the opposite direction.
The new circuit shows an additional relay. This relay turns on power to the motor circuit. It uses a transistor driver like the motor control relay. It uses a seperate logic control to activate it.

The relay in the new circuit is labeled. The labels mean:
N/O Normally open
N/C Normally closed
C common or wiper
Coil requires voltage to activate.

When selecting a relay the contact have a current rating. The Radio Shack relay that you selected will be fine if the motor you are controlling requires less than 5 amps to operate it. If the motor requires more than 5A then I suggest the 275-218 Radio Shack relay.
 

Attachments

  • logic_contorl_149.jpg
    logic_contorl_149.jpg
    13.8 KB · Views: 875
First of all I would like to thank you all again for helping me with this subject! :D It took me a bit longer to reply this time because I had to start making all the brushes I needed for an Image manipulation program I have.

I think I finally understand most of the circuit but before I build it I want to make sure I have it right (No, k7elp60 I don't think your circuit is wrong, but there were a few minor things I was confused about, so I made my copy of yours that seems a little bit simpler to me) I'm not sure if everything is correct in the transistion and addition of the extra "on/off" SPDT relay, so it would be great if you could go through one of my schematics for hopefully the last time :) . Sorry for compressing things in a small space so you might have to zoom in near the second relay. The relay pics instead of proper schematic symbols were another simpler for me thing.

Again thanks for all of your help and ability to bear my lack of knowledge for the subject! Oh, and I just realized that I forgot to add a resistor at one of the bases.

-freeskier89
 

Attachments

  • simplified.gif
    simplified.gif
    15.2 KB · Views: 806
Anyone, correct me if I'm wrong, but where freeskier has connected the logic GND to the -12V, I can see this causing dramas. GND normally represents 0V. Now, if you connect 0V and -12V directly together, I would expect to see smoke, unless one of the supplies is floating.

I'm not really familiar with parallel port specs. Does the port supply float?
 
Phasor said:
Anyone, correct me if I'm wrong, but where freeskier has connected the logic GND to the -12V, I can see this causing dramas. GND normally represents 0V. Now, if you connect 0V and -12V directly together, I would expect to see smoke, unless one of the supplies is floating.

It depends entirely on the point of reference, which he doesn't make at all clear?. I read it as the 12V supply is totally seperate, with -12V just being the negative connection of a floating 12V supply - but it's certainly confusing the way it's written, and subject to various interpretations, most of which wouldn't work.

I'm not really familiar with parallel port specs. Does the port supply float?

No, the port ground is connected to the case. All supplies in a PC are referenced to 0V, which is the case, and external ground.
 
I think the confusion over -12V arises, because the "-12V" rail should really be the 0V rail.

Bearing in mind, freeskier is using a 12V motor; if true 12V and -12V rails were used, the motor would have a 24V supply and very quickly burn out!

Wherever "-12V" has been marked, should be revised to "0V". Makes much more sense that way!

EDIT: Nigel, I just realised you basically said that in your previous post.... just didn't catch it... :!:
 
Sorry about the confusion. The + and - 12V are all on the same supply. Are k7elp60's markings incorrect also for indicating both positive and negative 12V? Would I even connect to the parallel port GND? Where k7elp60 has logic common does that mean that part is connected to parallel port GND or logic pin? Or does it mean something totally different.

Again thanks for your help!
 
First let me appologize for the confusion in regards to the 12 volt supply. I have relabeled the schematic to indicate 12 volts with a + and - terminals.
freeskier89 your connections to the relays are incorrect from normal configuration. But as you indicated you will connect them correct with the markings on the relays. I have also redrawn my schematic to indicate the SPDT relay to turn the power onto the motor control. The important thing is to have the logic common connected to the 12V powersupply -(negative terminal)
Just so you know on relays, with the configuration you showed in your schematic for the relays. The top terminals are usually the N/C (normally closed) The next terminal down is the N/O (normallay open) and on the DPDT the third terminal down is the C (common or wiper) On the SPDT the C terminal can be in various positions.
 

Attachments

  • logic_contorl_753.jpg
    logic_contorl_753.jpg
    16 KB · Views: 741
I am surprised to not have seen only a brief mention of H-bridges... it's probably the most common method of driving DC motors I've seen, and allows forward and reverse, and is easily controllable via two inputs. I guess it's up to personal preference whether you want to use a relay or not... personally I don't generally use them, they cost more than transistors, take up more space, are slower (a problem if you are trying to switch the motor very quickly back and forth, or use PWM) and I would imagine that if you're changing the direction of the motor reasonably often, the clicking noise could get annoying :lol:
 
Thanks so much for all of your assistance! I think if finally know how to assemble the circuit discussed in this thread. I know that H-Bridges are used more often, but I like this method more and the clicking sound of the relays won't be a problem. They won't be switching direction to often. This has been one of the first electronics projects I have done (I know, its obvious :D). Too bad the only time electronics are even close to being taught in my high school is physical science where you essentially learn how to set up series and parallel ciruits with light bulbs. :( Thanks again!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top