why arduino nano is used
Now the Nano is going to control the speed of the motor using a 0 to 20 milliamp current loop. Now this is the circuitry here, so the Nana will output a pulse width, modulation signal into the circuitry between a 0 to 20 million current loop, so zero percent PWM signal will be zero current, which would be stopped on the motor and 100 percent. Pwm would be 20 milliamps in the current loop, which would be maximum speed on the motor. Now I put an LED in my current loop, so we could actually monitor the current through the brightness of the LED, and I got it mapped to the keyboard. So if I give it some PWM signal, you can see the current increasing on the LED and that’s 20 milliamp, so that would be maximum speed and I could take the speed down by decreasing the current down to zero. So I have total control of my keyboard. The speed of the motor from 0 to 20 milliamps now to control the direction of the motor, either clockwise or counter clockwise, or forward and reverse. I have I have an opto coupler feeding the digital input of the variable frequency drive, and so I can control the direction of the motor by sending a signal into the variable frequency drive. So if I send a clockwise signal you see, the left LED comes on. So that would be a clockwise or forward speed on the motor. Now, if I, if I type counterclockwise and send that into the motor, you can see now it’s reversed direction now it’s counter clockwise or reverse now, I’ll just stop.
If I send a stop signal, both LEDs will go off, so I think eight is stopped, so there’s two ways to stop the motor either by the digital input or by sending a zero milliamp current loop signal into the variable frequency drive: okay, here’s, the schematic diagram Of the variable frequency drive that I used in my project. If you look at the very left hand side, you can see the AC power input so that’s your single phase, input into terminals l1 and l3. If you look at the right hand side, you can see the three phase: power output on terminals, t1, t2 and t3 that’s feeding the three phase motor. Now you look at the very left hand side. You can see five push button switches, labeled s; 1. 2 s 5 and then there’s common terminal that’s your multifunction input, so you could program. Those switches do to do anything you want so I program a switch s1 and s2 to be my direction: control for clockwise and counter clockwise direction of the motor. So if I connect terminals s1 to common, my motor will spin clockwise and if I connect my terminals s2 to common, my motor will spin counterclockwise and if both are open circuit, then the motor will stop and that’ll be an inverter. Stop that be a power. Stop itstop by killing the power from the inverters to the motor. Now, instead of using push button switches, I use two optocouplers that have been driven by the nanos GPIO to control my clockwise and counterclockwise control.
If you look further down on the left hand side, you can see the AC. I input that’s analog current input, that’s your 0 to 20 milliamp and that’s used to control the speed of the motor. So my Nano can control at 0 to 20 milliamp current loop and that’s fed into the AC I input. So I control the speed using my 0 to 20 million current loop and I use my melted function, input s1 and s2 to control my my Direction control. So with with these inputs and my Nano, I have total control over my three phase: motor. Ok, my variable frequency drive is powered up and you can see the forward LEDs, blinking, so it’s in the forward mode and the front part is disabled. It’S not controlling the speed, so the Arduino Nano is controlling the speed of the variable frequency drive through the 20 milliamp current loop interface. But you can see on the on the strip here: it’s labeled, a CI for analog current input, and you can see the two wires they’re feeding the analog current input. If you look at the very left, you can see a switch 1 and switch 2 that’s. My forward reverse control, that’s hooked up to the Nano. So if I give, if I give some current into the 20 milliamp current loop into the into the motor, you can see it being activated. So now the motor is starting to spin. I got I got the motor running if you pick it up and I can take it down so I’m controlling it through the narrow controlled by my keyboard, all the way back down to stop okay.
This is my three phase motor and I have a coupled up to a gear drive. This is the gear drive here. You could get it in different gear ratios and this is the output of the drive, so he put in some keyed round stock into here and that will drive that will drive your project. So if I give, if I give some current into my current loop through my keyboard, I can start up the motor and if you look at my breadboard, you can see my my clockwise led is on my direction, LED so it’s gon na run clockwise so I’ll Give it some current, I can slowly bring it up, it’s running clockwise. I can bring it up to speed or I can bring it back down just by changing the current in the current loop I’ll, bring it all the way back down to stop so in. In my code, the way I would control the speed of the motor, I would give it a percentage value. So, if you look at, if we look at the breadboard, you can see my my clockwise led is on so I’ll. Give I’ll give it 50 I’ll tape that onto my keyboard 50, so that would be 12 my speed. So she goes up to half speed. I go 20 percent, that’d be 20 percent drive and you can see it’s running clockwise and I could actually change it to counterclockwise for the keyboard. Well, she changes direction and it’ll go to the same speed as if it was in clockwise.
So the speed doesn’t change. So I could alternate between clockwise and counterclockwise and around the same speed, so I’ll take it up to 100, so it’s maximum speed and I’ll take it down to 0. That takes it back down to stop okay, here’s the code running on my Nano to control. My three phase motor now this code is written in forth, so I could execute the code from the keyboard for troubleshooting now I’m using timer counter number one on the Nano and I’m configuring that as mode 14, so that’s fast, PWM and I’m using a pre scale. I’Ll divide by one so I’m, using the full 16 megahertz clock to drive the PWM circuitry. Now the output of the PWM will be out of pin 9, so I’ve set. Pin 9 is an output in the GPIO and I’ve entered the value of 2015 into into my input capture register that sets my t.o.p might assess my top value, so the counter will count from 0 to 2015 and then back down to zero gain and I’ll continue On over and over again now giving my pulse width modulation period, so all I have to do is enter a value into into the output. Compare register. To give me my pulse width, so I enter a value from 0 to 2015 and they’ll. Give me my pulse width, so the next word is an it opto, and that sets up my up two Isolators and they’re on pin 7 and pin 8 so I’m setting them as outputs and I’m driving them low and they’ll control my direction.
My clockwise my counter. Clockwise direction on my up two Isolators, so next four words are the heart of the commands. The first word is percent. So if I type zero percent I’ll get a stop speed. If I type 100 percent I’ll get maximum speed. So if I type 50, it will take 50 multiplied it by 2015 and divided by 100, and that value will putting it will be put into the output compare register, which will give me a pulse width to drive my motor at 50 speed. So next is stop and I will set my up to Isolators for a stock configuration and clockwise will set my optimized they up to Isolators for clockwise, also for counterclockwise. Now this next word demo is going to use these commands in the sequence and alright, it will run this sequence and it will control this motor in each step here, as we can see each command. So what I’ll do actually run this program on? On my on my motor and we could actually see it respond to the demo program just a little silly program, but it just will give you an idea how to send sequence commands to the motor. Now on the very bottom, we see 0 and that’s that’s that’s. A 0 stop, so it actually will stop the motor by sending the frequency to zero or Hertz. Now the next stop is to stop by the up the Isolators and that’s real actual that will kill the inverter power to the motor to stop it.
But the speed information is intact. So as soon as you go to a direction like clockwise you’ll resume the last speed that it saw. But if you stop the motor with a 0, then you got to ramp up the speed to whatever a desired speed that you want. So next we’ll actually run this demo program and see how the motor responds okay, I’m gon na run my little demo program. So it’s my little silly program, it really doesn’t do anything it’s, just a demo on some sequence programming, so watch the direction and speed of the motor and watch the two Direction. Leds and we’ll go through our sequence code. So I’ll start that now so it’s. First of all, it’s gon na go into stop mode for two seconds then watch the clockwise LED come on for three seconds and it’s gon na go to 50 speed for 5 seconds and then 20 speed for 5 seconds that’s clockwise. Now it changes to counterclockwise for 5 seconds. Let’S go 100 for five seconds, that’s a zero percent. That’S frequency stopped for five seconds. The nail they deal will change the clockwise and will hold there for five seconds and go up to 75 percent speed clockwise for eight seconds. They’Ll. Do a zero percent? Stop and it’ll go to a digital? Stop you see the LED go out. Okay, if you want to control your own three phase motor, but you don’t want to build the circuitry involved.
You could get two off the shelf PWM to current or voltage signal converter like this one here made by axiomatic. So you could get a PWM to 0 to 20 milliamps or a PWM from 0 to 10 volts, and you could use either one of these to feed. The variable frequency drive like that when I was using to control your own three phase motor.
why arduino nano is used Video
why arduino nano is used news
Posted on Thursday October 10, 2019The Next Generation Arduino Nano Hackaday … Continue Reading »
Posted on Wednesday October 23, 201923 | October | 2019 Hackaday … Continue Reading »
Posted on Monday October 21, 2019The Arduino IDE Finally Grows Up Hackaday … Continue Reading »
why arduino nano is used Social