Notifications
Clear all

How can I use a 36v dc motor + encoder with an arduino  

  RSS

JohnS
(@johns)
Active Member
Joined: 7 months ago
Posts: 6
2020-06-04 5:14 pm  

Hi,

I'm busy for a few days now finding a solution on youtube and internet.

I have a 36V motor with an encoder on it (from a robot lawn mower). See specs below.

I tried to use a motor controller to let it go left and right.

All samples I see on the internet and YouTube the negative of the motor and the negative of the Arduino Uno are connected, but whenever I do that, my arduino uno is gone (cant upload anything anymore getting errors) I tried to install the boot loader again, it looks like that's going ok, but I still get the same error.

I do mind that, but its not what my problem is about.

I just want to control the have motor (with gears by the way) with my arduino. I used a L298N Dual H Bridge Dc Motor Driver. Whitch can be used up to 46V and 25W but I only used an output of 10V on my power supply.

I just want to turn it left and right with a push button and (but I don’t know if it’s possible) control the speed trough the code.

 

If any of you could help me with the schematics and code it would be wonderful. 1

Of course I will post my progress here

 

Thanks!

 

Here are the specs of the motor:

ACTUATOR AEM81002808, DC 36V, D383A2, estimated 30 Watt
ACTUATOR AEM81002813, DC 36V, G196D1
magnetic encoder
gear motor wiring (assumption): thick wires (white and green) for motor +/- and thin wires for encoder (red VCC, black GND, blue/yellow encoder signals)

Image of the motor can be found here:

and 


Quote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2020-06-05 11:32 am  

It is possible the L298 is not capable of handling the current required for these motors? You don't say what the motors are being used for. Just turning them left or right without any speed control can be done with simple self centering toggle switches, much like driving a tank with two levers, or under computer control by using relays to replace the toggle switches.

toggleH Bridge

Did you wire it up like this?
https://dronebotworkshop.com/dc-motors-l298n-h-bridge/#1

L298MotorControl

 

This appears to be the motor you are referring to?
http://grauonline.de/wordpress/?page_id=219
Motors are designed to operate at some voltage and in this case it is 35volt. I would say that 10volt is a bad idea.

I see references to robotic mowers which may be of interest to any robot builders here.
https://wiki.ardumower.de/index.php?title=Ardumower_Sunray

 

 

This post was modified 5 months ago 2 times by robotBuilder

ReplyQuote
JohnS
(@johns)
Active Member
Joined: 7 months ago
Posts: 6
2020-06-05 7:08 pm  

Hi Robot Builder,

Thanks for your reply. yes the motor comes from the same lawn mower as the link you provided.

I don't want to build a new lawn mower. I want to use it as a plastic grinder. I think it has (and will need) quite some torque. The setup I did is similar to the diagram you provided. But I dont know how to use the encoder (thats on the back of the motor) in the diagram you provided the encoder isn't used.

The L298N I used is this one:

 

 


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2020-06-05 9:51 pm  

@johns

I don't want to build a new lawn mower. I want to use it as a plastic grinder. I think it has (and will need) quite some torque. The setup I did is similar to the diagram you provided. But I dont know how to use the encoder (thats on the back of the motor) in the diagram you provided the encoder isn't used.

This includes how to use encoders with the Arduino.
https://dronebotworkshop.com/robot-car-with-speed-sensors/

dronebotMotorControl

However your motors might be using hall effect sensors which means no power is required for a LED to be used in the encoder.

However again I ask: Do you need speed control and do you need to reverse the motor and is it going to be controlled manually? Not sure what you mean by plastic grinder. If you want high torque (for plastic?) then you need full voltage not the 10v you mentioned. Maybe 24v would be sufficient. If you want manual speed control then you do need PWM but that doesn't require encoders. The speed can also be manually controlled with a variable resister (POT) as in portable battery powered drills. There should be off the shelf solutions for manual speed control of a motor.

If you have all the lawn motor then it has the battery and charger you might use. If it doesn't need to be portable you can run it from mains power with an appropriate plug in transformer.

 

This post was modified 5 months ago by robotBuilder

ReplyQuote
JohnS
(@johns)
Active Member
Joined: 7 months ago
Posts: 6
2020-06-05 10:07 pm  

@robotbuilder Thanks for your help again.

What I would like to do with the speed, is gradually speedup the motor at start, and gradually slow it down at stop in the code (if that's at all possible) so not by hand.

it's for shredding plastic bottles and food packages in my household, they take up a lot of space in the trash (pay per volume here)

When plastic gets stuck in the shredder, I want to be able to reverse the motor (like most paper shredders do)

This schema, is very helpful and the first I've seen measuring the speed from the encoders.

I was planning to use the original battery so my shredder can be placed elsewhere and just have to be charged ones in a while.

 

Oh, can I still use the L298N or do I need a bigger motor controller?

Thanks!

John

 

Almost forgot to mention the encoder is I think a magnetic encoder it has 4 wires:

red=VCC

black=GND

blue and yellow=encoder signals

This post was modified 5 months ago by JohnS

ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2020-06-06 2:00 am  

Looking at the bottle shredders online they all seem to have some seriously heavy duty shredding parts? You could first try and see if the machine works without speed control as that would make it much simpler? Looking at the home built shredders online I notice the special blades used and that there are two sets that rotate slowly in opposite directions without any apparent speed control. Are you using an online design?

Here is the basic motor control I used in my first robot. It's motors are 18 volts. It uses hall effect encoders.

To enlarge the image click right mouse button and select open link in new window.

motorEncoder

I don't know for sure if your motors would need something better than the L298.

Of course you could just run your lawn mower over the plastic items a few times 🙂

 

 

This post was modified 5 months ago 4 times by robotBuilder

ReplyQuote
JohnS
(@johns)
Active Member
Joined: 7 months ago
Posts: 6
2020-06-08 8:15 am  

@robotbuilder

If I just had thought of that before 🤣 run the lawnmower over the plastic.

Thanks again. I'm going to do some building and testing.


ReplyQuote
Ruplicator
(@ruplicator)
Estimable Member
Joined: 7 months ago
Posts: 110
2020-06-09 1:58 am  
Posted by: @johns

Oh, can I still use the L298N or do I need a bigger motor controller?

The spec sheet indicates the throughput current is as low as 2A and the heat dissipation is 25 watts. If you have an opportunity to test the motors under load it will give you a better idea if the controller can manage it.

Here is the spec sheet:


JohnS liked
ReplyQuote
Torgcraft
(@torgcraft)
New Member
Joined: 5 months ago
Posts: 2
2020-06-11 5:26 am  

Hey JohnS: 

There was a couple of things that seemed out of place. A 36v motor at 30W would only be around 1 amp. A motor like that would draw much more than that to turn those planetary gears with any speed and torque. 

If you said 300W that would make sense with amperage around 8 amps. You wouldn't need the encoder unless you want to start/stop in a specific position, but using it as a grinder I don't see the necessity (though I am sure not the builder). 

motors like this use battery set ups like two 18 v batteries in series for your 36v. Otherwise you need a DC motor drive capable of the amperage output. Industrial stuff use 120vac for input power rectified/filtered to a DC voltage the usual is 90/180v. This kind of DC powersupply is available everywhere. Speed control is normally done by a 10k potentiometer. For grinding you will want it running before introducing the plastic materials. You would want to purchase or build a DC 36v power unit to supply this motor. 

Again, a motor that you pictured used on a battery system would not be 30W Ohms law P=I*E

30 = .833 * 36. 

Interfacing an arduino to a drive for that motor should take one of the relay modules. If you want the programming to switch the relays to switch the motor direction...or as earlier mentioned a simple DPDT switch wired as shown will give you what you want with no programming...but that defeats the purpose of the arduino. 

I hope I havent side tracked you. 

 


ReplyQuote