Author
Topic: First Robot - Help needed :) (Read 2319 times)

Hey I only started with robotics couple of days age and already have quite ambitious idea for a robot. The robot has 3 basic functions:

Going in a circle

Avoiding walls

Going after an object (using edge detection)

The robot itself is very similar to $50 robot (the only difference really is that i don't use electrical design and instead of photoresistors I want to use Sharp IR Range Finder). I did chose that robot mainly because it seems to be quite popular (thus quite a lot of tutorials on it) and also because it's simply cool

I have already finished electronic scheme and design.>Link to image<Also i only just started learning how to use CAD software so i apologise for the quality of the design.

Servo 1 and 2 are used as motors (modified) and Servo 3 is used to move Sharp IR sensor. By my calculations I will get 610mA in servo circuit in worse case scenario and 230mA in microcontroller circuit. Also I thought about op amp for sensor but is this really required?

If somebody could please have a look at this design and verify this has at least a slight chance of working I would be very thankful

@z.s.tar.gzThanks Putting it together and then finding errors is probably going to be the case. As i only started with robotics (and electronics) i wanted somebody to tell me there isn't an obvious error that i made because of lack of knowledge. I didn't have much about electronic engineering in school (yet) and most of my knowledge comes from 2 weeks of reading about it.

The DC connector shouldn't be shorted in the switch, the purpose of the switch is disconnecting a battery supply when you use an external supply and batteries going *Kaboob* is not funny.

You should use less capacitance on the input of C1 and C2 AND use around 20..25µF on the output of the voltage regulators.

I don't see the point in using two voltage regulators and unless there should be a reason that I just cannot dig out of your (slightly confusing) schematic, you should remove VR2 - it won't work anyway, as it isn't grounded as is.

You should use the correct symbol for the controller - if you make a layout for a PCB from what you have, you're gonna have a hard time plugging in the PIC

You need decoupling caps on the controller supply lines.

Not that it matters a lot, but the connector row marked "PRG" is upside down - it's pin 6 that isn't used (marked "AUX" in some descriptions) and pin 1 is Vpp.

You need to control the unused lines (I'd suggest pulling them to Vdd via 80k to 100k resistors), or you'll see "funny" behavior.

I did got the point that you haven't got much experience with Eagle CAD or schematics in general, so here's a few pointers that would go a long way to make them readable...- An important, but much overlooked "rule" is that positive supply lines are drawn on top. Most negative supply (here Gnd) is drawn at the bottom. Inputs go on the left and outputs on the right. There will be situations where this is not possible, practical, or plain "misuse" of the drawing area, to follow, but whenever possible... It makes a schematic so much easier to read.- Using bus lines cut down on the hard to follow wires.- You are using an unspecified "LEDBAR" without linking to a datasheet or even just making notes of how the LEDs are connected within it. From the schematic I can decrypt that the anodes are on the left and cathodes on the right, but it's not an instant read.I see that you use two LEDs for "Power Good" signals from the regulators, but as mentioned, you should be able to make do with a single regulator, so, unless you have the bar already, using plain old 3mm LED's makes more sense IMO, as you're only utilizing half the bar (if you get rid of the 2'nd regulator) and bars are usually more expensive than "loose" LEDs.

If, by chance, you don't intend to make a PCB layout from the schematic, you're wasting time drawing it in Eagle - ink and paper is way faster.

If you post the Eagle files ".sch" and ".brd" (if you've made it), I'll fix it up a bit and make it more readable.

Logged

Regards,Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?Please remember...Engineering is based on numbers - not adjectives

The idea about DC and two power supplies was that it would be either DC jack or battery packs connected at the same time, and switches simply enable me to disable any power input instead of plugging them off. However I must admit that knowing me I would be very likely to forget to plug DC jack and watch my battery packs fry

For capacitors you are absolutely right... I just noticed that it should be 1-10uF for every amp (from one of electronic tutorials) NOT 1-10uF for every miliamp... That is a huge failure from me, thanks for pointing it out.

The general idea behind VR2 was that I limit power supplied to servos so that I have a constant one. This would make me feel a bit more secure about my other calculations (such as current drain) and keep things more static in the circuit. I suppose this is not necessary it's just my insecurity showing up. I will go with your advice and remove it.

I am currently considering few microcontrollers (all of them have the same or very similar pinout so it doesn't pose much of a problem) so i didn't put the correct one on the design. The one i am most likely to use is PIC18F1320, I could not however find a footprint for it for EagleCAD.

What rating decoupling capacitors should I get? Do you know any good tutorial about decoupling you could recommend. I did go through two already but the way in which it was explained was very chaotic for me as a beginner.

I didn't notice that PRG was upside down in fairness... Just my inability to spot simple and obvious things. I am sure however that the pins are connected to the right pins on the PCI microcontroller.

The LEADBAR on the item list is linked to the item on onlineshop. I should have made it a bit more visible. The datasheet can be found here: http://www.rapidonline.com/netalogue/specs/55-0190e.pdfThe main reason why I wanted to use LED bars, is because in my opinion it looks better I know its my first robot and it's not going to be all shiny and beautiful but I am trying to keep it neat.

With the board it's a bit more difficult (as to make a scheme for it) situation. I am using 1.6mm thick, stripboard (10cm by 7.5cm). Firstly this enables me to have as many layers as i would only want (as effectively the connections can cross each other as cables are isolated) and I have not got that far in operating EagleCAD. In fairness I am used to using computer for most things in my life. It would probably be a bit easier to use pen and paper to start with but i just feel more comfortable using computer (especially that it gives me experience with CAD software) also if I want to send some design on forum or to friend its easier. My scanner is hid deeply in my room and digging to it might be a problem

Use an analog pin - Sharp IR sensors have nonlinear output, so it wouldn't really be all that helpful to amplify it. An A/D pin at the PIC's 10bit reading will be fine. Take a look at admin's IR tutorial for how to code it.

The idea about DC and two power supplies was that it would be either DC jack or battery packs connected at the same time, and switches simply enable me to disable any power input instead of plugging them off. However I must admit that knowing me I would be very likely to forget to plug DC jack and watch my battery packs fry

OK, it could be switched by the switch in the DC connector (most, but not all have them).When you plug in an adapter, the battery is disconnected - easy and nothing to remember

For capacitors you are absolutely right... I just noticed that it should be 1-10uF for every amp (from one of electronic tutorials) NOT 1-10uF for every miliamp... That is a huge failure from me, thanks for pointing it out.

Caps on a voltage regulator is not so-and-so-much capacity for a given current (I'm not talking about the buffer cap that should follow a transformer supply here). These are to keep the regulator from oscillating and to suppress noise.

For eg. an LM317, around 220 nF on the input and 22µF on the output is a good solution, both should be mounted as close to the regulator pins as physical possible.

The general idea behind VR2 was that I limit power supplied to servos so that I have a constant one. This would make me feel a bit more secure about my other calculations (such as current drain) and keep things more static in the circuit. I suppose this is not necessary it's just my insecurity showing up. I will go with your advice and remove it.

I am currently considering few microcontrollers (all of them have the same or very similar pinout so it doesn't pose much of a problem) so i didn't put the correct one on the design. The one i am most likely to use is PIC18F1320, I could not however find a footprint for it for EagleCAD.

I have made a circuit with the PIC13F20. A few connections is still missing on the board, so here is a tentative schematic:Full resolutionYou cannot tell the pins used, as I didn't put it down yet, but the busses got them embedded, so it will come out right in the end. I made it with 3 busses (in, out and program), but normally, I'd have made just one bus, as that makes the schematic cleaner. I added a reset circuit (and button) and pull up resistors too.

What rating decoupling capacitors should I get? Do you know any good tutorial about decoupling you could recommend. I did go through two already but the way in which it was explained was very chaotic for me as a beginner.

As mentioned, 220nF and 22µF is OK for most regulators. LDO regulators may be a bit more hysterical on values and you need to know the specific type and consult the data sheet - Which one are you planning to use?

With the board it's a bit more difficult (as to make a scheme for it) situation. I am using 1.6mm thick, stripboard (10cm by 7.5cm). Firstly this enables me to have as many layers as i would only want (as effectively the connections can cross each other as cables are isolated) and I have not got that far in operating EagleCAD. In fairness I am used to using computer for most things in my life. It would probably be a bit easier to use pen and paper to start with but i just feel more comfortable using computer (especially that it gives me experience with CAD software) also if I want to send some design on forum or to friend its easier. My scanner is hid deeply in my room and digging to it might be a problem

Well, I find it a waste of time laying out on a PC for stripboard (you can get CAD programs for that as well though) and smaller circuits, I don't even draw ahead when using stripboard.

If had some time and could make small changes to it I would be thankful On side note if you could also let me know what/how/why have been changed so that i can understand more behind what i did wrong and do it right next time it would be great If you dont however find time to play with it it's fine

I do it in between "chores", so it might take a bit longer.Sometimes, I don't notice why I make a change (I just do it unconsciously, based on decades of working with electronic design), but I'll try to jot it down on the schematic and what I don't, just ask.

BTW. If you like to use the LED from the supply #2, it could be used to show whether it's running on battery or mains. And if you're gonna use rechargeables, a simple charger could be added, so it charges when on mains (with a LED to show that too).

Logged

Regards,Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?Please remember...Engineering is based on numbers - not adjectives

OK, it could be switched by the switch in the DC connector (most, but not all have them).When you plug in an adapter, the battery is disconnected - easy and nothing to remember

I did read about it somewhere, but I couldn't find any decent explanation how it works, only how to make it work. Do you have a link to any good explanation of that? (I will search for it again so quite likely I will find something myself but if you have something that could help please share )Also what is +UB symbol on your schematic?

I am slightly confused now. In one of the tutorials (on societyofrobots.com as far as i remember) it said that circuits like that should have two supplies: one for microcontrollers and sensors and one for motors. My idea was to use two battery packs, and additionally add one DC jack. Two battery packs would then go one for microcontroller and one for servos, and in case DC jack was plugged it would server both servos and motors (since my DC supply should be able to cope with sudden changes I decided to just use one DC jack for both purposes instead of two jacks). On your schematic I can see only 1 input for both purposes. Is it my inability to read schematics or is it intentional? Is that rule of having two supplies even valid/important?

As mentioned, 220nF and 22µF is OK for most regulators. LDO regulators may be a bit more hysterical on values and you need to know the specific type and consult the data sheet - Which one are you planning to use?