12v DC motor Driver Module without Arduino

Hi,
Can someone please advise what module I can use to forward and reverse a single 12V DC motor without using an Arduino? the left/right command signal will come from 2 Infrared sensors with a 5v output. (DC Motor is 12V, 15A stall current, 0.8A no load, 6500rpm, 315rpm with its gearbox)
Basically I want to move a box that’s on a rail from left to right constantly

would this be suitable?

if so can I have the non Arduino wiring diagram please?

Or would something like this work?

Many thanks,
max

2 Likes

Hi Max
Firstly are you going to run this motor full speed or do you need some speed control.
Second what sort of current capability is the 5V output from your infra red sensors. You just quote 5V output, no current.

You seem to be able to drive that 15A controller directly from Arduino so the input current requirement must be less than 40mA although the Core text or product WIKI make no mention of this.
You may need some logic to prevent both inputs being ON at the same time. This might be on board or might not. There is no mention of this anywhere either although the product WIKI warns about this so that might mean there is no on board prevention, refer Note 1 after the truth table.
Cheers Bob

3 Likes

Hi,
No speed control,
I’m not sure of output current for 5V IR sensor less than 150mA for sure, It is one of these:

2 Likes

Hi Max
A bit confusing on the Jaycar page. The description says IR, The specification says Hall Effect but the data sheet says IR so I suppose that is what it is.

You would do well to read the Data sheet. That tells us that the output is open collector NPN which means it will need pull up resistors and it can sink 100mA. Also it pulls low when active.

I think what you need is doable but what is needed before too much guess work takes place is some sort of diagram outlining what you want to happen when and under what conditions.

As the 15A driver seems to work best with a HIGH input some sort of interface will be needed. This has to happen anyway to have some “dead” time where the motor is braked before changing direction. Refer to product WIKI. I would have to know exactly what you are doing but I would probably suggest a couple of relays here as the relay operating time would take care of the braking time. We will see.
Cheers Bob

3 Likes

Thanks Bob, it will need some trial and error for sure

1 Like

Hi Max
Too much trial and error without some sort of a plan usually ends up with some broken bits.
Cheers Bob

2 Likes

Yes, broken bits I have a plenty, I’m not an electronics engineer so making this product work has been a journey of fumbling in the dark, but I don’t know what else to do, it’s either leave it or struggle with it

Hi Max
A drawing or diagram showing EXACTLY what you want to do would work wonders and just might get you some results. Getting enough information is sometimes like pulling teeth, and I for one am not a Dentist.
Cheers Bob

Hi Max,

Thanks for posting on the forum, as Bob noticed earlier, that definitely seems to be an IR proximity sensor rather than hall effect.

That’s quite a beefy DC Motor at 180W stall, just out of curiosity what’s the use case for moving the box left to right and why did you decide to go with a proximity sensor rather than just two switches at either end and a latching relay setup? (By the way, depending on your setup you’ll likely want some dead time if you’re driving the motor back-and-forth so that you don’t create a short circuit while the motor is still spinning causing a huge discharge as the back-EMF tries to discharge, there are a number of videos about driving DC motors online that show what happens when motor driving goes wrong, usually ending in some magic smoke)

Hi Bryce

I have highlighted that earlier.

Once what actually has to happen is known this could probably be done with interlocked relays. I believe Max wants to achieve this without an Arduino or any microcontroller. This all hinges on some sort of diagram turning up.
Cheers Bob

Yep, just noticed that good catch, DC motor driving is always quite interesting due to how the current changes based on load and interaction of source versus EMF voltages (startup current can also be quite a concern for big DC motors, starter-motors for engines can often draw a few hundred amp depending on the size of the vehicle)

Yes, that was my train of thought for this one too, given we need bi-directional control a relatively simple H-Bridge ought to do the trick, just need to make sure that your sensor or switches can handle enough draw at the correct voltage in order to trigger it.

Hi Bryce
Given that the project has no microcontrollers I was going along the line that there is nothing simpler than a relay to change direction and can be easily interlocked not to operate until the motor has been switched off. There will have to be some interfacing between the sensor and all this as the sensors are NPN open collector outputs which means they go LOW when activated. PNP sensors would have maybe been a bit easier but they are not all that common. Personally I have always found myself using the NPN types.

Relays take some time to operate also so that should take care of any required “dead” time. KSS principle.
Cheers Bob

2 Likes

Hi Bryce

I must have had a brain snap yesterday. Max has already got a high current H bridge motor driver which he posted a link to in his first post. I was unable to find enough (read any) information on this device to ascertain if it had any built in protection or dead time so was suggesting some sort of interlocked relays for interface.

Some interfacing will be required as the motor driver requires input HIGH to activate and the sensors will provide output LOW so any interlocking could be done here
cheers Bob

1 Like

