DC motor, tachometer, microcontroller and HSC digital input

Thread Starter

Kaladin

Joined Jul 24, 2023
5
Hello,
I am currently working on a project involving a DC motor and a microcontroller. My goal is to connect the tachometer output of the motor to the digital input of the microcontroller, but I don't know how. I've tried a few different things such as using optocouplers and resistors, but with no success.

The microcontroller in use is the Siemens CPU1214C DC/DC/DC, and its digital inputs are configured as sinking inputs. Given the high frequency of the tachometer signal, HSC digital inputs are used. The power supply is 24VDC and 0VDC.

What exactly am I doing wrong? Could it be due to the inputs being configured as sinking inputs instead of sourcing?
Do I need additional resistors to increase the current? Or perhaps a pull-up or pull-down resistor? And, what about an optocoupler? Originally, I used it because the signal voltage is too low to switch the microcontroller's input. Also, the experiment didn't work out because the maximum switching frequency of the optocoupler was too low.

1692096878774.png1692096918823.png
Link: https://docplayer.net/26224780-Pmd24-48-oem-bldc-motor-drive.html

Any assistance is deeply appreciated. Thank you for your time and patience.
-Kaladin
 

ericgibbs

Joined Jan 29, 2010
18,283
Hi K,
Welcome to AAC.

Have you checked the waveform of the Tacho out, using an oscilloscope.?
E

The clip from the d/s shows the Load of the Tacho out is a resistor transistor.

EG57_ 1062.png
 

strantor

Joined Oct 3, 2010
6,743
The diagram posted shows this servo's drive output signals configured appropriately for sourcing inputs but you have sinking inputs. If you have wired as per this drawing it won't work. You will need to swap the common/signal wires at the input card.

Screenshot_20230815-083212_Chrome.jpg
 

ericgibbs

Joined Jan 29, 2010
18,283
hi K,
The PM24 /Tacho output is a sinking output, this is connected as shown in their diagram, pulling an LED low.

If you want a Sourcing Input to your MCU use the transistor circuit they show on the d/s, the Collector resistor to the MCU +supply

E
EG57_ 1063.png
 

Thread Starter

Kaladin

Joined Jul 24, 2023
5
Hello,

@strantor, @ericgibbs, thank you for your answers.

I'm planning to reconfigure the inputs from sinking to sourcing and give it another try tomorrow. However, this might complicate things since I currently use sinking inputs also for other purposes. In that case, I'll need to find a different solution. Maybe some kind of an NPN to PNP/ PNP to NPN signal inverter. I used one to modify the signal for the run and break function.

Nonetheless, I'm uncertain if these changes will be enough. The part in the lower right corner is unclear to me.


1692109484160.png

Link: https://www.wmfts.com/globalassets/literature/m-wm-drivesure-pmd-en.pdf
- Kaladin
 

ericgibbs

Joined Jan 29, 2010
18,283
hi K,
It means when the Tacho is OFF the Vout will be greater or equal to +4.5V
When ON Vout will be Less than +0.1V or equal to +0.1V, at a current of 50uA.
E
 

strantor

Joined Oct 3, 2010
6,743
I'm planning to reconfigure the inputs from sinking to sourcing and give it another try tomorrow. However, this might complicate things since I currently use sinking inputs also for other purposes.
What is the part # of your input card? It may be possible to reconfigure individually the inputs used by this servo drive, or just a group of inputs, which the drive can use.
 

Thread Starter

Kaladin

Joined Jul 24, 2023
5
Hello,

Thank you once again.
If I understand all of you correctly, all I need to do is change sinking inputs to sourcing inputs.
@strantor Sadly, that's not possible. Connecting 24VDC to 1M will change all inputs to sourcing inputs. Assuming that "M" refers to 1M.
From Siemens Easy Book S7-1200.
1692111800573.png
Abbreviation d/s, what does it mean?
- Kaladin
 

Thread Starter

Kaladin

Joined Jul 24, 2023
5
Hello,
I rewired the PLC to change inputs from sinking to sourcing and connected the Tacho signal to one of the available HSC digital inputs. PLC failed to detect anything, but the status LED intensity increased with the drive speed. After that I added a 10k Ohm pull-up resistor as depicted in the image below and tried again, but with no success.
1692370044099.png
I also tried with resistor betwen tacho and input in which that case status LED didn't turn ON.
I am curious whether my existing wiring is correct and if the issue could potentially originate from the I/O setup in the TiaPortal.

Thank you
 

Thread Starter

Kaladin

Joined Jul 24, 2023
5
Hello,
I'm curious about how to invert a Tacho signal. Are there any components that can be placed on a DIL rail as an alternative to using a chip?

Thank you.
 
Top