Electronics&Hardware&PCB Layout&Projects19 Oct 2013 12:15 pm

This isn’t exactly what I had in mind with my last post (there’s another project coming up after this one), but it’ll do for now :)

I had an idea for a simple mechanical design for a quadrotor, and since I was already pretty interested in building one, that prompted me to go work on the design for it. Like with many things I do, I like to build the full stack in projects like these – so I’ve designed my own electronics for it as a first step. Some of the PCBs have come back from fabrication so I expect to make more progress with this pretty soon.

Some pictures from the PCB designs:
quad_esc_r1

quad_main_r1

quad_nrf

The three boards above are a speed controller to drive the motors, the main PCB that will collect sensor data and do control, and a plug-in module for the main PCB which has wireless (via Nordic RF chipset) and a flash chip for archiving sensor data / other general use.

For now, I’m just writing initial firmware and testing that things work, but once I confirm the design is viable I’m planning to release the design files for it.

Another interesting feature of this project is that I screen-recorded the PCB design process – I’m planning to edit the videos into timelapses and add some commentary on the thought process behind the design. I’ll post about these also once they’re released.

Electronics&Projects&Uncategorized17 Sep 2013 08:58 am

Well! It’s been another year since I posted anything; not the first time I suppose.
I’ve come up with an idea for something I want to do though, which will result in a lot of blog posts in about a month or so. I don’t want to say too much about what it is yet, but keep an eye out for it :)

Electronics&Hardware&Projects26 Aug 2012 07:11 pm

I am really bad at keeping to a schedule with this blog :)

It was going so well, with the 3D Printer posts, all good posts and not too far apart, and then… nothing.

I did continue to work on the 3D printer a bit past that, and will resume those posts again, probably once I have everything working – it’s still waiting for some software development which I have been stalling on / doing other things.

So, what has been taking my time? Let’s see…

 

Reflowed: nRF_stick, chopper1, nRF_sensor1

First I messed around with some Nordic RF chip stuff (I’ve built some infrastructure, but these projects are still ongoing)

 

IMG_0893.JPG

I built some PCBs for an RGB POV spinning top, which still hasn’t been fully assembled or programmed…

 

Reflowed: psplcd

I designed a board to control the PSP LCD, and finished its software (it works!) – I normally do everything but a friend of mine did the PCB layout on this board.

 

GBCart: Nintendo logo

And most recently I’ve been working on a gameboy cartridge. Not much to say about this one yet, but will be fun when there is :)

 

And of course a few other things along the way; my Flickr Stream has more, and is usually the first place new stuff shows up.

Feel free to ping me with any questions or comments! I’ll try to post a bit more regularly.

Circuit Design&CNC Controller&Electronics&Hardware&PCB Layout&Projects04 Feb 2012 10:58 am

Armed with a blinking LED program, I set to work attempting to flesh out the rest of the software for the CNC board. I built and tested a nested vectored interrupt handler, and started trying to port my USB stack from another chip that has very similar USB hardware. As time went on though, the outlook became a bit bleak; A number of things did not appear to be working as intended on this chip, and the manufacturer’s example code included bizzare comments and workarounds for some pretty impactful bugs that weren’t otherwise documented. Not confident that I would be able to make this chip work the way that I wanted, and being less than thrilled with the ease of assembly and some of the design of the CNC Rev1 board, I decided to make a new CNC board.

My design goals would be:

  • Ensure the design will work, by using chips I’m familiar with & already have code working on.
  • Reduce complexity by only having one motor driving voltage, but still allow that voltage to be changed.
  • Reduce the part count per motor, by consolidating components into fewer packages and taking a different design path driving the motors.

(more…)

CNC Controller&Electronics&Hardware&Projects31 Jan 2012 12:31 am

As I mentioned earlier, JTAG is a pretty simple protocol. For the ucHelper I’ve designed a command-oriented serial protocol that allows me to perform various JTAG and UART operations. After some initial trouble with physical connections on the CNC board, it was possible to enumerate the JTAG chain! In order to be sure JTAG was really working as intended, I took a short detour and wrote an SVF player, and was able to program some existing Xilinx FPGA boards from SVF files (like serialeth).

