Hi guys. Please help me with my problem. First I will explain what my device can do.
FIrst, the device will ask for a user time input. Then a stepper motor will turn in that specific time and then after 2 minutes. A loadcell will measure the current weight. and based from that measurement. A GSM module will text a message
All of this things are already working except for one part.
My problem is when the stepper motor starting to turn, the loadcell output start to distort.
Example the current weight output is 500.. (example)
Then when the stepper turn
The loadcell output changes from 490 to 530
Just like this
490
500
530
510
520
Just like output random numbers.
In stepper i use L293D, The input of Arduino is an 12V adaptor 500mA, I also tried 12V adaptor 1500mA. But both of them give me the same output.
My problem is when the stepper motor starting to turn, the loadcell output start to distort.
Example the current weight output is 500.. (example)
Then when the stepper turn
The loadcell output changes from 490 to 530
Just like this
490
500
530
510
520
Just like output random numbers.
No, random values would fluctuate a lot more in the possible range of 0 to 1023, yours are most likely responding to circuit noise as the motor is activate and causing variation around the nominal value of 500. You probably need to try some filtering with caps on the motor circuit. And/or you could attempt some software filtering where you make say 8 consecutive readings adding them in to a variable and then divide by 8 and see if that helps with the variation. This kind of problem can be difficult to solve and access to a scope might help.