I have some weird noisy behaviour in my circuit and I can't explain it.
The setup is very simple: driving a dc motor with a L293D (actually a L293DNE), controlled via an Atmel ATMega32(no PWM, just a pin out).
The dc driver layout is similar to the application notes of the L293D datasheet, i.e. the motor is connected directly to the 1,2 outputs of the L293D, no external diodes. Thus I can drive it forward and backward.
Also connected to the MCU via USART is a serial LCD. Now I tried two different settings:
- A 9V battery/power supply for both the MCU (via a 7805 regulator) and the dc motor (before the voltage regulator).
- Separate 9V for the MCU and 10V for the motor.
Both setups give me trouble: The first one doesn't do it's job at all. As soon as I initiate motor movement (by setting the Atmegas output pin to high), everything goes wild and the MCU reboots eventually.
Does this mean that the voltage drops in the rest of the circuitry so that the MCU brownouts/blackouts? What can I do to alleviate these problems?
The second setup works, but everytime I run the engine, my LCD displays random characters, i.e. it seems to receive noise over the RX line.
Where does this come from? Is it that the motor somehow induces interference in the circuit? If so, how do I have to change my design to get rid of the effects? I have rather long, single wires (~10-12 inches) for most of the connections, does this make difference (vs. e.g. twisted pairs)?
I can post layouts, but the setup is really simple, anyways.
I am not an electronics guy, so any help appreciated!