Well it took me about 2.5 months to learn C# and to program an Arduino Nano but, I have Version 1 of my codes completed. I learned a lot about the Arduino IDE coding, it's a combination of C and C++ in their own flavour. They say necessity is the mother of invention. Shipping costs and some manufacturing costs from China was killing me so this seemed to be my answer. I need to make charge and pickup coils for the Krober ignition I'm making. Now I just need to make some room in the garage to build the actual machine.
So what can one do with this code? Because I'm using TB6600 stepper controllers, either Nema 17 or 23 motors (must be 200 step 1.8 degree), and 10-32 rod for the wire feed carriage, the resolution can be on the order of 0.0000048 " or 0.05 of a degree at 6400 steps per rev. Another thing is that the Nano only has the parameters passed to it from the PC. This frees up a lot of memory space on the Nano and the number of clock cycles needed to run the Arduino code. Using a PC to do most of the calculations, pretty much all the calculations, and having different specs/jobs stored on the PC allows for me to quickly switch from one job to another and recall jobs. The motors are synchronized to each other but, I need to verify this which, I'll be doing today along with the degrees accuracy. So far I have just bench tested the motors. The program is able to use 20 predefined popular wire sizes or one can enter in the the wire size in either AWG or measured inch. One can also enter in their bobbin size and number of windings needed. The PC will calculate the number of layers needed, number of feet of wire needed beforehand so you can tell if your bobbin is big enough and you have enough wire. It will also calculate the resistance of the wire and max amps it can handle. Also right now one can only make single segment coils like ignition coils that have multiple layers, just use a laminated iron core instead of a bobbin. I will later change this to multi-segment coils like CCFL or switching power supply step-up/step-down coils.
Computer programming which, includes programming the Arduino stuff is not for everyone. Programming is learning a new language/s but and this is a big BUT, it is not normal for humans to think in pure logic or ladder programming. Ladder programming is the same as programming a PLC or smart relays. When programming, one not only needs to use the correct commands but, one also has to put them in the right order. For example have someone walk from your front door to your back door or from the kitchen to the bathroom by taking only one step at a time that you tell them. So you have to tell them to take each and every step, telling them how big each step is and in which direction and which foot to move. I'm only supplying the source code the the Nano and not the C# because unless someone wants to lean C# I think the Arduino is enough. I put lots of comments in the code and I also used different code to do the same job, which is good for learning. I deliberately did not optimize the code for this reason. I also tried to keep the code as simple as I could so learning it would be easier and the same for modifying it.
Future possibilities: I've been trying for 5 years now to get a combo lathe/mill but, something always keeps coming up to stop me, so I'm going to concentrate on my CNC stuff for now. As I mentioned I want to expand this project so it can do multi-segment coils. From this I plan on turning it into a cam grinder using 1/4" wide grinding wheels or smaller if I can find them. All I need to do is turn the carriage 90 degrees so it feeds in and out from the camshaft. Of course I need to come up with code to handle making the lobes and feed rates. It's a good thing that I made my code modular to help with the modifying. I'm pretty sure that when I make my 36" x 24" CNC router I'm going to use either 3/8" or 1/2" threaded rod for the lead screws to give me greater accuracy without using gearing of some sort. I still want to check out GBRL and g-code programs and how I might implement them.
If you decide to check out my project and have problems please let me know.
Thanks
Ray
So what can one do with this code? Because I'm using TB6600 stepper controllers, either Nema 17 or 23 motors (must be 200 step 1.8 degree), and 10-32 rod for the wire feed carriage, the resolution can be on the order of 0.0000048 " or 0.05 of a degree at 6400 steps per rev. Another thing is that the Nano only has the parameters passed to it from the PC. This frees up a lot of memory space on the Nano and the number of clock cycles needed to run the Arduino code. Using a PC to do most of the calculations, pretty much all the calculations, and having different specs/jobs stored on the PC allows for me to quickly switch from one job to another and recall jobs. The motors are synchronized to each other but, I need to verify this which, I'll be doing today along with the degrees accuracy. So far I have just bench tested the motors. The program is able to use 20 predefined popular wire sizes or one can enter in the the wire size in either AWG or measured inch. One can also enter in their bobbin size and number of windings needed. The PC will calculate the number of layers needed, number of feet of wire needed beforehand so you can tell if your bobbin is big enough and you have enough wire. It will also calculate the resistance of the wire and max amps it can handle. Also right now one can only make single segment coils like ignition coils that have multiple layers, just use a laminated iron core instead of a bobbin. I will later change this to multi-segment coils like CCFL or switching power supply step-up/step-down coils.
Computer programming which, includes programming the Arduino stuff is not for everyone. Programming is learning a new language/s but and this is a big BUT, it is not normal for humans to think in pure logic or ladder programming. Ladder programming is the same as programming a PLC or smart relays. When programming, one not only needs to use the correct commands but, one also has to put them in the right order. For example have someone walk from your front door to your back door or from the kitchen to the bathroom by taking only one step at a time that you tell them. So you have to tell them to take each and every step, telling them how big each step is and in which direction and which foot to move. I'm only supplying the source code the the Nano and not the C# because unless someone wants to lean C# I think the Arduino is enough. I put lots of comments in the code and I also used different code to do the same job, which is good for learning. I deliberately did not optimize the code for this reason. I also tried to keep the code as simple as I could so learning it would be easier and the same for modifying it.
Future possibilities: I've been trying for 5 years now to get a combo lathe/mill but, something always keeps coming up to stop me, so I'm going to concentrate on my CNC stuff for now. As I mentioned I want to expand this project so it can do multi-segment coils. From this I plan on turning it into a cam grinder using 1/4" wide grinding wheels or smaller if I can find them. All I need to do is turn the carriage 90 degrees so it feeds in and out from the camshaft. Of course I need to come up with code to handle making the lobes and feed rates. It's a good thing that I made my code modular to help with the modifying. I'm pretty sure that when I make my 36" x 24" CNC router I'm going to use either 3/8" or 1/2" threaded rod for the lead screws to give me greater accuracy without using gearing of some sort. I still want to check out GBRL and g-code programs and how I might implement them.
If you decide to check out my project and have problems please let me know.
Thanks
Ray
Attachments
Last edited: