Dangerous Prototypes

In development => Project development, ideas, and suggestions => Topic started by: Computerman on September 24, 2011, 02:40:27 pm

Title: PicKit 3 in Eagle format
Post by: Computerman on September 24, 2011, 02:40:27 pm
I have the PicKit 3 schematic drawn into Eagle if anybody is interested in helping with the layout. It would be a big challenge to do the layout single-sided, and I am not very good doing double-sided boards.

If somebody will help with the layout, I will pay for the boards from Seeed - as long as I get 1 or 2 for me, I will donate the rest.
Title: Re: PicKit 3 in Eagle format
Post by: sqkybeaver on September 24, 2011, 02:50:18 pm
i could help,

but why the interest in building one?
Title: Re: PicKit 3 in Eagle format
Post by: fcobcn on September 25, 2011, 01:12:39 am
Hi Computerman!
A free pickit 3 design would be nice, MPLAB X seems to have better support for it.
I encourage to go ahead, a couple of suggestions:
-Go SMD, use 0603 components and a double sided PCB.
-Try to fit your design to the Bus Pirate v4 PCB (board size, leds, usb connector and pin header location), I have been working on a case for that design http://http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=2666, so it may be posible to reuse it.

I have such a warm feeling each time a burn a PIC with my diy pickit2, too bad I still have to use a windows machine.
[attachment=0]
Title: Re: PicKit 3 in Eagle format
Post by: arhi on September 25, 2011, 04:35:28 am
[quote author="fcobcn"]such a warm feeling each time a burn a PIC with my diy pickit2, too bad I still have to use a windows machine.
[/quote]

why? pickit2 works perfectly from both linux and osx, is supported in mplabx... it works (for all parts it supports) even better then pk3 ?! "still have to use a windows machine" might be for other reasons but pk2 can't be one of them :D


wrt pk3, is the firmware open now or is it still closed? Are the hex files (bootloader etc) available at least? They were not (neither hex files nor sources) last time I check (Was long time ago).... I personally use pk3 only when I really have to (pic32mx debugging) as pk2 is way better device
Title: Re: PicKit 3 in Eagle format
Post by: fcobcn on September 25, 2011, 10:28:26 am
[quote author="arhi"]
why? pickit2 works perfectly from both linux and osx, is supported in mplabx... it works (for all parts it supports) even better then pk3 ?! "still have to use a windows machine" might be for other reasons but pk2 can't be one of them :D
[/quote]

I may have to try again, the last time didn't work.
Title: Re: PicKit 3 in Eagle format
Post by: arakis on September 25, 2011, 01:44:55 pm
there is something odd with PK2 and MPLAB X, while pic16f1824 witch I am using right now, and many new chips are suported by pk2 with a device update, it isn't supported in MPLAB x, I dont get this, if the PK2 has no problems twith reading or  programing the device, why is there no way to do it from MPLAB 8 or X?
Title: Re: PicKit 3 in Eagle format
Post by: arupbsk on September 25, 2011, 02:01:54 pm
@Computerman , whatever this discussion of PK2 vs PK3 tends to, just upload the schematics file here, I'll try for the baord. What's the need of single sided? Seeed charges are same for 2 layer boards, and 2layers boards are easy to route while designing.
Title: Re: PicKit 3 in Eagle format
Post by: arhi on September 25, 2011, 06:32:40 pm
@fcobcn, pk2cmdv1.20LinuxMacSource is the source I compiled pk2cmd from and it works like a charm. There;s also a gui called dwarf that I don't use but it should work.

@arakis, latest version of mplabx broke something with pk2, worked in previous version, will probable be fixed again in next one.

Noone answered, are the hex files for pk3 open/available?
Title: Re: PicKit 3 in Eagle format
Post by: Sjaak on September 25, 2011, 08:34:34 pm
AFAIK are the hex files stashed somewhere in the program directory of mplab(x)

mine are in C:Program FilesMicrochipMPLAB IDEPICkit 3
Title: Re: PicKit 3 in Eagle format
Post by: arhi on September 25, 2011, 09:02:12 pm
There's whole bunch of HEX files in the pickit3 directory - but those are different functions (the pk3 use that icd like architecture and upload new hex every time you change mcu you are working with :( ), you still need the "base" hex, and I have not found that one (not sure if that's only bootloader or there's something else there too). Note that "I have not found it" does not mean it's not out there, that's why I was asking. Last time I checked the source was not available and also the "base" hex was unavailable; I assume one could read hex from mcu directly (I don't believe they protected the mcu but who knows) so that could be done but I haven't seen hex available anywhere, also this pk3 plastic is soooo shtty that I don't feel like opening it and trying to read the on board pic

I heard mchip said they will "never" publish source for pk3 (not proven info - I think it was one of many blog posts bitching about how pk3 is shtty device compared to pk2 - si it might be untrue) and that's something I really liked with pk2
Title: Re: PicKit 3 in Eagle format
Post by: Sjaak on September 25, 2011, 09:46:14 pm
I'd guess the base hex was available though..

I have a pickit3 clone which did came programmed. I was bought from some chinese company (sure) so that won't be a proof it is open ;)
Title: Re: PicKit 3 in Eagle format
Post by: arhi on September 25, 2011, 11:42:32 pm
I googled a bit, looks like you can read the hex from the original pk3 without a problem, it is not protected
Title: Re: PicKit 3 in Eagle format
Post by: Computerman on September 26, 2011, 06:58:01 am
I loved my Pickit 2, but Pickit 3 supports the new 16F150X chips and I think the 24E/DSPIC33E chips.

My Pickit 2 was fine for my projects and it also has some other great features (UART tool, logic analyzer), but now it is not working properly.

It would probably be only a few more dollars and much less hassle to just buy an original, but like most people on this forum, I just like to build things!!!

The reason for single-sided was that I make my boards with a worn-out HP laser printer, press-n-peel blue film, and a clothes iron. I also wanted to keep it as simple as possible for the low-budget hobbiests who must make their own boards.  That is how I built my Pickit 2. However, double-sided boards are virtually impossible to do in that manner. Enter Seeed. Problem solved.

My schematic is identical to the original in every respect except:
The MOSFET's are replaced with discretes from ON semiconductor. They could be easily changed back to the original Fairchild parts. I only did that so I could build it with samples.
Q3 and Q4 are Central Semiconductor - again so I could use samples.
I also omitted the test points.

The fuses are 1206, resistors are 0603, Ceramic caps are 0805. The tantalum caps are huge, but could possibly be shrunk to a smaller size.
Title: PicKit 3 in Eagle format
Post by: fcobcn on September 27, 2011, 11:53:02 pm
@arhi: Have you managed to get your pickit2 working with mplabx on linux or mac?
With every new release I give it a try, no luck so far.
Title: Re: PicKit 3 in Eagle format
Post by: arhi on September 28, 2011, 09:24:58 am
my pk2 was working on linux with mplabx with beta5 and beta6 without problems. beta7 broke something so pk2 is not working attm. I hope beta8 will fix the bug and return the functionality back.

