Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
that degree was 4 years back and I dont think I remember much now!
Quotethat degree was 4 years back and I dont think I remember much now![/quote[I don't want to sound down on you or anything, but my experience is this: If you forget an education in 4 years, you will probably fail at robotics, and probably also fail at life!The voltage regulator should only be between the input voltage, and the VCC of the microcontroller. Set it to output whatever the microcontroller wants for input (typically 5V or 3.3V, but the data sheet will tell you for sure) and add a bypass capacitor and perhaps two capacitors around the voltage regulator.To regulate the speed of a motor, you use PWM output from the microcontroller. To go faster, make the PWM duty cycle longer. The H-bridge needs to be able to keep up with the frequency of the PWM. If the frequency is 200 Hz, almost anything except relays will keep up, but response will be somewhat slow, and it will be noisy. Modern MOSFET based H-bridges with fast-switching gate drives can keep up at 20 kHz and above, at which point the PWM will be inaudible.The PWM functions of a microcontroller typically are tied to whatever timer peripherals they have. The details vary be family (ARM, AVR, PIC, MSP, etc) and are described in the data sheet of the microcontroller.Thank you I will try these methods.. About the past 4 years, Ive been busy doing and learning lots of stuff man.. Its been great.. And I m coming back to tech stuff as well !
that degree was 4 years back and I dont think I remember much now![/quote[I don't want to sound down on you or anything, but my experience is this: If you forget an education in 4 years, you will probably fail at robotics, and probably also fail at life!The voltage regulator should only be between the input voltage, and the VCC of the microcontroller. Set it to output whatever the microcontroller wants for input (typically 5V or 3.3V, but the data sheet will tell you for sure) and add a bypass capacitor and perhaps two capacitors around the voltage regulator.To regulate the speed of a motor, you use PWM output from the microcontroller. To go faster, make the PWM duty cycle longer. The H-bridge needs to be able to keep up with the frequency of the PWM. If the frequency is 200 Hz, almost anything except relays will keep up, but response will be somewhat slow, and it will be noisy. Modern MOSFET based H-bridges with fast-switching gate drives can keep up at 20 kHz and above, at which point the PWM will be inaudible.The PWM functions of a microcontroller typically are tied to whatever timer peripherals they have. The details vary be family (ARM, AVR, PIC, MSP, etc) and are described in the data sheet of the microcontroller.
I don't want to sound down on you or anything, but my experience is this: If you forget an education in 4 years, you will probably fail at robotics, and probably also fail at life!
Rea1,Rea2,Rea3,Rea4=0;
while(!0) Rea1,Rea2=5; Rea3,Rea4=0;
while (!0) l_rev(); r_forw();
Rea1=0, Rea2=0, Rea3=0, Rea4=0;
void setReas(int a, int b, int c, int d) { Rea1 = a; Rea2 = b; Rea3 = c; Rea4 = d;}... setReas(0, 0, 0, 0);
#define TIMEOUT 1000... unsigned long now = millis(); while (millis() - now < TIMEOUT) { l_rev(); r_forw(); }