Forum: µC & Digital Electronics Relay circuit not working?


von Daniel Sticker (Guest)


Attached files:

Rate this post
useful
not useful
Hello, I have set up a circuit as described in the picture. The circuit 
works so far, the esp switches all relays and switches on the circuits.

The problem is that as soon as I connect the motor, which is connected 
to relay 4, with the 9v power source and switch relay 4, the motor 
starts up for about 2 seconds and then the esp restarts and the relay 
closes again.

The motor should not actually be able to take any electricity from the 
esp, since it has its own circuit with the motor of reais 2. if I take a 
new 9v power source and connect the motor to it so that the motor on 
relay 4 has its own circuit, everything works again.

Where did I go wrong?
Thanks in advance!

von MaWin (Guest)


Rate this post
useful
not useful
Daniel Sticker wrote:
> then the esp restarts

You experience the wonders of electromagnetic interference.

Electronics is not just the connecting of presoldered boards
like Lego.

Creating emi resistant circuits is an art.

von Lothar M. (lkmiller) (Moderator)


Rate this post
useful
not useful
Daniel Sticker wrote:
> The problem is that as soon as I connect the motor, which is connected
> to relay 4, with the 9v power source and switch relay 4, the motor
> starts up for about 2 seconds and then the esp restarts and the relay
> closes again.
Measure the voltages with an oscilloscope. There may be a short voltage 
breakdown due to the inrush current of the motor.

BTW: its kind of tricky to read your scribbledy as a schematic, so one 
question: do i see there a stepup from 5V to 12V for driving a motor? If 
so: do you think thats a good idea? If so: why do you?

: Edited by Moderator
von Daniel Sticker (Guest)


Rate this post
useful
not useful
Thank you very much for your answer! I'll try to measure the voltage.
what you deciphered is correct, i installed a step-up from 5 to 12 v. 
Only a small fan is operated with it and i only had the 5v energy 
source.

von Daniel Sticker (Guest)


Rate this post
useful
not useful
should i try to cover the esp power cables with a grounded aluminum or 
copper foil to fix the electromagnetic interference?

von Lothar M. (lkmiller) (Moderator)


Rate this post
useful
not useful
Daniel Sticker wrote:
> should i try to cover the esp power cables with a grounded aluminum or
> copper foil to fix the electromagnetic interference?
No. You should do a proper wiring with a reasonable GND and supply 
layout.

> and i only had the 5v energy source.
From where? Does it deliver enough current?

And what about

>>> the 9v power source

you mentioned?

What kind of "power" is that? Hopefully not a 9V battery like that:
https://en.wikipedia.org/wiki/Nine-volt_battery
Those things are not suitable power sources for develompent! With those 
you always will run into some kind of power fail or power breakdown.

Take a loadable power supply aka "laboratory power supply":
https://www.tme.eu/en/katalog/one-channel-power-supplies_112661/ or
https://www.aliexpress.com/w/wholesale-lab-power-supply.html
Even the cheapest of those will outrange your battery-supply by far.

: Edited by Moderator

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig