Hybrid View
-
07-06-2020 #1
Clock of DDCS is 500khz, my code mirrors directly off the port so low overhead compared to arduino libs. I will verify propagation delay with the scope. PC817s are only on switches not step/dir, this is also the opto inside the DDCS, i've just had a look. Agree easy to build part of it with multiplexers but I'm not sure it is required. I've got a box full of ESPs here, again not required for this.
With 16x ustepping and 10mm pitch screws you are at 320 steps/mm so 500kHz gives 1500mm/s and a screw speed of 10k rpm, we only need 1/10th of this tops so I don't think frequency will be an issue.
-
07-06-2020 #2
Interested to see how this goes. Glad to hear you're bit-banging, though as the 328 is inline with the axis pulses to the stepper drivers it has to keep up at all time (not just homing) and I'd be curious if you can hold the signalling whilst I2Cing the display - interesting challenge.
I did realise after writing that the optos were for homing switches/reflection into the DDCS, so, yeah, will be fine - I'll withdraw that.
-
07-06-2020 #3
Yeh the I2C is the dubious part, albeit it is done in hardware, I haven't coded that yet, if it gets in the way it can be omitted. I just usually add them to all my boards these days as I have a drawer full and they only cost a few quid. In this case I had disable the uart to use the rx/tx pins for outputs so without I2C there is no way to get any debug out whilst testing. I did this so I could get a full 8 bit synchronous port write to the drivers rather that making multiple consecutive writes. Every true IO pin is in use ;-)
-
07-06-2020 #4
A very interesting project, especially as I was well on the way to completing something similar when I decided to put on my grown up trousers and upgrade my LinuxCNC version instead.
My version planned to have a board in the middle of the parallel cable from the PC to the BoB and used logic gates to select whether stepper control pulses were fed from the PC or the Arduino Nano (you just can't get away from them can you?!) and limit switch pulses fed back. When you selected gantry squaring the PC was left thinking the machine was idle and the Nano produced drive pulses which were gated to the two motor drivers by de-bounced and latched signals from the limit switches. Once that sequence was complete control was handed back to the PC for normal homing.
Under normal operation the stepper drive signals were only going through a couple of extra logic gates so no data speed problems were added and the timing of separately stopping the two motors was to be done by the discrete logic with no software delay to add timing errors. The nano was there to select who had control, generate step pulses at the two required speeds and set the direction of movement for the whole sequence. One of it's great weaknesses was that it relied on mechanically adjusting one of the end stops to set the squaring, though it would only have needed a few extra lines of code and maybe a gate or three to fine-adjust from the software.
I designed and built the whole thing including laboriously cutting and buzzing out both ends of a parallel cable but never actually put it into use having realised in the mean time that an upgrade of LinuxCNC was not as difficult as I'd first thought.
I look forward to seeing your video of the beast in action.
KitLast edited by Kitwn; 07-06-2020 at 04:15 PM.
An optimist says the glass is half full, a pessimist says the glass is half empty, an engineer says you're using the wrong sized glass.
-
07-06-2020 #5
Hi Kit,
I still have a PC with a MACH license on it to revert to if this doesn't work. Just want to try and remove all the associated cruft (keyboard, monitor, desktop) I usually have around the machine to make it work. I've now drilled and assembled the board, tested connectivity then lacquered the copper side (just in case it is a keeper!).
I need some more solder paste mine is about 5 years past its best and someone has bent the ends of my nice tweezers meaning putting those resistors on was a PITA.
Cheers, Joe
-
07-06-2020 #6
It's drilling the bloody holes that's always the pain isn't it? I use SMDs as much as possible and bought a vacuum placement thingy off eBay a few years back. I keep the solder paste in the fridge, especially as inside my shed can get up towards 50C around Christmas and new Year.
I hope it works as you want.
KitAn optimist says the glass is half full, a pessimist says the glass is half empty, an engineer says you're using the wrong sized glass.
-
07-06-2020 #7
Drilling?, if only we had a machine that could do all that for us :-)
And solder paste?, I've thrown more out than I've used, with it's damned stupid shelf-life (fridge or not...and a Northern UK climate). Right now 0.4mm rosin cored solder will do me and a decently "Large" iron tip. Oh, and flux... plenty of flux.
But, yeah, DevMonkey - hope it works and please report back. I need inspiration to continue my DRO/Pi controller for my mill.
-
08-06-2020 #8
You have. It's called a CNC router. The trick is making the machine and your ability to register a pre-etched circuit board on it accurate enough. Something I haven't even atempted yet.
I do like using the solder paste. That and a gas soldering iron with a hot-air head makes hand-soldering SOIC chips nice sand easy and the 1.27mm (thats 0.05 inch for our 19th century readers) pad spacing is reliably makeable using the toner-transfer method for DIY circuit boards....without holes!!!
KitAn optimist says the glass is half full, a pessimist says the glass is half empty, an engineer says you're using the wrong sized glass.
-
10-06-2020 #9
For crude through hole boards with thick traces like this one I use the toner transfer method with a £50 Brother laser printer from Argos, good results and takes <15 mins to make a board including etch and drill, I drill by hand on a tiny toy CNC machine. This process works well for double sided boards as well.
For higher resolution boards I use a CNC photo method on the same toy machine. Spray the copper with black paint then use a low power UV laser in the machine to isolation route it. Wash off the ablated paint then etch. If the board requires any drilling and/or is double sided I use a fixture so to re-locate it after etch. This process takes a bit longer but I can achieve 0.2mm features/tracks.
Anything more complicated with >2 layers gets sent to China, even if just a proto. All the SMD stuff gets soldered with hot air, agree very easy if your solder paste isn't like gritty chewing gum.Last edited by devmonkey; 10-06-2020 at 08:19 AM.
-
10-06-2020 #10
Hi Doddy,
So it turns out if you ditch the standard I2C/TWI wire.h library and display driver, crack open the 328p datasheet, write your own crude framebuffer and I2C non-bocking state machine that operates directly on the TWI registers you can tick the state machine at a 2-3us per tick penalty. Will put it on the scope and see if this is sufficient.
Main loop becomes:
1. Mirror stepper/home signals with squaring logic.
2. Update framebuffer if needed (using a 5x7 font this is 5 memory reads/writes per character)
3. Tick I2C state machine.
I could remove the framebuffer to make it a bit faster if required, this will effectively amortise the font copy part at one byte/I2C tick.
Cheers, JoeLast edited by devmonkey; 10-06-2020 at 08:23 AM.
-
The Following User Says Thank You to devmonkey For This Useful Post:
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
BUILD LOG: 8x4 router build. Steel base & Aluminium gantry gantry
By D-man in forum DIY Router Build LogsReplies: 57Last Post: 13-12-2019, 10:43 AM -
BUILD LOG: Design stage - All steel - 1200x750x110 - aluminium capable (hopefully)
By oliv49 in forum DIY Router Build LogsReplies: 3Last Post: 08-06-2018, 01:18 PM -
welding steel base or just getting aluminium extrusion
By reefy86 in forum Gantry/Router Machines & BuildingReplies: 200Last Post: 15-01-2018, 08:55 AM -
BUILD LOG: Steel Frame, Aluminium Hybrid Design Thread
By f1sy in forum DIY Router Build LogsReplies: 0Last Post: 23-02-2016, 10:04 AM -
Steel vs Aluminium
By gavztheouch in forum Metalwork DiscussionReplies: 4Last Post: 26-05-2014, 10:11 PM
Bookmarks