go_away

Author Topic: How to make alogrith for a artificial intelligence line follower.....??  (Read 6928 times)

0 Members and 1 Guest are viewing this topic.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #60 on: November 03, 2011, 11:46:14 AM »
OK, now 298 is working as i want [...]
Well done  ;) Why didn't it work before?

[...] but should i connect any resistance or buffer to 298 enable and input pins??? while connecting uC to 298 directly will cause any hazard or not??
As long as You don't go over 7V for Your logics and use quick recovery diodes to block EMF from motors - You're fine.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #61 on: November 03, 2011, 09:10:16 PM »
Quote
Why didn't it work before?

I think there must be a problem .....( can't guess)

OK, i was just checking the input pins rating while connecting 12Kohms resistance the 298 was working perfect then i change voltage from 5V to 1V at 1V to 2.5V the 298 was not working but after 2.6V it start working ....I have connected the logic suplly voltage to 5V then also it was working...!!

SO, working with LDR for line follower is creating a problem while testing:-
1.) the response time was very less..
2.) I can't check properly which ldr is working due to light interface..!!
as i am using 100K variable resistance at 26-27Kohms ...........

Pls tell should i continue with LDR or just have IR leds?? and if IR then which  IR receiver diode one or TSOP 1738 one (  wires)

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #62 on: November 04, 2011, 02:31:52 AM »
Using LDR for line following is not the best decision, as change in light conditions will greatly affect performance (although it is possible to overcome these issues).

The better option, as You already mentioned, is to use IR Emitter/Detector pairs, which, speaking plain, are pairs of IR LEDs and IR phototransistors (IR sensors do not work well with masking tapes, so if line to follow is going to be made of one, consider Your choices well). They can be used with:
  • op-amps in Schmitt Trigger configuration to create digital output (0V when white line is not detected, 3.3V when white line is detected)
  • resistor to create "variable" voltage divider, which outputs varying voltage to ADC as IR intensity changes

Schmitt Trigger option is more efficient.


Have a look at these articles to get deeper insight on what You want to use:
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #63 on: November 04, 2011, 07:15:14 AM »
But IR led switching at 38Khz........but here it is not used why???

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #64 on: November 04, 2011, 07:40:57 AM »
But IR led switching at 38Khz........but here it is not used why???
I'm not sure I understand what You ask for.
« Last Edit: November 04, 2011, 09:58:34 AM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #65 on: November 04, 2011, 08:10:40 AM »
Quote
I'm not sure I understand what You as for.

As in fig you can see there is no source of 38khz switching freq. which is required for IR led......

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #66 on: November 04, 2011, 10:00:12 AM »
As in fig you can see there is no source of 38khz switching freq. which is required for IR led......
You don't necessarily need frequency modulation (if You have that in mind).
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #67 on: November 04, 2011, 10:50:24 AM »
Quote
You don't necessarily need frequency modulation (if You have that in mind).

After checking 3 different IR lED i came to know that IR can work without any switching freq. ( common used 38Khz) i was watching with digital camera all are glowing like visible LED ..

But why in remote control we use switching freq. for IR led??

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #68 on: November 04, 2011, 01:09:48 PM »
Remote controls switch at 38KHz primarily to make it easier to filter out the noise from background light--the receiver is often pointed towards a window, so being able to pick only the 38KHz signal helps to significantly improve the SNR. This is not nearly as much of an issue for line following, since the main light source is the LED.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #69 on: November 04, 2011, 03:08:54 PM »
Quote
You don't necessarily need frequency modulation (if You have that in mind).

After checking 3 different IR lED i came to know that IR can work without any switching freq. ( common used 38Khz) i was watching with digital camera all are glowing like visible LED ..

But why in remote control we use switching freq. for IR led??
I think we don't speak about the same thing... Do You ask about IR circuit used for line following or for remote control?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #70 on: November 04, 2011, 09:00:00 PM »
Quote
Remote controls switch at 38KHz primarily to make it easier to filter out the noise from background light--the receiver is often pointed towards a window, so being able to pick only the 38KHz signal helps to significantly improve the SNR. This is not nearly as much of an issue for line following, since the main light source is the LED.

Hi again,

Thanks for the light on my doubt.
Quote
Do You ask about IR circuit used for line following or for remote control?

I got my answer ........
and IR is working well then LDR & easy to use..!!

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #71 on: November 05, 2011, 01:32:05 AM »
I was testing my circuit using multimeter......it is working fine with it.
But testing with uC( quick start board) the output is not working well.....I have have tested my code with DIP switch in place of sensor output all code are right i don't know what problem in  it........

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #72 on: November 05, 2011, 08:10:12 AM »
You have to tell us what is not working well. What do You expect it to do on certain condition and what it actually does?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #73 on: November 05, 2011, 08:28:16 AM »
First the event is on Monday........!!So we have to be fast.

