PIC control board PCB

If you are using low voltage capacitors, something less than 10V like 6.3V or 4V you should consider they may have died. Tantalum capacitors in particular like to die to low ohm resistances from a few ohms to a few hundered depending on how badly they are abused.

I just uploaded new code to:
www.geocities.com/saipan59/robots/dualpic.zip
It’s code for both the 4620 and the dsPIC, version V0.2.
A lot of good stuff is working:

The 4620 talks I2C to my sensor board, motor control board, and the dsPIC.
The dsPIC talks to the SSC-32, using commands sent from the 4620.
The dsPIC can be told to output data on its 2nd serial port (but I haven’t actually tested it).
The dsPIC can be told to make A/D readings from any of the 9 input channels (the 4620 can also do A/D stuff on some pins, but I haven’t set that up yet).

Pete

It’s all getting better and better! :slight_smile:

I just checked Microchip, and my second order has shipped which I should get around Nov 30th.

If anyone needs 4620’s and dsPIC4011’s for your boards, I will give away two each of mine when I get them. I plan to use mostly the 4680 and dsPIC 4012 or 4013 for my boards after I build a board stock and have it working. I am also getting a 4685, but it was backordered.

8-Dale

I have my eye on this OOBOT40-3 Robot Control Computer as a possible carrier for PICs. It is supposed to be able to use 40 pin PICs also and the ooPic it comes with is based on an 18F PIC.

8-Dale

A parts list of what you actually use to build your board would be helpful. :slight_smile:

I’ve put together the following so far, but have not yet combined everything by component value or looked at the other images for additional information. I took the following from the schematics.

Dual PIC Power System

D1 - D4 1N4001
C2,C3 470 uF
U2 LM317
C1,C4,C5,C6 10uF
U1 LM2940
R1 10 Ohm
D5,D6 1N5817
C2a 22 uF
C2 470 uF
R2,R3 4.7k
R4,R6,R8 10k
R5,R7,R9 100k
Q1-Q3 2N3904
U3 TC4626
C7 0.1 uF
Q4-Q7 Standard n-Channel MosFET
P1
P2

MPUs

D7,D8 1N4148
R10,R13 10k
C10,C11,C15,C16 33pF
X1 10 Mhz
C8,C9,C12-C14
R11,R12 4.7k
X2 7.3728 Mhz
U PIC18F4620
U dsPIC30F4011

I/O

J1 DB9 Socket
P5
C17,C19-C21,C23 0.1uF
P6
R14 1 Meg
U MAX232
U MC1455
U TLP434A
C22 1uF
P7,P8
P9,P10
JP4,Jp5

<EDITED: Corrected part LM2940 and removed SW1-SW4>
8-Dale

You’ve pretty well covered the parts list I think - all the good info is on the schematics.

Some parts-selection suggestions:

The ‘brown-out buffer’ is probably of limited use. Replace D5 and D6 with wires, skip C2, and put C2a in the place of C2. This change will give you a Vcc voltage that is closer to 5.0V, and will be regulated better. One reason to have a more accurate Vcc value is because it affects the A/D readings in the PICs, unless you provide an external reference.

You wrote “LM2490”, but it should be “LM2940”. Other similar 3-terminal regulators can be substituted.

The value of R1 determines the charging current. With 10 ohms, the current is about 120 mA (I = 1.2/R).

“SW1-SW4” are not components, they are signal names.

The values for the 33pF caps should be very flexible (see the PIC spec for details).

The MC1455 and TLP434A and it’s related parts are only useful if you’re doing the “console transmitter” thing that I did. The MC1455 is a 555 equivalent. Any 555-clone should work. A CMOS type is generally best, because it uses much less power.

Pete

Ah, good. I wanted to make sure I had not missed anything.

Ah, OK, noted.

Durn, I went dyslexic there. I’ll correct that.

Basic Ohm’s Law.

I knew that, but included them in case somebody else wanted to do it.

8-Dale

Hi Dale, Peter,

