Search This Blog

Showing posts with label DIY DRO. Show all posts
Showing posts with label DIY DRO. Show all posts

Sunday, 28 May 2017

Video of DRO Operating

Video of DRO Operating

I've made a little video of the DRO operating so you can see how fast the update rate is. It's several readings a second and easily fast enough for anything I do. The gauge data stream is pretty fast and all six channels are read by the main processor over I2C, only three are displayed.






The main TFT is quite slow with big updates, but just about responsive enough when I use the menus.


One thing I was worried about was the auto power-off that the gauges have. After a period of inactivity they shut down, but fortunately all they do is turn the display off. The data stream continues, which is perfect for a DRO like this. It also might explain why the batteries go flat so quickly...

Wednesday, 19 April 2017

DIY DRO

All Gauges Attached to DRO


The remaining gauges have been attached to the DRO. There's now 3 gauges on the lathe and three on the mill. All of the gauge channels are now populated and attached:



Each card has a PIC on it that converts from the gauge serial protocol to I2C. The main ARM processor then interrogates each of the relevant gauge channels over I2C and displays the values.

Each of the gauge channel PCBs is identical, the firmware is almost identical, the only difference is the I2C slave address, which is 0x30 and 0x40 for each pair of PCBs on the same I2C bus. There's three I2C busses.


The main DRO PCB has an ARM processor on a commercial LPExpresso card:



The TFT screen is a touch screen and there's a menu system running on it. The DRO can be set to display the lathe channels or the mill channels. The smaller OLED displays then show the appropriate axis tags. When running in lathe mode the two X axis values can be added together.

The gauges have been attached with 3D printed plastic mounts. I may re-make them in metal if they aren't rigid enough.

The gauges are held in clips that can have screws clamping them from the sides:




 I've removed the buttons from the gauges if they were pressed by the clips. The buttons aren't needed and you also don't need to read the displays as the DRO does that.



The batteries aren't needed either as the DRO channels all have a 1V5 power supply. The gauges run from that and are powered all the time the DRO is powered. The power down of the gauge display doesn't stop the serial data stream, either, which is nice.

 The mill X gauge is mounted in a similar way:


The Y as well:


And the Z gauge:


The lathe bed gauge was one of the more complicated mounting arrangements.



I've started to use the DRO and it certainly makes measuring things much easier. I need to check that the gauges are working correctly by comparing with a dial indicator.

Saturday, 13 August 2016


Finally Got DRO Touchscreen Working

I rewired a few GPIOs to move them away from the JTAG interface and the
XPT2046 touchscreen is now working:



I now have all the hardware working and can start on fleshing out the firmware a bit. Then I'll put the DRO back on the lathe and try it for a bit.


Tuesday, 9 August 2016

Ah ha! The TFT Lives!

The breadboarded ARM DRO can finally get the TFT display to display something over the SPI interface. I've used the same x*y colour map:





This is good news as it's a movement forwards. It turns out that I wired the JTAG signals to some of the TFT interface signals and the JTAG was turned on by default. As I want to keep the JTAG debug facilities I'm going to rewire the interface on the PCB. I will mill another PCB at some time, so it doesn't matter too much.

I now need to get the touch screen controller talking, then all the hardware will be talking. Then on to make some more complex firmware to do DRO type stuff.





Saturday, 6 August 2016

Lathe DRO 

I've mounted the ARM based DRO on the wall and attached two gauges to the lathe. The Y axis isn't attached and the code mirrors the X axis, but apart from that it's working:


The gauges are here:


I've re-cased one PCB but left the other one with a display. I'm not sure what I'll do with the next ones, it depends on the space I have available. There's only two channels of gauge decoders plugged in at the moment, both decode the cheap Chinese gauge data streams (24 bit). For some reason I've not worked out I have a signal problem with the channel that attaches to the more expensive gauge that outputs the 2x24bit data stream. I need to build some more gauge channels and attach gauges to the mill and the third gauge to the lathe.

The TFT display isn't working at the moment, I have to get the SPI protocol working, I'm going to do that on a breadboard.

I'm going to try the DRO out as it is for a while and see how it goes.



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.