using atmega8 as relay.

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to take this

http://www.rav4world.com/forums/...

and do it all on my atmega, The 555 timer I can figure out but I'm a bit foggy on the relay part. I was thinking of using the left side of the chip and not connecting +5. Then I could tie the input to the +5 and keep one of the pins lo. Then When I hold the pin hi it would effectively close the circuit. Is this not the best approach?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That link you posted requires us to register on that site.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok thx, here is the image.

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

The whole circuit is turned off when SW1 is opened if Vcc is in fact also +12.  The relay is not controlled by anything other than +12 being active, or non existent.  So best I can come up with is the 555 is being used to output a level after a delay from power up.

What exactly does this circuit do?

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When SW1 is open, the relay is off so ToNav is connected to FrVss (the 555 is powered off).

 

When SW1 is closed, the relay is energized so ToNav is connected to 555-Out (the 555 is powered and generating a square wave).

 

This circuit seems to be designed to send the nav unit a fake speed.

 

If you want to replace the 555 and relay with an ATmega:

1) 12V input from switch (could change to switch to ground with 5V pull-up).

2) 12V input from FrVss

3) 12V output to ToNav

 

You also need to add a 5V regulator circuit with adequate filtering for automotive environment.

 

I'm not sure what you gain from the ATmega - the 555 & relay seems to be a very simple and reliable solution.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The sw1 is a cut off switch. Yes, when active it fakes the radio in thinking its going under 3mph so that you can use the radio features. When doing so the GPS is worthless so you use the cut off to make it operational. 

 

I was pretty sure one could power the atmega with 12v see link below and it would also allow the mcu to to bring hi/lo levels at 12 volts. If not then maybe there is no advantage. 

 

https://www.avrfreaks.net/forum/1...

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can't power the uC from 12V, but you can interface it to a 12V input.  The series resistor that you referenced is one method.