Strange position/offset problem

More
01 Nov 2014 10:09 #52641 by andypugh

Pulses are being emitted correctly from software and hardware, and the motor driver step and direction pins connected directly to parallel port pins gives me twice the possible speed and 100% real world position accuracy, ergo it has to be breakboard's fault.


I did think it probably was. We would have noticed by now if LinuxCNC didn't work :-)

maybe the optos are too slow, or rather marginal at the parport current.

Actually, how are you driving the optos? The parport is much better at sinking current than sourcing. It's best to connect Opto+ to 5V and have the parport on Opto- and invert the software logic.

Typical parports source 3mA and sink 15mA.

Please Log in or Create an account to join the conversation.

More
01 Nov 2014 14:43 #52643 by DaBit
Modern SuperIO-based parports are even worse than that and 2-4mA is as much as one can expect. It is better to buffer the port signals with a 74244 or so before driving the optocouplers. The required 5V for that can be taken from an unused USB port or PS2 port.

Are you sure you did not set the step pulse length too short? Regular optos driven from a weak source without any circuitry to speed up the phototransistor are not exactly fast. 10 microseconds would be the minimum, and even that might prove to be a bit too fast.

To speed up the opto: the LED is not the slow part, the phototransistor is, especially during turn-off. A resistor with a value of 220k-680k between the base and emitter of the optocoupler phototransistor helps speed a lot but reduces current transfer ratio. It also helps to use the phototransistor in an emitter follower configuration, thus collector to +Vdd, emitter pulldown to GND. The transistor is not going to be faster, but when a TTL-level input in connected to the opto the logic-low treshold of 0,8V is crossed earlier.

Please Log in or Create an account to join the conversation.

More
01 Nov 2014 20:49 - 01 Nov 2014 20:50 #52658 by staviq
Optos i used were some really cheap ones i just had already, and they were driven basically like this ( PART SYMBOL IS WRONG ):



I'm thinking of using those optos:

www.tme.eu/en/details/h11l3/tht-optocoup...logic-output/isocom/

Mostly because they have logical output, so no signal conditioning will be required to provide square output wave.

The buffer looks like a good idea, i have seen projects using buffer but did not understand its role, now i do :)

Pulse length was set really high at 0.1 MILIsecond, which helped a lot with accuracy but did not fix the problem, i still had up to about 50% error.
Attachments:
Last edit: 01 Nov 2014 20:50 by staviq.

Please Log in or Create an account to join the conversation.

More
01 Nov 2014 21:14 #52661 by DaBit
If you can handle small scale SMD: check out TI's digital isolators too. Cost effective when compared to such a large amount of optos and fast.

Please Log in or Create an account to join the conversation.

Time to create page: 0.094 seconds
Powered by Kunena Forum