How to implement the motor with limit switch

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
revolution
Level 1
Level 1
First question asked Welcome!
The motor should be run up and down 1000 times and on each run
the limit switch must open and close again. Depending on the test result, a red or green LED should be switched on.
The following task has to be implemented.

1.If end position LOW - motor drive down till end position HIGH
2.If even after 12s the endposition it is still low, the red LED should be turned on followed by end.
3.If the end position within 12s is high, the motor should run 1000 times.

I have already implemented two output pins for the motor up and down positions, one for end position, one for green led and one for red led.

Please guide me how can i proceed with this task. I have never worked with Psoc, this is first time. I highly value any suggestions you provide me.
 



 

 

0 Likes
1 Solution
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @revolution 

To start with using PSoC, you may choose a PSoC4 board and look into the following thread for code examples.

https://www.infineon.com/cms/en/design-support/software/code-examples/psoc-4-code-examples-for-psoc-...

The code examples will help you to get an idea about how to use the different subsystems and peripherals. 

You can also look into the following PSoC product for motor control applications:

https://www.infineon.com/cms/en/product/evaluation-boards/cy8ckit-037/

If you need more information on any topic please let me know. 

Regards 

RupakC

View solution in original post

0 Likes
1 Reply
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @revolution 

To start with using PSoC, you may choose a PSoC4 board and look into the following thread for code examples.

https://www.infineon.com/cms/en/design-support/software/code-examples/psoc-4-code-examples-for-psoc-...

The code examples will help you to get an idea about how to use the different subsystems and peripherals. 

You can also look into the following PSoC product for motor control applications:

https://www.infineon.com/cms/en/product/evaluation-boards/cy8ckit-037/

If you need more information on any topic please let me know. 

Regards 

RupakC
0 Likes