Skip to main content
Topic: line follower with dspic33fj128mc802 (Read 8602 times) previous topic - next topic

line follower with dspic33fj128mc802

i'm planning of building a robot with a dspic33fj128mc804 and two encoders for implement some dead reckoning algorithms so for learn something on the dspics i build a line-follower, it uses 6 analog sensors that are read with the auto-scan capability of the chip, the pwm is 12 bit and the control loop runs at almost 30 kHz (it only calculates the line position and the do a very simple PD routine that use fixed point math).
The controller runs at almost 40 MIPS.
I win most of the parts on the sparkfun freeday :D.
Here it is a video : .

Re: line follower with dspic33fj128mc802

Reply #1
can i get the coding for my reference since i using dspic33fj64mc802 for my robot. but still can code well. this is my email: "mutiara_hitam02@yahoo com"

Re: line follower with dspic33fj128mc802

Reply #2
Here it is the code, it is very very bad written but it works ok...

Re: line follower with dspic33fj128mc802

Reply #3
Hi Exapod,

I have download your coding and go through,but can I get your schematic/components too?

What IR sensor do you use & bluetooth module you use?

Did you display printf using Hyper terminal?

If i am using USB microstick (dspic33fj64mc802), where should the printf be display? because hyper terminal only support serial communication?


Re: line follower with dspic33fj128mc802

Reply #4
Good speed in the video - looks like almost 0.5 meters per second. This make me want to build my own line follower.... Maybe some day....

Hey rajaafiq - Nice email address.  It's strange how one can pick up parts of a language without even trying. After 3.5 years in Malaysia I actually know what Mutiara Hitam means in bahasa :-)

Re: line follower with dspic33fj128mc802

Reply #5
i'm sorry but i don't have a written schematic, but it is very simple...
The two cell lipo is regulated to 3.3v with a linear regulator ( not the best choice but it was the only thing i had around), the sensor are QRD1114 and i'm reading them with the ADC of the pic, i have a n-mosfet for switching the led on or off, the circuit is similar to this . The dspic has the core cap and the 100nF on the supply lines.And that's it, let me know if you have any problem

Re: line follower with dspic33fj128mc802

Reply #6
Thanks for the info,

But what about the PrintF communication between dspic and PC, where do you diplay the value? on window hyperterminal or in MPlab?

Re: line follower with dspic33fj128mc802

Reply #7
I display it on my pc with putty, but any terminal program will work

Re: line follower with dspic33fj128mc802

Reply #8
I'm brazilian and I'm an Eletrical Engenering Student. I'm working on a project really similiar to yours, but I'm not sure of a lot of points. Actually, I'm kind of "lay". So, I'd like to know if you can send me your codes or even some information about the components of your sistem. It would really help a lot and I'd be thankfull. Anyway, thanks and congrats.

gilberto_loiola@hotmail com