parallel port circuit

Thread Starter

modobo

Joined Apr 23, 2013
31
Hi folks, I am currently trying to build a circuit to drive a high voltage BLDC motor using a old 386 pc. I have gained all the info to send info out to drive the motor but the motor has something called a Hall effect sensor and it sends out 2 pulses of 10v in accordance to the rotation of the motor. I need to transfer these pulses to the parallel port in such a way that it can be read. The internet seems full of info about circuits that can be controlled by the parallel port but barely any on transmitting into the port.

I will be grateful if anyone can provide me with advice and circuits on how to input the pulses into the computer. Thanks in advance.
 
This is going to depend on what you mean by "the parallel port". PCs stopped using these ports long ago and you need to first see what you have on this old 386.

Then, assuming you have one, search for "interfacing with a Centronics parallel port". There are many many circuits for reading from these.Then maybe a trip down memory lane to find an old version Visual Basic 6.

Getting to a "tachometer" may be a little difficult, but can likely be done - although there may be easier ways.
 

MaxHeadRoom

Joined Jul 18, 2013
30,557
There are programs that uses the PP both directions, Mach3 for CNC for e.g.
Usually a BLDC motor has three hall sensors for commutation.
Many modern MB's have both a PP and a 9pin D plug on the MB itself.
Max.
 

AlbertHall

Joined Jun 4, 2014
12,619
The 10V pulses could drive the gate of a 2n7000 MOSFET, source connected to 0V. The connect the drain to one of the parallel port input pins with a pull-up resistor to +5V, perhaps 4.7k.
 

AnalogKid

Joined Aug 1, 2013
12,043
Tach outputs from an internal hall sensor almost always are an open collector output in the sensor pulled up to the fan operating voltage for 12 V fans. Some fans bring out the bare open collector so you can pull it up to a voltage that is different from fan power. Based on this, my guess is that you can put a 5.1 V zener diode across the tach output to GND to clip the tach pulse to something safe for the PC, and not damage anything inside the fan (no warranties expressed or implied).

The IBM PC parallel printer port is a group of three 8-bit ports in the I/O space. Port addresses and bit assignments are here:
https://en.wikipedia.org/wiki/Parallel_port#IBM_PC_Implementation

ak
 
EDITED
There are programs that uses the PP both directions, Mach3 for CNC for e.g.
Usually a BLDC motor has three hall sensors for commutation.
Many modern MB's have both a PP and a 9pin D plug on the MB itself.
Max.
Sure, but, as I said, "This is going to depend on what you mean by "the parallel port". PCs stopped using these ports long ago and you need to first see what you have on this old 386."

The original PC parallel port was designed as a printer interface and had an 8-bit port and a 5-bit port and a 4-bit., in fact, it did not have to be bidirectional. It need to have to be and frequently was not. It was there to accommodate the Centronics interface.

A few feet from where I am typing is an old XPmachine that has a PP card that I purchased - fully bidirectional - goes much further than the original LPT interface specification.

Of course there are programs to control the port, hundreds if not thousands of them. So what?

The first step, again, is to see what the TP has on the machine. Maybe the TP already has done that or maybe he just sees a connector on the back or maybe not. That is why it is the first step.

The reason I mentioned the older version of VB is because, as I recall, it has plenty in it for support of PP and, again if I recall, you can actually get it and uses. Can't get much easier than VB for programming.

I don't know what you were suggesting with your response - please explain how it relates - especially to the first step....and don't assume I am "upset", I am simply responding, just like you.
 
Last edited:

MrChips

Joined Oct 2, 2009
34,626
I have used CompactFlash memory cards that plug into HD slots and can boot off the CF memory.

Edit: oops, wrong thread.
 

ian field

Joined Oct 27, 2012
6,536
This is going to depend on what you mean by "the parallel port". PCs stopped using these ports long ago and you need to first see what you have on this old 386.

Then, assuming you have one, search for "interfacing with a Centronics parallel port". There are many many circuits for reading from these.Then maybe a trip down memory lane to find an old version Visual Basic 6.

Getting to a "tachometer" may be a little difficult, but can likely be done - although there may be easier ways.
A 386 might be old enough to not have integrated peripherals.

The more recent M$ OS offerings inhibit direct port access - there's a patch file to overcome this.
 

Reloadron

Joined Jan 15, 2015
7,850
We had a forum member here, EricGibbs who did quite a bit with the old parallel port using Visual Basic 5.0 and 6.0. I have not seen any post by Eric in awhile. I learned quite a bit of VB from him and at one time he had plenty of stuff available for download. There were also a good number of free programs out there using the parallel port. The problem was most would not run on an OS newer then Windows XP. Now if running Windows 98 or Windows XP you may be able to find something. I also forget how fast these older systems update the parallel port which may put a ceiling on pulse count.

Ron
 
Not how I read it at all. Granted, the thread was to be split/combined and without certain posts, but his original post that you referenced does not say anything about using the LPT port from DOS.:

Im currently writing a small program in qbasic on msdos. My question is can I use c to write a program that can run on a pc without having to load windows first. Is there any code that can run immediately the pc leaves the bios, an os free program?
Yep, he has a qbasic program in DOS. He wants a C program to run without Windows first. In fact, he explicitly wants to run an "os free" program. That would rule out a DOS program owing to the OS in DOS. He wants to jump from the BIOS right out to his program, free of the OS.

How much of that first thread is relevant here, I don't know. I am anxious to see how this unfolds in both threads.
 

Thread Starter

modobo

Joined Apr 23, 2013
31
This is going to depend on what you mean by "the parallel port". PCs stopped using these ports long ago and you need to first see what you have on this old 386.

Then, assuming you have one, search for "interfacing with a Centronics parallel port". There are many many circuits for reading from these.Then maybe a trip down memory lane to find an old version Visual Basic 6.

Getting to a "tachometer" may be a little difficult, but can likely be done - although there may be easier ways.
Yes, there are many circuits reading from these but barely any circuits sending info back to them
 
Top