Search This Blog

Friday, 29 July 2016

Gauges Working on DRO

I've got gauges working again on the DRO, currently two of the cheap Chinese calipers using the 24 bit data output have run on two axes of the ARM based DRO. There's a few minor PCB errors but nothing major. The switches should work soon. The only major part not working is the TFT display and that could be a code problem, or a non functional display. I've switched to an SPI TFT display, and I only had a non touchscreen version. I'm waiting for the touchscreen ones to arrive. Based on the parallel display experience, I think about 50% of these displays don't work out of the box and of the remaining 50% only half have the advertised display controller chip on them, the other half have whatever chip was hanging around when the displays were built.

Here's the ARM DRO with a channel working:






The daughter board is plugged in at the bottom left. That has a PIC 12F1822 on it that converts the data form the gauge into I2C which the main board polls in its idle loop. There's room for five more boards across the bottom of the main board.  As you can see the gauge reading is on the Z axis in this picture.

I've had two 24 bit gauges working, the third one I had wired was of the 2 x 24 bit packet format, which did work in the past but failed for some reason when I tried it. I'll make some more daughter boards and debug the problem..

The more expensive gauges I got as a trial are ironically less stable when powered off the DRO 1V5 supply so I may move to cheap Chinese gauges as they are also 0.01mm resolution and seem more tolerant to my 1V5 supply.


Sunday, 24 July 2016

Back Where I Started

With regard to the DRO PCB anyway, just this time it is using an ARM (LPC11U14 specifically) on an LCPXpresso board that I had floating round for another project.




As you can see, the code is ported over, well the OLED driving stuff anyway, and all is up and running. Just the TFT and LED displays to do, then I can attach the gauge boards and get it running. That's where it all started to go wrong with the PIC based PCB. The LPC stuff is much more solid. I've not seen the OLED problems I saw with the PIC, and it's the same code, so there was something odd going on with the PIC. The LPCXpresso board has a JTAG debugger on one end too, so the DRO has it's own debugger. That works perfectly too, I've managed to get a stack trace from it when I made  porting error, and it was easily debuggable. All in all, much better.

The only thing is that the LPCXpresso board is much more expensive than a PIC chip, but I can probably make my own target board later and take the LPCXpresso board off the DRO. Maybe. I may just leave it there, it'll make programming easier later on.

Friday, 22 July 2016

Mortice and Tenon on CNC3020 Engraver

I need to do a lot of mortice and tenon joints if I'm going to do the chair project, and they aren't fun and never look very good in pine, as it's difficult to work with. So can you do them on the CNC3020?


Well, after 3d printing a clamping plate that attaches to the 4th axis mounting bolts on the front of the 3020, it turns out you can do some very consistent nice looking tenons and matching mortices:


These are test pieces, but they are very consistent, totally interchangeable and look nice.  The clamping bracket lets me put tenons on the end of long pieces of wood, I 3d printed it and it's strong enough to hold the work.


In order to get the spindle out in front of the bed of the CNC enough to do the entire tenon, I had to make a spindle extender attachment. I did this in wood as the 3d print was 6 hours or so, I may do a 3d printed one later if I use it much.





This gives me enough extra over the end of the machine to do the work I need for the chairs. I'm a bit concerned that there may be heat build up due to the insulating properties of wood as opposed to the aluminium heatsink arrangement the spindle normally has.


Of course, this is also going to be true if I 3D print a version. I may have a think about a 3d printed cylinder in the existing heatsink and an aluminium clamp attached to it that gives similar heatsinking as the current clamp. I don't think the machining will take too long so I won't be running for extended periods of time, but it may be better anyway.

Perhaps a 3D printed version with holes for ventilation?

Lathe Centre Height Finder

I got fed up with fiddling with tool heights on the mini lathe, so I cobbled together this






It's not hugely pretty, but it works and is adjustable. I like the base, as it's a bit of metal I picked up while walking somewhere, on the off chance I could use it, and I have, excellent. The brass and base are polished, but you can't see that in this picture very well, so there's some shiny bits.
Main DRO PCB 2.0

I've decided to put the entire Lexpresso card onto the DRO main board as it saves me the hassle of laying out a processor board, and I get the debugger/programmer half of the card as well. I can lay out a processor card later if I want to. The card also has nice 0.1inch holes for mounting on a PCB, which the Arduinos don't I thought about using and Arduino Mega, but mounting it was just too difficult.

New main PCB being milled:


I'm doing two passes, the first with a 0.6mm bit and the second with a 0.2mm bit. The first pass gives me more clearance around the tracks and pads and th eseocnd does th efine isolation. This should make it a bit easier to solder without shorts like I had on the first PCB. Of course, it means two 7 hour milling sessions, not one, but it's probably worth it.

Saturday, 16 July 2016

Change of DRO Direction

 I've spent a lot of time recently trying to get the PIC16F18875 working as the main controller on the DRO. It's sort of working but there's problems. Whenever I make a simple code change (something like changing a /1000 to a /10) the code sometimes just fails to run. This would be fine, as it's probably a bug, well maybe, but as the Microchip debugger also doesn't seem to work, it's all a bit of a disaster. Looking on the web it seems this is a fairly common experience. It's a shame as I've used PICs a lot in the past and they were useful little devices. Anyway, I've decided to ditch the PIC and try something else. At the moment he plan is to use an LPC1114 ARM based device. This has the added advantage of more flash (32K), similar clock speed and lots of GPIO. Unfortunately it is a 3V3 device and that means I will have to deal with level shifting and add a regulator.  Anyway that's all OK, just a bit more complexity and if it works I can lay out a mostly 3V3 PCB with the LPC on it.

The other thing about the LPC chips is that they don't come in any DIP packages. Not that are available to buy anyway. So I have tried to mill a QFP48 footprint that is one of those used by the LPC1114. Once I used a 0.1mm cutter and a shallow depth of cut, I managed this:






It's not perfect, there's a bit of copper that hasn't been milled away. I think I may be able to sort that with either a second milling or slightly more depth. Anyway, it looks to be possible, so that's the plan.
Those pads are 0.5mm between centres, by the way.




Spindle Camera Mount

I made a quick little bracket for mounting the spdinle camera on the CNC milling machine while it is operating. I can then see what's happening without having to look at the spindle directly.


The shiny red bit is a mount off a cheap magnetic base from ebay. It works well, I may get some more. Unfortunately the base isn't very strong.

Here's a picture of some PCB milling going on:


here's a video of the same.


Sunday, 10 July 2016

Nuts

I've been looking for 12mm T nuts with an M6 hole for a while, to use with my very small vice. I finally decided to make some as I couldn't find any. Some steel arrived and off I went.






The one on the left is the 12mm T nut with an M10 hole. Mine are on the right. They work nicely. I think I'll have to cut some bolts down to a useful length though. The mill pretty easily cut these out too, I managed to make the cuts in a single pass, which made it easier.  One I get the DRO going I'll be able to take multiple cuts more easily, I just couldn't be bothered this time.

Friday, 8 July 2016

DRO Display Running

The main display PCB has now got some firmware that does something. The code can talk to all three OLED displays and also to the three LED readouts.



It can also get pixels on the TFT, but the range of co-ordinates seems limited in some way. There's also some spurious pixels on the OLED displays, but it seems deterministic so I don't think it's noise.
I need to get the touch screen code in a fit state to register keypresses.

I've also routed a couple of gauge channel daughter boards:


