Electronics basics (Need your help..)

You can discuss various control electronics here. RAMPs, Arduinos, Motor Controller boards & etc...
Posts: 31
Joined: Tue Jul 07, 2015 3:54 pm

Electronics basics (Need your help..)

Postby wirelessguyny » Mon Jul 13, 2015 12:13 pm

Given that many folks out there may be starting from scratch like me I thought that I'd start a thread with some relatively basic questions I think others might come across as well.

I have some electrical knowledge but that can be more dangerous than good when it comes to tinkering. I am attempting to wire up a simple 4 pin bipolar CDROM stepper motor to an arduino Uno through a DRV8825 stepstick.

Questions are as follows...
1. How does voltage/amperage work and how to I test this?
I started with a wall wart power supply which read 12V / 800ma but my volt meter shows closer to 18V. I do understand that these things tend to have tolerance levels within a given range but don't know how that might affect my results.

So far.... :
I believe that everything was wired to my CDROM drive bipolar stepper correctly and although I was able to actuate the motor and get it to travel back and forth there was a buzzing noise and the motor began to heat up quite a lot. (Note: I do not know the stepper motors specs but I do know continuity of the poles so I at least have As and Bs - although it is possible that I have B1/B2 mixed up. I don't know how I'd tell the difference )

I have another PS but it's larger. It's a 12V / 1.5A (measures at 11.92V on my meter) which sounds closer to working for my stepper but I'm concerned about the higher amperage. Is that an issue? Will my stepper draw whatever is 'offered' or is the 1.5A just a limit in what could be drawn. Do you think it's safe to swap out my P/S units or is that a bad idea?

2. How does the trimpot work? What/how do I measure?The DRV8825 has a small trimpot which can be used to control the current. (left is lower / right higher). I'm wondering f this might be useful to me as well (and how I'd test that. My multimeter does have 20A and mA sockets for the leads but I've never used them to test anything)?

What makes the most sense is to remove the motor and test what voltages / mA I get at A1 A2 B1 B2 and ensure its within some sort of range that my motor would likely handle (sorry there are no marking on it)

My best guess right now is that I'm looking to inject the close to correct voltage/current so that the motor moves but doesn't make funny noises or get excessively hot.

While I don't have the arduino code in front of me my basic setup uses three pins (4,5,6) on the Uno to control the driver....

SLEEP / REST / M0/M1/M2 - Bridged to 5V line (I believe this is 1/32 step)
Enable - PIN6

Any thoughts or suggestions on how I troubleshoot what I've got before I manage to fry something would be appreciated.

If useful I can include images and the code from my other PC that's running the Uno board.


Posts: 14
Joined: Wed Jun 03, 2015 8:23 pm

Re: Electronics basics (Need your help..)

Postby khbaur330162 » Mon Jul 13, 2015 3:19 pm

Ran into a scary similar situation myself. Was using a 12VDC x 200mA wall wart and getting some serious motor heat buildup. I swapped it out for a 3.7VDC x 350mA unit and the high temps went away. In my experience I wouldn't go much over 6V with a little micro stepper like this, and ideally I think I'd like to stay between 1-2W max consumption.

As for the noise, I too had an odd hum going on, but I'm pretty sure I broke my A4982 stepstick driver. I unplugged some of the motor wiring while everything was hooked up (huge no no, I guess) and started getting some lava burning hot temps from the Q1 on my Arduino (the driver overheated as well). I unhooked all the wiring from the stepstick and just left the duino plugged into my USB and everything seemed fine. So, afaik, the Arduino is still healthy I'll just have to wait for new motor drivers to see if this was the cause of my hum.

No idea on trimpots and what not, you'll need someone more experienced for everything else.

Btw, I got all my wallwarts at Goodwill. They've got tons of them with all kinds of ratings and they usually run you for about a buck a pop.

Posts: 31
Joined: Tue Jul 07, 2015 3:54 pm

Re: Electronics basics (Need your help..)

Postby wirelessguyny » Mon Jul 13, 2015 3:30 pm

