Go Back   IceInSpace > Equipment > ATM and DIY Projects

Reply
 
Thread Tools Rate Thread
  #41  
Old 26-05-2020, 10:48 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Quote:
Originally Posted by alval View Post
.... I thread away from the chuck. Same set up except tool is upside down and you run the lathe in reverse..... Speed is then not an issue and most things cut better with a bit of speed.
Al
Yep, I was thinking about this method if they send the wrong controller again.
But, since the machine is new and sort of under warranty, I will insist on full functionality as advertised.. Anything else may be considered as improvement (the seller actually offered to pay for cost of repairs),

I sort of enjoy solving problems like those and at the end of the day I will know what I have.
Reply With Quote
  #42  
Old 29-05-2020, 05:10 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Daniel Reardon's post (Astrophysicist with magnets in nose) gave me an idea - how to firmly attach dial bracket to lathe bed, for precision readout of tool position... and to be easily removable at the same time. I used 8mm Neodymium magnets (I found them in some old faulty toys, and until now I kept them on kitchen fridge door... I think this application is much more useful.
Picture is self-explanatory...
Attached Thumbnails
Click for full-size image (DSC_0325.jpg)
196.8 KB45 views
Reply With Quote
  #43  
Old 29-05-2020, 10:26 PM
alval (Alan)
Registered User

alval is offline
 
Join Date: Jun 2017
Location: Northern Adelaide
Posts: 47
Yeah neodymium magnets are great for quick attachment of all sorts. Might I suggest a bit of tape over the magnets as they attract lots of swarf and chips, when you need to pull off the tape and the magnets are clean, put on some fresh one for next time. They are a pain to pull chips off of but really handy.
Al
Reply With Quote
  #44  
Old 30-05-2020, 04:50 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Quote:
Originally Posted by alval View Post
Yeah neodymium magnets are great for quick attachment of all sorts. Might I suggest a bit of tape over the magnets as they attract lots of swarf and chips, when you need to pull off the tape and the magnets are clean, put on some fresh one for next time. They are a pain to pull chips off of but really handy.
Al
Reply With Quote
  #45  
Old 31-05-2020, 05:52 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Angry

Today, after 1 w waiting, I received the parcel (from China via DHL).
But.. instead of new, correct motor control module or new processor (as I hoped we agreed after many messages), I found the potentiometer in the box (not that I wasn't expected something un-expected after what was going on previously).

I will have to give negative feedback to this seller..

They really, really don't know what they are selling (and neither manufacturer know what they are doing.. or they think I am stupid. Which is probably true because I was too patient with them).


Anyway.. not a big deal really (machine works), but this is not the way how to treat customers.
Reply With Quote
  #46  
Old 01-06-2020, 11:01 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Since the issue with seller isn't going anywhere, I decided to modify existing controller by replacing original processor with AtTiny85.
The following "sketch" (arduinian for "source code") does the trick:

****
// HT66F016 application for lathe DC continuous variable speed motor controller
// to run on attiny85 as replacement

const byte pwmPin = 0; // PWM output pin defined
const byte LED = 1; // It is also used for onboard LED
const byte PWM_EN = 3; // PWN enable LOW, no activity from original processor
const byte analogInPin = A2; // input pin defined

// Original HT66F016 PWM frequency is 15kHz. Default ATtiny85 PWM frequency on P0 is 500Hz
// To change that:
// https://digistump.com/wiki/digispark/tricks
// MS_TIMER_TICK_EVERY_X_CYCLES in arduino-1.0x/hardware/digispark/cores/tiny/wiring.c is set to 8 (default is 64)
// resulting in PWM frequency on P0 =4kHz (If set to 1, freq would be 32kHz, possibly too high)
// FAVOR_PHASE_CORRECT_PWM to 0 in arduino-1.0x/hardware/digispark/cores/tiny/core_build_options.h file, it's possible to double the frequency on Pin1
// How to increase this frequency to ~15kHz?

void setup() {
//TCCR2B = TCCR2B & 0b11111000 | 0x01; // This doesn't work

pinMode(pwmPin, OUTPUT);
pinMode(PWM_EN, OUTPUT);
pinMode(LED, OUTPUT);
digitalWrite(LED, HIGH); // LED ON
digitalWrite(PWM_EN, LOW); // another wired-NAND for PWM, no activity observed form original /u processor, so here just in case..
}

void loop() {
int analogIn = analogRead(analogInPin);
analogIn >>= 2;
analogIn=analogIn/1.5;
// Alternative statement is: analogIn = map(analogIn, 0, 1023, 0, 255);
analogWrite(pwmPin, analogIn);
}

***


I will couple the PWM output to the rest of controller electronics with opto-isolator, which will give me the option of using GRBL for spindle speed control in the future.

EDIT: I added enable output (LOW), the same functionality was on Holtek HT66F018 processor (but no activity observed), probably to prevent activation of high voltage output during processor startup.

Last edited by bojan; 10-06-2020 at 08:35 AM.
Reply With Quote
  #47  
Old 02-06-2020, 10:45 AM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
This is how $2 Digispark ATTINY85 board fits onto existing controller PCB without any modification. I may solder the chip directly on board later, but it's mounted perfectly OK as it is now.
I also reverse-engineered the controller circuit to some extent..
HT66F018 (faulty now) is full-blown 8-bit processor, but it's only function here is generation of PWM from pot position (exactly what Attiny85 with my program from previous post does).. and nothing else.

Overload protection is facilitated by separate Opamp and comparator IC's, signal from this circuit disables PWM externally in separate wired-OR circuit.. Maybe they used here processor from, say, vacuum cleaner power regulator to save the effort of designing more sophisticated firmware? This would explain my troubles with minimum head speed....

Anyway, it seems I will have exactly the same functionality after this modification is finished, except I will have the desired lower speed.
And another controller board as spare :-)
Attached Thumbnails
Click for full-size image (DSC_0330.jpg)
200.7 KB26 views

Last edited by bojan; 02-06-2020 at 11:10 AM.
Reply With Quote
  #48  
Old 02-06-2020, 01:30 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
The motor controller works on bench, as expected
It is ready now for test in the machine.
If all goes well after tweaking speed, I will need to figure out how to get rid of 5 sec delay (used by bootloader) so the main code starts immediately after power-up.
Attached Thumbnails
Click for full-size image (DSC_0331.jpg)
199.3 KB22 views
Click for full-size image (DSC_0334.jpg)
204.6 KB16 views
Click for full-size image (DSC_0335.jpg)
198.9 KB15 views

Last edited by bojan; 02-06-2020 at 03:08 PM.
Reply With Quote
  #49  
Old 02-06-2020, 05:33 PM
multiweb's Avatar
multiweb (Marc)
ze frogginator

multiweb is offline
 
Join Date: Oct 2007
Location: Hinchinbrook
Posts: 19,011
This is turning into an expensive DYI. For the money you've paid the seller should ship you a new one. I wouldn't modify it.
Reply With Quote
  #50  
Old 02-06-2020, 05:59 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Quote:
Originally Posted by multiweb View Post
This is turning into an expensive DYI. For the money you've paid the seller should ship you a new one. I wouldn't modify it.
Well.. no....
Seller send me already the wrong items anyway, I think they are helpless here as well. They are just sellers..
The new machine may have numerous other problems, I found heaps of videos about them.. and I didn't want to pay 3x or 4x more for professional machine. If I found something second hand I would have gone for it, but, I was not that lucky.

Then...
First, what else to do in isolation?

Second, it is only my time that is really spent here, plus couple of bucks for additional electronics (which I already had in my drawers doing nothing), and a bit more for bearings ($5 each, some of them I also had in my stash).
And, this story may be useful for someone. Like, what to do in similar situation, or what not to do to get into situation .
Reply With Quote
  #51  
Old 06-06-2020, 03:37 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Last update:
Lathe works now with repaired control module (original faulty processor replaced with Attiny85).
I did some more measurements on both modules...
Minimal pulse duration (determined by external buffer circuitry) is ~8us, and combined with ~15kHz (generated by Holtek processor) results in quite high duty cycle (~12%), and that means high minimum speed.
My program for Attiny85 generates ~4kHz for PWM and with ~8us PW duty cycle is ~4%, so the minimum speed is considerably lower, ~70rpm, acceptable for threading.

This is one very primitive controller.. obviously made with very low level of expertise in analog design.

For example, they are using diode in series with transistor base in buffer circuit (no idea why.. maybe to have better noise immunity.. but then they have too slow transistor switching speed? And they have no control over duty cycle at low speeds.. except via PWM frequency).
Bypass cap (1nF) across this diode reduces duty cycle down to 1.5%... Or, using series resistor instead of diode) could also have the same effect.

