Circuit stops working right when i connect motor encoder grounds
rwgast_logicdesign
Posts: 1,464
Ok so im having a weird issue. Due to my bluetooth module breaking i went to write my pid code for my encoders, which are built in to the motor. I made special board for noise filtering and emi, just a bunch of diodes and caps with a 6pin header to break out my motors encoder and power lines. Ive tested all systems indavidually and they work fine.
now everythings togather and working but as soon as i plug in the 5v ground for my motor encoder my wheels go slow in one direction depending on what encoder is grounded, like i said everything works beautiful seperately!! Everything seems to be good with the micros, hbridge, motors, its just when i plug in the encoders ground that everything goes wrong. If i power the encoder from a totally different 5v supply each encoder works fine when connected to a logic analyzer but as soon as the encoders are on the same power source the wheels stop again... so at this point each encoder would need its own isolated 5v supply. anyone have an idea about what could cause this
now everythings togather and working but as soon as i plug in the 5v ground for my motor encoder my wheels go slow in one direction depending on what encoder is grounded, like i said everything works beautiful seperately!! Everything seems to be good with the micros, hbridge, motors, its just when i plug in the encoders ground that everything goes wrong. If i power the encoder from a totally different 5v supply each encoder works fine when connected to a logic analyzer but as soon as the encoders are on the same power source the wheels stop again... so at this point each encoder would need its own isolated 5v supply. anyone have an idea about what could cause this
Comments
With this pullup the encoder pulldowns can go directly into the Prop pins. Or for safety a 10K to the Prop.
Duane J
Btw no pull up resistors are attached there built in to the faulhaber.
I just measured to see if there was any connection between the encoder and the motor or case.
It looks like there is no more than about 30pF between any pin on the encoder, 2 3 4 5, and the motor, 1 6, or the case.
So the encoder ground should have little to no interaction with the motor.
Maybe your motor has a short somewhere, possibly in the ribbon cable.
Duane J
Jim
I do know what the problem is now, somewhat, although idk how to fix it. I took everything apart and then hooked both EMI/Noise boards and motors with encoders to a propeller board running Propalyzer (mostly to make sure the encoders worked and i didnt fry them) and everything went smoothly. So i did some messing around to trouble shoot the problem and figured out whats happening. When the hbridge flips the pins and the encoders are connected thats what stops everything i guess causing a short.. ?
Right now im just using a 9.6v battery and l293e to test things, I will be using a different bridge and 18v later. So I have my hbridge connected to an arduino and motors like this,
l293 enable1 to +5v
l293 in1 to arduino pwm pin 9
l293 in2 to arduino pwn pin 10
l293 out1 to motor +5
l293 out2 to motor ground
l293 vs to +9.6v
l293 vss to +5v
So basically i just send a pwm signal to one of the l293 inputs then pull the other input low, while the enable pin is always hi, like this
l293 enable +5
l293 in1 to arduino analog pwm signal
l293 in2 to arduino digital pin out low
so if i want to reverse the motor i just flip the in1 and in2 settings, basically this would cause the motors +5v input to be connected to the encoders ground and thats when the issues start... am i going about controlling the hbridge wrong? Im acually controlling the arduino via serial with a propeller and i want to get this all sorted out soon so i can start soldering permanent boards and get this breadboard off my bot.
However, from your description and tests, you're describing what happens when the h-bridge has one side being connected to 0volts via a motor connection.
The motor connections on the h-bridge should only go to the motor leads; not to a ground or source except by the action of the h-bridge.
Cheers,
.