this isn’t a strictly rf issue, but I couldn’t find a better forum to put it… Hopefully someone here can help?
So I’ve been doing a robotics project for school, and I thought I could go the extra mile and put together a wireless controller, so I bought some components from sparkfun and put it all on breadboard. Here’s what the circuit looks like:
On the breadboard, everything seems to work. After we put together the pcb and attached the motors, I noticed something was wrong:
everything works as expected on the breadboard, using a DMM on the motor leads
with the motor attached, the motor will do nothing on power-on, and starts spinning when the appropriate inputs are active (so far so good), but will continue to spin even when the encoder inputs are inactive.
while the motor is spinning, the decoder outputs are active, despite the encoder input being inactive.
if the decoder output is shorted to logic high, the motor stops.
a 3.3k pull-up resistor seems to have no effect on the decoder output
any ideas? Me and my partners have been struggling with this problem for a day now, and the deadline is close. Any help would be appreciated!
You might try using the VT (valid transmission pin) to gate the output. That way when the transmission ceases, the output pins go inactive. VT will go to logic 1 as long as a valid code is being received.
I’'m not sure what the L/M pin is, but in the datasheet, it does say that the decoder outputs are latching. I assume this means the output will stay at the same logic level until a new valid transmission is received. I have tried the following without success:
bring an input pin low (motor spins), and turning off the transmitter (motor keeps spinning)
deactivate the enable pin of the encoder, re-enable, then send a logic high. (I thought this would constitute a "separate transmission")
it seems that no matter what I do, the motor spins indefinitely once it has started. The only thing that stops it is disconnecting the motor leads or shorting the low decoder output to a logic high. Once the motor is stopped in this fashion, I can turn it on again, but with the same problems as the first time.
other observations: - the encoder outputs are high at power-on, but are supposed to be low
I don’‘t think I know how to gate Vt with the decoder output, but it seems this shouldn’‘t be necessary if everything is in order. What if I simply "buffer" the decoder output, so the decoder doesn’‘t see the driver directly’'d have no idea how to do that either…
Guess I looked at the wrong datasheet. Sorry.
From the correct datasheet, it looks like the HT-12D keeps the output until a new command is received. I assume that you try pressing one of the other buttons and that has no effect.
What does your power supply look like - are you sharing it between the motors and digital logic? Those motors generate lots of noise. That could be an issue.
As you already know, the HT12D has latched outputs. That means that a code can be sent by the transmitter and once received, the outputs will remain in the same state until a new code is received. I presume that you want to have the motors to go forward, backward, and stop. To make the motors stop, you need to manage the ENABLE pin on the 754410 (pin 1). When you want the motors to be running, ENABLE needs to be at logic 1. Setting ENABLE to logic 0 will cause the 754410 outputs to go into high impedance state and the motors will stop.
The HT12D has four outputs, all of which are currently being used to drive the 754410. The easiest way to control ENABLE is to tie the HT12D’s VT pin to the ENABLE pin of the754410. However, that will mean that the transmitter has to be transmitting continuously to keep the motors running.
If motor noise is an issue, you may want to run the motors off of a different supply. The 754410 has a logic supply and a motor supply. There is an application note on addressing motor noise and caring for your 754410 on the [KronosRobotics site.](Dios — Kronos Robotics)
when we tied Vt to the driver enable, it turned the motor on and off rapidly at about 3 hz when the inputs are active. It actually stops when the inputs are inactive! If we can get this frequency up it might be usable :]
we tried the 10k and 39 ohm resistors on the reduce motor noise page, but with no success (behaves same as without resistors)
I’d try a simple delay filter and see if that gets you where you want to be. Add a diode (cathode to HT12D VT and anode to ENABLE), a capacitor (10 uF?) from ENABLE to GND, and [maybe] a resistor (100K) across the capacitor. The capacitor should be able to keep ENABLE at logic 1 between the 3 Hz pulses from VT. Start with the diode and capacitor as you may not need the resistor to bleed off the charge on the cap. Use the smallest capacitor value that will do the job to maximize the responsiveness of the controller.
The 10k and 39 ohm resistors are there to protect the micro controller (if any) feeding the driver. I recall seeing a photo on the site of all the PICs that were toasted gaining this knowledge. There is a link on the page I referenced that discusses using .1 uF capacitors across the motors as noise suppressors.
thanks for the help guys, but we’re out of time. It looks like we burned out one of the decoders, and we don’t have time to order more. I guess we’re just wiring it up.