Note that if you are using 64bit Linux you have to run mplabx with 32bit java in order to use pickit2 or pickit3 I wrote about it on my blog (http://http://elco.crsndoo.com/wordpress/2011/03/how-to-make-mplab-x-work-properly-on-64bit-linux/) while back. Without that the PK2 / PK3 are not recognized. The beta7 recognize pk2 (you see it in a list, serial number is displayed etc etc) but it won't program pic using it. Beta6 and beta5 work ok.
Title: PicKit 3 in Eagle format
Post by: fcobcn on September 28, 2011, 03:26:00 pm
Have just done another test, it seems to be working now. I succesfully programmed a 18F2550 with mplabx b7 x64 on a mac 10.6.8 using the diy pickit2.
The only difference from the last time, is that yesterday I installed pk2cmd. But I'm not sure if it's related.
Also tryed with mplabx in x84 using -d32 on the command line, with no luck.
Finally, this is great news!
Title: Re: PicKit 3 in Eagle format
Post by: Computerman on September 29, 2011, 12:47:28 pm
Quote
What's the need of single sided? Seeed charges are same for 2 layer boards, and 2layers boards are easy to route while designing.

@arupbsk, It don't need to be single-sided. I was only trying to do it single-sided because I etch my own boards using the press-n-peel-laser-printer-iron method and I can only do single-sided boards with jumper-wires. That was before I discovered Seeed. Now I prefer double-sided.

A couple more things:

The memory chips are SOIC 150mil not 208mil.
The USB connector needs to be mirrored or better yet, changed to a surface-mount type to avoid confusion.

Thanks in advance to all who help!!!
Title: Re: PicKit 3 in Eagle format
Post by: arhi on September 29, 2011, 02:21:19 pm
btw, I do pnp boards double sided. Trick I use is to put 2 holes on the pcb layout that I drill on the fr4 put small pieces of wire trough them and then use them to level the both sides of the pnp foild. Then I tape the foil and push it trough laminator ... works like a charm. Of course holes are not metalized so for vias you need to put piece of wire and solder on both sides and trough hole components you have to solder on both sides but that's not a big deal when you acquire some experience :)
Title: New schematic and board files for PicKit 3.
Post by: Computerman on October 13, 2011, 05:09:48 am
UPDATE: New schematic and board files for PicKit 3.

It is now nearly identical to the original. FET's have been changed back to the original Fairchild dual FET. The USB connector has also been changed to a mini-B type SMT.

Thanks again to all who help!!!
Title: Re: PicKit 3 in Eagle format
Post by: dolabra on October 14, 2011, 05:56:38 am
somewhat off topic, but..... is there a way to get the pickit2 to support the 16f150x parts?  i bought some recently because they were cheap and I thought the programmable logic would be fun to play with.  i didn't realize at the time that they they weren't supported by the pickit2.  So a this point even if I can't get the PL to work, I would like to be able to program them.

Is there a way to add them to the pickit2 device list ourselves?
Title: Update #2
Post by: Computerman on October 15, 2011, 04:54:44 am
That is one reason for wanting to build a Pickit 3. I too am interested in the same series. That and the fact that my DIY Pickit 2 crapped out on me.

UPDATE: I changed the ceramic capacitors to 0603 size and the P-FET is now IRLM6402 as in the original.

Does anybody know the current requirements for the inductor and the zeners? Or the voltage requirements for the tantalum caps? It would be nice to shrink those down some. They are HUGE!!!
Title: Re: Update #2
Post by: arhi on October 15, 2011, 02:18:24 pm
[quote author="Computerman"]Or the voltage requirements for the tantalum caps?[/quote]

all lines except Vpp/MCLR are operating at max 5V so 10V voltage req should be used. Vpp/MCLR line is going all the way up to 14V so a 32V is what I'd go with.
Title: Update #3
Post by: Computerman on October 20, 2011, 01:54:08 pm
Thanks, but...

Quote
Vpp/MCLR line is going all the way up to 14V so a 32V is what I'd go with.

Why a 32V if it only goes up to 14V? Would a 20V not suffice? Or even a 16V?

UPDATE:

All tantalum caps except C23 have been changed to size 0805.

I also found a better replacement for Q4 in SOT-23, and changed D1 back to the original in SOT-23.

All parts are now original or equivalent except Q3. I think I already have the best replacement.

I believe the crystal could be replaced with a smaller one.
Title: Re: Update #3
Post by: arhi on October 20, 2011, 02:14:46 pm
[quote author="Computerman"]Thanks, but...

Quote
Vpp/MCLR line is going all the way up to 14V so a 32V is what I'd go with.

Why a 32V if it only goes up to 14V? Would a 20V not suffice? Or even a 16V?
[/quote]

There is a rule I follow that for any "hobby" project I use cap's rated minimum 2 times the voltage they will operate on. One of the main reasons is that even "respectable" suppliers like farnell and mouser often have crappy parts so it happened not once that 16V capacitor blow up working on 14V.

When you do "commercial" work there's a whole procedure how you get  your parts, test them etc ... for hobby - the 2x rule works for me
Title: Re: PicKit 3 in Eagle format
Post by: dpropicweb on October 21, 2011, 01:57:42 am
[quote author="dolabra"]somewhat off topic, but..... is there a way to get the pickit2 to support the 16f150x parts?  i bought some recently because they were cheap and I thought the programmable logic would be fun to play with.  i didn't realize at the time that they they weren't supported by the pickit2.  So a this point even if I can't get the PL to work, I would like to be able to program them.

Is there a way to add them to the pickit2 device list ourselves?[/quote]

I've not tried those particular devices, but I have had luck with others. I used this tool http://sites.google.com/site/pk2devicefileeditor/ (http://sites.google.com/site/pk2devicefileeditor/) to edit the device file to add the new entries. You will need to check the datasheet for your device, and probably the family reference document, to add it. So long the PICkit2 already uses the same programming algorithm it should work. I found it easier to find a very similar device and duplicate it, the modify the required parameters, rather than adding a complete new entry.

Let us know how you go.
Title: Re: PicKit 3 in Eagle format
Post by: dolabra on October 21, 2011, 05:20:37 pm
thanks,  that's just what I was looking for.  Maybe I'll get to it this weekend (famous last words... 6 months from now I'll be posting results :) )
Title: Re: PicKit 3 in Eagle format
Post by: JTR on October 26, 2011, 07:26:13 pm
Of course if you just wanted the PICKIT 3 for the latest PICs other than the 16F1xxx parts it would only need to provide 3.3V to the target and much of the circuit could be left off. In fact you could build one with a modified BPv4 board.
Title: Re: PicKit 3 in Eagle format
Post by: dolabra on October 29, 2011, 03:15:58 pm
I started to play with adding support,  but it turns out Microchip has released a new device file:  http://www.microchip.com/forums/downloa ... e=0;610564 (http://www.microchip.com/forums/download.axd?file=0;610564)

thanks dpropicweb
Title: Re: PicKit 3 in Eagle format
Post by: ginpb on January 02, 2012, 01:15:35 pm
Nice, this is great idea, someone tried to build the pickit3 clone?
Title: Re: PicKit 3 in Eagle format
Post by: arhi on January 02, 2012, 01:42:19 pm
you can get pk3 pic clone fairly cheap. There's one made by surestudio (I heard ppl had problems with it) and there's one made by olimex (superb quality from what I hear). There's a full schematic in the manual so you can make one yourself... (not sure you will be able to get parts as cheap as to purchase already made clone)
Title: Re: PicKit 3 in Eagle format
Post by: dpropicweb on January 02, 2012, 11:05:22 pm
[quote author="arhi"]you can get pk3 pic clone fairly cheap. There's one made by surestudio (I heard ppl had problems with it) [/quote]

I have the same issues with my Sure Electronics clone PICkit3 as others have with their original Microchip PICkit3. The PICkit2 is far superior, provided it supports the devices you want to program/debug.
Title: Re: PicKit 3 in Eagle format
Post by: arhi on January 02, 2012, 11:22:36 pm
I do not have any issues with mine original pk3. What ppl had with surestudio pk3 clone were some wrong parts producing wrong voltages ..

pk3 vs pk2 ain't the topic ... pk2 is imo better device but if you work with pic32 and similar fast devices from microchip you have to go pk3 as you can't debug them with pk2 as pk2 is just too slow for them. If you are playing with 16F then yes pk2 is a better choice.
Title: Re: PicKit 3 in Eagle format
Post by: Computerman on January 03, 2012, 07:57:41 am
I agree that pk2 is a better and more versitile device, but my pk2 clone quit working. Besides, I need to program 16F1507-09 series and maybe 24E or 33E series - none of which are supported by pk2. The Olimex clone (shipped) costs more than the original. The Sure clone (shipped) costs about $20 less than the original. I have most of the parts on hand already so it would still be much cheaper for me to build one.

I am not new to electronics, but I am relatively new to board design. I designed the original "CM29" through-hole version of the pk2. The thread is on edaboard.com. I built it entirely with free samples and parts from my salvage bin. I seemed to be the only person that could get my hardware to work. It has since been reworked and perfected by others on the edaboard forum.

I understand that this project is child's play to most of you, and may not be useful to as many people as most other projects on DP, but I am surprised that nobody on this forum wanted to show of their expertise. Oh, well.
Title: Re: PicKit 3 in Eagle format
Post by: arhi on January 03, 2012, 02:43:44 pm
I think Arcol found pk3 from olimex for ~30$ with shipping on ebay ..

The layout of the pk3 ain't too important, no high speeds there, you could route it with auto router without big problems...
Title: Re: PicKit 3 in Eagle format
Post by: violator83 on August 30, 2013, 11:22:55 am
Really nice work, but I lost something. Is it available the PICKIT3 firmware?
Title: Re: PicKit 3 in Eagle format
Post by: systemstech on September 17, 2013, 01:37:21 pm
[quote author="violator83"]Really nice work, but I lost something. Is it available the PICKIT3 firmware?[/quote]

I think arhi googled it.
Quote
Postby arhi » Sun Sep 25, 2011 4:42 pm

I googled a bit, looks like you can read the hex from the original pk3 without a problem, it is not protected
Title: Re: PicKit 3 in Eagle format
Post by: Jhon on October 30, 2013, 04:30:45 pm
[attachment=0]

For the first time, I made ​​...
Do you help me?

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01522179592session_write_close ( )...(null):0
20.01552311168ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01552311944Database_MySQL->query( ).../DatabaseHandler.php:119
40.06042450664Database_MySQL->error( ).../Db-mysql.class.php:273