Author Topic: Test Schematic  (Read 3700 times)

0 Members and 1 Guest are viewing this topic.

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Test Schematic
« on: May 19, 2007, 11:11:19 PM »
I designed my first schematic, and It would be nice to get it checked out from someone with experience  before I start building...

http://aycu13.webshots.com/image/17492/2005621959605693018_rs.jpg
The best way to get to the top is to get off your bottom.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Test Schematic
« Reply #1 on: May 20, 2007, 03:53:21 AM »
hi Radiken,
so the only thing i can see wrong is the lack of charge capacitors on the MAX232.
the MAX232 has to generate voltages in excess of VDD for communication with RS232 devices.
it does this using a charge pump and stores the power in capacitors.

there should be capacitors between pin 2 (V+) and VDD
and between pin 6 (V-) and VSS.

just to add confusion, the Eagle package you used to create your circuit diagram doesn't show you the actual connection to VSS and VDD.
it just presumes these exist.

all this is clearer if you just look at figure 5. here:
http://datasheets.maxim-ic.com/en/ds/MAX220-MAX249.pdf

the only other thing i might be concerned about is the maximum current provided by the MAX667. glancing at the datasheet, it's only rated up to 250mA.
from experience, it's always worth putting a voltage regulator on your circuitthat can provide as much current as possible.
one servo could draw 250mA when under load.
as long as you don't intend to run anything power hungry off this regulator you should be allright though.

dunk.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Test Schematic
« Reply #2 on: May 20, 2007, 05:18:31 AM »
oops, i missed something obvious.
i don't theink the pic16f877 has an internal oscilator.
you are going to need a timing circuit.
(section 12.2 of the datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/30292c.pdf)

dunk.

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Test Schematic
« Reply #3 on: May 20, 2007, 09:11:36 AM »
I've never had to deal with oscillators until now,(As I said, this is my first board) so how do I figure what frequency of crystal to use? ???
The best way to get to the top is to get off your bottom.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: Test Schematic
« Reply #4 on: May 20, 2007, 09:36:27 AM »
You can use a ceramic resonator - if you buy one that has bulit-in capacitors, you only need the one component - they have three legs. You would connect each of the outer pins to one of pins 13 and 14, and the center pin to ground.

You can use any frequency you like, up to 20 MHz. I typically use 20 MHz on my PIC projects.

Digikey part# X909-ND would do the trick, and will cost 53 cents.

- Jon

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Test Schematic
« Reply #5 on: May 20, 2007, 09:50:44 AM »
Which is better: Ceramic or Crystal?


When hooking it up the the crystal, are any other electronic components needed, or is it just connected strait to the controller?
The best way to get to the top is to get off your bottom.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
Re: Test Schematic
« Reply #6 on: May 20, 2007, 10:47:37 AM »
If you're using a crystal, you need two 18 pF capacitors. If you're using a ceramic resonator like the one I pointed out, you don't.

A crystal is more accurate than a resonator, but either is accurate enough unless you are dealing with very picky timing interfaces.

- Jon

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Test Schematic
« Reply #7 on: May 20, 2007, 06:08:30 PM »
Ok, I revised the schematic...
The only question is:
If servos are plugged into the unregulated V. ports, are they connected to the correct place on the PIC16F877?



The best way to get to the top is to get off your bottom.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Test Schematic
« Reply #8 on: May 21, 2007, 02:28:28 AM »
Quote
If servos are plugged into the unregulated V. ports, are they connected to the correct place on the PIC16F877?
yup. controll servos from PWM loops within their program so any I/O pin capable of digital output will do.

i don't think you have the right pins connected on your DB9 connector X1.
from memory, ground (VSS) should be connected to pin 5, RX to pin 2 and TX to pin 3. (check that though.)
i don't usually bother with hardware flow controll so i generaly only need these 3 pins.

the other thing you might think about, how are you going to program the AVR?
i like to put in a connector for an in circuit programmer.

dunk.

[edited to correct a typo in pin numbers.]
« Last Edit: May 21, 2007, 03:45:04 PM by dunk »

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Test Schematic
« Reply #9 on: May 21, 2007, 05:08:05 AM »
As far as I know, on the DB9 connector Tx goes to pin 2, Rx goes to pin3, Reset (Attn) goes to pin 4 and GND (VSS) goes to pin 5.
« Last Edit: May 21, 2007, 05:08:44 AM by Ro-Bot-X »
Check out the uBotino robot controller!

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Test Schematic
« Reply #10 on: May 21, 2007, 01:16:21 PM »
Ok, another revision has been made:



I believe that the serial connector is correct now...

Dunk, what do you mean about programming the AVR? I was just planning on programming everything through the serial port... Or are you talking about programming something else?
« Last Edit: May 21, 2007, 02:25:54 PM by Radiken »
The best way to get to the top is to get off your bottom.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Test Schematic
« Reply #11 on: May 21, 2007, 02:26:38 PM »
I think Dunk had a hunch when he asked you how you will program the robot...

You need to program a bootloader into the microcontroller using an in circuit programmer before you can program it from the serial port. This is valid for PIC and AVR microcontrollers.

Check out the uBotino robot controller!

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Test Schematic
« Reply #12 on: May 21, 2007, 03:12:11 PM »
hmm... That is useful information I didn't know about....  :'(
oh well, luckily I found a PIC that comes preprogrammed with a bootloader!  :D

http://www.junun.org/MarkIII/Info.jsp?item=12


I would appreciate one last look at my schematic, and If I get an ok, then I will start ordering parts...


Thanks for all of the help!
« Last Edit: May 21, 2007, 03:17:05 PM by Radiken »
The best way to get to the top is to get off your bottom.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Test Schematic
« Reply #13 on: May 21, 2007, 04:08:15 PM »
yea, there are a few different ways to program PICs.
when you first buy a blank PIC it will need programmed using a special programmer.
there are two general versions, the first you need to remove the chip from the circuit, pop it into the programmer, program it, then return to the circuit.
the other kind of programmer is an "in circuit" programmer. with this kind of programmer you run all the connections the programmer needs to a plug so when you want to program, just plug the programmer into your board.
(this is the method i was suggesting you go with but a bootloader may suit you better.)

the way you are currently intending to program your pic involves a bootloader program being installed first.
microcontrollers can actually write to the flash memory where their program is stored. bootloaders take advantage of this.
the bootloader takes anything it sees on the serial port at switch on time and stores it in program space. if it doesn't see anything on the serial port then it jumps to the program space and starts executing what it finds there.

if you end up doing a lot of work with PICs you will probably end up getting a dedicated programmer but for a first project the bootloader is the cheaper option.

good luck!

dunk.

Offline RadikenTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Test Schematic
« Reply #14 on: May 21, 2007, 04:21:55 PM »
Thanks for all the help, I'll start ordering the parts, and let everyone know when it's done!  ;D


Thanks again!
The best way to get to the top is to get off your bottom.

 


Get Your Ad Here