The ARM Chip I was using on the CNC board (NXP LPC2927) has two JTAG chains – one of them is a boundary scan / flash (and who knows what else) chain, and the other is for the ARM9 standard debug interface. I only really wanted to program the flash, so I started out with the flash chain – There was some documentation for the JTAG flash interface of a previous chip in the series so I was hopeful this one would be similar.

Unfortunately it was not meant to be. The enable bits / initial handshake sequence for the flash controller on this chip seems to be entirely different than the earlier one, sometime I may go back and find the right bits to make that work, but I shifted my focus to using the ARM debug interface. The first thing I noticed, is that it didn’t work :) As it turns out (after connecting the layers of deep indirection in the documentation), you must have a crystal in a specific range of frequencies for it to work; After fixing that though, I began to make progress on that front. the ARM debug interface for this chip is relatively well documented in the ARM9 documentation on ARM’s site. Documentation always seems to leave something to be desired, but this was at least relatively unambiguous – and worked!

Effectively, the ARM9 chips (also most other ARM chips), for a debug interface, simply intercept the processor’s instruction and data busses, and allow you to single step the processor. So you can perform operations by injecting the instruction you wish to execute, and single stepping. You can write a register to an arbitrary memory location, which causes it to be intercepted on the data bus (afterwards you can read the data bus) – Similarly you can read from memory and it will end up reading the value you insert onto the data bus into a register. It’s a rather minimal and effective debugging interface, it doesn’t consume much in the way of hardware resources, though the software to do anything useful with it has to be a bit complicated as a result.

Since the single step operations capture the data bus, it’s not possible to directly modify or read system memory through them, but there is another special provision for doing this, for executing individual instructions synchronized with the normal CPU clock that can interact with memory. So, I wrote a handful of wrappers that would allow me to manipulate the CPU’s registers and read from / write to memory, and around that built a small program that wrote the flash using the system’s internal flash controller.

With that literal pile of work behind me, I set off building software for the ARM chip itself. A short amount of time later, I had a blinking LED (Because this is naturally the most important thing to do with /any/ piece of hardware)

IMG_0826.JPG 

(Not visible: LEDs blinking)

(Continuity note: Note that the above board is not the same one as the board shown in part 1! At some point in messing with the JTAG chains I became sufficiently frustrated with the quality of connections on the first board, which had been reworked a few too many times perhaps, that I built a second board and took special care in making sure the JTAG chains and other important connections were in good shape. It’s a bit less than fully populated because… placing some 400-500 components is HARD!)

(More to come in part 4…)

CNC Controller&Electronics&Hardware&Projects28 Jan 2012 03:33 pm

Around the middle of December I decided it was finally time to make this project actually work.

I took the one CNC board I had assembled, such a long time back, and subjected it to an initial smoke test (connecting the power, that is). There was smoke. Not discouraged by the loss of a chip or two, I took a further look. I found that the assembly of the first board had hit a number of major snags; The board was 2oz copper in order to be capable of routing large current loads to the motors – but the groundplane was exceptionally difficult to solder to, even though the pads have thermals. I found that one of the chips broke because a resistor intended to keep an “enable” signal low was not connected to the groundplane, and the other one, a FPGA, was installed backwards (these FPGAs have two circles on the top which could indicate pin 1; Unfortunately the wrong one was chosen and I didn’t check.)

Undeterred, I pressed forwards with getting this board to work. I replaced the FPGA and rotated the other one, doublechecked a lot of signals (there were still some components on the back side of the board that were not properly connected to ground). All the poor connections were on the back side of the board, the top side had been reflowed and the connections seemed uniformly good there.

After those fixes and some cleanup, ran the smoke test again – The board powered up without smoke! A first small victory down this path – But many more things remained.

