Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
1) This is the backlight I refer to, connect pin 15 to pin 1 of LCD connector, pin 16 to GND.2) pin 3 is to be connected to 10K ohms preset at the LCD power connector mid pin.3) see ans 1)4) yes, is correct.
LCD MCUPin Port01 GND GND02 VCC +5V03 Contrast Mid pin of 10K preset04 RS PC4 Pin 4 of LCD Connector05 R/~W PC5 Pin 3 of LCD Connector06 E PC6 Pin 2 of LCD Connector07 D0 No Connection(NC)08 D1 NC09 D2 NC10 D3 NC11 D4 PC0 Pin 8 of LCD Connector12 D5 PC1 Pin 7 of LCD Connector13 D6 PC2 Pin 6 of LCD Connector14 D7 PC3 Pin 5 of LCD Connector15 A B-LED Pin 1 of LCD Data connector16 K B-LED GNDB-LED Backlight LED
You connection was in-correct, The connection as followCode: [Select]LCD MCUPin Port01 GND GND02 VCC +5V03 Contrast Mid pin of 10K preset04 RS PC4 Pin 4 of LCD Connector05 R/~W PC5 Pin 3 of LCD Connector06 E PC6 Pin 2 of LCD Connector07 D0 No Connection(NC)08 D1 NC09 D2 NC10 D3 NC11 D4 PC0 Pin 8 of LCD Connector12 D5 PC1 Pin 7 of LCD Connector13 D6 PC2 Pin 6 of LCD Connector14 D7 PC3 Pin 5 of LCD Connector15 A B-LED Pin 1 of LCD Data connector16 K B-LED GNDB-LED Backlight LED
Tuning the PID control This is the most interesting part in building a PID control. In this step one should tune the Kp, Ki and Kd values to get the best results. I cannot give you the values because what works for me will not work for you. The optimum Kp, Ki and Kd values vary a lot from robot to robot. And the best way to determine the optimum values is by trial and error.First, set all values to 0 and start with tuning the Kp value. First time I just gave an approximate value. Seeing the robot perform will determine what you should do next. If the robot wobbles a lot reduce the Kp value, if the doesn't follow the line (goes straight in curves) increase the Kp value. Tune the Kp value till the robot smoothly follows the line. By now you will have observed that the robot goes with no acceleration on straight lines. Now, tune the Kd term. After tuning the Kd term move to the Ki term. After which, you will see the robot first center over a straight line and then accelerate also.Note: The optimum Kp, Ki and Kd values vary a lot even from track to track. You can only know these optimum values by testing.
http://www.societyofrobots.com/member_tutorials/node/361QuoteTuning the PID control This is the most interesting part in building a PID control. In this step one should tune the Kp, Ki and Kd values to get the best results. I cannot give you the values because what works for me will not work for you. The optimum Kp, Ki and Kd values vary a lot from robot to robot. And the best way to determine the optimum values is by trial and error.First, set all values to 0 and start with tuning the Kp value. First time I just gave an approximate value. Seeing the robot perform will determine what you should do next. If the robot wobbles a lot reduce the Kp value, if the doesn't follow the line (goes straight in curves) increase the Kp value. Tune the Kp value till the robot smoothly follows the line. By now you will have observed that the robot goes with no acceleration on straight lines. Now, tune the Kd term. After tuning the Kd term move to the Ki term. After which, you will see the robot first center over a straight line and then accelerate also.Note: The optimum Kp, Ki and Kd values vary a lot even from track to track. You can only know these optimum values by testing. Have you change the Kp, Ki and Kd values?
Secondly,When our sensor array was connected to 5V VCC and GND, IR leds werent emitting light. When giving direct 9V from the battery they were emitting light. Iguess they arent getting enough current. Should be we using 1K resistors instead of 10K to solve this problem ? or what ? We have our competition coming soon. please help sir.
Quote from: bhavyabhatia on August 16, 2013, 09:41:25 AMSecondly,When our sensor array was connected to 5V VCC and GND, IR leds werent emitting light. When giving direct 9V from the battery they were emitting light. Iguess they arent getting enough current. Should be we using 1K resistors instead of 10K to solve this problem ? or what ? We have our competition coming soon. please help sir. The IR LEDs was supply by the 120 ohms resistor R1, the 10K resistor was for the photodiodes, what do you means by "giving direct 9V from the battery"? to which part of the circuit?Giving 9V may kill the MCU Atmega16 which only operate on 5V.
OK - we are talking about providing power to light up LEDs? You need to determine the appropriate current limiting resistor based on the supply voltage and the LED voltage / current specification.Let us assume that your LED takes 1.2 volts and has a current rating of 20mA (0.02A) and you want to run it off your 5 volt regulated supply (note: I am just making these numbers up - use the real numbers for your LED)We will have the resistor and the LED in series. If we want to have 1.2 Volts across the LED, and we have a 5 volt supply, 5 - 1.2 = 3.8 Volts that have to be dropped across the resistor. If I have to drop 3.8 Volts, at a current flow of 20 mA (from the LED spec) then we can apply Ohms law to find the appropriate resistance.R = V/I = 3.8 / 0.02 = 190 Ohms Pick the next larger standard resistor for your circuit - something like 200 or 220 ohms. If you have tried hooking up the LED directly to your power supply (either 5 or 9 volts) you need to buy a new LED.
He has 8 LEDs in parallel - at 20 mA per LED that comes to 160 mA total current at 1.5 volts per your spec.Subtracting 1.5 from 5 we get 3.5 V 3.5V drop at 0.16 amps gives us 22 Ohms. I would use something larger than 22, but 120 Ohms seems to be high.Now, given that these are infrared LEDs - how do you know that they do or do not light up?
It was clearly visible in the camera whther they lit up or not.