How’s this project coming along? I’ve mentioned before that I’m interested in the 4620 and similar PICs. I’ve not used the DSP.

I downloaded the ZIP files, but I wasn’t able to read the schematic file. I guessed incorrectly that it was an Eagle file. Oh well. OOPS! Just noticed the BMP files! That’ll do.

New 18F8722 PIC on a new demo board is available. Maybe I can talk my rep into some samples.

I’ll take a look at the code when I get a chance. I’m curious about the DSP part.

Alan KM6VV

Hi Alan,
I haven’t done anything with robotics in the last few months - been distracted by other projects.
I have been doing a lot of PIC-related things, though. I’m not on this forum much lately - usually on the SparkFun forum instead.
On my ‘dualPIC’ board, I’m not really taking advantage of the dsPIC features - you could do all the same stuff with a pair of 4620’s or whatever, unless you need the DSP features and/or a really high clock rate.

The dsPIC parts are not greatly different from the PIC18 parts, if you’re doing ‘regular’ stuff. Mostly just “more better faster”.

Get a PICKIT2 programmer, MPLAB, and the free version of the C30 compiler, and you’re good to go.

My schematic files are ExpressPCB - it’s a free download.

Pete

This project is 100% Pete’s. I just tossed in suggestions but did not do any of the work. I wish his project was more generalized - it has great potential for some kind of super bot board with the dual PICs.

8-Dale

Hi Dale, Pete,

Well, I’ve got the ICD2 and MPLAB, but the HiTech compilers for the 16 and 18F chips. Plenty to play with!

ExpressPCB, OK, I should have thought of that.

I think someone mentioned the DSP processor being much faster then the ordinary 18F PICs. I thought they were for signal processing! Maybe it’s time to try some IK state machines using the DsPIC.

I should probably start considering a board with multiple PIC processors. I have quite a few choices. I’m tempted to switch over to the ARM7 board I designed for work work. It has two processors. One is the Atmel AT91SAM7S, and the other is a USB Host processor (AT41USB380). Too bad the 2nd processor isn’t another ARM7! The board might be a little heavy for a CH3-R 'Bot, 'tho.

After a little experimentation on the PICs, I think I’ll compile my BASIC Atom-to-C port on the ARM7. I actually used the IAR C compiler to help in the port. It had it’s own ideas on errors (a little more comprehensive), and helped me keep the “brackets matched”. I ended up having quite a bit of work to get the code out of the Atom BASIC “main”, and into a set of serviceable functions/subroutines.

I want to write a new controller that is a small RTOS. Nothing fancy, no preemption, not much more then a system tick to get PS2 data on a regular basis, and then parse the received data for tasks to be run. Interrupts from RS-232 will also contribute to the controller’s operation. Plenty of other things can be added after that.

Your distributed tasks (two PICs) would also be a good addition. But I’m getting ahead of myself!

I’d like to hear when you get going again on your project!

Alan KM6VV

Hello Allen,

Do you think you could make a stand alone video processor board? or at least design a small board that could wirelessly tramsmit video signals to the pc?

There are some DSPs from other makers that are more specifically for signal processing, and they may not be so suitable for general-purpose stuff.
Microchip’s dsPIC series is a more-or-less standard 16-bit CPU with a DSP engine integrated into it. So it does normal processing just fine, but also has a bunch of special instructions to do fast DSP-related stuff.
The dsPIC30F series can run up to 120 Mhz internally (rated 30 MIPS), which is about 3 times the speed of most PIC18F parts. The dsPIC33F series can go up to 40 MIPS.
The PIC24 series is also a 16-bit CPU, but without the DSP engine, and without any on-chip EEPROM, so they are cheap.

I’ve never used a dsPIC for “DSP” work; instead just as a fast general-purpose MPU. They work great.

Pete

Hi Mike,

Probably. Depends on what one wants the video processor board to do. Scanning a simple NTSC camera gives quite a bit of data.

