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 : http://www.youtube.com/watch?v=B0XdQ6GRexo&feature=plcp .
i build a prototype using the schematic of the pdf and it works great. It has a range of more than 20m and it doesn't lose power with the time, the capacitor is a 200uf 4v that i desolder from an old remote, the led is a tsal6100. I still need to put a smooth capacitor on the line but it works fine also without it. Now i'm designing the board in eagle.
i'm building a datalogger around the pic24fj64gb002 that saves the data from an accelerometer, temperature sensor, and a gps on a micro sd card and has also an usb port for configure the device and also for print the data if the pc doesn't has an sd card slot. I want the device to be as small as possible so i'm searching a small gps module (max 18mmx18mm and very thin) that can be soldered directly to the pcb and works on 3,3v. Thanks for the help.
i think i will use timer0 and timer3 as 16 bit counter and i set timer1 to x second and every time the interrupt fires i do in the isr tick from the encoder / x second so i now the speed of the tho wheel
hi, i'm planning of doing a robot with two motors and two encoder. for the motor part there is no problem but i don't know how interface the pic (a 18f4620) to the encoder. I was thinking of using timer 1 and timer 3 as counter but i dont understand if i can use them in the same time and how. the encoder give only one square wave that at maximun speed of the motor has a frequency of 2khz.
i use this code:http://www.d.umn.edu/~cprince/PubRes/Hardware/SDcard/ and interface correctly with a micro sd card. Now i have another question, i need to read the analog value of the x,y,z axes of the accelerometer every 0,25 s but i don't understand how i can wake up the pic and then read the values. If i use a timer then how can i step in the main?