Electronics > Microcontrollers

Arduino Mega Reset Problem

<< < (3/3)

A easy thing to do is to isolate the 2 circuits with optoisolators. Make a board (or use a blank protoboard) and use optoisolators to cross an isolation barrier. Have any controls on one side, and all ther power switching on the other, physically separated. A separate power supply for the power side ( no connection at all, and a separate low voltage supply for the controller) and keep the output wiring separate, in a loom not shared with the controller, and preferably shielded with a woven braided cable sheath connected to the grounded case.

Erwin Ried:
Can you post the code? maybe the problem is not the hardware

come one. optocouplers are not the end-all solution to this kind if simple problem.

have your arduino drive a darlington. put a freewheel diode acros the coil.
power your arduino from a SEPARATE supply. energizing the coil creates brownouts on the power rail. the rest circuit of the arduino may trip on that. if separate supply is not possible : use a diode and a fat capacitor as tank.

--- Code: ---

          |                                  |       |      |      |
         _|_                                _|_       )    _|_      ) 
        _\_/_  1n4001                       /_\       )    /_\      )
          |                                  |       |      |      |
          |                                   -------+       ------+
          +------ > to arduino power                 |             |
          |                                        |/            |/
         _|_                              -/\/\/---|    --/\/\/--|
        |___|                                      |>            |>
         ---                                         |             |
          |                                          |             |
         _|_                                        _|_           _|_
         GND                                        GND           GND

--- End code ---

there you go.
that's all you need

if the coils energize the arduino is not impacted if the +12 volt collapese temporarily. it gets it power form the capacitor. put a 100uf there and off you go ( arduino has a stupid linar regulator that burns off excess voltage as heat ... instead of an efficient switcher. so you need a big fat capacitor )

i wish there was a way to make this text input field larger and switch it in courier font ( not courier tags , but have the editor work with courier font ... its easier to make ascii art . now i everytime have to fire up notepad++ )


[0] Message Index

[*] Previous page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod