gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Raspberry Pi 3 to DBH-12V Motor Controller

Tue May 21, 2019 4:47 pm

Can I do this?

Dual-channel-DC-Motor-wirin.png
Dual-channel-DC-Motor-wirin.png (209.27 KiB) Viewed 4492 times

pcmanbob
Posts: 12193
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Tue May 21, 2019 5:46 pm

Hi.

So what voltage to you need to run your motors ?

If it's more than 5v then NO.

If it's 5v and you are trying to provide the 5v from the pi to the motor driver board then NO.

If you are providing a 5v supply to the motor board and want to run the pi from it as well, not recomended, because by powering up the pi form the gpio header pins by passes some of the on board protection should you supply more than 5v and the motors switching on and off can cause drops in voltage which the pi will not like and voltage spikes that could damage your pi more so because you will be powering via the gpio header pins.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Tue May 21, 2019 6:30 pm

1. Just curious....If the RPi3 was powered via USB and the motor requires 5V will that setup work?

2. In my test case, the motor requires a 12V battery to run the car window motor.
After i hooked up the battery, I checked the voltages on the Motor controller board pins
EN pin is at 13.65 V
V+ pin is at 12.18 V
does this mean i need to drop it down to 3.3V and 5V respectively?
Dual channel DC Motor wiring Ver-3.png
Dual channel DC Motor wiring Ver-3.png (238.02 KiB) Viewed 4456 times
Last edited by gxmark on Tue May 21, 2019 7:05 pm, edited 1 time in total.

pcmanbob
Posts: 12193
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Tue May 21, 2019 6:54 pm

gxmark wrote:
Tue May 21, 2019 6:30 pm
1. Just curious....If the RPi3 was powered via USB and the motor requires 5V will that setup work?
NO you would probably blow the pi poly fuse as it's only rated at about 2.5A and connecting 5V to the gpio pins will kill your pi. See below ref voltage on control pins of motor driver board.

2. In my test case, the motor requires a 12V battery to run the car window motor.
After i hooked up the battery, I checked the voltages on the Motor controller board pins
EN pin is at 13.65 V
V+ pin is at 12.18 V
does this mean i need to drop it down to 3.3V and 5V respectively?
If the control circuit is working at 12+V then you are going to need an interface circuit between the pi gpio and the motor control board if you connect 12V to the pi gpio you will kill your pi instantly.

What exactly this will be will depend on what inputs the motor driver board is expecting on its control pins .

And you still need a 5V supply to power the pi.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Brandon92
Posts: 949
Joined: Wed Jul 25, 2018 9:29 pm
Location: The Netherlands

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Tue May 21, 2019 7:46 pm

Do you have more information of the motor driver than you are using? And can you post that information.

User avatar
joan
Posts: 15844
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Tue May 21, 2019 8:25 pm

You should not be seeing high voltages on the EN pin. It is meant to be an input from the controlling computer. Are you sure you have't damaged this motor driver board?

gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed May 22, 2019 2:36 pm

I did not expect high voltage on the EN pin. But it does not look like the board is damaged.

The motor controller board is rated at 5V-12V and the meanwell power supply provides 12V 5 amp.
I am not sure where the problem is.

https://usa.banggood.com/DC-5-12V-30A-P ... rehouse=CN

https://www.newegg.com/p/285-000J-00E73 ... lsrc=aw.ds

Brandon92
Posts: 949
Joined: Wed Jul 25, 2018 9:29 pm
Location: The Netherlands

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed May 22, 2019 4:07 pm

Ehm, are you sure you need to connect he ground of the rpi to the -pwr. Because when I take a look at picture 8/9 of your link. Its looks like that it's not connected to ground. But more likely to some signals. Did you measure if there is a solid connected on the board?

Did you get a manual with this board?

gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed May 22, 2019 4:25 pm

I am not sure if the power ground needs to be connected to the RPi3 ground.
I did not get any documentation with the board....

I am getting the feeling this was not designed to run a 12 v motor. I need to look up the amp required to run the card window motor.

Brandon92
Posts: 949
Joined: Wed Jul 25, 2018 9:29 pm
Location: The Netherlands

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed May 22, 2019 4:34 pm

When you disconnect everything from the board. And measure the voltage between the -pwr and the gnd of the yellow connector. If they are connected it should be 0V. And when it is 0V, could you also measere the other connections relative to the -pwr.

gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed May 22, 2019 5:45 pm

If nothing is connected its at 0 volts
Hooking it to a 12 v battery gives me 12.19 on pins IN1 and IN2.
EN is coming up as - 1.462

Brandon92
Posts: 949
Joined: Wed Jul 25, 2018 9:29 pm
Location: The Netherlands

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 8:59 am

gxmark wrote:
Wed May 22, 2019 5:45 pm
Hooking it to a 12 v battery gives me 12.19 on pins IN1 and IN2.
EN is coming up as - 1.462
That is indeed a strange voltage on that pin. I would advice you to ask the seller if this is normal and if he has more information about this. Because if you connect that to your Rpi, your Rpi will not survive that.

User avatar
joan
Posts: 15844
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 9:37 am

I would like to see photos of how it is wired when these measurements are taken. If the measurements are correct that motor driver board ist kaputt or the meter needs a fresh battery.

Everything I've seen on-line suggest the motor driver board can be driven by 3V3 logic at IN1/IN2/EN.

gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 4:21 pm

en.png
en.png (229.27 KiB) Viewed 4251 times
Here is the latest readings.
The Rpi3 board is kaput. (Its before ...I knew better to test the voltage on the control pins.)

No dice so far from seller.
My plan next is to try using a Raspberry Pi Relay Hat to drive initially 1 dc motor ( to be expanded to 6 dc motors )....thoughts?

pcmanbob
Posts: 12193
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 7:11 pm

Looking at your second image you appear to be attempting to use a potential divider circuit to provide an interface between the controller and the pi, this will not work.

You use a potential divider when you have some output from a device that is at a higher voltage than the 3.3v of the gpio to reduce that output voltage to a safe level, you are not trying to read some output on the EN or IN pins, you actually need to apply a control signal to these pins but in a way that protects your pi from the high voltages.

As I cant get my hands on your motor controller board would you be happy to do some testing an post the results then may be we can work out what's actually needed.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

gxmark
Posts: 22
Joined: Mon May 20, 2019 3:04 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 7:20 pm

The second image was just a test to validate the multi meter reading.
The voltage on the EN pin is what threw me off.

I am going to try using a raspberry Pi relay hat board to control the dc motor.

pcmanbob
Posts: 12193
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 7:33 pm

gxmark wrote:
Thu May 23, 2019 7:20 pm
The second image was just a test to validate the multi meter reading.
The voltage on the EN pin is what threw me off.

I am going to try using a raspberry Pi relay hat board to control the dc motor.
You could certainly use 2 single pole changeover relays to control a DC motor you would just need to wire them like this

Image

this would give you directional control but no speed control.

if you change your mind and want to try and get the motor driver board working just let me know .
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Brandon92
Posts: 949
Joined: Wed Jul 25, 2018 9:29 pm
Location: The Netherlands

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu May 23, 2019 7:59 pm

pcmanbob wrote:
Thu May 23, 2019 7:33 pm
Picture
this would give you directional control but no speed control.
If you place a single MOSFET (n-channel) at the bottom, so between the lower contact of the relay and the ground. And add 4 diodes also. The you can control then speed of the motor.

And if you use the MOSFET at a specific time, you could extend the lifetime of the contact of the relay. Turn the MOSFET of and wait x amount of time. Then change the state of the relais and turn the MOSFET on again.

Samuelbraid
Posts: 1
Joined: Fri Jul 26, 2019 1:27 am

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Fri Jul 26, 2019 1:56 am

Hello everyone, I am new to the forums and I have information to add to the discussion.

There is very limited information on these boards but I will share what I know. First, the pins should be in1 pwm speed control (invert for reverse direction, strange), in2 is low for forward high for reverse, en should be low for disabled and high for enable.

Having had about 5 of these in my hands in the past week I can confirm the high voltage output of the en pin, about 13v at .8 uamps. It must be a design /manufacturer flaw but I don't have a good datasheet to compare. I've had several of these fail after working as expected for a couple of days.

I worked around the high voltage by connecting it to a relay on NC and grounding the common. Powering the relay let's it float high.

DC34788
Posts: 2
Joined: Mon Sep 16, 2019 2:29 am

DBH-12V Motor Driver Schematic and notes

Mon Sep 16, 2019 2:45 am

