ISP pins and PWM outputs

Hi

I am using an Arduino Nano, and I want to drive 2 steppermotors. For that I need 6 PWM outputs, which the Arduino Nano has. All fine :slight_smile:

I need to control them over "long" distance (10-20m), so I thought to use the CAN bus protocol, using 2 "MCP2515" modules.

The issue I encounter now is that they use the ISP protocol to communicate to the Arduino Nano. So I have a conflict on pin 10 and 11, which are both used for ISP communication and as PWM output.

However if I look to the pin layout of the Arduino Nano, I see that at the ICSP pins that there are is also a MOSI pin, can I use that pin, or is that pin just a parellel connection to D11?

Thanks in advance!

demobiel:
or is that pin just a parellel connection to D11?

Correct. This is just the same pin broken out to a different location on the board to make it easy to connect an ISP programmer. There is no electrical difference between the two. They are not extra pins.

mmmh that is what I was afraid of...

can somebody advice on my next steps? The idea is to have 1 master and several slaves (analog clocks). The master just have to tell the clocks what the current time is. This is sent every minute or so. So no much data to be sent at all.

I see 2 options:

  1. Find a way to do long distance communication via TXD RXD pins
    I see that the MCP2515 module has the TJA1050 transceiver onboard, which interfaces the bus to the MCP2515 controller over RXD TXD.

Or is MAX485 Module RS-485 a good alternative?

  1. Use software to emulate PWM, which is not really advised, and means that I have to adapt the library that I use to control the stepper motors.
    I am not sure if an emulated PWM will be fast enough for what I need to do.
    This is the library I want to use: GitHub - GewoonGijs/VID28

Kind regards,

Andries

Why do you need PWM to drive steppers? Aren't they usually hard on-off and just sequenced through?

I think it is to reduce the noise (as described in the library). If I don't use PWM you hear the gears, but when using PWM there is no noise.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.