I have searched for the solution, and most of what I can find is written "above" my knowledge. So, I kinda need a primer written for a 3rd grader.. lol
I have a Arduino Nano running my gear-cutter, which is meant to sit on my 3-phase-powered milling machine. The "Arduino Cutter" runs perfectly until I turn on the Milling Machine to actually cut the teeth. Once the milling machine's motor is engaged, the OLED display goes nuts and then fails. the "loop" programs SEEMS to run, but will eventually stop before completing the sketch.
When the NANO is grounded to the Milling Machine it SEEMS to work, but there are 2 motor drivers I'm worried about. The biggest culprit is the OLED display - it shuts down first and almost immediately if the Nano is not grounded.
If it's causing these issues with the OLED, I don't know what it might be doing to the driver/stepper/encoder that is precisely rotating the gear blank for the teeth to be cut. They seem to be working fine, but a few missed steps will cut the teeth in the wrong place.
Questions:
Is grounding the Milling Machine enough to eliminate the interference from the 3-phase motor? Right now, it's sitting about 1 meter from the motor -- will moving the Nano and OLED 2-3 meters help?
The gear-cutter is meant to be portable so I can use it on different milling machines in the shop, so I don't want to permanently "ground" the Nano to this machine.
FWIW, I have:
3 push-buttons on D5, D6 & D7 with 330ohm resistors to ground
Stepper driver #1 has STEP on D2 and DIR on D3 (Enable not used) connected to STEP- & DIR- ... Step+ and DIR+ are both connected in series to 5V on the Nano
Stepper Driver #2 has STEP on D8 and DIR on D9 (Enable not used) connected to STEP- & DIR- ... Step+ and DIR+ are both connected in series to 5V on the Nano
OLED display is on A4 and A5. It is powered from the 5V on the Nano and grounded back to the Nano.
Interesting problem. Real 3-phase motors cannot cause interference. Fake 3-phase using a motor for the third phase cannot cause your problem. Therefor, I see you have an electronic device that generated the the third phase and that is causing the problem.
Is the third-phase device fully shielded with a steel case and is it firmly connected to your mains ground?
You are dealing with a piece of equipment that is more "industrial" in nature than the normal stuff that most arduino users are working with. First off - is this 3 phase motor controlled by a VFD or does it run off 3-phase with a contactor? A VFD uses high frequency switching to create the 3 phase voltage wave forms and that switching does induce voltages in places where is might not belong. If the 3-phase motor is connected to true 3 phase then you may just be seing currents induced in your circuits because of the stronger magnetic fields. In either case you need to look at grounding and shielding. Shield your cables and ground the shields at only 1 end. Properly ground everything as this keeps the electrical noise levels down below the point where they will effect things. And yes, shielding and grounding and physical separation is a normal practice when working with industrial equipment. And grounding and shielding will make these components reliable. If you do not provide proper shielding and grounding it will be unreliable. The problem is not with the machines you are trying to use this on, the problem is with your design.
Post a picture of how you have it wired and an annotated schematic, not a frizzy picture. Also pictures of the motors and controls. Doing that will eliminate thousands of possible problems. I know it will take some time but you could keep guessing until next Christmas and not have it operating properly. Also let us know what controls are on the motor(s) as they have a big impact. EMI restrictions are much more lenient in an industrial environment then in a residential environment.
The Milling machine is 3-phase, but that wall of my shop only has single-phase. It was cheaper to buy a $200 inverter (Vector Drive) than run 3-phase power to that side of the shop.
The "inverter" (vector drive) inputs 220v single-phase and outputs 3-phase 240v. Is that the problem? It is in a plastic case and I am assuming it's grounded- my brother installed it - I'll have to check on that..
I also have a smaller single-phase milling machine on that wall. I will try using it with my gear cutter and see if I still have problems.
It still sounds like the problem you have is that your attachement needs proper grounding. In the real world that is very common, and the problems go away with shielding and grounding. I work with CNC machines and Plasma cutters. Plasma is very noisy - it is at its most basic for and open arc (much like many welding processes) Some installations are much more fussy about grounding. We built the machines and tested them with minimal grounding, and had no problems in the assembly area of our shop. But several of those machines got into the field, and for whatever reason, we had make sure their ground system was properly done, and kept moist, otherwise those machine would behave similar to what you are describing. Grounding is important.
For the record, it is the VFD (aka: Inverter or vector drive) that was interfering with the Arduino. When I ran it on the single-phase milling machine the Arduino and all accessories worked fine.