Go Down

Topic: Data logging Motor Rotation pulse across 55 Treadmill motors with arduino (Read 935 times) previous topic - next topic

dc42

As I said before, an Arduino is the wrong device to receive 55 x RS232 channels concurrently. It might just be possible if the baud rate is very low, but the software would be complex. However, if the boards are silent most of the time and then send a single character over the RS232 when one motor rev occurs, then you only need detect the start of the character, and it becomes much easier.

If all the sensor boards are required to do is communicate that a motor revolution has occurred, then I would use a much simpler interface. The US1881 that I referred to earlier can work from a 12V supply.

You need to know the maximum motor RPM (hence the maximum pulse rate), to determine whether one Arduino can manage the data from 55 sensors concurrently.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

robbietapping

Looks like your idea is a goer. Will get the US1881's tomorrow. The upper limit is 5500RPM @ 22km/ph normally user will do 18km/ph on the treadmill, but the device is being used in a competition scenario,
so the treadmill motors get pushed to the max.

Thanks for all your help, i may come back and ask more questions tomorrow.. :) hopefully not.

dc42

5500rpm is nearly 100rpm, or 1 pulse every 10ms. That's faster than I was expecting. Here are a couple of issues you might face:

1. Keeping the motor sufficiently well balanced when you glue magnets to a rotating part. A US1881 needs to see a N pole followed by a S pole, so you can glue 2 small magnets on opposite sides of a suitable rotating part. However, at 100 revs/sec, any imbalance will cause vibration. You might better of sticking with optical sensing, especially as the necessary hardware is already in place.

2. The US1881 will generate a 1:1 square wave if you position the magnets diametrically opposite each other (so will a suitably-designed optical pickup). To register a pulse, then Arduino needs to see a high and a low state. So you need to sample and process each input at intervals of 5ms or below. I would aim for 3ms in case the pulses are not quite square. That's one input every 55us on average. That's easily doable, especially if you read all the inputs from a shift register using SPI at maximum rate. But if you are not careful, then any I/O or writing to flash that you do may cause pulses to be lost.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up