arduino 12v power supply

 


 
Let’S talk about Arduino and motors Arduino zz are awesome. I love them and the reason I got into them whenever they came out, I think, is like 2006 is to control motors. That to me is the coolest thing, taking input from something and an output to something else and I’ve done a lot of work with Arduino, Zand motors and I’ve even published two other videos. So you can see here below that we’re pretty popular one on was controlling big stepper motors and then the other one was on controlling smaller motors lots of different ways with relays and transistors and so forth. Today, though, let’s talk about big DC gear motors, these are brushed motors. These have a huge amount of power, they’re, pretty inexpensive, they’re, actually incredibly easy to control with an Arduino. We just need to use an external driver, and today I want to walk you through a driver that I really like and it’s really powerful and it’s gon na be a lot of fun. This episode is also going to be sort of a framework start for some projects. I’Ve got coming up where I want to use our dwee nose and these big motors to hopefully do some pretty cool stuff here in the shop. So without further ado I thought I’d do the typical NYC CNC walkthrough here we’ll, take a look at the hardware. We’Ll take a look at the pin layout and the wiring of it and then we’ll.

Take a look at the Arduino code I’m, going to show two different examples. One is going to be a simple example. It shows you just how little code you need so, if you’re intimidated by Arduino or if you’re new to Arduino you’re going to see this is really really really basic. Then what I’m going to do is we’re, going to hook up a couple of potentiometers and a couple of sensors we’re going to have this motor rotate back and forth with a little hammer. I machine mostly just for fun but again to show the control and the speed and the capabilities of this. So what do we have here for today’s project? First off we’ve got a 12 volt bench top power supply. You can use a 12 volt battery like a lead acid or gel cell type. Battery is fine, whatever needs to suit the motor you’re working with. I have this bench off supply for this use because it’s a 50 amp output and where you run this with a big motor and I need that kind of power – we’ve got an Arduino Uno. We’Ve got a breadboard with some potentiometers on it, and then here is our driver. This is made by dimension engineering and it’s their siren model 50, so it controls up to 50 amps. All of this information, like always folks, is going to be available right here on the Wednesday widget I’ll have a parts list off of the arduino code: i’ll post a photograph of the layout, so you can take a closer look and all that good stuff.

The motor we’re controlling today is this guy right here it is powerful, got a from surplus Center and their specs state it’s over horsepower 900 watts, something like 1900 inch pounds, that’s a lot of torque folks and it’s. A standard DC brushed gear motor. So, with 12 volts hooked up, you could control it by just an on off switch and you could even control with an Arduino and a like a beefcake relay which I’ve dusted other videos on very, very easy to do, but that’s not the kind of control that I want to focus on today and it’s also, one reason why these kind of controls are awesome because, as you’re going to see here, we’ve got much greater levels of precision, fail, safes, safety’s, braking, etc so let’s dive in there are two reasons. I love these controllers. From dimension engineering, one they’re just so darn easy to use with Arduino. In my opinion and again, I’ll show you the code here in a minute. The other reason is they’re actually pretty affordable. The one I’m using controls, 50 amps it’s 120 dollars. You don’t need such a large motor. They have a 50 driver that will control up to 10 amps and, I think that’s continuous 50 at peak of 15 amps for a few seconds. So again you get the same functionality and in fact the same code will work with this 10 amp version there’s a lot more information out there. They talk about even on their product webpage.

Here you can see the four different main control modes, our analog radio, controller, RC and then there’s, two different serial control modes, we’re going to actually work on one of those serial modes because I think it’s a really cool way to work with them, because the level Of precision and the nature of how you’re controlling it, but again these controllers are great. When you read down on the product specs on the we’re using today, you know you can use combat, combat robots, very heavy, traditional type robots. You can use these things for scooters and in vehicles that need to be controlling a lot of weight. Anything like that with brushed DC motors, so pretty darn cool and I think, that’s. What a lot of folks out there with our drina’s are looking to do. One of the reasons I make these videos is hopefully to make it easier for you guys to get your projects going and one of the things that I think is frustrating. If you look at the Flyers that they include, they mentioned that the control scale is zero up to one 255. So zero is full, reverse 255 is full forward and then right in the middle 128 is stop unfortunately, and it’s kind of frustrating to me that’s wrong. The way these things are actually programmed is, instead of being zero to 255 they’re negative 127 to positive 127, with zero being stopped it’s an imp it’s a simple fix, but you could spin your wheels for a while, if you’re trying to figure out how to make One of these things work, the dip switches also are not complicated, but for some of you folks out there that aren’t interested in becoming experts on the driver, but rather want them to just get to work.

Hopefully this video is helpful. So again, like I said information available here on the NYC CNC web site here is the motor we’re using from surplus Center. You can see the specs here: 40 rpm at the output, shaft, 12, volts and amps ranges depend on how much power you’re draw, but over a horsepower about 1900 inch pounds but again it’s a lot of power, and we want to control that with the Arduino. So let’s go take a look at this really simple example, so you do need the library for the sirens and again go to the NYC. We see website for the links we’re going to set up a siren, we’re going to call it st and we’re going to start it at serial 9600 and this matters on the siren on the dip switches. If you look on the products webpage, they have a dip. Switch wizard and if you chew you go through it and actually I’ll just walk through with you. So we are using not using the lithium batteries. So we’ll do click this one we’re going to control it with serial, not analog or RC and we’re going to do. The simplified mode and we’re only controlling one, so here we go. This has the different baud rates we’re doing 9600. So if you look closely at the little dip switches, we’ve got them on off on off on on perfect, so back to the code, when we start it, what we do is we do st motor one is means we’re, identifying the first control board, so you’ll never Need to change one, especially if you’re, only using one siren or one motor and 0, which 0 again is for stop so in our our arduino loop.

In this simple example, what we’re going to do is say again the same thing: zero for stop delay, 2000 milliseconds to seconds and then we’ll say: go 60. So remember, I’ll make a comment here. Negative 127 is full reverse. Zero is stopped and then 127 I’ll put positive in front of it is full forward. So 60 should be about half speed forward, continue running that full half speed forward for about two seconds. Stop it pause two seconds and then go backward about half speed, so let’s upload that code and see what she looks like. Okay, you see how easy that is: let’s change, the speed, let’s increase the speed one way: D here’s to the other and decrease the delays. Just you can quickly see the difference and how we can control it. You should also take a look what’s really cool. Is these things can break and stop on a dime and reverse and so forth? Okay, real quick one last simple code will just accelerate everything. A little so you can see the speed at which it can start stop reverses, accelerate, etc. So how do you hook this stuff up? Well, I’ve got a lot of wires here, that’s, actually only because of the footage I’m about to show you, which is using this thing with the potentiometers and some external proximity sensors. All that you need to do for what we just took. A look at was connect. Pin s1 on the siren over to Arduino digital pin 1, which is the TX pin pretty darn simple over here on the left side of the siren.

The outside two pins are your motor leads. They call them M 1 and M 2, but that’s not for motor 1 and motor two it’s, just the two leads of one motor and then the inside two are your power source for your motor. They talked about using batteries. In this instance, I’ve got the power supply. It is very important that you not don’t mix those up but they’re labeled, B, minus and B, plus minus B negative positive plus being the positive so hard to screw that up. In my opinion, now, let’s take a look at what I really want to do, which is using this with the Arduino and sensors and being able to adjust the speed on the fly. So I machine this little hammer on the tormach PC and see mill. You can see a quick shot of the footage here. Let’S do just for fun, no real practical purpose other than demonstrating the video, but what I’ve got is 2 proximity? Sensors mounted on this strip? Here I love these sensors they’re, not the cheapest sensors out there. They are, you know, somewhere between 10 to 10 and 20 dollars or even 25, but they have incredibly they’re very well made they’re, sealed they’re, weatherproof or waterproof and they’re non contact. So you can detect. You can detect a signal in front of it without actually contact. So some applications it’s great to have a non contact sensor. So what we’ll do is we’ll just throw our little hammer on here.

All the code is going to do is alternate this hammer back and forth between the two sensors pivoting and we’ll be able to use the two potentiometers to adjust the speed in each direction. So take a quick look at the wiring again we’ve got the siren hooked up via this yellow cable to Arduino digital pin. 1 digital pins. 2. Amp 3. Are the proximity sensors over here to the side. Those sensors are also hooked to ground via this blue cable and they take 12 volts. So I’ve got a yellow wire here, that’s connected via this red wire back to the 12 volt power supply for the motors that’s, also helping feed those sensors, because otherwise we’ve only got 5 volts on this board other than that all you’ve got is the one switch Here and then two potentiometers, the switch is pulled high with a 10k and when you push it in it goes over to digital pin 7 on the Arduino, and then the potentiometers are analog outputs, so they’re connected to analog one into again. One side of the potentiometer is connected to ground. The other side is 2 5 volts and then the middle pin is your analog signal, pin it’s just that simple we’re, obviously establishing a ground and a 5 volt on the breadboard rail from the Arduino and that’s? Actually, it folks pretty darn simple, so let’s take a look at this code again it’s available to download on the NYC cnc website a quick walk through the stop.

