Mike, is there an alternative method of programming? Something that doesn’t have the limitations as the “single thread” arduino programming methodology? We would want to support the arduino programming, but it would also be quite nice if the processor we choose doesn’t make other options unobtainable.
We want to support arduino code base, but still be able to use other options.
Absolutely there are other methods of programming that would give better performance. Even within the Arduino environment it is possible to implement forms of multitasking. Its just that most Arduino programmers don’t do this, so they will not see as great a speedup. The PIC32 is really fast if used to the extent of its capability.
Yep the easiest would be to use the same IO pins and the like. However with their new Beta drops of MPIDE, they now have seperate directories per board, where you can define things like the IO mappings and the like. So maybe it would not be difficult to use a different chip. They have maybe 5 different boards defined, so I will look through those for a good match.
I am still investigating to understand more about this chip and what should be on the board.
Jim, from your other posts, If we can not layout the desired stuff on one normal 3x2.3" board, you are thinking we may need a main processor board, sort-of like this one from Sparkfun: sparkfun.com/products/9713. The Sparkfun one won’t work as it is over 4" long as it is using the 100 pin chip… But we could set up a mondo BB, with like 64 pins on it. that has all of the processor stuff on it, possibly including voltage conversions for Analog pins… Probably not have USB on it, but on the main board. The main board would have all of the main connectors speakers and the like. It may be possible to lay it out, like the BB2, that it plugs in on the top, such that it adds very little thickness… As for a comparison for size, awhile ago I laid out a board using the BAP40, which at the time looked like:
After looking at the cost of a BAP40 and likely cost of building this board, to me it looked like a waste as it would not be any cheaper than Arc32… So I punted… But it does give an idea of how much room a DIP40 would take…
Other things I am thinking about and would appreciate input include:
0) Which chip… I personally like the Pic32MX5 or 6 or 7 as it has lots of USARTS, but that is me…
USB - Once you get up to a Pic32MX4 (likewise 5-7), the chip has built-in USB support. So the UNO32 which uses a PICMX3… chip required an external USB chip, they used FTDI. But the Max32 board uses a PICMX795… Chip so they could use the USB from the chip, but choose instead to use the FTDI chip. Thoughts?
The Chip does not really have any EEPROM on it. You can use a little of it for that, but they mention that it is good for 10000 writes… So I think we should probably have an external one. Not sure if SPI or I2C?
That Pic32 board from sparkfun reminded me of a hexapod project I read about on Matt’s forum. Check this thread. The board even drive all servos (with some simple modification).
The Pic32 sure demonstrate some power. As he (a guy called surfdabbler) mention he manged to get the IK code running at 200 Hz! Pretty awesome.
I like the idea of a normal bot board with the processor on a hybrid carrier. I think the things that should be on the processor board are;
EEProm (SPI or I2C)
Push buttons and LEDs
I think you should put the USB on it too… This makes the module complete for testing and QC.
That leaves the main boards layout to only include;
Power screw terminals
Vregs and power selection shunt terminals
Speaker
IO header pins… I can see 52 normal three pin groups. 20 on each side and 12 on one end.
The best thing is this looks very doable. Adding a little extra height in the middle not that bad cause the servos and stuff are still going into the main board. That’s a lot better than the mega / shield where the servos plug into the top board adding a lot of extra height.
On the processor show me the options with cost and we’ll do it. I want it to be the best, no compromise. Not sure of internal usb or external ftdi. I know ftdi drivers are kept up well. Not sure yet on the exact specifics, but I know this is going to be very powerful!!!
Kåre, that looks very interesting. I think our team with this new processor is going to raise the bar for the entire robotics community. A very fun place to be I think!
Thanks guys. I am having a great Christmas and hope you all are as well!.
Still investigating. A question came up on the chipkit forums, about bootloaders and the like, so I took the opportunity to ask about why use an FTDI chip when the UNO32 can do it directly… I received an answer:
I understood up until the last paragraph, so I ordered myself a UBW32 from sparkfun and asked additional questions…
As for which chip, not sure yet. If we go for the Pic32MX5 or 6 or 7, I think they all have the same pin outs for 64 pin or 100 pin chips. I am assuming 64 pin. Cost from Digikey for PIC32MX575F512HT-80I/PT-ND for 1200 is $6.23. Obviously if we don’t need an FTDI chip that would cut the cost…
Putting the USB code into the program area seems a little… I think the ftdi chip is the way to go too. Using the built in usb does take resources from the program.
Yep, using the FTDI is probably the safe way to go. The only possible reasons to not go that way is, it gives us a little less stuff to place on the board. Also if the FT232RL costs somewhere around $3 that is about the cost difference between a 128KROM/16KRAM Processor and a 512KROM/128KRAM processor. So if your desired price point for the board made me have to choose…
Taking a look through the different versions of the chip and prices. I stuck to the TQFP64 chip versions.
I am going to shorthand the part numbers here. Here is a summary of Part number, Program Size, Ram size, USarts, DMA channels and price for 100
If I were building it for myself I would probably go for the 695F512, but I like the most of everything. Don’t think we need CAN support. However there are lots of boards out there with the 795, but most of them use the 100 pin version.
Now back to chip selection. Before laying out the boards, I thought I should first try taking a pass through Trying to map the Pic pin numbers to our logical Arduino pin numbers. To see how well that works out.
Example: On Arduinos, digital pins 0 and 1 are the hardware serial port. On the UNO32 which uses the 64 pin MX320F128, they use pins 33 (U1TX/SDO1/RF3) and 34 (U1Rx/SDI1/RF2) for this. On any of the USB enabled Seriels (MX4-7), the hardware Serial port moved to pins 50(SDA3/SDI3/U1RX/OC3/RD2) and 51(SCL3/SDO3/U1TX/OC4/RD3)
As you can see there are several things multiplexed onto these IO pins.
Next looking at Hardware PWM pins (On Arduino UNO, these are on logical pins (3,5,6,9,10,11). We only have 5 of them on Pic32, so UNO32 does the first 5 (skips 11). On the Pic32 they are using the pins marked OC1-OC5, but with chips like the MX795F512H (64 pin), you can see from the above talk about USART1, that OC3 and OC4 are on the same physical pins as the hardware serial port. So I see a few different ways here to proceed.
Likewise Several Analog pins are also used for other things like: Pin 29 is AN14/C2RX/SCK4/U5TX/…/RB14. So it is one of our Analog pins and one of the USart pins and a clock pin for one of the SPIs…
More or less make a UNO32 board with an MX3… board. Could probably move up to 340MX512, which gives us the larger program space, and 32K ram. But like UNO32 (and Arc32…), only has 2 USARTS, 1 being used by the USB…
Continue on the track I was with one of the TQFP64… MX5-7… and get as close as we can, But know that some things we won’t be able to map.
Use one of the TQFP100 versions like they use in the MAX32 board. This may be overkill, but we could then use the same Mappings as used by the UNO32 board. There may/will be several IOs that we would probably not run to the 3 pin headers on the host board, but could use some of them, for Leds, buttons, speaker… Could also maybe have some additional headers on the daughter board for some IO pins like maybe some of the USARTS or SPI or … But this adds some cost. That is a 64 pin version of the 795F512 for 100 units is about $726 the 100 pin version is about $781.
Personally I am not sure which of these is the best approach. My guess is 1) or 3) but not sure… Thoughts?
So using the 100 pin 79F512 will allow easy integration with the Arduino community driving the effort for this chip, right? Or just “UNO32 like” support. Support is important. I agree with the use of the extra IO pins for leds and buttons. The price difference from 64 to 100 pins is very small. The processor board may need to be as large possible, not covering IO headers. Maybe room for Xbee socket? pads for a sparkfun usb board? IMU module?
This morning I was playing around the with Schematic/layout tools for the main board just to get an idea of layout/sizes, when you have 48 3 pin connections on it, plus power and connections to the daughter board… Can probably not leave a full .2" between the signal pins and the power selection to save a little room, although it is nice for alignment when you hand solder. Was also thinking about changing the vertical between board connectors into horizontals and double up both the right most horizontal ones… If that makes sense… Maybe also rotate the power one double it up with one of the left most ones… Probably also move the power selection jumper ares for the right hand side groups to maybe double up the power jumpers. That is maybe make JCN6 be a 2x3 connector… That would clear up some more space for daughter board.
But is going to be a tight fit to be able to get, the processor, USB, memory, leds, buttons… on that board. May choose to drop down another 8 pins or the like down from daughter and maybe put extras like buttons and leds on main board (other than led on 13 for the standard…)
No problem, I have been busy with other stuff as well and have not done much since then.
Yesterday my UBW32 card arrived from sparkfun. It has the TQFP100 version of the 795F512 chip. For the fun of it I took a picture of it sitting on top of an SSC-32 to give a general idea of sizes.
The card can run directly off of USB power, has a few pushbuttons and LEDs. It uses the USB of the Pic32 so I had to download and install a driver to talk to it. Note: on Win7, a diagnostic came up after it failed to load, which give me the instructions on how to download and install a driver… Both this card as well as the Chipkit ones (UNo32…) have holes for connectors to connect to programmer/debugger, so I also purchased PicKIT3. Now need to make cable or maybe will order one… Note: they also have USB bootloaders which allow you to program over USB…
I had some time today so I started to enter in the schematic for the Daughter board and started to get an idea of how much room things might take.
Here is a printing out of Diptrace showing most of the daughter board components…
In the above picture there is a green rectangle showing about the size the daughter board could be if it was on top and fit between the top and bottom rows of servo connectors. As you can see the standard .1" connectors eat up most of the room. Could probably find some other form of connectors that might use up less. Not sure about things like edge connectors with a ribbon cable or the like… There are lots of options on what could be on which board, like:
a) Obviously choose different power regulators. Or could choose to put all of the power stuff on the main board. Probably the processor board only needs the 3.3V and GND.
b) Could move FTDI/USB stuff to main board.
c) Change all/most of the SM components from 0805 to something smaller…
d) Playing around with different buttons. The one in picture is the one used on UBW32 board. I don’t think it is any smaller but it is SMT so only impacts the one side.
e) I have not put any of the diodes/resistors in yet to make sure the Analog pins are 5v tolerant, but assume I would do this on main board.
…
But my gut tells me that I may first try to layout the entire thing on one board first before going to the two boards… May run out of room, but if I could get there it would sure make things easier.
Hi Kurt, Much apologies. I been running around like a one legged man at a butt kicking contest…
I like the idea of going to a single board solution if possible. We can drop the speaker and push buttons as they take up a lot of room. Will sure miss them though. Maybe those should be on the daughter board!
The power selection jumpers can be moved to be inline with the rest of the IO. Servo sockets are .108" thick, and this is why we break them into groups of four. The power jumpers are .09" thick. So for 5 in a row the width is 0.522". If you separate the groups of 5 by .025" it will work. .525 x 4 = 2.1" which should easily fit along the 3" length of the board. Are we back to the 64 pin version to try it on a single board?
No Problem: I figured you are probably pretty busy and probably could use a vacation about now
I am hoping to get as much on the board as I can. To me, I have a higher priority for the speaker than the switches as most of the time my boards are inside something and the buttons are pretty hard to reach. Also pretty easy to add external push-buttons. I assume you could probably get some simple set-ups with a servo connector, a PU resistor and push button made or even a simple board UI objects, like buttons, LEDS… But see how far I can get it…
So far I am assuming 100 pin. The one thing I am starting to run into is my license for Dip-trace is limited to 500 pins and 2 signal planes. I am not done yet and already have 460+ pins… I need 20 more pins for the Analog pin Protection diodes. So it is going to be close. If necessary I could upgrade to Standard which gets me to 1000 pins and 4 signal planes, but so far I have not needed to. Alternatively I could really start to learn Eagle…