Digital Control of controller

 

Technobots FAQ » Motor Speed Controllers & General Electrical » Speed Controllers » General Questions on Motor Controllers » Digital Control of controller « Previous Next »

 

Author Message
Ian Hopper (Ianhopper)
Member
Username: Ianhopper

Post Number: 1
Registered: 3-2007
Posted on Wednesday, March 21, 2007 - 12:55 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi,

I'm looking at a project which will require feeding speed controllers from a 8 bit digital speed demand source (I think the source signal is effectively 0 to 255 in binary form). This needs to be converted to 0 to 5V (approx) analogue, or perhaps to -2.5V to +2.5V - I'm not sure of the details yet. The controllers will probably be 4QD's Vortex units. Do you have any interface boards that will do such a digital to analogue conversion, or do any of your other controllers accept digital speed demand inputs?

Many thanks

Ian

Built For Fun EV's
http://buggies.builtforfun.co.uk/
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 439
Registered: 10-2004
Posted on Wednesday, March 21, 2007 - 9:47 pm:    Edit Post    Move Post (Moderator/Admin Only)

Ian,

4QD's use a 0-5V (typical) voltage input with a separate digital signal for reverse. Smaller speed controllers use a serial comms connection or the industry standard I2C (again serial). I have not come across any that have an 8-bit parallel port. You can easily purchase 8-bit D/A converter chips for a few pounds but you would need to design a circuit board to suit. There are other ways of providing D/A conversion - are you using a PIC or similar processor? Consider the use of a PWM output pulses into an integrator circuit. You could even build your own simple R-2R resistor network as a D/A. If you need increased accuracy, feed the D/A output back to a spare analogue input and make it self compensating. A few ideas to think about.

Regards

Paul
Ian Hopper (Ianhopper)
Member
Username: Ianhopper

Post Number: 3
Registered: 3-2007
Posted on Thursday, March 22, 2007 - 8:38 am:    Edit Post    Move Post (Moderator/Admin Only)

Thanks Paul,

The digital output is from proprietary motion platform control units driven from a PC. I can purpose built buy DAC boards but they are expensive - it might pay for me to do some reading here. I've noticed the low cost of the chips so self-build might be an option. Do you know if D/A conversion is a standard application for PICAXE processors? I see there are texts available. Where might a mechanical engineer learn about integrator circuits and R-2R resistor networks!

It looks like I'll either have to cough up or do some learning.

Ian

Built For Fun EV's
http://buggies.builtforfun.co.uk/
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 444
Registered: 10-2004
Posted on Thursday, March 22, 2007 - 9:00 pm:    Edit Post    Move Post (Moderator/Admin Only)

Ian,

All of the PIC's I've used did not have D/A, A/D was no problem although newer models may do now. They also have a PWM output so the integration method is possible. Years ago I used simple D/A converters like the ZN426 and this is the way I would go now. Very easy to use, search for a datasheet on the net and you should see what I mean. Another useful article is http://www.restena.lu/convict/Jeunes/D_A_converter/D_A_2.htm which shows both the R-2R method and the integration method. Good reading.

Regards

Paul
Ian Hopper (Ianhopper)
Member
Username: Ianhopper

Post Number: 4
Registered: 3-2007
Posted on Friday, March 23, 2007 - 1:27 pm:    Edit Post    Move Post (Moderator/Admin Only)

Thanks Paul, I'll do some reading.

Ian
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 445
Registered: 10-2004
Posted on Friday, March 23, 2007 - 9:22 pm:    Edit Post    Move Post (Moderator/Admin Only)

Ian,

Let us me know how you get on and if I can help further I'll try.
Ian Hopper (Ianhopper)
Member
Username: Ianhopper

Post Number: 5
Registered: 3-2007
Posted on Tuesday, March 27, 2007 - 9:06 am:    Edit Post    Move Post (Moderator/Admin Only)

Paul,

I have a plan - sort of. I've done a bit of reading and probably need to get some hands-on experience here so I thought I'd order a picaxe starter kit, and some D/A chips and bits and bobs from RS or Rapid and see if I can get a D/A chip running. Most of this seems fairly inexpensive and the pic controller would allow me to program digital inputs to the DAC and do any switching I need to do to experiment etc. I might play with some amplification.

I was contemplating getting the 28A, I already have a vortex controller I can experiment on, regulated power supply etc. In the end I want to run 3 D/A's each with their own separate direct digital input, control reverse signals for each controller and probably have a master emergency off switch input which acts on all. I thought the 28A would have the capacity to implement much of this.