They should have used dedicated Gate Driver IC for FET imo.

No wonder people are buying better electronics (which is not cheap, ~US200-300).
Anyway.. Another project is finished.

Last edited by bojan; 06-06-2020 at 05:07 PM.
Reply With Quote
  #52  
Old 08-06-2020, 12:34 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
One more update on electronics and no more...
After simulating circuit with LTSpiceXVII, conclusion is they screw up the design.
Diodes are not supposed to be in series with bases of the transistors, they should be connected between base and collector, similar to Schottky-TTL logic family output circuit.
This way transistors do not go into saturation, so their switching-OFF speed increases up to ten-fold.
For actual mod I simply replaced diodes with short jumper wire, and soldered BAT54 diodes on top of existing SS8050 transistors.
The actual minimal pulse width is now ~1/us, 1/8 compared to original.
Attached Thumbnails
Click for full-size image (Original circuit.jpg)
107.0 KB13 views
Click for full-size image (Modified citcuit.jpg)
121.0 KB12 views
Click for full-size image (Modification.jpg)
198.5 KB13 views

Last edited by bojan; 08-06-2020 at 12:54 PM.
Reply With Quote
  #53  
Old 08-06-2020, 01:14 PM
iborg's Avatar
iborg (Philip)
Registered User

iborg is offline
 
Join Date: Feb 2015
Location: Lynbrook, Australia
Posts: 359
Hi Bojun


Sounds like you know a lot about electronics. Damn good job on improving the lathe circuitry.


Philip
Reply With Quote
  #54  
Old 08-06-2020, 01:22 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Quote:
Originally Posted by iborg View Post
Hi Bojan
Sounds like you know a lot about electronics. Damn good job on improving the lathe circuitry.
Philip
Thanks :-)
Analogue electronics design is my profession...
Reply With Quote
  #55  
Old 08-06-2020, 01:53 PM
iborg's Avatar
iborg (Philip)
Registered User

iborg is offline
 
Join Date: Feb 2015
Location: Lynbrook, Australia
Posts: 359
I suspect just a tad more advanced than my TAFE "Advanced" Diploma in Electrics Engineering.
Reply With Quote
  #56  
Old 08-06-2020, 03:28 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Quote:
Originally Posted by iborg View Post
I suspect just a tad more advanced than my TAFE "Advanced" Diploma in Electrics Engineering.
Well.. that plus additional 50 years of working experience in the field...
I am much slower problem-solver these days compared with what was 10 years ago...
Reply With Quote
  #57  
Old 09-06-2020, 03:11 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
How to modify cross slide parts of the lathe on the same lathe

Well, it is possible... with help of compound slide rotated by 90.
The backlash is almost non-existent at cross slide now after insertion of small ball bearings, and, more importantly, there is no friction of aluminium to aluminium between dial and rod barrel (machined as shown on pictures).
Attached Thumbnails
Click for full-size image (DSC_03421.jpg)
200.5 KB24 views
Click for full-size image (DSC_03431.jpg)
198.6 KB23 views
Click for full-size image (DSC_03441.jpg)
200.1 KB23 views
Click for full-size image (DSC_03451.jpg)
199.4 KB24 views

Last edited by bojan; 09-06-2020 at 03:47 PM.
Reply With Quote
  #58  
Old 10-06-2020, 02:07 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Finished....
Attached Thumbnails
Click for full-size image (DSC_03422.jpg)
198.2 KB20 views
Click for full-size image (DSC_03452.jpg)
191.6 KB16 views
Reply With Quote
  #59  
Old 10-06-2020, 02:09 PM
multiweb's Avatar
multiweb (Marc)
ze frogginator

multiweb is offline
 
Join Date: Oct 2007
Location: Hinchinbrook
Posts: 19,011
Bravo!
Reply With Quote
  #60  
Old 10-06-2020, 02:17 PM
bojan's Avatar
bojan
amateur

bojan is offline
 
Join Date: Jul 2006
Location: Mt Waverley, VIC
Posts: 6,177
Thanks :-)
Now I can start business
Reply With Quote
Reply

Bookmarks

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 02:49 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Advertisement
Testar
Advertisement
Astromechanics
Advertisement
Lunatico Astronomical
Advertisement
Bintel
Advertisement
Astronomy and Electronics Centre
Advertisement