Trond
Keen DIYer
Posts: 18
|
Post by Trond on Nov 30, 2014 12:27:32 GMT
I have made a version of this function decoder that measures about 16 x 13 mm. I have one version with two regular transistor outputs. And another one with an H-bridge that gives reversible polarity with full voltage, not just 5 V that you can get using the PIC outputs directly. To get it this small I did remove a couple of components that seemed to be there only for safety reasons (zenerdiode, diode over voltage regulator), don't blame me if it melts your trains and burns down you house. It only has two outputs. And the in circuit programming is of course gone, so you will have to program the PIC before soldering it in. But it seems to work very well, although I haven't done that much running on an actual layout. Everything is SMD so it requires some soldering skills, but it's not too bad. Is this of interest to anyone? Do you want me to upload board layouts and parts lists?
|
|
|
Post by Paul Harman on Dec 23, 2014 15:34:32 GMT
I am sure this will be of interest to someone.
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 26, 2014 14:45:38 GMT
First the version with regular transistor outputs: I'm probably breaking several rules of PCB design here. My main focus was getting it as small as possible. The part list uploaded here is the one exported directly from Eagle. The transistors listed are not the ones actually used, just some that was available in the library that had the same pinouts. The transistors actually used, Diotec MMBTRC103SS, are transistors with built in resistors. Replacing them with regular resistors is probably not wise. Replacing them with a FET will probably be ok, if you can find some with the same pin placement. The MMBTRC103SS transistors have a max collector current of 100mA. The column "ELFA_BEST_NR" in the part list contains the part numbers I have actually used. Ordered from www.elfa.se, I think they ship to most of the world now. They do not sell the 78L05 in SOT-23 package, I ordered that from china on ebay. I think I paid about $3 for 50. The only part that might be difficult to get hold of from other suppliers is the Diotec MYS40. Farnell for example does not carry it. But it's a very small 500mA bridge rectifier and I have not found a more common part that equals it. If you are mostly used to electrolytic capacitors be aware that with tantalum capacitors it's usually the positive side that is marked. You can order the circuit board from here: oshpark.com/shared_projects/5VA6kxCm
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 26, 2014 14:51:05 GMT
Here is the schematic and board files for Cadsoft EAGLE PCB design software. If you want to adapt the PCBs for other components. Eagle is free to use for boards less than 100x80 mm and can be downloaded here.
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 26, 2014 14:55:25 GMT
H-bridge output version: Same notes as above with the addition of the H-bridge. Finding a small enough H-brige IC was not easy, but then I discovered the Rohm BD6220. Again, the partslists says BD6230 because that was what was available in the Eagle CAD libraries. You can use the BD6230, the difference is mainly that BD6220 can work with up to 18V while the BD6230 can run up to 36V. I found someone on ebay who sells the BD6220 for £1, which is quite cheap although it's still the most expensive part. I think I calculated that the complete decoder comes to less than 40 norwegian kroner, about £4. The BD6220 has a max output current of 500mA. There exists a BD6221 version that has 1A, but I'm not sure the quite thin PCB tracks will be able to handle that. This version of the decoder can not be read back or give programming acknowledge. since acknowledge is performed by setting all outputs high. And setting both inputs high on the H-bridge makes no current flow. I suppose one could make program version that only sets one output. You can order the circuit board from here: oshpark-prd.herokuapp.com/shared_projects/MVf2ZIKD
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 26, 2014 14:56:59 GMT
Only allowed three attachments per post. Here are the Eagle files for the H-bridge version. If you make any improvements please post your version.
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 28, 2014 17:26:00 GMT
Another note. There are several posts here talking about the importance of using fast enough diodes.
The datasheet for the MYS40 rectifier bridge does not mention recovery time. My first SMD version used two BAV99 which are very fast (6ns). But when I found a way to get all four diodes in a packagage of the same size as two I just had to try. I believe recovery time is dependent on current and these are not meant to drive more than a couple of LEDs. I can not with an oscilloscope measure any difference in rise time with a couple of these on the circuit. But it might be an issue if you have a lot of them.
|
|