The bottom one is milled using a 0.2mm bit as I have done with most of my PCBs so far. After the problems with shorts on the display PCB (which turned pout to be soldering problems, as there's no solder resist), I have tried a double stage milling process in the second PCB. The first stage is a mill with a 0.6mm bit, followed by one with a 0.2mm bit to cut away the final detail. This leaves a larger gap around most of the tracks, which I hope will act as a sort of solder resist.

Here's a populated gauge channel PCB:


The socket is for the PIC12F1822 which reads the gauge data stream. The transistors are used for level shifting the data to 5V and also for driving the data and clock lines in order to put some gauges in to fast mode.
There's also a 1V5 supply generated with a simple voltage divider.

First DRO PCBs

 I've routed the first DRO PCBs. This is the main display PCB with one gauge interface daughter board:




There's the three LED axis displays and the OLED axis label displays. The larger display at the bottom is the TFT that I want to use for diagrams etc.

This is the gauge interface board:


it plugs in like this:


The partially populated display PCB from the rear:


Unfortunately I have a short between the supply rails on the display board, so I'm going to remove the excess copper to try to isolate it.

Tuesday, 5 July 2016

DRO Electronics

I have breadboarded the DRO electronics now. I've settled on three 8digit LED displays for axis position and three 0.96" OLED displays as labels for the axes. These will show whether the axis is X,Y, Z or whatever, plus summed axes and any other information for the axes that may be needed.

I'm also having a 2.4" TFT touchscreen LCD as the main keypad instead of separate keys. This means I can change the layout of the keys and have firmware controlled keypads as required. I've added one hardware key per axis though as an axis zero button.

The TFT LCD can also be used to display various more complicated modes like centre finding and so on.

This is a couple of the displays breadboarded as I tried to get the TFT displays to work. This is a bit of a nightmare as I've had boards that look identical to each other but which seem to have completely different controller chips on them. The touch screen functionality isn';t the most advanced int he world either, requiring voltages to be set up with GPIO lines and then and ADC reading to determine each axis position. Finally got it working though. The OLED display was easy, I just ported the OLED watch code...






The PIC at the moment is a 16F18875. I think I may end up running out of flash space, well, maybe, but that's not a huge problem as there are PICs with the same pinout and more flash space. I'll move to one of them if I need to.
I'm in the middle of routing a PCB with the main displays and big PIC on it. The circuits for each gauge I've decided to put on separate daughter boards. It means I have to lay out just one PCB and I can also adjust the gauge circuit to match any future gauges I find that have slightly different interfaces. Each of these interfaces has it's own PIC12F1822 which captures the gauge digital output and acts as an I2C slave which the main processor then polls. I have done most of that code already. This means that there are seven processors in total and an idle loop for polling each gauge, the main processor doesn't then have to worry about polling six data streams. It should all work...

The main display PCB being routed:


Well, the start of it anyway.





Spindle Camera


While trying to drill very small holes in punches I thought it would be easier to align the drill bit with the centre of the punch if I had a camera that could be used to do the alignment. There's quite a few spindle camera designs on the web, and I found one that used a particular webcam, so I bought one. I then dismantled it:





The PCB had its microphone removed and also the LEDs that could be used for illumination. The problem with them was that the didn't fit in the case I found on Thingiverse, and also that the LEDs were not pointing at the subject when looking at very small items.

I then printed the Thingiverse spindle cam case I found, after I'd modified it for the smaller collet nut I have on the engraver.


The PCB is held by the two halves of the case which are bolted together.


The collet nut slides into the back of the case and there's enough friction there to hold it while adjusting the alignment.


This is the camera on the spindle:





I used some dots on a white background and the trails feature of the camera script that was on Thingiverse. It seemed to work well once I had printed a holder that was a tighter fit on the collett nut.

It was then fairly easy to align the spindle on the end of a punch, then put a 0.1mm drill bit in and have a go at drilling a hole:



You can see some chips at the base of the drill there. The first attempt snapped the drill bit on removal just as it was nearly done. Not sure why, maybe too fast an extraction speed on the peck cycle.

I had another go and all worked well that time. This is a video of the camera output while drilling another punch hole.


These pictures were taken with the camera out of the spindle and held in a marking base I recently bought:



Sunday, 3 July 2016

Dragonfly Hairclip

 I've been working on this on and off for a while now. It's a dragonfly hairclip decoration made from acrylic and aluminium.


 The acrylic is turned and polished just like a pen would be, with two parts, one for the body and one for the head.


The wings are engraved aluminium sheet, each pair of wings took about two hours to engrave and cut out, admittedly this is mainly due to the resolution of the input file.

The parts are screwed together and then screwed to the hair clip.