Difficulty with MAX14870 DC motor driver

I've got a heisenbug... help! This is the motor driver. When I measure the voltage on the digital output responsible for setting the direction with my DMM, everything seems to work as intended - the motor with encoder feedback goes to the setpoint position with some overshoot. However, when I disconnect my DMM, it seems that the direction output is stuck at logic high and so my carriage goes gently ramming into the end of travel.

I seem to have remedied this by pulling the direction pin on the MAX14870 motor driver low with a very gentle pulldown resistor of 150kOhms (10kOhms was apparently too strong and made it ram into the opposite end of travel). I guess connecting the DMM to the circuit is kind of the same concept as a super weak pulldown resistor, huh? Is there a better approach to resolve this, or do I just continue putting my thumb on the scales with this pulldown resistor? I can measure 0.07V - 0.1V between ground on the arduino and ground on the driver board; is this bad or unexpected?

Here's my circuit, basically. My circuit consists of a Atmega328P on a breadboard which serves as the motor controller and position decoder. It is assembled exactly as shown in the tutorial, but the with the addition of VCC, GND, EncA, EncB signals for the encoder going to interrupt pins 2 and 3, and it is also connected via I2C (SDA, SCL (with 2.2k pullup resistors to Vout on the voltage regulator), shared GND) to a Teensy 3.5 which tells it the setpoint and also requests the position.

While I'm here, I measured the voltage at various spots and was a little alarmed to see voltages that weren't either pretty much 5V or pretty much 0V. Are the below readings normal? I measured these both on the Atmega328p on a 10 year old bread board and also a 10 year old arduino. Perhaps they're both just old and invisibly corroded? Or perhaps this is normal?

LM7805 Vout: 4.73V
hot rail very close to the LM805: 4.41V
AVCC: 4.36V
VCC: 4.00V
Digital Output when state is HIGH: 3.6V

Can you attach the schematic or is the size too large ?
Your link doesn't allow viewing of the entire circuit.

Is the 7805 regulator hot ?
Are you using a TO-220 HEATSINK ?

Hi raschemmel, thank you for the replies!

The 7805 is definitely hot. Not hot enough to burn my skin, though. I am not using a TO-220 Heatsink; didn't know this was readily available. From googling, it seems that the purpose of adding a heatsink to a linear regulator is purely to protect the 7805 from damaging itself while dissipating the heat. Do you have anything to add to that?

The schematic that I provide was actually a bit more than I actually had set up when I was doing my testing. See the attached schematic where I circled the parts of the circuit that I actually assembled.

I suspect going up to +24V will make the 7805s require more heat dissipation so those heatsinks are probably required going forward. I'll see if dissipating the heat also helps bring the output of the regulator up to +5V relative to ground on the 7805. I also bought some new breadboards.

Thank you for your time.

No code? Sounds like you might have forgotten to set pinMode (dir, OUTPUT)...
And no common ground to the Arduino in your diagram either.

I guess the code was totally relevant to this problem. You were totally right, I forgot to set the direction pin to output with pinmode. Thanks for your intuition! It's working a lot better now.

Hi,

The 7805 is definitely hot. Not hot enough to burn my skin, though. I am not using a TO-220 Heatsink; didn't know this was readily available. From googling,
it seems that the purpose of adding a heatsink to a linear regulator is purely to protect the 7805 from damaging itself
while dissipating the heat. Do you have anything to add to that?

No, the regulator has a protection system called , THERMAL SHUTDOWN, if it gets too hot it drops its output voltage to drop the current being drawn through it. This is to drop the energy being DISSIPATED in the 7805 and not allow it to self destruct.
This is why you only have 4.41V on the 5V rail, the 7805 is shutting down to protect itself.
Fit a heat sink... this will help DISSIPATE the energy and drop the temperature of the 7805 and allow it to regulate to 5V with more current.

Look at the 7805v datasheet, you need more than just 22pF capacitors around the 7805, place them as close to the 7805 leads as possible.

Tom.... :slight_smile:

Ah, I actually have 10 uF caps on there. For some reason on this circuit-diagram.org, you have to click save to save it. This diagram used to have the Atmega328P rather than the Nano, which better resembles my circuit, but I ex'd out of the window before saving. I guess I've been pavlov'd into thinking I don't have to save things if I'm doing it in a browser. Almost more trouble that it's worth at the prototyping stage unless you plan to rely on forums to help out with prototyping!

Heat sinks have been ordered as even though the voltages are now where they need to be after adding pinMode statements, the regulator is still quite hot.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.