Software > Software

2WD Robot with pid

(1/2) > >>

Vendra:
Hey,
I need some help. I would like to do a new robot, I already did a couple but they were quite simple. Now I built a 2wd platform and bought 2 motors with encoders. I have an arduino board, a dsPIC33FJ128 MC 802 and a Raspberry Pi.
What I would like to do its to learn how to implement a good software. Something that I can improve step by step. I'd like to start with a basic control o the motors and PID and then proceed to elaborate a "map" of the environment. (Adding ultrasonic sensors, webcam and stuff)

The problem is I'm stuck Don't know where to begin. Any suggestions? Link or other stuff to read/learn could be great. Also if u want to contact me send me a pm (I can use skype)

Vendra:
Anyone?

jwatte:
Do you know how to program at all?

To run PID control of motors, you need a motor controller that allows for proportional control, and a motor encoder that gives you feedback into the microcontroller.

Also note that the quadrature sensors on most motors will be pretty noisy, so you may need clean-up circuitry to actually read them cleanly on the microcontroller (unless you use a microcontroller with built-in quadrature decoder peripherals.)

It would be hard to give more suggestions than this, because your question is so vague.
What have you already started with? Do you have any specific parts? Do you know any particular programming language? Do you have experience with any particular controller -- or are you equally good (or bad?) with the three different architectures you're listing?

Vendra:
Alright I'll try to be more clear, giving more details.

I'm a engineering student (second year). I studied electronics and telecom at high school.
My first robot was a simple robot with 2 modded servomotors a pic16f84.
The second one was the one i brought for my final exam at school. It was based  on Arduino, a 4WD rover with L298 driver. I used PWM. Also I used a pan tilt and a Ultrasonic sensor to avoid obstacles.

Now I started a 2WD platform, I got 2 new motors ( http://www.robot-electronics.co.uk/htm/emg30.htm) emg30 they have encoders and they are a little better than what i used to handle.

What I have:
-Prototype platform with 2 motor EMG30 (they have encoders)
-Arduino (Not the latest though)
-Raspberry Pi
-dsPic33F (I choosed this cause of the QEI, quadrature encoder interface)
-A board with various stuff and a L298 with a little cooling wing.

What I know:
-Assembly (Pic 8bit, University-level Arm programming)
-Java (Data structures and stuff like that, stack & piles, linked lists etc..)
-C ( Mainly the one arduino uses. A little practice with PICs)
-Pascal ( alright... :)

Anyway i have quite good experience with Arduino. I programmed a lot the 8 bit Pic series but Im kinda new to the C dsPIC programming. With the raspberry pi i don't know where to start cause i have no experience on implementing software but just embedded firmware.
I'm not afraid of learning new things, clear :)

jwatte:
That sounds great!
What is your actual question?

Or, to put another way:
1. Is your robot the way you want it?
2. If yes, you're done!
3. Make some change that makes the robot more like you want it.
4. Goto 1.

Navigation

[0] Message Index

[#] Next page

Go to full version