Power supply needed for DC linear motor - Page 1
Forum section: electronics / beginners

author: DanMcKinney
author_rank: Contributor
timestamp: February 07, 2021, 03:01:18 pm
content: My project is this - I am sampling an acoustic piano, which involves recording each key at a wide range of velocities, from very quiet to very loud. To accomplish this, I've enlisted the aid of a DC linear motor.Got one a few years ago (http://moticont.com/DDLM-019-070-01.htm) and I used the software that accompanied the cheapie power supply I got (https://tekpower.us/tp3005p.html) to create programmed steps for the DC motor. I calculated the necessary voltages to get the velocity / loudness levels I wanted, and put them in a CSV document that the software could input. The higher the voltage, the greater the force that the motor puts out, the louder the piano key is "played" by the robot sampler.Worked great! I was able to automate the process of sampling each key. However, the motor wasn't quite powerful enough to reach the highest velocity / loudest level that I wanted. No fortissimo!So, I just upgraded to a more powerful motor (http://moticont.com/DDLM-038-051-01.htm). Problem is now when I try to activate the motor past a certain level, the voltage starts to drop. My cheapie power supply can't provide enough juice to get to the upper reaches of my new motor. So, still no fortissimo.I really have no idea of the power requirements of the motor. Seems stupid, I know, but I just don't. The Moticont website offers no insights beyond this doc -http://moticont.com/pdf/linear-dc-motor-force-calculation.pdfI am the classic jack-of-all, master-of-none, and my brain freezes up when confronted with real stuff like this.So, I am left to simplyguessthat if my 30V, 5A power supply won't cut it, maybe a 50V 20A unit will. Another cheapie -http://www.volteq.com/programmable-dc-power-supply-hy5020ep-0-50v-0-20a-with-arduino-nano.htmlSo, questions are this...Would this power supply be sufficient to access the full range of the motor?Will I be able to figure out how to program the thing?I do not know the first thing about Arduino. I am not an electronics guy, not a programming guy, so I've got two strikes against me from the outset. The PS website says some "sample code with a rich set of features" is provided. On Monday, I'll give them a call and ask a few questions.But I figured I'd post here to see what you think about question #1!Thanks!

author: ledtester
author_rank: Super Contributor
timestamp: February 07, 2021, 06:23:29 pm
content: Here's a little thinking outside the box... to get fortissimo just record a human playing the piano. If you're not a player yourself I'd look for any local piano teacher or a piano major at the college or graduate level. It'll take only a few minutes to go through all 88 keys.

author: DanMcKinney
author_rank: Contributor
timestamp: February 07, 2021, 06:38:01 pm
content: I am a player myself, and the first piano I sampled I did by hand. Eight velocity levels was all I could muster, and they weren't particularly consistent! The second one I sampled using a home-made fulcrum system that relied on gravity for different velocity levels - the higher I lifted the striker before dropping, the greater the velocity. Simple, and more consistent than doing with my own hand.But for this one, I'm going to sample 20 velocity levels per note, with 3 round robin sample sets. That means I need to be able to duplicate 20 velocity levels exactly from key to key, and duplicate exactly each key's 20 levels 3 times! I can't possibly do this by hand, and using the old fulcrum would be maddeningly repetitive.The machine can get all the desired velocity levels and round robin sets with perfect consistency. And it will relieve me of some of the tedium of sampling.So, my system now can get to the low end of forte - I'd still have maybe 7 velocity levels left to go.And as far as time goes, 7 levels x 3 round robins x 88 keys x 30 seconds per key actually works out to 55,440 seconds. Isn't that, like, 15 hours? There's a LOT of time involved - and that's one of the blessings of the robofinger - frees me up to get other stuff done while it runs.

author: ledtester
author_rank: Super Contributor
timestamp: February 07, 2021, 08:35:44 pm
content: QuoteOk - I was under the impression that you were only missing ff.What voltage levels are you using and what is the current draw of the motor at each of those levels?

author: DanMcKinney
author_rank: Contributor
timestamp: February 07, 2021, 09:18:06 pm
content: OK, here's a list of voltages followed by the corresponding current draw. The numbers are a little rough, as the current draw starts to drop a bit immediately, but this is pretty close.2 0.5833 0.8784 1.1665 1.456 1.747 1.998 2.269 2.5410 2.8211 3.0712 3.3213 3.5514 3.815 4.116 4.3317 4.5818 4.7819 5As you can see, I'm maxing it out at 19 volts with my 5 amp power supply. The amperage draw increases in something pretty close to a straight line, so if I extrapolate, it seems to me as if the power supply I'm thinking about would do the trick.Does that make sense??

author: WattsThat
author_rank: Frequent Contributor
timestamp: February 07, 2021, 09:55:46 pm
content: Looking at this generates more questions than answers.1) How are you measuring the volt/amp values you're listing?2) How are you driving this motor? That is how are you turning the voltage on and off to the motor?3) What pulse width are you using?There’s a lot of missing details here that would help for us to see things as a system, not just the components that make up the system. You’ll get better, more informed answers that way.

author: DanMcKinney
author_rank: Contributor
timestamp: February 07, 2021, 10:36:59 pm
content: Quote from: WattsThat on February 07, 2021, 09:55:46 pm1) I'm looking at the read-out on the power supply.2) I'm setting the voltage on the power supply with the supplied software, "EasyPower". I enter the voltage value, send it to the power supply to turn on the motor, take the amperage reading, then enter "0" as the value to turn the motor off again.3) Pulse width? Don't know!! I plead ignorance, but I do know there's nothing about pulse width in the power supply's documentation. It's referred to as a "DC regulated" supply. Maybe I just don't understand what you mean by "pulse width"...

author: ledtester
author_rank: Super Contributor
timestamp: February 08, 2021, 04:00:19 am
content: Just a couple of observations...1) Your data is very linear and suggests that the resistance of your circuit is 3.6 ohms.The datasheet for the DDLM-038-051-01 says that its coil resistance is around 2.5 ohms which suggests that you have about 1 ohm of resistance in your wiring. Relatively to the coil resistance this is quite large. What gauge wiring are you using? How long are your cable runs? How are things connected to each other - soldered, screw nuts? Less resistance in your wiring will allow you to drive the same amount of current through the motor with less voltage.It would be a good idea just to check the resistance of the motor to see if it is indeed around 2.5 ohms.2) The DDLM-038-051-01 datasheet shows a "force constant" of 7N/A -- i.e. 7 newtons per amp of current. It is capable of operating at 14N continuously (without interruption) which would require 2 amps of current. On an intermittent basis there is a figure of 44N which by extrapolation requires about 6 amps of current. At 5 amps the motor should be exerting around 35N. This doesn't happen throughout the entire length of the stroke, though. The graph gives you an example profile showing that the force peaks in the middle and is less at the beginning and end of the stroke.It's not clear what the limits of this motor is or how long the 7N/A relationship is valid for. Since the datasheet mentions 44N you should be able to get that, but perhaps you shouldn't expect much more than that. This is something you might consult the manufacturer about.3) In researching how much force pianists actually exert on a keyboard I came across this paper:https://www.researchgate.net/publication/246554893_Characteristics_of_keystroke_force_in_the_pianoI haven't read through it carefully yet, but it looks like it would have a lot of useful info - like the range of forces involved, the relationship between force and sound pressure level, etc.

author: DanMcKinney
author_rank: Contributor
timestamp: February 08, 2021, 02:30:56 pm
content: Thanks for the great info! Especially that force study, and the help decoding the text in the motor's datasheet. Really helpful. My approach to this so far has been trial and error, and it's great to have someone nudge me in a more focused direction.The first motor I used is rated at 8.9N, and it brought me maybe about 50% to where I need to be, so it seemed that the rating for the new motor ought to have more than enough dynamic headroom. And after looking at the paper you cited, it looks like 40N is the force that's bringing thefff. So it seems the motor ought to be sufficient - if I can power it properly.1) I was using 16 gauge braided wire for the cabling, and it's maybe about 30', and it's just alligator clips connecting to a couple of wimpy banana plug leads at the power supply. I measured the resistance at4.3at the end of the cable run where it connects to the PS, but only3.1if I test at the leads coming off the motor! I did not realize there'd such an increase in resistance!After switching to about 12' 14 gauge solid copper wire and 5' of the braided, now the resistance at the end of the cable is3.4. Big improvement. I left a length of braided copper cable leading to the motor because I need the flexibility as the mounted motor moves up & down the keyboard on rails.2) The stroke length for the motor is just about exactly the distance needed to push the key all the way down. As soon as it starts, it is already working at pushing the key down and triggering the complex action inside the piano that results in the hammer stroke on the string. So, if the stroke is more powerful at one point than another, it's kind of a moot point since the entire stroke is always utilized anyway.3) As I said above, what a great study!

author: DanMcKinney
author_rank: Contributor
timestamp: February 08, 2021, 02:50:55 pm
content: As predicted, less resistance does allow me to drive the same amount of current through with less voltage. Right now, 15 volts drives 5 samps, as opposed to 19 before.I'll be honest, I never quite understood the relationship between voltage, amperage, and resistance. That was one of those high school classes I must have slept through. But now I've got the opportunity to learn some things I really ought to know!

author: Terry Bites
author_rank: Super Contributor
timestamp: February 08, 2021, 03:48:39 pm
content: Ohms law: Voltage =current*resistance, Resistance = voltage /current, current= voltage/resistance.Amperage is more usually referred to as current in the EE world to avoid confusion.

author: ledtester
author_rank: Super Contributor
timestamp: February 08, 2021, 04:08:51 pm
content: V = I*R is called Ohm's law.Now that you've got the resistance down, there are cheaper ways to get more current. Riden sells a series of "buck regulator power supplies" which also can be controlled from a computer. It will allow you to get more than 5A from your Tekpower supply albeit at a lower voltage. For instance, you might be able to get 6A at 25V or 9A at 15V - something like that.To give you an idea of what it is and how it works, here's a review of the DPS5020 along with screenshots of the PC control program:https://tech.scargill.net/dps5020-diy-power-supply/The Riden units are very well-known among electronics hobbyists and professionals (e.g. the people on this forum) and I've seen lots of examples of people controlling these units with Python, so I don't think it would be difficult to feed one of these your CSV file of voltage levels.

author: DanMcKinney
author_rank: Contributor
timestamp: February 08, 2021, 04:18:00 pm
content: Wow! Very cool. Will check this out!

author: DanMcKinney
author_rank: Contributor
timestamp: February 10, 2021, 04:17:49 pm
content: Another option to increase the current would be to use a second power supply in parallel with the first. At $115, this might not be a bad idea - if it would work! The question is if the supplied software can send instructions to both power supplies simultaneously. In the setup page for the software, there is a "list of detected devices", which seems to suggest that the software CAN work with more than one.

author: ledtester
author_rank: Super Contributor
timestamp: February 10, 2021, 06:38:44 pm
content: There are complications in parallelizing power supplies. And you are unlikely to get the fast impulse of current that you're looking for.

author: DanMcKinney
author_rank: Contributor
timestamp: February 10, 2021, 06:40:40 pm
content: OK, good to know! I will try the buck converter.

author: penfold
author_rank: Frequent Contributor
timestamp: February 11, 2021, 04:31:13 am
content: Just one note RE power supplies and buck converters, you'll need the output to rise from 0V to the commanded level within (probably) 10ms or so. So that is one key specification to look out for, admittedly I'm not familiar with the devices people have recommended, but since "soft-starts" are quite common, its worth making sure any solution doesn't have one or its faster than that.I got the number of 10ms arbitrarily (so please do dispute it if anyone thinks I'm wrong), but considering the keystrike in the quoted paper was mostly over within 30ms, it seems sensible that the motor needs to reach its full output within the first third of the key strike, (and I use the word "output" to avoid saying force or speed because the hammer velocity as a function of force, velocity and time is pushing my brain power for tonight).I went through a similar process recently so that I could "normalise" two remote digital pianos to have a similar dynamic response to a target acoustic one, I ended up controlling the actuator via an amplifier, but that was more to get a specific keypress characteristic, as long as the power supply voltage ramps up fast and consistently your method should be fine.

author: ledtester
author_rank: Super Contributor
timestamp: February 11, 2021, 06:26:09 am
content: Quote from: penfold on February 11, 2021, 04:31:13 amHi - what kind of actuator did you use?