Hi,
Thank you @Robert93820 & @Bryce for your comments,
My DC motor has this “backstory”: I commissioned an electronic engineer to give me a DC motor&Driver to move a Nerf target board from the left side of a room to the right (about 3m).
When the target ‘box’ reaches the left, a switch has to command the DC motor to Reverse, until it reaches the sensor on the right, to go back left again.
This left right setup could have been executed much more simply, but I got “upsold” and used as a learning aid Guinea pig to IR sensors and a custom made H bridge driver, that keeps burning components.
Picture attached:

There is no PWM, there is little “dead time” between reversing directions. the IRFZ44N Mosfet is first to go, heats up and messes the 1N4148 Diode or burns the IC 2103 controlling it, there are 4*817 optocouplers between the ATmega8 and IC2103.
when I changed the parts, it works, but when the DC motor is reconnected to it, they burn out again…
anyway, ever seen that botched plastic surgery program on TV?

Seeing as I already had the IR sensors on the railing set up, I wanted to use the same IR sensors with an off the shelf DC driver module, to reliably control my DC motor.

Any suggestions on how I should proceed is most welcome :pray:

1 Like

Hi Max
OK so you just want this target to drive back and forth continuously from switch on to switch off. Is that right, could you please confirm.

As far as your custom driver blowing up is concerned when a motor is connected I would bet there is no provision for a “flywheel” diode across the motor to absorb “back emf” which is caused by the collapsing field when the motor is switched off. This will quickly destroy any electronic components connected. This voltage is only there for a very short time but can be many tens or even hundreds of volts depending on many factors.

One could only assume this is looked after in a commercial dedicated motor driver such as the one you linked. The presence of a PWM input facility would suggest so. Unfortunately some of these suppliers are a bit short on information, for so called commercial reasons I suppose. With that unit I suppose you are lucky to get a truth table but even then you have to search for it. The presence or not of this diode could be checked but would require a bit of a fiddly set up and an oscilloscope with a connection with NO mains earth. Looking at the pics in the product WIKI there are some hefty looking diodes on the board so that looks promising. There is also a 5VDC output which would be very useful.

Will have a look at this when you confirm or not my assumption above (at the beginning of this reply). But it will require some interfacing to operate with those sensors.
Also have you fitted or considered limit switches to avoid accidents if you have an electronic failure. In past experience the Mosfet switches in this sort of thing generally fail short circuit and the motor is likely to go flat out until mechanically stopped, like run out of room.
Cheers Bob

2 Likes

Hi @Robert93820
Yes, target moves from left to right continuously.

There is a 1N4148 Diodes between each of the 2103 ICs and mosfets and, one FR107 Diodes for every IRFZ44N mosfets, will these help with the back emf or not? I have no idea.

The Custom DC driver has a stop switch that directly cuts power to the motor, just in case the IR sensor doesn’t work or anything else happens (pic attached), but I’m not sure how the switch and IR would connect to the new DC module that’s hopefully arriving soon. As this is just a proof of concept prototype to check market demand, to demonstrate the concept, any emergency contingencies can be added later.

Cheers
Max

1 Like

Hi Max

Haven’t you got it yet. I hope it is the one you linked or I have wasted a lot of time trying to find some info on it.

I have no idea either and without further info one could only guess. I do know that the 1N4148 diodes are classed as small signal devices (100mA max forward current) and definitely would not. The FR107 are only 1A and would be highly unlikely used as flywheel diodes. There are a couple of hefty looking diode like things in that pic of the rear of the board which could be but I will not guess. I would think that diodes used in the flyback application for this driver would be at least 20A. They might be depending on the Mosfet body diodes for this function.

Safety Limit switches should NOT rely on the motor driver of any flavour to cut the motor. They should PHYSICALLY remove motor power completely in isolation to any electronics. After all if a failure occurs it is most likely going to be in the motor driver/H bridge unit. Generally as I have said it will fail to short circuit and the motor is likely to keep going.

As this has now surfaced to be a commercial project I really think you should be seeking commercial help. As I have got myself interested enough and have an idea I will post a circuit soon that you can peruse and play with, Also a limit switch circuit I have used extensively in the past. Whether you use them or not is up to you but I will state now I will not accept any responsibility or damage be it material or personal. The circuits I provide, although I think would work, are for ideas only.
Will draw up the circuits and post soon.
Cheers Bob

3 Likes

Hi Max.
Here is a circuit I believe should work. It is about as simple as I can make it.


Assuming the target has stopped somewhere mid travel at last switch off.
Each relay is latched by a NC contact in the opposite relay. As both are idle they will both attempt to energise. The fastest one should win and for this exercise assume Relay 1. This will latch ON via a NC contact in Relay 2. Also 5V is applied to comparator OP1a + input and output of OP1a will go HIGH and applied to IN? to drive the motor. I have included a momentary push button switch labeled “Start” in case this does not happen. Pressing this should force Relay 1 operation and start the sequence.

