reSpawner Bot

Go To Last Post
34 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello. I'm working on a robot platform which I can upgrade later as I have more parts and of course, have more experience since I'm still a newbie to this world of microcontrollers. I designed the PCB in Eagle and I tried to foresight things that I will want to add later, like a RF radio module other sensors and things like that.

Here is the schematic for the power supply:

and the main schematic:

and a CAD of how the chassis will look like:

Before I start creating the PCB and then etching it I want to hear some opinions from experienced users, because this will be my first project out of the breadboard.

Thanks in advance,
reSpawn.

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Instead of trying to anticipate what you might want to add in the future, you may want to implement some sort of bus, and then you can stack additional boards with the new functionality onto the robot as you go. This way you're never painted into a corner with what you envision today. By all means, add some of the higher priority items, but I highly recommend allowing for some form of communications bus as well.

Also I suggest additional filtering on your AVCC and AGND pins as per Atmels recomendations. All your ADC connections should tie to AGND,and not GND as well. You need to keep the two separate, as your digital circuitry will introduce noise on GND, that may affect your ADC's accuracy and stability.

For your LED's, use individual current limiting resistors for each one, not one per pair. Resistors are cheap, and this will result in more even intensity between the two LED's.

Another thing, is that you're likely going to find that the servos are not going to provide enough power for your drivetrain (depending on what you're hoping to do). You might want to look into using regular motors, and H-bridges instead.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like 4 rc servos, probably modified for continuous rotation and speed control. (Can you command them to reverse?) Does it steer by brute force and just drag the wheels around? And one more question... is there any speed feedback, or do you just command it to go straight by setting all four speeds the same and hope for the best?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using an individual resistor per each LED won't result in a bigger current drain?

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One resistor feeding more than one led is a problem if the leds are even slightly different... from different batches for instance. The lower voltage led will hog most of the current. Resistor per led evens it out.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why would it? the current is determined by the resistor/LED combination. It's the same amount of power (assuming you size the resistor appropriately), only now each LED will get the current it wants. The way you have it now, one LED could steal more current thus starving the other. When this happens one will be brighter than the other.

[edit] Bob beat me to it. :)

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, I will fix this. Any other suggestions ?

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah! I asked 3 questions up there!

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On your power supply you need more bulk capacitance on the output side (470uF minimum). Also you should add a small 100nF capacitor in parallel to that on both the input and output.

I would also suggesting adding a small bulk capacitor at each of your power take-offs, like each servo. A 100nF cap at each of your connectors isn't a bad idea either.

I just noticed you used a 22pF cap as a bypass cap on the AVR... this is too small... it should be in the 100nF range, and you should have one for each VCC/GND pair. (in addition to the AVCC filtering suggested before.)

Also depending on if you are going to have a plane, or traces to distribute power and ground, you may want to add additional capacitors on the board to smooth things out.

You may want to add pull-ups or pull-downs on any of your I/O lines to hold things in a safe state during reset, and to provide termination while running.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

Last Edited: Wed. Jan 2, 2008 - 06:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Whops! I haven't noticed.
Those servos are modified for continuous rotation and they don't have speed control. I just pwm'ed them at 1,5 ms(neutral position) and modified them, and yes. For speed control, I could use some sort of software PWM, but I don't think about that right now, and about speed feedback, I know in how much time the servo completes a rotation, I know the wheel diameter, so I can calculate it depending on the duration of the PWM.
argh. That capacitor is 0.1uF(I saw this in sparkfun tutorial) not 22pF. I've forgot to change it when I 'copy/pasted'

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So the PWM is the speed control. So to turn left, make both motors on right go fwd, make front left go fwd slow, and make back left stop? Maybe just drive back 2 wheels, make front wheels casters that rotate freely like a shopping cart?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't control the speed unless I will modify the circuit of the servos, but yes, something like that. To turn left, I will PWM both right servos to go forward, and the left ones to go backwards. I hope this will work. I could have done it with 2 normal wheels and one caster, but I badly wanted a 4wheeled robot

Nicu reSpawn.

Last Edited: Wed. Jan 2, 2008 - 07:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My guess is he's using skid steering like a tank. Stop or reverse one side to turn the bot. The turn radius could be controlled by varying the speed on the one side.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can control the turn radius after I experiment a little with it. For instance I know it takes 0.96s for the servo to complete a rotation(in theory, I can't guarantee it's like that in reality untill I test this out), with this info, I can compute how much time I will have to PWM the servos to turn X degrees, at least I hope so.

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I can't control the speed unless I will modify the circuit of the servos

??? - On modified (360 degree) servos the pulse width of the PWM determines both direction and speed of the servo. Pulses close to 1.5 ms (depending on where you fixed the pot) move it slow, while pulses closer to 1 and 2 ms move it fast.

My difficulty has been to hold these modified servos absolutely still, since you're having to produce a pulse width exactly corresponding to the value of the pot/resistor you used in the modification. This would be a particularly nasty problem with 4 drive wheels, whether using tracks or not.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hence my suggestion of using H-bridges and normal motors. The control system would be much easier. The addition feed-back encoders on each driveshaft would close the control loop producing a fairly accurate speed and direction control system.

In fact I would probaly reduce to 2 drive motors (or add sensor wheels on each side), with encoders, and then place encoders on the other 2 wheels. This would allow you to calculate any slippage that might be occuring. So you don't end up moving in a giant arc. The undriven wheels are less likely to slip than the driven ones in a straight line. During cornering the outside wheel will give you the most reliable data, as the inside one will be experiecing high amounts of slip, though both will be experiencing some amount of slip.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why four motors?

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

four motors for four wheels, and because I didn't wanted to get things complicated, at least that's what I wanted to obtain: simplicity

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok glitch, I took your advice(half of it, I don't have AGND and GND separated). Here is the new schematic:

Can someone take a look and tell me if there is something wrong with this one? I hope I've "wired" those capacitors correctly (I'm a newb in electronics)
Edit:
here is the modified power supply:

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Whats the name of the net on pin 2 of the photo res right and left? Need a BFC... 1000uf on the 6V.... not 22 pf

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pin 2 is always +5V. Okay, 6V has no regulation at all, I'll add that 1000uF cap, maybe even a bigger one?

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It aint gonna route if you dont name the net. Unless you route it manually, in which case you dont need to name any of the nets.... just keep em all in your head. I still vote for 2 driven wheels and casters.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

They have that name, but it is not shown on the schematic. Anyway with 2,4,6 wheels the PCB is the same :P

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Schematically all the GND's can be the same. But when you route them route them separately, tying them together at only with single point connectons. You actually have 3 grounds you should route on different tracks.

Power ground: this is your 6V ground for your servos, you don't want this path crossing any of your analog or digital points. Run this one from the 6V input connector, to the servo connectors, with only a small tie point to digital ground at the 6V connector.

Digital Ground, This is your 5V ground for everything else, except the analog section. Route this from the 5V Connector, to everything else.

Analog Ground, route this from the AVR to all your Analog connectors & components. Only tie this ground to digital ground at the AVR itself. Do not have any other non-analog components along this track.

Overall it looks a lot better. You still have those 2 22pF caps at your voltage inputs. In both cases they should be larger. As bob stated the 6V one should be much larger, 1000uF should be enough. Don't overdo it, too much capacitance can be a problem as well. On the 5V side you can put a smaller one (but still bigger than 22pF), say in the range of 10uF to 47uF.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

reSpawn wrote:
four motors for four wheels, and because I didn't wanted to get things complicated, at least that's what I wanted to obtain: simplicity

?
Aren't 4 motors more complicated than 2?

Most bots I've seen are two wheel drive, which seems to me would be simpler and cheaper than four. Since two wheel drive seems to work for most terrain, I thought maybe you were making something for rough terrain or had some unusual need that 2 wheels won't do.

So how are four wheels help to obtain simplicity over two wheels? I'd think just the opposite.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

glitch wrote:
Schematically all the GND's can be the same. But when you route them route them separately, tying them together at only with single point connectons. You actually have 3 grounds you should route on different tracks.

Power ground: this is your 6V ground for your servos, you don't want this path crossing any of your analog or digital points. Run this one from the 6V input connector, to the servo connectors, with only a small tie point to digital ground at the 6V connector.

Digital Ground, This is your 5V ground for everything else, except the analog section. Route this from the 5V Connector, to everything else.

Analog Ground, route this from the AVR to all your Analog connectors & components. Only tie this ground to digital ground at the AVR itself. Do not have any other non-analog components along this track.

Overall it looks a lot better. You still have those 2 22pF caps at your voltage inputs. In both cases they should be larger. As bob stated the 6V one should be much larger, 1000uF should be enough. Don't overdo it, too much capacitance can be a problem as well. On the 5V side you can put a smaller one (but still bigger than 22pF), say in the range of 10uF to 47uF.


Do I need to do that again? I've put caps on the power supply, the 5V is coming from there, the 6V comes unregulated and I will put there a 1000uF cap.

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Smiley, you are right, but I wanted badly a 4wheeled robot :P. Anyway, instead of 2 wheels you can put one caster and the PCB doesn't change.
Btw, thanks a lot for giving me tips & tricks :)
edit: should I add 0.1uF caps on servo connectors?

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

reSpawn wrote:
Do I need to do that again? I've put caps on the power supply, the 5V is coming from there, the 6V comes unregulated and I will put there a 1000uF cap.

Yes, but not as large. The wires that run from your power supply to your main board have an impedance associated with them. This impedance will affect the ability of the caps on your supply board to quickly meet a surge current requirement by your board. Adding a largish cap at the connector on your board, allows the cap to provide some of this surge current, in the short period that the supply board is lagging behind. Admittedly, in this case your 5V load is very light, and you should be fine without it. I would also place a 0.1uF caps here. You can also place the caps at the servo connectors, it wouldn't hurt.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


This is the pre-final version. Tell me if I missed something, or any other final suggestions, after that I'll start making it.
Thanks a lot for having patience with me ;)

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

change C17 from 22pf to 100uf?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Change C17 to a 0.1uF and I'll be happy... 22pF isn't going to do anything really.

As for your XTAL caps, you may find that at 16MHz your cap will need to be in the 12-15pF range. The actual value will depend on your crystal... check the data sheet for it.

[edit]Damn Bob keeps beating me to it this week. I think I had a little too much nog over the holidays ;)

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, yes, I've forgot thank you. Any other suggestions or I should make the pcb now ?

Nicu reSpawn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Was off work all last week... spent a lot of time on freaks... now back to work this week.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey! Just wanted to thank you all for your help :) The board is working nicely, and my robot is following the light :). Thanks again, I'll post some images later, now I'm planning to add some more sensors and stuff like that :)

Nicu reSpawn.