Please check my circuit for errors..

Hey im building this line follower from scratch so im not directly using an arduino board, im building a pcb using atmega328... there is an l293D motor driver, infra red sensors, voltage regulator ..
sensor output goes into the analog input and motor driver input pins go into the digital ports.
Im a total noob at this, so kindly help me :slight_smile:

linefollower2mine.sch (192 KB)

Sorry my machine won't read a .sch file.

Lefty

It looks like you have a LOT of wires that are not actually connected to the pins they look like they are connected to. You probably started with the Arduino reference schematic, which has several components "off grid" making them difficult to connect to. Use the "electrical rule check" (exclamation point in yellow circle) and fix (or at least understand) each of the errors and warnings that it shows.

You can move an off-grid component back onto the default grid by holding down CTRL when you pick it up in a "move" command. Otherwise, "move" wil keep it at the same offset from the grid that it was originally placed.

No obvioius problem that I can see but I know nothing about the 293.

I do see some things like GNDs that don't appear to be connected.

One question, how are you going to program the chip?

BTW posting the schematic as a PDF or JPG might get you more viewers, not eveyone uses Eagle.


Rob

Oh yeah; just checked. On the L293D, VCC1 is a "logic" supply and should be connected to your +5V rail. VCC2 is the motor power with the separate connection. The "EN" inputs should be tied to +5V rather than VCC2 (though I can't find an actual spec for the EN input voltages...)

I do see some things like GNDs that don't appear to be connected.

Wont that automatically be connected once i switch it to board? connecting every gnd in the schematic would make it look crowded right?

Oh yeah; just checked. On the L293D, VCC1 is a "logic" supply and should be connected to your +5V rail. VCC2 is the motor power with the separate connection. The "EN" inputs should be tied to +5V rather than VCC2 (though I can't find an actual spec for the EN input voltages...)

Oh thanks , i shall rectify that..

You can move an off-grid component back onto the default grid by holding down CTRL when you pick it up in a "move" command. Otherwise, "move" wil keep it at the same offset from the grid that it was originally placed.

im sorry i didnt really get you, besides that my CTRL key wont work :smiley:

and heres the original circuit in .jpg format. thanks everyone :slight_smile:

Wont that automatically be connected once i switch it to board? connecting every gnd in the schematic would make it look crowded right?

In general you have to define EVERY required connection in the design, which you pretty much have. It just seemed to me that a couple of them may not be properly connected and need checking. If they aren't they won't get connected on the PCB either.

Another possible dodgy connection is pin 4 on the mega and the GND connection on the middle opto and probably many more as westfw pointed out.

Also, as I said, how are you going to program the chip?


Rob

Also, as I said, how are you going to program the chip?

I have an arduino board with me, so i could program the atmega328 using the board and then use it in this circuit.. That would work, right?

That would work, right?

Yes that will work, it gets a bit annoying if you have to do it 100 times though. You can use your other Arduino as a programmer but I've not done that so can't advise.

If you have to do your development with the board (and chip) in the bot I'd add provision for an FTDI cable or something so you can make code changes easily, and use a chip with a bootloader installed.

Believe me, you'll be changing your code a 1000 times until it "works" and then more when you make changes. You want the procedure to be as painless as possible.


Rob

If you have to do your development with the board (and chip) in the bot I'd add provision for an FTDI cable or something so you can make code changes easily, and use a chip with a bootloader installed.

I thought i could experiment first with my arduino board ,making all the connections and program it, after then plug it back into my pcb....

heres the edited circuit, it still shows a lot of errors(those yellow and red exclamation marks, i hope they are not so serious).....

it still shows a lot of errors(those yellow and red exclamation marks, i hope they are not so serious)

Many were serious in the last version of the .SCH you posted. Essentially all of the "Net XXX overlaps PIN" warnings are indications of a drawing that looks ok but does not actually have a connection where you think it does. You can ignore the "part xxx does not have value." warnings, though.

check this:)
http://www.david-laserscanner.com/forum/viewtopic.php?f=9&t=2655

Hey, using the same 5volt from the voltage regulator for 1.microcontroller 2.sensor circuit(4 IR led,photodiode pair) 3.logic supply for L293D 4.enabling 2 pins ON in the L293D , is that feasible?

khalid@ thanks for the video, i really appreciate it. But how is it connected with my circuit? :slight_smile:

Don't connect AREF to Vcc, it'll may be damaged. Just have a decoupling cap to ground from this pin.

Don't connect AREF to Vcc, it'll may be damaged. Just have a decoupling cap to ground from this pin.

Just curious, why do we connect a cap there?

jayakrishnan:

Don't connect AREF to Vcc, it'll may be damaged. Just have a decoupling cap to ground from this pin.

Just curious, why do we connect a cap there?

Because that pin is connected internally to the reference voltage used for the A/D converter used for analogRead() statements. So the extra noise filtering from the cap will help improve the accuracy of the A/D measurements.

Lefty

The cap helps keep noise from the reference and therefore is often used to get cleaner analog readings.

When using one of the INTERNAL options AREF is actually connected to this internal reference, if it is also connected to say 5v you have 5v->1.1v (or whatever is selected) which is bad.

You can connect Vs to AREF but have to be very careful never to use an INTERNAL reference.


Rob

Graynomad:
The cap helps keep noise from the reference and therefore is often used to get cleaner analog readings.

When using one of the INTERNAL options AREF is actually connected to this internal reference, if it is also connected to say 5v you have 5v->1.1v (or whatever is selected) which is bad.

You can connect Vs to AREF but have to be very careful never to use an INTERNAL reference.


Rob

Actually the Arduino reference has instructions on wiring a series resistor between the Aref pin and any external voltage reference being used. That would prevent damaging current level flows in case of misuse of the analog reference command. analogReference() - Arduino Reference

Lefty