Any thoughts on which currently available DAC chip might be a good choice would be appreciated - I've found lots of single channel, 8 bit, TTL compatible (I think) models most of which cost less than a couple of pounds each so I can try one or two without much risk, but I might be missing something.

Any thoughts or can you see any obvious flaws in the approach?

Ian
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 448
Registered: 10-2004
Posted on Wednesday, March 28, 2007 - 8:06 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi Ian,

Is it your intention to run each D/A from their own respective 28A? I assume not, thus to drive 3 off 8-bit D/A from a 28A would need 24 dig outs + control pins etc. which exceeds its capacity. You would be better off using a D/A with input latch. That way you can use the same 8 bits to all 3 D/A's, and use additional Dig outs to latch the data in the respective D/A (that's only 11 dig outs in total leaving plenty for reverse control etc.). Something like the DAC0832 but there are lots about. There should be a write input that operates the latch and maybe a chip select which for only 3 D/A's is not really necessary. You should need CMOS compatible D/A otherwise you may need pull up or down resistors on the dig outs.

Regards

Paul
Ian Hopper (Ianhopper)
Member
Username: Ianhopper

Post Number: 6
Registered: 3-2007
Posted on Tuesday, August 7, 2007 - 9:34 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi Paul,

Just a quick update to let you know how I got on with the digital control. In the end I drove the Vortex controllers from Picaxe 18X chips using their pwmout function. The Vortex units can accept pwm voltage speed control signals at 0-3V so long as their pot fail sensing is disabled. This worked a treat but the relay firing produced a lot of noise which gave the picaxe chips a hard time and I needed to fit capacitors and diodes to keep the 18X's from resetting all the time.

The Vortex's proved not to be the best choice for the project and I ended up changing them out for the MD03 H-Bridge controllers which are much better for frequent reversals and are much quieter electrically. These are also driven by the picaxe chips.

The application is a motion cockpit for flight simming and there's a write-up on the site.

Thanks for your help.

Ian

http://buggies.builtforfun.co.uk/Sim
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 546
Registered: 10-2004
Posted on Wednesday, August 8, 2007 - 7:49 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi Ian,

A rather good solution using the PWM output, I wish I had thought of it.

Now have you sat in the simulator yet?
Don_jarr (Don_jarr)
Member
Username: Don_jarr

Post Number: 3
Registered: 3-2007
Posted on Friday, August 17, 2007 - 10:47 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi all

Slightly off the robot builders theme, but I have a radio controlled boat, running two 12v motors, they are unlabeled but look similar to most 540 in general appearance.

It’s been in the loft for years, and I used the pair of speed controllers out of it ages ago on another project, but now wanted to take the family down the boating pond at the weekend.

Its was powered by a 12v sealed lead acid battery, but that gone as well, so I was thinking of getting a couple of ‘Europa Plus 12V 2.2Ah SLA’ to run it off. (One each to avoid the he’s had a longer go than me tantrum.)

So what I was wondering was if I could get one speed controller to power both motors. When I first got it, speed controllers were coiled wire with a moving arm bit, but now they all seem electronic.

So no real spec on the motors I am afraid, but being a boat, its around 3ft long and abs in construction so only weighs a couple of kilos, so I am guessing not much strain on the motors to move it around, if that bit of info is of any use

Any suggestions on a controller would be much appreciated, and also if its in stock.

:-)
Dave in Winchester (Css_broadcast)
Member
Username: Css_broadcast

Post Number: 7
Registered: 4-2006
Posted on Friday, August 17, 2007 - 11:56 pm:    Edit Post    Move Post (Moderator/Admin Only)

ESC's are cheap now (even for a brushless motor) but you will want reversible units (they have a relay on them with delay). The money you save by using just one ESC will no doubt cost more in downtime as well as buying a replacement TWO units when everything burns out.

You won't need anything heavy duty as you are only turning small water props, therefore you should get away with the cheapest. They would both plug into a parallel point on the receiver so you should get equal drive output.

You can still get coiled shunted speed controllers for model cars etc. Also, running both motors on ONE controller would give you problems with resistance that *could* cause problems for the speed controller.

As I found out with my 30ft R/C camera airship (I work in TV), battery to motor continuity is the important factor. I use brushless motors for my power output which isn't a route you want, or need to take. I couldn't risk cheaping out in case I lose my ship. Same applies to you waiting for a smoking watercraft to drift ashore on a still day (eventually). Buy two!

Hope that helps?
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 556
Registered: 10-2004
Posted on Sunday, August 19, 2007 - 9:04 am:    Edit Post    Move Post (Moderator/Admin Only)

Dan,

Assuming you do not want to individually control the two motors, it is quite acceptable to parallel motors up on the same speedo. You will of course only be able to use one battery system with this configuration. An Electronize microprocessor based 15A speed controller would be ideal.

If you run two speedos, one to each prop you may need to balance the speedo's (quite easy with the Electronize) to ensure the boat travels forward rather than trying to turn (assuming props are side by side rather than in line). You can use one or two batteries, personally I would use 1 battery if the props are side by side.

These controllers are generally in stock as they are a popular line for us.
Dave in Winchester (Css_broadcast)
Member
Username: Css_broadcast

Post Number: 8
Registered: 4-2006
Posted on Sunday, August 19, 2007 - 11:56 am:    Edit Post    Move Post (Moderator/Admin Only)

I remember a friend of mine doing the same thing. He decided to use one speed controller instead of two. He rewired everything correctly and things seemed to work, albeit with slight delays from stick to motors.

He took his boat out to a large lake and ran it for 5 minutes before it stopped, with heavy smoke belching from inside. When it was eventually captured and opened, the SC had cooked away, shorting out the battery to boot. When the motor resistance was measured (parallel) it was found that the resistance was near on a short circuit and the SC couldn't cope.

He had the same problem with a tank many years later. Coupled two motors to one SC to maintain equal motor drive via relays. Motors again nearly went short circuit and the SC caught fire, gutting the metal tank.

Maybe ESC's have changed a lot by now and can cope with the high loads of todays motors? In which case, ignore my earlier post.
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 561
Registered: 10-2004
Posted on Sunday, August 19, 2007 - 7:38 pm:    Edit Post    Move Post (Moderator/Admin Only)

Dave,

The speedo does not know how many motors it is driving, it simply will see the combined load / resistance / inductance of the motors. As long as the speedo is sized for multiple motors, it will be fine. We use the 540 size in our Zeobot robot, two motors per Electronize 15A CPU controller and is very reliable. In fact we have an 8 wheel drive Zeobot with the same Electronize controllers driving four 540 motors each and this is right on the limit. There are a number of speed's on the market with rather grand claims of performance which frequentlly fail under 'normal' operating conditions.

Always good to hear different views and experiences but we are certainly happy to offer the Electronize with twin 540 motors.
Dave in Winchester (Css_broadcast)
Member
Username: Css_broadcast

Post Number: 9
Registered: 4-2006
Posted on Sunday, August 19, 2007 - 9:39 pm:    Edit Post    Move Post (Moderator/Admin Only)

Glad to see that you sell Electronize SC's. Didn't know you sold them. I'm building another TV camera crane soon and have just made plans to buy a lot of things from your shop. Now I know you sell Electronize SC's too, that would be highly beneficial. I just need to build a wired (non-Radio Controlled) controller from a joystick array to control each Electronize SC.

Actually, looking on your site now, you have quite a goldmine. Useful for me too being as I am only a few miles away from you.
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 563
Registered: 10-2004
Posted on Monday, August 20, 2007 - 9:02 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi Dave,

We've sold Electronizes from almost the start of Technobots and whilst there are those who don't like them for various reasons, I reckon they offer great value for money, made in the UK and we get very few returns.

Our range is certainly expanding as the market changes for us. We now have our own range of steel spur gears and sprockets, we bring in products direct from Canada, USA, China, Germany etc.. and always on the look out for more.

As for non RC speed controllers, Pololu and Robot Electronics have a nice range featured on our site as well.

Regards

Paul
darrencooper
Unregistered guest
Posted on Wednesday, November 7, 2007 - 7:22 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hi

Could I run one of your speed controllers in analog mode using a PWM frequency of 10-50Hz; this is the output of MACH3 cnc software.
Admin (Admin)
Board Administrator
Username: Admin

Post Number: 623
Registered: 10-2004
Posted on Wednesday, November 7, 2007 - 9:35 pm:    Edit Post    Move Post (Moderator/Admin Only)

Hello Darren,

You did not state which controller but if you check out the post above http://www.technobots.co.uk/discus/messages/6/483.html?1187640176 you will see where Ian Hopper did use PWM to drive our speed controllers. Let us know how you get on.