In my circuit the output from 339 is working as on black surface the output is partial zero..0.5V nearby.
and on white it goes to 3.5 depend on surface..!
while vcc was 4.0V from 1 Li-cell.

So, should i add chip like 7414??
or any changes in value of resistance ??

and when i connect the circuit with Vcc 3.3V of uC...
the output seen in LED of uC is not working well.
Note:- Code are right no error.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #74 on: November 09, 2011, 07:05:27 AM »
How was competition?  :)
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #75 on: November 10, 2011, 04:24:06 AM »
Quote
How was competition?  Smiley

Hi again,

well every thing was fine my motor was running well while testing code.
but my code was not so good enough in testing condition of sensors
so, i have to complete it.
If we talk about completion my Bot was not ready and the others guys who has got the Bot was fully Ready made buy from company as it is.

they have done only coding part.
There was one more guy with his team who has also brought robot by self hard work it was also not working ( incomplete)

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #76 on: November 10, 2011, 06:47:46 AM »
You were going the right way with it, however, You did not leave Yourself enough time to finish it. Just finish it now, so next time You have more knowledge.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #77 on: November 10, 2011, 07:36:41 AM »
OK, as my IR circuit was totaly different as in society of Robots so can tell me how to make more sensitive circuits for R sensors.......

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #78 on: November 10, 2011, 07:43:53 AM »
OK, as my IR circuit was totaly different as in society of Robots so can tell me how to make more sensitive circuits for R sensors.......
To start with, i don't know what circuit You used  ;D Why didn't You use circuit from SoR? It's simple and very effective.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #79 on: November 10, 2011, 11:14:40 AM »
Hi ,

I was using simple comparator with Wheatstone bridges as posted earlier (post71)  ...
actually i was not able to get why SOR was using a feedback Resistance??
can you explain the schematic working?? why it is more effective than my basic comparator..!!

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #80 on: November 10, 2011, 12:37:54 PM »
Why use comparator at all? Look at the circuit below:



R2 and T1 creates voltage divider. If You measure voltage between them when IR LED rays are detected by T1, You get around 0V as T1 is fully ON. When IR LED rays are not detected - T1 is fully OFF, hence voltage between T1 and R2 is going to be around Vcc.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #81 on: November 11, 2011, 09:21:32 AM »
Quote
R2 and T1 creates voltage divider. If You measure voltage between them when IR LED rays are detected by T1, You get around 0V  as T1 is fully ON. When IR LED rays are not detected - T1  is fully OFF, hence voltage between T1 and R2 is going to be around Vcc.

I think this schematic will mot be so power full without comparators??
and if i will do freq. modulation of 38Khz will this effect in its working  more precise??

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #82 on: November 11, 2011, 12:45:19 PM »
What do You mean by "more powerfull"? What do You want to achieve with comparator? What do You want to achieve with modulation?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #83 on: November 11, 2011, 11:55:44 PM »
Quote
What do You mean by "more powerfull"? What do You want to achieve with comparator? What do You want to achieve with modulation?

It should be more sensitive..............

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #84 on: November 12, 2011, 03:01:21 AM »
some one suggest me while using IR with 38Khz its absorbing and performance  will increase and efficient, is this true??

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #85 on: November 12, 2011, 03:44:07 AM »
Quote
There can be with some CMOS digital inputs because if the voltage is between logic states, both transistors in a totem pole will be conducting, and it could get hot.

One more suggestion from an engg.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #86 on: November 12, 2011, 06:01:09 PM »
Could You post a circuit which You are willing to use?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0

Offline RITESH29Topic starter

  • Robot Overlord
  • ****
  • Posts: 152
  • Helpful? 0
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #88 on: November 14, 2011, 05:04:30 AM »
In this circuit i don't understand the use of feedback resistance..

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: How to make alogrith for a artificial intelligence line follower.....??
« Reply #89 on: November 14, 2011, 05:39:10 AM »
Hello again  :)



In the circuit You pointed me to Op-Amp is used as Non-Inverting amplifier. R3 and R4 creates voltage divider which feeds only part of the output voltage back to inverting pin of an Op-Amp. As Op-Amp tries to hold potencial voltage difference of inverting and non-inverting pin at 0V, it increases output as required. So, if Your R3 = R4, then feedback voltage will be exactly 1/2 of the output voltage, to compensate the difference between input pins Op-Amp will increase output voltage 2 times making difference = 0V.

Play around with this Non-Inverting Op-Amp circuit.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

 


Get Your Ad Here

data_list