Encoder with feedback

i already manage to make a programming where the mobile robot will move to certain location... however, i need to know, how to make a feedback for encoder... my project was wall climbing robot for spherical surface.... the mobile robot will climb by the chain... it is difficult ot say here... so... probably my mobile robot will be move after stop.... the question is:-

how to make a feedback for my encoder to get back to my position if the mobile robot move again after stop.?

I used dc motor with encoder.... the program was complete to certain position....

You probably don’t have enough space (memory) in the platform you are using. Good luck Simon

please someone help me.... hurmmm

please someone help me.

Well, OK. I voted for 2. Hope that helps.

mattnor:
i already manage to make a programming where the mobile robot will move to certain location… however, i need to know, how to make a feedback for encoder… my project was wall climbing robot for spherical surface… the mobile robot will climb by the chain… it is difficult ot say here… so… probably my mobile robot will be move after stop… the question is:-

Do you want us to write the code for you?

Perhaps post what you have done already.

no.. its simple... just go to encoder programming for arduino... it will teach the command... I would to know... is there any reference for me to make a command for that purpose... It easy for me to understand... or is there any work already done cuz i search through google... i fail to get it

google translate should be helpful. What you posted makes zero sense to me in English. mobile root, spherical wall, encoder feedback and chain? Write a post in your language and do google translate.

yes… i know… i think u are not understand how it moves… my topic was design and development of mobile robot for spherical surface specifically for spherical tank in oil and gas industry… it will do inspection for spherical tank… the mechanism was totally different… we are looking to make different mechanism… i know everyone will condemn this idea… the idea is the mobile robot will move on the track… the track is chain… chain will support the mobile robot… there are no vacuum or magnet that will stick the mobile robot on the spherical tank… i hope that the dc motor with encoder will help me if the mobile robot is sliding down because my lecturer told me the encoder can give a feedback where the mobile robot will move again to the position if it sliding down… did u understand now…???

Perhaps you could use accelerometers/inclinometers or other tilt-sensing mechanisms & keep track of the angle achieved, then return to that angle after the slide.

http://www.atmel.com/Images/doc8354.pdf

AVR4200: Inertial One (ATAVRSBIN1) Hardware Users Guide
(file size: 874064, 7 pages, revision A, updated: 11/2010)

The Atmel Inertial One sensor board delivers a full nine-degree-of-freedom sensor platform—combining accelerometer, compass, gyroscope, and temperature sensor—that is ideal for developing motion sensing or user interface applications.

Also is it possible to measure resistance of the chain or something to determine the location?

actually... i think the angle of chain to move doesn't give problem to me... because i already design the mechanical body where it is flexible and with the position of chain get through to the sprocket it can stick on the spherical tank... i just want to know... is there any command for encoder to give a feedback... it might be someone did not understand what is the feedback that i mean... feedback that i means here is, if the dc motor move again the encoder will detect and will move the dc motor again... thankzz for everyone help... :slight_smile:

Yes, there is a "feedback". Every time the motor rotates, it rotates the encoder with it. You count the pulses coming out of the encoder to determine how many turn the motor makes. Say if the encoder gives 12 pulses for each full rotation, you count 120 pulses, it means the motor rotated 10 turns. But I warn you, this is not entirely related to how long the chain is rolled up or down since the chain itself has size and an empty spool has less radius than a full spool with chain wrapped on it. Tricky.

is there any command for encoder to give a feedback

There exists servos, and other motors with encoders, which have commands to read back the encoder value that the servo/motor reads.

There also exist servos, and other motors with encoders, which do not have commands to read back the encoder value.

You have to know which particular brand and model of motor/servo/encoder you are using, and then look in the documentation/data sheet for that motor/servo/encoder, to see whether there is a command to read back the value that the encoder has.

thankzzzz it help... based on the user manual... i'm not found yet anything talk about it... i will try to ask them at their tutorial... to have their answer quiet late compare to here... i will update it later... this is motor driver with encoder that i buy... thankzzzz

I don't see how the encoder will be 100% helpful " if the mobile robot is sliding down ", unless the encoder works effectively while sliding.

mattnor:
http://www.cytron.com.my/viewProduct.php?pcode=SPG30E-150K&name=DC%20Geared%20Motor%20with%20Encoder

There is not a “command” at all for that encoder. It simply provides pulses. You have to hook those pulses into an interrupt handler, and count them yourself. If they have a library that does this for you, then you have to read the source code of that library to understand what it’s doing.

In the abstract, the way you want to build these kinds of “goal seeking” systems, is something like this:

volatile long curPosition;
volatile long desiredPosition;

void update_direction() {
  if (desiredPosition < curPosition) {
    run_motor_backwards();
  }
  else if (desiredPosition > curPosition) {
    run_motor_forwards();
  }
  else {
    stop_motor();
  }
}

ISR(my_pulse_isr_vect) {
  if (direction == backwards) {
    curPosition--;
  }
  else {
    curPosition++;
  }
  update_direction();
}

void set_target_position(long targetPosition) {
  cli();
  desiredPosition = targetPosition;
  update_direction();
  sei();
}