Hello Forum,
In looking for detailed information regarding the DBH-12V motor driver, it is clear the vendor does not share such essential information.
I was able to create a schematic and add some notes on its use.
Please reply with suggestions or errors.
Thank you.
Attachments
DBH-12V schematic.jpg
DBH-12V schematic.jpg (186.91 KiB) Viewed 3674 times
DBH-12V schematic and notes.zip
(84.4 KiB) Downloaded 176 times

DC34788
Posts: 2
Joined: Mon Sep 16, 2019 2:29 am

DBH-12V User notes

Fri Sep 20, 2019 6:12 am

Hello everyone, Here are some details that might help with your system integration.

The main supply at terminal PWR+ has an acceptable voltage range of 3V to 13.5V.
The 3V minimum is from the Vcc boost converter. The 13.5V maximum is from the 16V capacitors and the boost regulator 13.75 output. You can exceed it to 15V without damage, but now Vcc is whatever you apply. The only performance change will be the input thresholds will vary with your motor supply voltage.

Everything on board is powered from the 13.75V boost regulator, Vcc. Kind of nice. You can set the PWR+ for the motors you are using, 3V to 12V, and Vcc stays at 13.75V.

Be aware that PWR+ is applied directly to the V+ pins on the 12pin header. If your motor voltage is 5V, you can use it to power your controller. If not, your controller won’t work, or be damaged.
I am adding a NSR003A0X4Z 3 amp regulator to power my RP from the 12V motor supply.

The control inputs on the 12pin header can all operate from 0V to 12V. They have different characteristics though.

The two enables, ENA and ENB, if left disconnected, default to enabled high with 10K pull-ups to Vcc. If you need to control them, the IR2104S shutdown inputs enable at 3V rising and 0.8V falling.

The four inputs, IN1A [the first input for bridge A], IN2A, IN1B, and IN2B, have 10K pull-downs, and 1.25V thresholds. With this, they are 3.3V, 5V, and 12V logic compatible, as long as low is less than the threshold.

The only complicating issue is the timing of the IR2104S half-bridge drivers. It’s unfortunate the designer chose a 600V device for such a low voltage application. The high-side gate drivers are supplied by their respective boot-strap capacitors; C5, C6, C12, and C13. They are charged through their respective boot-strap diodes. The half-bridge output has to go low for at least 1uS for this to happen. Also, this needs to happen each cycle before the capacitor voltage drops below 10V. This means this motor drive has a minimum operating frequency and will not hold a DC output, like when the stepper motor needs to hold its position.

If you are using the motor current monitor outputs, CTA and CTB, their gains are 155mV/A.

If anyone knows of a similar device that does do DC operation, please let me know will you??

tjodork
Posts: 9
Joined: Sat Mar 28, 2020 3:34 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed Apr 08, 2020 4:05 pm

I setup an arduino controlling a motor with this motor controller DBH-12V

I left EN open, grounded IN2 for forward and input PWM signal from arduino to IN1.
I ramped the PWM voltage from the arduino from 0 to 5V
The motor got faster as the voltage increased but till it gets to 1.7 or so and then drops speed and stays constant while the voltage increases to 5v.

Why does the motor top out at about 1/3 of 5V and then stay steady.
2020-04-08 11_04_25-iCloud Photos.jpg
2020-04-08 11_04_25-iCloud Photos.jpg (28.9 KiB) Viewed 2960 times

tjodork
Posts: 9
Joined: Sat Mar 28, 2020 3:34 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Wed Apr 08, 2020 4:44 pm

I put an current meter in series with the motor ..and the current tops out at about .85A, and then it drops down to .45A and stays steady even though the input voltage keeps increasing by a bunch...
why would that be ?

tjodork
Posts: 9
Joined: Sat Mar 28, 2020 3:34 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu Apr 09, 2020 10:30 am

turns out the power supply was weak....a better power supply resolved the issue

patracy
Posts: 3
Joined: Thu Nov 14, 2019 8:50 pm

Re: Raspberry Pi 3 to DBH-12V Motor Controller

Thu Jun 25, 2020 11:29 pm

Could one replace the 47u 16v capacitor with a 47u 50v capacitor to allow for the board to handle 24v?
Last edited by patracy on Thu Jun 25, 2020 11:55 pm, edited 1 time in total.

Return to “General discussion”