Pin we just button. The stop button we just mentioned is: pin 7 the forward and reverse those are. The proximity. Sensors are on 2 amp 3 and then the analog are 1 amp 2. We have a number of states which you’ll see here below. This is the same code. We talked about in this simple version. We define a siren mode siren and then we define a motor on it started as a at the stopped position and then all we’re doing is we’re using the forward state to hold the digital read of the forward button. So basically, that is determining the forward button. Is the proximity sensor and it’s determining if that’s, high or low? We do that once in the setup, because what I want to do is establish one set of values for everything. But then I don’t want to reread everything down below I’m only going to reread it under certain conditions. So we read, we do have to reread the buttons that you can’t, avoid as you’re looping through the code and what you do is if you, if the forward state is low, and that would mean that that forward the proximity button is triggered, then it defines the Current state as one if the other switches is pulled low or trigger, then the current state is and if the stop button is triggered, the current state is zero and we immediately stop the motor because we want that to happen with no delay.

Otherwise, after you have stored these states, you actually go through and say: okay, if the current state is zero. Well, we know that stopped. So you stop. The motor actually already should have been stopped with this up above, but nevertheless good to have. We also delay for 500 milliseconds as sort of deep bounce if up above it saw hey ice on the arduino, and i see that the forward states which is low so i’ve set the current state as 21. Here, if you say here, we’re, saying, okay, that state is equal to one so let’s do this let’s do the motor at the forward, speed and in when it’s moving forward. I can adjust that pot potentiometer and change the speed. So what how do you do that? Well forward speed is an analogue read of the forward. Speed, pin that’s at analog one or two, whichever one is for forward and then what you do. Is you map it and we want to say okay. Well, we know that the potentiometer can range from zero to 123 or 1023, but we only want that range to be 1 to 127, but we actually want it to be inverted so that when you rotate the potentiometer clockwise, it increases the speed that’s. What feels natural? You do the exact same for the other state. If the other switch is triggered, then you say: okay, let’s move the motor at the reverse speed. What is the reverse speed? We’Ll let’s read that potentiometer and we’re going to map that potentiometer range, which is as y2 0 to 1023, but we only want to control it from scale it down, rather from negative 1 to negative 127 and again, I have it going this order negative 127 to Negative 1, so that, as you rotate the potentiometer clockwise, you increase the speed of the motor so that’s all the code.

There is folks let’s upload this and take a look, how she runs. Actually, before we put a little hammer on here, I thought I’d show these proximity sensors. Just so you can see they’re non contact. So if I hover this is actually an old harley davidson piston at least that’s. What I was told it was. My grandfather gave it to me as a punch works great, and this will have an LED red, LED that’ll light up when it’s triggered like so and then same thing over here. Hmm, you can see our motors working switching the directions like so I’ll use the potentiometer to increase the speed a little bit and the cool thing is these also work with aluminum a little shorter sensing range, though just like so hit our stop button here. Put our hammer back on now, my original hope was: you could run this thing pretty quickly and have it reverse, without touching these doesn’t look like that’s actually going to be possible when I was experimenting that has to do with the Arduino Bob, the Arduino processor rate, Although you know I was thinking – and this is something I’m going to do more experimenting with – is, if you increase the baud rate of the serial protocol that we’re using, maybe I can get a little bit about better, reversing and performance out of it. So again, if you’re interested in this type of stuff, whether it’s motors and Arduino and machining and prototyping and fabrication definitely subscribe, I’ll have more of this stuff to come and again.

This is just the framework again setting this stuff up, because I’ve got one project in mind I’m, going to be putting this into and doing the video series on it. So, looking forward to that let’s go ahead here, just turn down a little bit so we’re not starting at full speed or anything, and I will just start it by tripping one of the sensors. So I tripped this one. It should go down to this one. First perfect: now this is slow enough and I’ll zoom in in a second that they should not contact, because it’s able to reverse and enough time to prevent that. Okay, so let’s turn up the speed a little bit, so you can see if they’re not hitting its darn yeah they’re hitting this is its darn close, but it’s, not stressing you hear or see will slow this down slo mo and we easier actually see when I’m. In production here in final cut a little more speed and that’s bending that bar just a hair, okay that’s, basically it let’s just before we wrap up here, let’s, throw a little bit of weight on the end of that hammer and see how she does had a Piece of lead, pure lead, 5.5 pounds sitting around had a hole through it. So hard argue with that, just about as dense as you can get for the size. Now five pounds is uh isn’t bad at all and you’re out here, maybe six inches.