Simply getting an RF remote, and processing the data in the PC would seem to be more desirable if the goal is to get data into the PC.

I did suggest an approach to using a simple CCD camera on a line following robot (one of my son’s EE projects). The raw video data was sampled and reduced to make the detection and direction of lines easier and faster.

What do you have in mind?

Alan KM6VV

Hi Pete, Dale,

They do sound interesting. I don’t think I really want to do any DSP work at this time, but the increased speed (and FLASH?) would be quite useful. Looks like a 2nd 4620 could be used in the DSPIC socket, if some extra analog VDD/VSS pins were cut. But if dsPIC30F4011 can do the same and FASTER, then maybe I’ll try 'em. Next question, does my Hi-Tech compiler compile for them? I’ll have to see… Nope! $1200 USD for a dsPIC compiler, that won’t be easy to justify! Guess it’s the limited (free) MicroChip compiler then. How much can you build with it?

I’m tempted; do you have any boards left? Looks like DigiKey has the dsPIC30F4011 chip.

I also looked a little more at the Oricom Technologies OOBOT40-3 Controller. $60 to $70 for the board (kit) with OOPic II+ chip.

Have you looked at the OOPic II+ firmware? Useful? I didn’t see a price for “without” the chip.

Didn’t think much of the L298N motor driver. I much prefer the LMD18245 driver chips.

Didn’t find a schematic, although that’s probably not important.

Alan KM6VV
(Still looking for the “perfect” 'bot board)

The free C30 compiler is fine. The limitations are not noticeable unless you’re pushing the limits of speed and memory size.
The free C18 is the same - it works great.

I do have one more bare board of the “dualPIC”, but I’m thinking I want to keep it for some future project…

Pete

Hi Pete,

I have used the C18, nice compiler. I may even get (If I’ve got this right) a free C30 as part of MicroChip’s newest contest (CircuitCellar?).

No problem on a board, But I’m keeping the “dual uP” idea. I was actually considering giving each leg a PIC at one time. They would be “loosely linked”, and reactive on their own. If I understand the white papers I’ve read recently, that’s a little closer to the Neuron or Biological approach; a synthetic system basically can generate a gait on its own. A multitask kernel could probably accommodate the same thing, and it would be in one uP. The propeller uP keeps coming up, but I’m not ready to go there.

Is anyone running a multitasking kernel of some sort? The kernel would be VERY simple, of course. Basically I’m looking to slicing up time to run multiple self-completing tasks; each in its own time “slot”. I think I’ve mentioned it before, but that’s what I want to do with the basic IK calcs and command parser found in the Atom demo code. OK, not really a parser, maybe call it a command dispatch.

Alan KM6VV
What’s in your 'Bot? ™ ;>)

Hi Pete, and welcome back!

Since I have finally taken the jump and started working with PICs now, I have gotten a lot more interested in what you’ve done with your dualPIC board and code for it. I am learning a lot by looking at your code. :slight_smile:

I tried building your code for the 4620, but I get this error:

Error - could not find definition of symbol 'FSR2L' in file 'U:\Users\dalew\data\Documents\Robotics\Dynaplex\Devel\dualPIC\Source\18F4620\pic_sci.o'

It seems to be having a problem finding a symbol in this object file, but I don’t know how to deal with this so I can build and program the code. Am I doing something wrong? I can build your dsPIC code without errors.

I’m using an Olimex ICD2, which is working very well for me. :smiley:

8-Dale

Pete? is that you? Long time no see.

SparkFun huh? yeah, they have all sorts of interesting topics over there regarding electronics. It’s a bit over my head though. :unamused:

FSR2L is a register in the 4620, so it must be part of the compiler output (my code doesn’t work with it directly).
Check your Project properties within MPLAB, to be sure that you haven’t told it the wrong chip (such as a chip that doesn’t include the FSR2L register).
Also make sure your project includes the appropriate h file and such.
If in doubt, delete all project-related files except for the actual source files, and re-create the project.

Pete