So, let me tell you about JTAG. I made a post on jtag a long time ago, when I was first starting to mess with it; but for this project I decided to build my own JTAG tools to program the chips involved & for other nefarious purposes.

I have made a few starts  towards my own jtag stack over time, first was an AVR-based board intended to program all manner of things – This project ultimately stagnated as the jtag level shifting interfered with actually programming the AVR chip itself. Despite a fix, building out the stack was a big project and never was completed.

While I was designing the CNC board though, I had the idea for a more specific debugging helper tool geared for it, and not too long after designing the CNC board, I did build such a device based on a chip I had come to know and love (and built a USB stack for…) – this was the ucHelper, PCBs shown below.

IMG_0628.JPG

ucHelper is really just a minimal JTAG and serial interface board – Being exactly what I needed for programming and debugging here though, I got started on writing the code for it.

(more in part 3)

 

CNC Controller&Electronics&Projects27 Jan 2012 02:29 am

It’s been just over a year since I decided to seriously pursue building my own 3D printer, and while it has been taking a back seat to a lot of other projects I’ve been doing, it’s looking like it will finally come together in the next few weeks!

The CNC Controller in the last two posts was my first big move towards realizing the idea; Being  a stubborn sort, I’ve wanted to build the entire thing entirely myself – Historically this has been both a good and a bad decision; I like owning the entire stack in a project, but it comes at a price – Actually building and completing the project takes a lot longer. The upside is I get a lot of experience from such projects, and learn a lot about a wide variety of things – this is ultimately the reason I do it so much.

I did finally concede to use an existing 3D Printer hardware design, and near the end of last year built a Prusa Mendel from a kit of printed parts & hardware (pic below)

IMG_0772.JPG

However I am still quite determined to own the electronics. Around the very end of 2011 I finally decided to put the effort into making this project happen, and started to bring up the CNC board I had designed.

(More in part 2)

Circuit Design&CNC Controller&Electronics23 Jul 2011 04:54 pm

Ah, it’s been a while.

Since I opted to stop posting on a fixed schedule, that seems to have eliminated any hope of regular updates – oh well.

So, I have been largely tied up in a (Very big) project that’s still secret, I’m not saying much about it. But there have been a few bits of progress in other areas – Most notably, I finally got a CNC controller board populated!

Fully populated CNC board

Isn’t it lovely?  I certainly think so, after all the work that went into getting this far :)

Sadly, I won’t really get much further at the moment (need to get back to an all-consuming secret project), but this has marked a pretty big milestone in a few of my projects (the reflow controller also works pretty nicely!)

I’ll be sure to take some time and write up these when I make some more progress (or just get sick of working on the more important stuff again)

 

Circuit Design&Electronics&PCB Layout&Projects21 Feb 2011 10:53 pm

Progress! At long last!

Over the past month I have been designing a CNC controller for various small projects I’ve been kicking around (oh things like 3d printing, building a pick&place, and some other random thoughts)

Being the hopelessly stubborn sort that I am, I decided to build it from scratch. The design work for something like this is something I enjoy immensely, and while I don’t always get everything right the first time (There are a few inefficiencies, but nothing terrible), it’s been a lot of fun and a good learning experience.

Here’s an image of the final board design, and past the break is a very long thread of text and images showing the steps getting to this point:

(more…)

Uncategorized29 Jan 2011 01:57 pm

Well, when I initially pushed myself into writing on a schedule, I thought having to write about something periodically would be an interesting challenge; I’ve learned a few things since then, one of which is that when I don’t have anything specific to talk about, I don’t really have anything to say either; So I’m changing the format of this blog once again to just post about project completion & milestones when they happen, rather than on a fixed schedule. Looking back the updates I’ve made are interesting from the perspective of seeing how things were going over time, but I think it will be more interesting if I’m just writing about the stuff that excites me :)

With that said, there’s nothing to  show for this week besides minor progress on a few fronts; so here’s a picture of my desk as it stands pretty recently:

IMG_0620.JPG

Next Page »