So that would be the equivalent of something like thirty inch pounds, and this motors got way more power than that, but nevertheless this is a pretty good amount of power and it’s more than what you normally see on a lot of you are doing the level stuff. So hopefully this will sort of prove the point of how good these controllers are. So we’ll start off slow, not that slow. Okay. So you get the point there. No problem at all increase the speed a little and just for kicks. You know you can start it. Stop it boom anywhere, no problem at all, restart all day long. You and you can go fast, one way and slow. The other way will speed up the other way, even a little more and see so hope, you’ve enjoyed that Wednesday widget. I love these motors. Lots of people ask about servos or steppers, and those are great as well, but I think sometimes folks don’t understand is you: can control a DC gear motor or brush motor like this very accurately and there’s so much more, you can do with these you’ll one thing That immediately comes to mind, is you can put an encoder on this and turn it into a sort of synthetic device stepper or servo, where you’re able to control location and positional accuracy and so forth? So much more to come on this? If you guys are interested in this type of stuff, please subscribe to my channel more Arduino, prototyping fabrication, machining, all that good stuff.

You guys know. I appreciate the thumbs up the likes the comments, the shares with that.

 
 

arduino 12v power supply Video

 

 

 

 

 

 

arduino 12v power supply news

 

 

 

 

 

 

 

arduino 12v power supply Social

 

 

 

 

official.arduino
2019-10-02T19:32:52+0000

👋 Want to bring Tony Stark-like gesture control to your projects? Learn how with the BLE-enabled MKR WiFi 1010 and Nano 33 BLE Sense boards using the ArduinoBLE library.
safe image.php?d=AQDyi1ELcW4VGzhx&w=720&h=720&url=https%3A%2F%2Fhackster.imgix.net%2Fuploads%2Fattachments%2F997327%2Fblob dChOhNMmeF - arduino 12v power supply
official.arduino
2019-10-02T19:08:01+0000

Arduin-yo ho ho! A fairground favorite, the pirate ship is a fun way to explore the oscillation of a pendulum. How much fun, you ask? Access our Science Kit Physics Lab preview and see for yourself: http://bit.ly/2oC6L0Q

🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr

70537898 550174072395145 8798850142103928832 n.jpg? nc cat=102& nc oc=AQmCfMPwMf1oPpYqFhzbxfnGdbrmsjZXrEEBy1ox5Z8EJtiYMADoFNZ5mnSNRgCCY74& nc ht=scontent - arduino 12v power supply
BAlEFgAV normal - arduino 12v power supply
AllArduino
Sun Jun 15 16:42:59 +0000 2014

#arduino https://t.co/OUbSnzitY8 Is it normal for this stepper (with the driver) to become very hot after ~5 minutes? (2.5A at 12V (from ATX power supply))

https://t.co/OUbSnzitY8
H4gvXc6L normal - arduino 12v power supply
bexslc
Fri Dec 25 00:41:39 +0000 2015

Huh, it works. Wanted to use my new CAN monitor outside the car, but it needs 12V. Found a power supply and used two wires from my Arduino to connect it up! https://t.co/PAVEJaE7nJ

My Coil Testing Station

More Whotsit time. I need to power a 12V 0.3A motor, and it looks like the current Arduino Uno motor shield can only handle up to 5V. So, I need another power supply, like this guy has. Can anyone tell me what I need to search for on Amazon or Google to g

 

 

(Visited 27 times, 1 visits today)

About The Author

You might be interested in

Comment (19)

  1. Great vid as always. Those poor proxy sensors…… You should always mount so they don’t hit. Ideally mounting them the same polar orientation as the motor shaft so it senses it coming in hovering over the top rather than coming in on a collision course. Proxy sensor can only take so much of this punishment, and if one fails, can you imagine what would happen with a motor of this strength?

  2. Now if you wanted to do this with a battery instead of a P/S, how would you connect a battery management system into this?

  3. Congratulations ! this code could be used to: push the button and start the engine and it stops at the end of course? and when it rings again does it return to the other end of the course?

  4. Does anyone know how to control your power draw on the motor? I know the power supply has a overload protection so if you draw more than 600W it will shut off. But with a little bit of load this motor could easily pull more than that.

  5. Great presentation John. I enjoyed it. I am pretty much done with my project plan and all I need to be completed is the DC Motor control. Please contact me at williampamphile@aol.com. Your DC Motor control is exactly what I am looking for. Thanks & Many blessings!!

  6. I’ve been following this tutorial in attempt to control this motor which has a ground leg. I’m unsure whether to connect this ground leg to the ground of the 12V power supply or to the Arduino’s ground. When I have everything hooked up, the Arduino doesn’t control anything with the “Simplified Serial” program running and the motor just spins endlessly instead of moving forward and backward with pauses in between as the program intends. Can anyone help with this?

  7. Is there someone in Ohio that’s good with this stuff that could give me a hand? I’m building a model and plan to radio control it and it’s going to be rather large and heavy and have high load and power outputs requiring large motors and gearboxes with variable speed.

  8. I really would like to have more info on this video! Video describes photo of layout & MOST important is the final CODE. Please help as i want to build one of there. Thank you.

LEAVE YOUR COMMENT

Your email address will not be published. Required fields are marked *