I tried swapping out my power supply for a 9V battery but didn't get any movement in the motor at all. I'll have to check and see if the connections were even solid as it was getting late last night while I was doing my testing (never a good thing).

If you think that the bi-polar motor can be driven by something like 3.3V or 5V with a current rating that would be higher than my 9V battery then I think my new AC/DC adapter should do. As I mentioned in my prior msg the adapter outputs 11.9V@1.5A and originally ran the CRDOM within an enclosure it came in. The good news is that the P/S has a second feed @ 5V@1.5A which I could try as well.

I'm hoping that I haven't fried my motor or driver board yet and will give it all another shot later tonight but I'm still hoping someone here can explain a bit more of electrical theory and what I should be doing to test with my multimeter rather than my blind trials.

Posts: 17
Joined: Thu Jun 18, 2015 8:04 am

Re: Electronics basics (Need your help..)

Postby JohnGay » Mon Jul 13, 2015 4:31 pm

Quick lesson in electronics:
Voltage is the force behind the current.
WallWart power supplies are EXTREMELY unregulated. Generally they have a transformer to get near the voltage, then a simple regulator to change the AC voltage to pulsed DC. Often, they don't even bother to filter the pulsed DC as most devices that use WallWarts have more room for the caps.
So, it's not unusual for a 12V WallWart to putout upto 18V peak DC.

When a power supply lists a current, that is the upper limit of current that can be supplied. What ever is connected to the power supply will draw as much current as it wants upto that limit. When it tries to draw more current than the supply can provide, the voltage from the supply will drop.
On the other hand, the supply cannot put too much current into a device.
Therefore, make sure the power supply can provide MORE current than you need.

As for the current limit trimmer on your driver board. When running a stepper motor in fractional steps, rather than whole steps, it is possible for the drive to provide too much current to the stepper motor. This trimmer is used to limit the current to the motor. Googling stepper motor drivers can provide some real good explanations for adjusting this.

Posts: 14
Joined: Wed Jun 03, 2015 8:23 pm

Re: Electronics basics (Need your help..)

Postby khbaur330162 » Mon Jul 13, 2015 5:02 pm

Have you tried running your stepper off the 5V supply on the Arduino? I've yet to do this, but it should be right around what you're looking for.

Posts: 31
Joined: Tue Jul 07, 2015 3:54 pm

Re: Electronics basics (Need your help..)

Postby wirelessguyny » Mon Jul 13, 2015 5:43 pm

I was considering running the motor off of the 5V line on the Arduino itself but I wasn't sure if there is some sort of issue with the fact that the same 5V+ line is attached to all the HIGH pins. I suppose that the 100uF coupling cap in the VMOT input would hopefully isolate that signal from anything else in the circuit but I'm still earning my training wheels here.

One other question...
The Arduino Uno says that the DC Current for IO Pins is 40mA. Isn't that likely too small for the stepper? While it is a small stepper and may work I would think that the 500ma-1A PS might be more appropriate - but what do I know.

On a positive note, my G+ resin and Projector are in and sitting here so I've just got to figure out how to get my stepper working and build a small test platform to start tinkering with. (All in all, I'm eventually going to have to figure out how to take that arduino code and apply that as my axis to some sort of app that drives the DLP projector etc.. but I'm taking it one step at a time) :)

Posts: 10
Joined: Sat Jun 13, 2015 1:55 am

Re: Electronics basics (Need your help..)

Postby Xoxu » Tue Jul 14, 2015 11:24 am


First things, the small stepper motor in the DVD unit is something like 5V and 500mA
So if you don't use the USB to power the arduino but a other power source than can delivery more than 700mA you can use the 5V line of your arduino, not a outpout pin of the arduino than have a limit of 40mA but the special 5V pin
Google the ref of the motor to have more information.

For the drv8825 you have to measure the voltage between the ground and the metal of the trimpot to have the limit, vref=Imax/2 so if you have a maximum of 500mA for your motor you set vref at 0,250V.
You can have more information here :