author: penfold
author_rank: Frequent Contributor
timestamp: February 11, 2021, 10:59:19 am
content: Quote from: ledtester on February 11, 2021, 06:26:09 amIt was a relatively pedestrian moving magnet linear actuator, throw of about 20mm, kv in the 10 V/m/s region, its one with which I didn't get much more information (from an old customer job), but its rated for use in high-vacuum environments so was it quite happy running at bizarrely high temperatures

author: perieanuo
author_rank: Frequent Contributor
timestamp: February 11, 2021, 12:10:15 pm
content: hi, if you really want to find the best answer, find the motor's top current peak using a scope + current probe, add some margin and you're okthat's your start data and we can discuss from therefor that motor, I guess the ps you have choosen is overkill, but quick smps ps with on/off control will do

author: DanMcKinney
author_rank: Contributor
timestamp: February 11, 2021, 01:03:21 pm
content: Quote from: penfold on February 11, 2021, 04:31:13 amThe documentation says the constant voltage mode response time is 2ms. I assume this refers to the rise you're talking about?

author: penfold
author_rank: Frequent Contributor
timestamp: February 11, 2021, 03:36:50 pm
content: Quote from: DanMcKinney on February 11, 2021, 01:03:21 pmYep, that sounds like the right number and it sounds like a plausible value,

author: DanMcKinney
author_rank: Contributor
timestamp: February 11, 2021, 04:01:12 pm
content: So, I've got a Riden RD6012 running, powered by the TekPower 30V 5A supply with the voltage on the TekPower set to 30. I've only had time to do a little testing, but I'm not getting the same force out of the DC motor with the same voltage settings on the Riden that I'd been getting with the TekPower.Quick example - at 15V, the motor is drawing a current of approximately 5A according the the Riden readout, just as it did when I was powering the motor from the TekPower alone, but the force (and volume of the note struck) is considerably less. Resistance of the setup is the same, with only a couple of inches of braided copper wire added to connect my solid copper leads to the Riden output.I'll test it more thoroughly and post some results, but right now, even with the Riden displaying current draws well over 5A and voltages up to 20, I don't seem to be getting any more force out of the motor.The features of the Riden are pretty cool - the software interface is way above & beyond what TekPower supplied for theirs, and I found I could easily convert my existing CSV steps into XML for the Riden to read. Now I need to figure out why I'm not getting the same amount of power!

author: penfold
author_rank: Frequent Contributor
timestamp: February 11, 2021, 04:34:12 pm
content: Do you have access to any test gear like an oscilloscope perhaps?As long as your voltages and currents on the Riden unit agree with those you had on the TekPower one I'd suggest your setup wasn't to blame and would be a bit suspicious of the timings. (unless the motor is starting to get hot, that would slow it down)If you could try with the output of the Riden switched on and suddenly connecting the motor, see if that gives you a significant change in volume. That would give a preliminary check as to whether its the output voltage rising too slowly.

author: DanMcKinney
author_rank: Contributor
timestamp: February 11, 2021, 04:53:07 pm
content: Thanks, will check that out! But it's not temperature - I'm so paranoid of overheating the motor that I only ever apply the striking voltage for 1 second, then immediately shift to a voltage of 1.5 for the duration of the note's sustain, just enough voltage to hold the key down.

author: DanMcKinney
author_rank: Contributor
timestamp: February 11, 2021, 05:21:05 pm
content: And, no scope. But your quickie test DOES suggest there's a difference in the rise rate! It's a pretty significant difference of 3 decibels.Check out the image. The first peak is 15V when switched on through the Riden software, the second is a peak from a quick physical connection of the leads.Will do more testing in a bit...

author: DanMcKinney
author_rank: Contributor
timestamp: February 14, 2021, 05:10:59 pm
content: Quick recap! And sincere thanks to everyone who responded to this noob's questions.Using a TekPower TP3005 (30 V, 5A) power supply to power a DC linear motor to strike a piano key. Turns out, not enough power is supplied by the TekPower to reach the upper force limit on the motor, so I got a Riden RD6012 (60V, 12A) buck converter to get more current going.But, using the buck converter, there seemed to belessforce out of the linear motor than there was when using the TekPower. It was suggested that maybe the Riden was ramping up too slowly to get a really effective key strike. The thought was that by the time it was putting out 100%, the key would already be down. The suggested way to test this was to contrast a key strike using a quick physical connection to the Riden with one actuated by sending the "on" signal via the software, or via the on switch on the Riden.It turns out that this was right on the money - thereisa very significant difference in the loudness & corresponding timbre of a struck key if I do a quick physical connection as opposed to letting the already-connected Riden go from 0 to the desired voltage. The difference is anywhere between 1-4 decibels, and, equally important, that bright & brassy sound of a piano string hit HARD now pops out.So, I think maybe the solution is to get a delayed relay. Does that make sense? Put a timed relay in between the Riden output and the DC motor to give it whatever fraction of a second is necessary for the Riden to ramp up to full power.Any suggestions for this timer relay? The voltages coming out of the Riden will be anywhere between 1.5 to 25, so any of those values would need to throw the relay and close that switch.

author: penfold
author_rank: Frequent Contributor
timestamp: February 14, 2021, 05:59:59 pm
content: A delayed relay is a good idea... however just some initial thoughts:1) A mechanical relay will need to operate well over the full range of coil voltages you're planning. Relay coils are usually rated for specific voltages andneedto be close to this for guaranteed changeover (there'll be a data sheet spec for the lowest voltage for guaranteed changeover), and so you would need to spec a relay for the lowest voltage and overdrive it at the higher voltages (some may tolerate this, but again its a data sheet thing and not something I do often).1a) Mechanical relays don't particularly like switching DC loads; but since you're only technically switching ON under power, and can switch the supply off before disengaging the relay... it could be okay but I'd be of the fence whether or not it'll survive nearly 2000 actuations... hopefully someone else will chirp in on that2) A solid state relay (SSR) may very well work over the full voltage range, I'm sure time-delayed variants will exist, its just not something I've looked for3) A an off the shelf USB based relay board would work well, but synchronising it with your PSU would need some thought or programming skills (I'll try and remember boards I've used before)

author: ledtester
author_rank: Super Contributor
timestamp: February 14, 2021, 07:16:46 pm
content: I was thinking that you could get by with an Arduino and an MOSFET.For the fullest automation you want to coordinate the triggering of the MOSFET with the configuration of the power supply. Both are rather easy programming tasks -- if you're already familiar with Arduino programming.For instance, here is a Python module to control a RD6006:https://github.com/Baldanos/rd6006and it's easy to set up an Arudino to trigger a MOSFET on command from its USB port, so you could script your entire test procedure as a Python program. Writing the programs is certainly something the people on this forum could help with.

author: DanMcKinney
author_rank: Contributor
timestamp: February 14, 2021, 08:44:53 pm
content: Quote from: ledtester on February 14, 2021, 07:16:46 pmSadly, not familiar with any programming, never used an Arduino. Very much the newbie, in many respects, with lots to learn. I will have to rely on the software that came with the buck converter - which works perfectly for my needs.

author: DanMcKinney
author_rank: Contributor
timestamp: February 16, 2021, 01:46:59 pm
content: The voltage ranges I'm working with run from 1.5V to 30V, and I can't seem to find any off-the-shelf delay relay modules with a range that goes that low. 6-30V seems to be the widest range I can find.One way to go might be to get a delay relay that works in the 6-30V range, and just bypass the relay for the lower voltages, compensating for the force difference when using the delay when I put together my programmed key strike voltages. I really only need full, instantaneous power in the upper dynamics anyway.Seems a bit half-assed, but it's the cheapest (and easiest) way to go at this point.Maybe by the time my next sampling project rolls out, I'll have my sh*t together enough to build something that works! But for now, this could be more than adequate.These sampling projects have been great for me in that they've helped my push the limits of my DAW and audio editing knowledge, pushed me into 3D graphics design for the GUI, and now they're nudging me toward the electronics end.With a little help, the old brain moves forward, however sluggishly, and that's always a great thing.

author: penfold
author_rank: Frequent Contributor
timestamp: February 17, 2021, 12:26:03 am
content: Its that damned voltage being the killer! I had a bit of think around what's possible without any "design effort" and can't really come up with anything that would work from 1.5 to 30V.I'll try and post something when I get a chance to finish of my coil driver but work's been getting in the way of implementing the fancy stuff and eliminating the position sensor (I did go overkill with velocity control)