Author Topic: Building a robot - confused  (Read 2330 times)

0 Members and 1 Guest are viewing this topic.

Offline alphieTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Building a robot - confused
« on: July 17, 2012, 09:28:32 PM »
I'm so confused right now. I am using a wheel, a PIC, an accelerometer and 2 DC Motor. 1 DC motor is needed to move forward while another is need to move backwards. From the above, do i need to generate and control the PWM of the chip to drive the 2 motors...?     

and if i'm using accelerometer, do i need to write a programme for analogue to digital conversion...?

thankyou for your time reading

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Building a robot - confused
« Reply #1 on: July 18, 2012, 04:33:33 PM »
Hi,

I am using a wheel, a PIC, an accelerometer and 2 DC Motor. 1 DC motor is needed to move forward while another is need to move backwards.
"A wheel" like "a single wheel"??
Which PIC? (there's several hundred different PICs)
What do you want the accelerometer to do?
Why not use the same motor for both directions??


From the above, do i need to generate and control the PWM of the chip to drive the 2 motors...?     
From the above, you need both cunning and luck and plenty of both to succeed.
I get the impression that you are in deep water here, so back up a bit and tell us what the assignment (I suppose it is) asks you to do.


and if i'm using accelerometer, do i need to write a programme for analogue to digital conversion...?
Yes, if it's an analog output sensor.
Perhaps you should take a look at a very simple robot like the "$50 Robot" from this site (AVR based) or a similar contraption from somewhere else (Google) to get the feel for it.
When you have a handle on the basic stuff, you can add an accelerometer.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Batienzaxcore

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 0
  • Just me. Really.
Re: Building a robot - confused
« Reply #2 on: September 08, 2012, 08:12:46 AM »
Hmmm... Maybe he is talking about a pair of wheels... Anyway, maybe you should use a motor driver to drive the 2 motors. Here is what I see in your problem.

If you are using an accelerometer, you would most probably be using it to control the forward and backward movement of the motors. If that is the case, then you could pin your accelerometer O/P pin to the A/D pin of your PIC (I suggest using a 16F877A; my classmates are using it as well while doing their design project using an accelerometer and wheelchair), then use the signal as a trigger to send a PWM signal to the enable pin of a motor driver (Most probably an LM293D for me), then send out a logic 1 and 0 to the motor driver to toggle the forward and backward movement of the motor.

Try reading stuff about the following:

 - LM293D H bridges. I don't think PWM signals alone are enough to drive your motors to move.

 - How to send out and vary the PWM signal from your PIC. Varying the PWM signal coming out of the PIC vary the speed of your motor, if it is connected to the enable pin of the H bridge.

Cheers!
Music is really my thing. But I am haunted by my fantasies of seeing robots rock out - A literal metal band.