Updates from October, 2010 Toggle Comment Threads | Keyboard Shortcuts

  • charliex 9:19 pm on October 17, 2010 Permalink | Reply  

    Eagle class at [NSL] 

    There is always a lot of interest in learning Eagle, it cheap and popular. It is not the best PCB layout tool around but for most people it does what they need.

    Thusday, We decided to make a Evil Mad Science Lab’s Larson Scanner, but make it out of all surface mount and try to make it single sided PCB.

    handheld

     

    Using Camtasia  I recorded the screen for each part of the class, at just under 1900×1200, whoops, lessons learnt there, most projectors can’t handle that and it makes massive files. The create a part video was 78GBytes.

    So lesson learned, check the native resolution of the projector and go from there! Most people probably don’t run 1900×1200 screens either.

     

    I grabbed the PDF schematic from EVMSL, then drew it into the Eagle layout, Windell uses gEDA for his schematic.

    The original schematic. Click for a bigger version.

    image

    The layout

    ixboard

     

    So its always been difficult for me to source Atmel chips, I’m cursed. Digikey had the MLF package ATtiny2313, which is tiny and basically leadless. Since this is [NSL] that is how we do things.

    Next step was to order up enough to make 50 boards, 75 CPUs, 50 switches, 5000 resistors, 5000 capacitors and 500 LEDs. Total cost came into to around $200, not bad for that many boards and we’ve now got some spare components for the next project.

    A nice switch was found, and as a bonus it had no Eagle footprint I could find, so this was the perfect part to use for the ‘Make a Part’ video. Another lesson was about to be learnt, don’t concentrate too much on the video or what to say, and pay attention to the part you’re making, more on that later.

    Friday, I laid out the board, managed to get it all single sided, and cut the board. Found a new feature of my PCB CNC , Black lines means that the distance is too small to cut, and they don’t cut even in force mode, so the first three boards had missing pads… Oh well it was enough to verify the design and the parts hadn’t arrived yet.

    Without the GND polygon processed. you can see the trickiness employed to route the ICSP. But the VCC is missing, which I’d never have gotten in this way without a jumper

    cylon

    Saturday, the parts arrive from Digikey. I re-laid out the board, had a chat with Chris over at AccurateCNC who’s knowledge about his product and PCB making never fails to amaze me, we chat a bit about the errors of the pads, its interesting that in Eagle if you make a part and it looks the same, the slight math errors that creep can make the difference between an 8mil and a 6mil gap. You’d never see it in eagle without looking at the actual numbers. I’ve seen this a few times on different parts. One pad of an SMD 0603 resistor CNC’d the other didn’t. This is probably due in some part to floating point numbers.

    The bad boards, notice the missing pad on the LED on the right, the 0603 resistor to the right of that and one of the ICSP is missing the isolation, which turns out to be the VCC(3V) too.

     

    I make the first board, and the MLF package turns out to be really easy to reflow, i basically tinned each of the traces and pad in the middle, placed the part and hot plated it, no problem, except when i test the CPU no go.. Ok add the 3V to the ICSP that i forgot, still no good. And yep the chips in 90o off…. Pull the chip and place another one, this one also drops in easily its almost as if the parts want to sit in the right place, it wasn’t hard to align it at all.

    After fiddling about with the AVR dragon a bit, setting the speed in ICSP mode I flash the chip with Wendell’s HEX file, flashes and verified !

    Next is the addition of the resistors and LEDs, I dab a drop of leaded solder paste on each pad and add the components with tweezers, throw it on the hotplate and everything’s tickety boo. Add 3V and all the LED’s start their dance.

    MMCA says hey try the switch, no go… hmm what up i think, bad joint. Investigate and that’s odd, the schematic said the switch part was lengthways right, nope, its the short side… and the PCB is cut in such a way that all three pads need to be modified. I use an exacto knife to cut the trace , then cut away at the ground plane to isolate all but one of the existing grounded switch pads. This is bringing me back to before I’d rotated the part design by 90o and so the schematic didn’t match the pads. Easily fixed but a pain. Of course I recorded the video and I’m watching myself create a schematic with an obvious short , but wasn’t paying attention to the diagram..

    After much late night not enough coffee stuff, its all together and patched. Here is it with a 3V CR2032 cell as comparison.

     

    The red wire is the patch to add 3V to the CPU.. which wasn’t routed in the original design… whoops. you can see the cutting of the copper around the switch to make it work too..

    By Saturday morning i have the first pass done, the PCB cut and a working prototype, the changes are back into the board.

    Sunday, I’m watching the video and thinking, have to redo the video in a lower resolution and write up a blog post about it, before i forgot half of what i did.  I’ve re-laid out the schematic, made it smaller, its now square, removed the second header, moved Opt1 and opt2 to opposite sides to allow chaining, added the 3V. Changed the ICSP 6 pin from 3×2 to 6×1 and also changed the order, since it was difficult to reroute the board single without  messy traces and 6mil widths. BatchPCB couldn’t cut the PCB as it was.

    Here’s a video of it in ‘action’

    And the switch works.

     

    Hopefully on the 29th, a lot of people will have made theirs and add them to pumpkins all over.

    Now to finish up work stuff and then cut the hopefully final PCB,  test a couple and then cut 50 PCB’s, i hope my new V90 bits last..

     

    No thermals, and i rushed the rubout cut, so didn’t set the depth , but its fine. Only one warning this time and sure enough it had an issue at that corner but right side of the cpu, so i just have to move that trace ever so slightly, I’ll put the polygon thermals back on , as i think it’ll make it hard for people to solder. about 28mm square now. Shame i rushed the rubout as the cut itself was perfect.

     

    After it’s made.

     

    Programming with the non standard connector and pogo pins

     

    Size compare with the previous revision

     

     

    Hackerspacing up the battery, superglued onto the FR4, loop a wire around the outside of the battery, then another wire under duct tape. Soldering to coin cells is bad, i didn’t do that other one.

     
  • charliex 11:40 am on October 17, 2010 Permalink | Reply  

    Proxmark 3 LCD version [Null Space Labs] build log 

    So we decided to build Proxmark’s at [NSL] and not just the well tested Proxmark3’s that most people use, the LCD version which there appears to be only possibly one other of, maybe not even  that, that had  a lot of missing parts and only one guy who knew anything about it. Luckily he was a cool guy and helped us out

     

    So we order boards from BatchPCB they came in, not bad quality, only one board of the 18 so far had a problem in where a trace was shorted out. Then fixed up the BOM and ordered enough parts for one board, built it and didn’t work. So we did what any sane space would do and ordered another 10 sets of parts. Parts that were going out of stock as we were creating the order!

     

    Some parts were hard to get the Atmel’s seem to be almost legendary these days, but they were found in China, the 8050 had a newer replacement part.. We used the 512K part.

     

    The first board was built by someone who’d never soldered before, and a hotplate, it worked pretty well only one chip had to be removed and a few pads lifted, but some Kynar wire took care of that.

    proxmark3 lcd, the blew up the fpga version yes the FPGA blew up, don’t know why, as it was replaced and the board gone over but didn’t blow up on the second power up, another $13 to the cause.

    Debugging SPI for the LCD

    Compiling the software and getting OpenOCD were a fairly massive pain (took longer than 10 minutes), so I ended up just throwing it in IAR and using a SAM-ICE which meant i could debug and flash the board quickly. All that had to be done was put the bootloader, fpga  and code into one program and change some no longer needed section attributes, add a few pack pragmas and off it went , the later proxmark3 code has done some of this but we are using a branched build.

    Once the software was up and running, mostly, we started building antennas and what not. This mostly meant wrapping bits of magnet wires at random and see what happened. M showed us his superior skills at picking up a partially used spool of magnet wire and connecting it directly to the PM4, and immediately getting a perfect LF antenna.

    I attempted a milled antenna, the first one didn’t go so well as I’d forgotten that sometimes when debugging FTDI hardware or designing a board with it, it causes a bluescreen in windows during the power down mode, but only much later, like for instance when you’re halfway through milling an antenna that you didn’t save the project file for and had to restart it from scratch, but only after buying a new V60 bit because it wore out during this board and I’d run out.

     

     

     

     

    http://www.flickr.com/photos/51925658@N08/4964281431/

     

    Making a patch PCB for the broken LCD connectors that some people had, these would be affixed to the board with glue and kynar wire, awwwhh yeah!

     
    • tom 12:51 pm on November 7, 2010 Permalink | Reply

      nice so when does the board ship ? and how much ?

      • charliex 4:44 pm on March 24, 2011 Permalink | Reply

        its finished, you can get it on batchpcb, look on our wiki.032.la

  • charliex 11:40 am on October 17, 2010 Permalink | Reply  

    ARM’ing the world one hacker at a time, or how I learned to hate the Arduino and spread that hatred to others. 

    Looking for new interesting projects to do at [NSL] and also wondering why my Elektor subscription has never arrived ( hope that Las Vegas, UK does exist and someone got the benefit of it).

    I cam across the segway clone, they’re just not cool too dorky and expensive. Then the 2.4Ghz wi-spy like, chips are obsolete but there are new ones, but I believe they are mostly just RSSI at each frequency which most Wifi cards can do, so not super interesting.

    http://elektorembedded.blogspot.com/p/sceptre.html

    So i grabbed the Eagle files, generated some gerbers with the sparkfun CAM file and uploaded them to BatchPCB. There are some odd parts in the eagle layout, so i had to remove the bottom right parts other BatchPCb showed it as 4x4inches, Elektor had added labels to the layers and masks which BatchPCB includes in the size of the design, since they don’t use a dimension/mil layer. the board came out to $20.35 per unit. Silver circuits has some nice options so the same board was $125 setup and $2 each for black pcb with white solder mask and ENIG finishing. So I’m going to try them, their ordering system is not as nice as BatchPCB’s but how hard can it be?

    Waiting for PCB’s !!

     
  • charliex 8:03 pm on June 7, 2010 Permalink | Reply  

    from the Hack A Day link http://hackaday.com/2010/06/07/usb-hub-used-for-in-system-programming/

     

    caveat:  I made the code compile, i haven’t tested it, but it ought (not) to work.  ( I’d double check the 0b conversions in avr_isp.c against the original if it doesn’t work )

    2010 MSVC project file.

     

    After chatting with Paul a little, we’re both convinced it’ll need a way to do the same kernel disconnect to make it work, so either a custom driver, or on Paul’s suggestion a winusb driver.

     

    Also a useful tip to test this from Paul is to just use LED’s off the HUB instead, much easier to debug it.

     
    • dan 1:12 am on August 11, 2010 Permalink | Reply

      any new developments with this?

  • charliex 7:00 am on June 5, 2010 Permalink | Reply  

    Reflowing ! 

    So the reflow test went better than I’d hoped, the stencils were a bit hard to use since they’re unframed but the biggest issues was the roughness of the edges and using a hard edge to scrape the paste.

    I did one board with the stencil, and the rest i did by hand with a syringe.

     

    SANY0029

    The hotplate QK680

    SANY0027

    Already to go!

     

    all pasted and components laid out (prototype in the background)

    SANY0035

     

    I hand soldered the CPU on one of the boards a few days ago, then pasted the rest

    SANY0036

     

    Enough junk ?

    SANY0037

     

    Ready to burn up, this is what you do when you’re learning the solder profile, you make three of them with chips that are very hard to source…

     

    Used 120C warm up for 0 seconds, then 185C-190C for the melt, with a short hop to 200C for about 20 seconds. I reckon 190-195C indicated is where its melting.

    SANY0038

     

    Clck for bigger image, paste by hand . If only my eyes had zoom mode, eh krytie ? it looked a lot tighter when i was placing them !

    SANY0047

     

    Things will straighten out by themselves later, maybe.

    SANY0048

     

    Starting to melt

    SANY0050

    SANY0052

     

    SANY0053

    little uneven here, but once it’d finished flowing it was all good, i touched up the chip with an iron later.

     SANY0055

    moved it too soon

    SANY0056

    you can see bits of the paste left behind, this was much much worse with the lead free paste, it ended up with 100’s of solder balls unmelted underneath the components that caused shorts, this just cleaned away.

    SANY0057

    couple of bridges, too much paste, and uneven dispersal, easy to remove with some copper wire.

     SANY0059

     SANY0058

     SANY0061

    more bits

    SANY0063

    prototype board, i forgot to do a via under the chip, hence the wire. this one i hand soldered… cut it a bit deep too.

     SANY0073

    proto and first run,and it worked! its a double sided board, but given its just a couple of components i’ll hand solder those. i wish i’d populated that tiny 3v<>5v level convertor on the other two boards. I just really didn’t believe it’d actually reflow and it did.

    SANY0077

     

    some of the boards i cut, and test layouts, its a lot harder to solder with a cnc’d board and no solder mask with a tight polygon pour, so i removed a lot of it.

     SANY0079

     

     

    it was much easier reflowing than hand soldering, and i knocked out the three prototypes much quicker than i had the hand soldered ones. I reckon i could have done all 16 and only taken another 30 minutes of placing.

     
  • charliex 10:39 pm on June 4, 2010 Permalink | Reply  

    New hardware! 

    I broke down and picked up a  few new toys..

     

    QK 870 Madell reflow /preheater the general consensus on this is that its not made by madelltech so its better than most of their other stuff, I’ve done two quick tests with it and it performed as you’d expected though the manual is a bit interesting. Adafuit seems to like it too.

    http://madelltech.com/QK870manual.pdf

     

    i also picked up a QK852 since its on “sale” for $125, it flows ok, the Zephtronics one is just so expensive! Haven’t really tried it out yet, but its useful for rework on some of the more expensive boards i do.

     

    Talking of Zephtronics, I went temporarily nuts and bought one of their paste dispensing systems, not realising it needs an air supply…They say it has everything you need to start dispensing, except shop air, which i have in my other workshop in Vegas, but not here, I’ll have to pop out to the art store for some canned air. As usual with the Zeph stuff its not cheap but well made, I couldn’t tell you if i really needed this ( no i don’t) but since i haven’t been able to test it yet, i can’t tell if its useful, it is definitely a pain to hand dispense paste and keep it consistent and it wears your hand out doing a lot of them, even with zeph’s $25 plunger !

     

    Automatic Dispenser for Dispensing Liquids, Pastes, Fluids, Epoxies and More

     

    It follows the theme of the Zeph boxes, which i think is a lot of the price. I have their pickup tool, but again its I think its a tad overpriced, it doesn’t work with a footswitch using the typical hole over the pen approach, which I personally can never get used too. Dave@Zeph assures me its just me, and I’ll get used to it. It does work well though, but it does sound like an aquarium diaphragm pump to me.

    Vacuum Pen, ESD-Suction, Vacuum Lifting, Internal Pump, Vacuum System

     

     

     

     

     

     

     

     

     

     

     

     

     

    I also used Pololu’s laser cutting service to make a stencil, worked as it said on the tin, though the edges are rougher than i can do with the cnc’d brass ones, especially since i can sand them.

     
  • charliex 9:38 pm on January 9, 2010 Permalink | Reply
    Tags: dual monitor, flash, fullscreen, mouse move   

    Dual monitor (or more) adobe flash fullscreen internet explorer moving the mouse 

    Flash annoys the heck of me when I’m using it on dual or more monitors with hulu fullscreen or such.. anyway i patched it to stop the mouse moving problem

     

    changes again for

    4/17/2010  10:28       3,981,080  Flash10e.ocx

    flash10e_ocx

    This is for version 10.0.42.34

    1/09/2010  13:12  3,982,240  flash10d.ocx this file generally lives in %windir\system32\macromed\flash\ YMMV

    Changes are :-

                     changed       <=   original

    Offset               Hex ASCII       Hex   ASCII
    0x14135F          0×90   É         0x0F   .
    0×141360          0×90   É         0×84   ä
    0×141361          0×90   É         0×85   à
    0×141362          0×90   É         0×00   .
    0×141363          0×90   É         0×00   .
    0×141364          0×90   É         0×00   .

    I had to run the windows recovery console to replace the file,  inuse.exe didn’t work. I tried it on windows XP.

    Basically i just NOP’d out the test 0×90 is NOP, 0x0f 0×84 0x850x00 0×00 0×00 is a jz (jump zero)

     

    I didn’t really test it much more than loading hulu, switching to full screen and clicking around the other monitors. Interestingly it’ll stay in fullscreen mode if you change tabs and stays in the window, you can even move IE to a different monitor and it’ll stay in fullscreen, for you that might not work, but its better than I’d hoped for ! :) pressing ESC key will return it back to normal, after you’ve returned focus to the fullscreen flash.

    click to expand in a new window

    flash_changes

     

    For firefox type people i found a similar patch http://my.opera.com/d.i.z./blog/2009/04/22/watch-fullscreen-flash-while-working-on-another-screen

    Here’s the latest version of flash patch

    1/26/2010  16:58       3,981,080  Flash10e.ocx 10.0.45.2, change highlighted area to 90 90 90 90 90 90

    image

     
    • Cas 7:01 pm on January 15, 2010 Permalink | Reply

      I am desperately trying to find a solution so that I can watch full screen hulu on my tv while I am on the laptop
      I have read everything and there seems to be a patch for FireFox etc. but not Internet Explorer
      Seems that this site has something that might work.but I tried it and still doesn’t work..have you had any new updates.iz the patch supposed to work or should I HEX edit as above

      • charliex 7:07 pm on January 15, 2010 Permalink | Reply

        it does work, i use it, if you switch into full screen mode on one display, then type in another it won’t go away. the OCX is protected by the windows SFP though, so you have to make sure that the patch takes.

        • rdagijones 10:00 pm on February 20, 2010 Permalink

          Can this patch be added to Adobe version 10.0.45.2? There is problem with the version that you list here and I cannot back up to that version.

    • rdagijones 6:40 pm on February 22, 2010 Permalink | Reply

      Found the trick. The items to edit on the “Flash10e.ocx” file are the same. They are just in a different location. I found them at 1411d0 and 1411e0. Since they are in a different location, you have to look through the ASCII text and find the patter indicated in the image above. Check out the existing ASCII code and compare it to the image above. The existing looks like the left part of the table and you want to change the six entries to 90. It was the double “HH” that helped me spot it. Copy the exiting ocx file, uncheck the “read only” setting under the file’s properties and then edit with a HEX editor. I renamed the original file in the Flash folder to “Flash10eOld.ocx” and then pasted my patched file into the folder. It worked.

    • Martin 1:33 pm on April 23, 2010 Permalink | Reply

      You sir, is a GOD!
      This has been bothering me for ages, and I found no workaround untill now!
      If I had a piece of brass, I would hammer it into a trumpet, and play you a salute! :)

      • rdagijones 11:51 pm on October 13, 2010 Permalink | Reply

        Definitely I am not a god of any kind. Secondly, this trick does not work for the newest Flash versions. I now have no clue where to make changes. Anyone else know what to “adapt?”

        • charliex 7:04 pm on November 4, 2011 Permalink

          i’ll update it.

  • charliex 1:13 am on January 3, 2010 Permalink | Reply
    Tags: cadsoft eagle, eagle, , script   

    My Cadsoft Eagle tips 

     

    Just some notes mainly for myself as I get into some of the finer points of Eagle, for instance I had a schematic that had been revised and no board, the previous version had both but there were enough changes to make it a hassle. So I figured script it, Eagle has a decently powerful scripting interface. Most of the things I end up trying to figure out involve changing existing laid out board to be suitable for my AccurateCNC 560 and PCB process.

    There might and probably is a better way to do most of these, but that is partially why I’m putting up an entry.

    I use the Sparkfun CAM (from http://www.opencircuits.com ) as starting off point,my DRC generally has 8mil min sizes and 31 mil minimum drill for via’s which is huge. Sparkfun also have their library available, but it has conflicting information for commercial use.

     

    Script/command line

    rotate =MR90 LED1  rotates and mirrors LED1 regardless of starting position, M=mirror
    move LED1 ( 1.0 1.0 )  moves LED1 to 1.0 1.0
    info LED1  equivalent to properties
    show LED1 same as clicking with the mouse

     

    Changing VIA sizes after the board has been laid out, without ripping up

    I have some via rivets LPKF EasyContac , the smallest has an outer diameter of 31mil , most board via’s are much smaller, so I wanted a way to resize them. I did the DRC, switched off some of the layers, then just clicked through them.

    change drill value

    Obviously the downside is that the changed Via may now overlap or cause routing problems, sod’s law will guarantee it. Its funny how the smallest of changes will throw off an entire board, the knock on effect can make it go from i just need to resize that one via, to the whole board has to be rerouted.

    I’d hoped this would do it, but alas no. From a cursory glance over other scripts, you generate a cmd that does the changes. I just have to figure out how to select the via I want to change.

    B.signals(S) {
      S.vias(V) {
         if( V.drill < drillminsize ) {
                  V.drill = drillminsize;
          }
         }
      }

    So this is where i went with it

     

    #usage "<b>Export size and position information from a board to a script.</b>\n"
           "<p>"
           "<author>Author: Charlie Wallace</author>"

    // THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED

    real u2u(int x) { // resolution 1/100 mm
       x = round(x * 100)/100;
       return u2mm(x);  // if mm
    }

    real u2ang(real x) {
      if (x > 360)
         x = x -360;
      x = round(x * 10)/10;
      return x;
    }

    if (board) board(B) {

              output("test.scr","wt") {   

            // switch to metric
            printf("grid mm\n");

            // iterate elements
            B.elements(E) {
                printf("move %s (%g %g)\n",E.name,u2u(E.x),u2u(E.y));
                if( E.mirror )
                    printf("mirror %s\n",E.name);
             }
        }
    }

    else dlgMessageBox("Start this ULP in a Board!", "OK");
    exit (0);

     

    First problem is that it uses a fixed name and path for the scr, second is that the mirror is a flip flop not an absolute. I’ll go over the existing parts first

    the real u2u…just converts eagles units to mm, easy enough i copied it from one of the existing scripts, same for the u2ang().

    if (board) board(B)

    this checks to see if we’re in a board, and then starts an iterator for all the boards in B. its like a for loop that makes B point to each instance of the board.

    output("test.scr","wt") {   

    this creates an output file called test.scr with “wt” as write text, C programmers that are familiar with fopen will notice the similarities. Eagle uses {} instead of fopen/fclose style, that is that the file will remain open for writing within the { } .  as with fopen this overwrites anything that already exists.

              // switch to metric
            printf("grid mm\n");

     

    we’re using metric positions, easy enough, this outputs the a line by itself to test.scr that just says

    grid mm

    next is  

         B.elements(E) {

     

    this iterates each of the elements in the board, look at E_ELEMENTS in the eagle help manual for all the members

                  printf("move %s (%g %g)\n",E.name,u2u(E.x),u2u(E.y));
                if( E.mirror )
                    printf("mirror %s\n",E.name);

     

    this prints out a move and maybe mirror ( if the part is mirrored) with the internal eagle units converted to mm so it appears as

    move R1 (1.0 1.0)

    that is basically it! it was faster for me to learn eagle scripting and write this, than it was doing an info, show, and typing in the coords by hand for 50+ components.

     

    Next is to fix the mirror issue. After a quick grep of the help file for ‘mirror’ we see that the rotate is able to set the absolute, which is great since we need to add rotation as well. angle is the member in the UL_ELEMENT structure we need for the rotation, so :-

     

            if(E.mirror)
                printf("rotate =MR%g %s\n",E.angle,E.name);
            else
                printf("rotate =R%g %s\n",E.angle,E.name);

             }

    That adds the rotation and the absolute mirror, it doesn’t deal with multiple layers.

    As its stands now, it needs a file requestor dialog for the script, and to support layers. But it worked (for the most part) for what I needed. Oddly enough one of the components refuses to accept a rotation or mirror, it’ll move but that’s it. Even by command line, have to investigate that one, it certainly helped me transfer the board, but it needs work.

    #usage "<b>Export size and position information from a board to a script.</b>\n"
           "<p>"
           "<author>Author: Charlie Wallace</author>"

    // THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED

    real u2u(int x) { // resolution 1/100 mm
       x = round(x * 100)/100;
       return u2mm(x);  // if mm
    }

    real u2ang(real x) {
      if (x > 360)
         x = x -360;
      x = round(x * 10)/10;
      return x;
    }

    if (board) board(B) {

              output("test.scr","wt") {   

            // switch to metric
            printf("grid mm\n");

            // iterate elements
            B.elements(E) {
                printf("move %s (%g %g)\n",E.name,u2u(E.x),u2u(E.y));
            if(E.mirror)
                printf("rotate =MR%g %s\n",E.angle,E.name);
            else
                printf("rotate =R%g %s\n",E.angle,E.name);

             }
        }
    }

    else dlgMessageBox("Start this ULP in a Board!", "OK");
    exit (0);

     

    Polygon pours usually make for easier routing (as well as the normal benefits)

    At the least this has been true for the boards I’ve been working on, having a common GND plane has made it much easier to route, the bonus being that you don’t have to work about the excess copper on the PCB during CNC too. Initially I’d been using PhCNC to do copper removal which looks nice and might help with assembly due to clearances, swarf and shorts during soldering but it takes a while to do and it eats up expensive end mills

     

    Autorouter as a tool

    Autorouters are a much maligned process, but its simple enough they’re a tool that may help with a process, not a solution for every situation. I use it to help me layout and then individually route, I find routing some of the harder parts by hand helps the auto routing a lot. Artistic style is one thing, but just like source code the pretty formatted code can still be buggy, it just makes more pleasing to humans, in circuits that is what schematics are usually for. Read up on all the right angle stuff, then find the papers where people have actually measured it and determine if your circuit needs it, granted habits are good but no need to go crazy but importantly learn why. Bunny over at Chumby Studios throws out some excellent tips. Engineers tend to be a bit overly obsessive, that is why they often ship late.

    Don’t expect to the auto router to make pcb’s like you see on professional boards, it’s just not going to happen, but if you help it along a bit you’ll get good results. The usual horses for courses rule applies.

     

    Multiple Monitors

    Probably one of the best investments you can make, I like the Hannspree 28’s cheap and cheerful, Schematic on one, board on the other (and a third smaller one for the blog ! )

     
  • charliex 2:23 am on December 28, 2009 Permalink | Reply
    Tags: binary grep, hyundai genesis   

    Hyundai Genesis, December pictures 

    IMG_1146

    I spent most of December hacking away on the Genesis ECU, did pretty well with it, its turned over to the dyno and mechanical guys now ! My stupid iPhone failed miserably at retaining the pictures I took, seem its falls apart if you take too many.

     

    I spent a lot of time in the Hotel, gave me an opportunity to work on the OBD II reflash code. Considering it looked like this outside, a good thing!

    IMG_1158 

    A few days before the snow

    IMG_1149 

     

    My car getting a few mods.

    IMG_1167

     

    Setting up a ram tracer

    IMG_1140

     

    Messing about with the scooby ecu’s, I threw together a little board to flash them.

    Test ‘jig’

    IMG_1112 \

     

    This is one of the three or four boxes of Toyota ECU’s I have.

    IMG_1110

     

    I came across tmbinc’s bgrep and modified it a bit to run natively under windows (rather than cygwin), the recurse directory code is just from msdn, I didn’t spent a lot of time with it. Binary grep is very useful, i keep meaning to write one. i didn’t test the stdin.

    // Written in April 2009 by Felix Domke <tmbinc@elitedvb.net>
    //
    // Placed in the public domain April 2009 by the author: no copyright is
    // claimed, and you may use it for any purpose you like.
    //
    // No warranty for any purpose is expressed or implied by the author.
    // Report bugs and send enhancements to the author.

    #include <windows.h>
    #include <stdio.h>
    #include <sys/types.h>

    int ascii2hex(char c)
    {
        if (c < ’0′)
            return -1;
        else if (c <= ’9′)
            return c – ’0′;
        else if (c < ‘A’)
            return -1;
        else if (c <= ‘F’)
            return c – ‘A’ + 10;
        else if (c < ‘a’)
            return -1;
        else if (c <= ‘f’)
            return c – ‘a’ + 10;
        else
            return -1;
    }

    void searchfile(const char *filename, FILE*fd, const unsigned char *value, const unsigned char *mask, int len)
    {
        int o, i;
        off_t offset = 0;
        unsigned char buf[1024];

        if(fd == NULL)  return;

        while (1)
        {
            int r;

            memcpy(buf, buf + len, len);
            r = fread(buf + len, 1,1024 – len,fd);

            if (r < 0)
            {
                perror("read");
                return;
            } else if (!r)
                return;
            for (o = offset ? len : 0; o < r – len + 1; ++o)
            {
                for (i = 0; i < len; ++i)
                    if ((buf[o + i] & mask[i]) != value[i])
                        break;
                if (i == len)
                {
                    printf("%s: 0x%08llx\n", filename, (unsigned long long)(offset + o – len));
                }
            }
            offset += r;
        }
    }

    void recurse(const char *path, const unsigned char *value, const unsigned char *mask, int len)
    {
        BOOL            fFinished;
        HANDLE          hList;
        TCHAR           szDir[MAX_PATH+1];
        TCHAR           szSubDir[MAX_PATH+1];
        WIN32_FIND_DATA FileData;

        // Get the proper directory path
        sprintf(szDir, "%s\\*", path);

        // Get the first file
        hList = FindFirstFile(szDir, &FileData);
        if (hList == INVALID_HANDLE_VALUE)
        {
            printf("No files found\n\n");
        }
        else
        {
            // Traverse through the directory structure
            fFinished = FALSE;
            while (!fFinished)
            {
                // Check the object is a directory or not
                if (FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                {
                    if ((strcmp(FileData.cFileName, ".") != 0) && (strcmp(FileData.cFileName, "..") != 0))
                    {

                        // Get the full path for sub directory
                        sprintf(szSubDir, "%s\\%s", path,FileData.cFileName);

                        recurse(szSubDir,value,mask,len);
                    }
                }
                else{
                    FILE*fd;

                    sprintf(szSubDir, "%s\\%s", path,FileData.cFileName);
                    fd = fopen(szSubDir,"rb");

                    if(fd){
                        searchfile(szSubDir, fd, value, mask, len);

                       printf("%s\n", szSubDir);
                    }
                }

                if (!FindNextFile(hList, &FileData))
                {
                    if (GetLastError() == ERROR_NO_MORE_FILES)
                    {
                        fFinished = TRUE;
                    }
                }
            }
        }

        FindClose(hList);
    }

    int main(int argc, char **argv)
    {
        char*h;
        unsigned char value[0x100], mask[0x100];
        int len = 0;
        if (argc < 2)
        {
            fprintf(stderr, "usage: %s <hex> [<path> [...]]\n<hex> = FFFF, FF or FF??. F, or F?F unsupported, ?? = wildcard\n", *argv);
            return 1;
        }
        h = argv[1];
        while (*h && h[1] && len < 0×100)
        {
            if (h[0] == ‘?’ && h[1] == ‘?’)
            {
                value[len] = mask[len] = 0;
                len++;
                h += 2;
            } else
            {
                int v0 = ascii2hex(*h++);
                int v1 = ascii2hex(*h++);
                if ((v0 == -1) || (v1 == -1))
                {
                    fprintf(stderr, "invalid hex string!\n");
                    return 2;
                }
                value[len] = (v0 << 4) | v1; mask[len++] = 0xFF;
            }
        }
        if (!len || *h)
        {
            fprintf(stderr, "invalid/empty search string\n");
            return 2;
        }
        if (argc < 3) {
            searchfile("stdin", 0, value, mask, len);
        } else
        {
            int c = 2;
            while (c < argc)
                recurse(argv[c++], value, mask, len);
        }

        return 0;
    }

     
    • MrC 10:38 pm on April 19, 2011 Permalink | Reply

      Charliex2,

      Saw your blog on hacking the genesis coupe ecu. How far are you from being able to read and write to the ecu. We’re interesting in a tuning solution for the genesis coupe 2.0T via flash. Let me know if you have any more information regarding the genesis ecu.

      Regards,
      MrC

      • charliex 1:06 am on April 20, 2011 Permalink | Reply

        I did that last year.

  • charliex 4:04 am on December 26, 2009 Permalink | Reply
    Tags: , Xilinx   

    Xilinx ISE update 11.3 –> 11.4 

     

    So a new update appeared for ISE, and I installed it, took about two hours… Worked for about five minutes then failed with the usual Xilinx cryptic message system this one being,  ‘ error message, when i tried to edit the  .v I’d  just created and compiled earlier, refusing to edit the file.

    So i reverted the changes, another hour+ gone, just basically moving/deleting files!, quad core 3 GHz with a 10,000 RPM WD drive under XP. It uses lots and lots of little files, so disable any antivirus you have since it’ll kill the already terrible speed as well as ruin your disk space. Suggest Xilinx look into using a different system, single packed files perhaps ?., works for practically all the video games out there, WAD files etc.. 1000’s of small files is just bad, it always kills performance.

     

    Loading the project back into 11.3 i see it added a ‘timing message to the top of the file (first part of the error message above), so i removed it. Curious to see if that was the cause of the error, I’m reinstalling the patch (which is now downloading again)

     

    This is the uninstaller, fills you with hope doesn’t it! Started off ok, then after about 40% did this. My guess is memory corruption.

    xilinux_1

     

    I’m writing this as i wait for it to reinstall, 15% so far, started at 5:45PM  now 6:10PM, it is around a 2 Gb patch. 40% at 6:28PM (22 Mbps connection). Still at 40% at 6:38PM, and 40% at 6:46PM

     

      I wonder if they have they seen this XKCD comic ?

     

    Still at least I’ve got some episodes of Top Gear and Doctor Who to watch on TiVo. It is December 25th, I just can’t imagine there are many people downloading from xilinx.com and i did a few tests at speedtest.net etc, I’m getting plenty of bandwidth.

     

    Ok finally moved off 40% and now its in the make 100’s of backup folders to copy the existing files into for the rollback. Since the patch is so large it seems to replace just about everything. I’m wondering how long this would take instead ?

    1. recursive zip on all folders in ISE.
    2. delete/replace/add new files

    Or just rename the existing folder to backup_xxx and then install a fresh copy. Even a differential archive shouldn’t take this long. I’m watching it with Filemon from time to time, recursively generating deep directories and copying. We keep our software updates in a content management system like subversion, so you just update to the latest, and you can go back to older versions easily, releases are tagged.

     

    It’s fairly hammering along now thanks to the 10,000 RPM drive. 70% at 6:58PM, but I watched Jeremy Clarkson drive to the North Pole since this started. 79% and its stalled again , since its downloading more data. 83% 7:17 PM, 84%  7:33PM, and this is the second time today I’ve installed it, around 5 hours to install/rollback/reinstall and i don’t know if it’ll work. Woo Hoo 100% at 7:56PM , but whats this ?

    xilinx

     

    Yep 107% its just that awesome. Presumably now its decided to just change files that don’t belong to it, or updating some of my other software. So far its at 126% and its done, well after a reboot. 5:45PM started, 8:03PM finished ( well after the reboot )

     

    I’m curious to know how much of the data being downloaded is actually different.

     

    ISE is just an awful tool. We’re spoiled rotten with C/C++ tools like Developer Studio. FPGA’s are often used because they are fast, the coincidence isn’t lost on me. Best I can think of is, don’t use the updater, delete and redownload it in whole, or just leave it overnight.

     

    Seems to be ok now, I don’t know if I’ll get the original error or not.  ISE crashes very consistently after editing the timing constraints file.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Follow

Get every new post delivered to your Inbox.