Go Down

Topic: PWM and 4-wire stepper motor. (Read 4008 times) previous topic - next topic

Robin2


OK, I will now trying to draw something in GIMP.


A photo of a pencil drawing will be fine, if it is easier.

Keep the size of whatever picture you post at or below 1280 x 960

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Qwseyvnd

Here's picture; I hoping that you understanding.

Robin2


Here's picture; I hoping that you understanding.


Sorry, no - I can't make any sense of the picture.

What has it got to do with how you control a stepper motor - which is the title of this Thread.

I can't help if you don't ask a question.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Qwseyvnd

I am trying to find a solution to not use several bytes and read/write memory; which would require:
16-bit 65536 increment on heading
16-bit 65536 increment om 7000 km X
16-bit 65536 increment on 700km Y
and same with #2
and many bytes to other calculation such as compass, magnetic, etc.

Here's a solution:
arduino card sends output to #1 heading, X and Y coordinate position to/from airplane
#2 heading and X Y position read from #1 with logic, arduino reads input from #2 heading position, then arduino reads angle between heading #1 and #2 then send to the autopilot so it turn to the angle that I have set input instead calculate each realtime of heading #1 and #2 and don't use logic.

I know that there is easier way to use stepper motor, it would require a lot of processing power if I am using microstepping which are a lot better because of precision.

tylernt


I am trying to find a solution to not use several bytes and read/write memory;


Why? 10/10 for being efficient, but you'll drive yourself nuts trying to save RAM if you don't need to save RAM. You've got 2KB of RAM, and you can use 1,000-1,500 of those bytes leaving room for the stack and heap.

Don't optimize prematurely. :)

Quote

I know that there is easier way to use stepper motor, it would require a lot of processing power if I am using microstepping which are a lot better because of precision.
Yes, there is an easier way. Use a stepper motor driver board. No extra processing power for microstepping.

Robin2


Here's a solution:
arduino card sends output to #1 heading, X and Y coordinate position to/from airplane
#2 heading and X Y position read from #1 with logic, arduino reads input from #2 heading position, then arduino reads angle between heading #1 and #2 then send to the autopilot so it turn to the angle that I have set input instead calculate each realtime of heading #1 and #2 and don't use logic.


Sorry, I'm trying hard not to cause offense but I just don't understand this.
What does the Arduino send out to?
Where does it get input from?

Maybe you should start by focusing on getting a single instrument working and ignoring the rest of the system. All complex projects must be built up from a collection of small sections each of which can be developed and tested on its own. Trying to manage the whole project as a single item will only lead to frustration and failure.

Quote
I know that there is easier way to use stepper motor, it would require a lot of processing power if I am using microstepping which are a lot better because of precision.


If you use a proper stepper motor driver board - a Sparkfun Easydriver, BigEasydriver or a Pololu A4988, for example - the microstepping is all done for you. The Arduino only needs to send step signals. (But I suspect I have said this already).

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Qwseyvnd

OK, why I concentrate at this item because it mainly control how the airplane behavior.
If I building fuel tank gauges and toggle switches, I would need to have throttle potentiometer, engine gauge, etc.
But Now I am trying to... building transponder gauge which contains just 5 or 6 rotary encoder and 1 or 2 toggle switches; on a breadboard!

Robin2

I asked 2 simple questions in Reply #20

If you don't wish to answer them I am not going to spend any more time on your problem.

I also suggested that you start with a single piece of your project and you did not comment on that either.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up