As the Target reaches Sensor 2 this will activate and activate Relay 2. The NC latching contact opens and releases Relay 1, switches OP1a so taking N? LOW. Relay 2 switches 5V to OP1b via a delay of about 0.5sec then switches the other IN? HIGH driving the motor in the other direction.

When the Target reaches Sensor 1 the process repeats by activating Relay1, releasing relay 2 OP1b output LOW and OP1a output HIGH after delay.

Delay: This is provided by R2/C1, R4/C2 and with the current component values will provide a fraction less than 0.5sec during which time both IN? driver inputs will be LOW and the motor in Braking mode. This should allow the motor to stop before reverse voltage applied which may not be catered for on the motor driver board.
The timing is set by the reference divider R5/R6 and R7/R8 providing a little over 60% of 5V which is conveniently about 1 time constant of the R2/C! and R4/C2 timing combination. If this time is not sufficient or needs to be extended increase the value of C1 and C2. Increasing the value will extend the time. This can be calculated by tSeconds = MΩ * µF or in this case 0.051 * µF.
D1/R1 and D2/R3 form a fast discharge path for the caps by bypassing the 51k resistors.

R9 and R10 provide a few mV of hysteresis to prevent any uncertainty or chatter during switching time and thus a faster, cleaner switched output.

C1 and C2 for timing purposes should be Tag Tantalum types as Tantalum caps will have a better chance of being full value at switch on. “Ordinary” electrolytic need some time to “form” to reach their full value.

C3 (100n) should be fitted as close to the LM393 as possible, even soldered to the pins on the back of the IC if necessary.

Relays. Be a bit careful here, low (5V) voltage types tend to be a bit heavy on current and the sensors can only sink 100mA (Data on Jaycar site) so you may need to use 12V types. The Sensor data says 5V operating voltage but that applies to the internal electronics. The NPN output collector is completely independent of this and should be OK with 12V. This sort of thing can generally handle up to 24,36 or even 48V but unfortunately the data for this unit is very thin as is most of these things these days. You can get others which do have data available but you have to pay a few dollars for those.
If a relay less than 100mA cannot be found you will have to interface another transistor to drive each relay.

Here is a limit switch circuit I have posted before elsewhere.


This sort of thing should be completely separated from any electronic driver circuits.
It is POLARITY SENSITIVE as it provides a braking diode to stop the motor dead and prevent damage due to over run. Also “steering” diodes to allow reversing the motor off the switch which at this point is open removing voltage from the motor.
Diodes should be 20A rated. Usually found in dual 10A packages either common cathode or common anode. Just join the 2 in parallel.
Don’t forget. If using this circuit BE CAREFUL of polarity.
Cheers Bob

2 Likes

Hi Robert and thank you for the detailed information,

Yes, it is the TKS-M8, I couldn’t find it being sold anywhere in Australia, so it had to come from Aliexpress.

to my knowledge it does this and it doesn’t go through the H bridge.

With regards to the Circuits, how can I install them on my machine? if you are available in Sydney, it would be great if you could see the machine up close, it has some other high speed projectile detection electronics that might interest you also.

Cheers
Max

Hi Max
Been a bit long but I had other things to do.

Took a while to find that out. When did that link appear on your initial post. I may be wrong but I don’t remember seeing it there when I first read it. This being a CoreElectronics forum I had assumed that we were dealing with the other one which Core stock. I had based my control circuit around what I could find out about that one.

The information re the TKS-M8 is extremely thin, almost non-existent. The bit I did see seems to indicate that a switch closure to ground starts the motor and another (separate) switch closure stops it. This is marked on the drawing as a “limit” switch. A load of CRAP. A limit switch should OPEN when operated, not close, so if anything fails it has a chance of doing so in a safe manner. Also as I have said, limit switches should be completely divorced from any electronic control circuits and this statement

indicate that you don’t know for sure.

As this unit is controlled in the opposite manner and quite differently to the Core one if you are anticipating using my circuit you will have to adapt. I do not have the time. I have given you an idea and now it is up to you to make it fit the device you have selected.

If you have to ask this question I don’t think you should be fiddling without hands on help.

I am not, I am on the Central Coast and anyway Sydney is a big place.

I will offer one more bit of advice. As this has turned out to be a commercial venture forget about this cheap Chinese garbage and go for something decent with enough information to be able to do something and the chance of some support. I think if you looked for support with your selection of controller a quick course in Mandarin would help. I am not putting a blanket over all of these products. Some are quite good quality and offer information and support. In a nutshell if you can’t get this don’t purchase.

Being a commercial operation I will have to stop right here. I do not have and do not intend to get Professional Indemnity Insurance and cannot afford any flack if anything goes astray which it has every chance of doing if you cannot get hands on help. Feel free to use any adaptation of the circuits I provided but as I have stated I cannot afford any further direct involvement.
Cheers and good luck, Bob

1 Like