Author Topic: Working with relays  (Read 25990 times)

germ

  • Jr. Member
  • **
  • Posts: 53
Re: Working with relays
« Reply #60 on: July 16, 2013, 08:52:11 am »
Thanks. I'll read that more thoroughly later. I might have a friend with an uno I could use maybe.
I should be fine with making a "one time only" chip, as long as I can do it with the sparky, and not some other expensive device. I'll try to research a bit on the net, but if it's too much work, I'll probably end up just using a complete board like digispark or arduino micro anyway.


Did a super compact version of my shield with a chip directly on the board. Would it work this way, or does it need pull-up/down resistors or anything else?

-> https://dl.dropboxusercontent.com/u/524696/Arduino/Rboard.r4l-attiny.PNG <-

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: Working with relays
« Reply #61 on: July 16, 2013, 10:06:22 am »
I'd add a 100nF cap on top of the MCU, else it should work.

germ

  • Jr. Member
  • **
  • Posts: 53
Re: Working with relays
« Reply #62 on: July 16, 2013, 11:01:34 pm »
Exactly where and why? But I'll add one ;)
So I found this guide on how to program the attiny13 with arduino... should work on the digispark too, can't see why it shouldn't.
Just gotta find something about disabling that reset to get all the I/Os.
Attiny24/44/84 seemed to work too, but the store I'm using doesn't have those.

*edit*
So I guess the cap goes between the 5v terminal and the 5v pin?
Any suggestions on what kind of cap? Ceramic, Polypropylene or Electrolytic? Or doesn't it matter?
« Last Edit: July 17, 2013, 12:26:58 am by germ »

Mark

  • Full Member
  • ***
  • Posts: 196
Re: Working with relays
« Reply #63 on: July 17, 2013, 02:45:39 am »
germ
Semicolo was suggesting you need a 100nF capacitor between the +5v and ground.

In each of your other designs, there was a manufactured board that included these. (and a larger 47-100uF as well)

Best suggestion I can make is to shift the input voltage connector to the left, and stick it there.
This is also the closest to the uP where it will protect it from either its own noise or other noise spikes.

100nF won't be electolytic but likely to be mylar or MKT polyester.
http://www.ehobbycorner.com/pages/tut_capacitors.html#Types

You can usually buy them in 0.1, 0.2 spacing (ie already bent ready to insert).

Mark



germ

  • Jr. Member
  • **
  • Posts: 53
Re: Working with relays
« Reply #64 on: July 17, 2013, 04:46:00 am »


100nF won't be electolytic but likely to be mylar or MKT polyester.
http://www.ehobbycorner.com/pages/tut_capacitors.html#Types

I was thinking of this one https://www.elfa.se/elfa3~se_en/elfa/init.do?item=67-005-04&toc=0&q=67-005-04
But nevermind, I'll just choose the ceramic one.
Like this one https://www.elfa.se/elfa3~se_en/elfa/init.do?item=65-726-89&toc=0&q=65-726-89
Perfect spacing to just jam it in there behind the terminal.

This all still depends on however I manage to program these little suckers, but it's nice to know what to do with them if I manage.
Thanks a lot!

*edit* Thanks for the link, now I know why to put it there!
At least I understand the voltage drop thing, I don't really know much about ripples and noise.
« Last Edit: July 17, 2013, 05:11:55 am by germ »

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: Working with relays
« Reply #65 on: July 17, 2013, 05:32:55 am »
I had a look at the ArduinoISP sketch and it's written using directly the SPI registers instead of a high level library, so it'll be a pain to port to digispark.
You'd also need a serial to ttl converter and use software serial to talk to the pc.

germ

  • Jr. Member
  • **
  • Posts: 53
Re: Working with relays
« Reply #66 on: July 17, 2013, 08:06:32 am »
Yeah, sorry.. I didn't understand much of that at all...
In this link http://elabz.com/arduino-shrunk-how-to-use-attiny13-with-arduino-ide/
it sounds rather simple to program a attiny 13 with an arduino, altho with 5 I/Os... but I haven't finished reading all of it properly yet.

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: Working with relays
« Reply #67 on: July 17, 2013, 09:33:08 am »
That's nice, they explain how to build software for tiny13 using the arduino environment.
But you still need a programmer to send the software into the tiny13.

Sorry for the mumbo jumbo, what I meant is they used low level instructions that are not compatible with digispark in the ArduinoISP sketch.

germ

  • Jr. Member
  • **
  • Posts: 53
Re: Working with relays
« Reply #68 on: July 17, 2013, 02:54:20 pm »
But can't the digispark be the programmer? I mean, if they are using another Arduino to do it, shouldn't it still work?
Uhm, ok. Well I'll have to research all this a bit more, I'm still confused about all the tinys and how it fits and doesn't fit with the arduino stuff.

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: Working with relays
« Reply #69 on: July 17, 2013, 04:59:12 pm »
theoretically, it can, the problem is the programming arduino software was written using specific atmega instructions that won't work as is on a digispark.
Also the pc is sending/reading data through a serial line to/from the arduino, serial emulation via USB is not working on a digispark so you'd need an external TTL to Serial converter.

pitchakorn

  • Newbie
  • *
  • Posts: 7
Re: Working with relays
« Reply #70 on: May 10, 2019, 07:39:32 am »

pckk

  • Newbie
  • *
  • Posts: 8
Re: Working with relays
« Reply #71 on: May 12, 2019, 10:39:01 pm »
Good idea

ufabet

pckcomeback

  • Newbie
  • *
  • Posts: 8
Re: Working with relays
« Reply #72 on: May 13, 2019, 01:45:44 am »
Thanks for the input!
I didn't buy the relay-shield, it's another relay board.
Darn, I missed the max current part. I was hoping to make this simple and just plug it into the board.
So, any ideas on what type of amplifier I need and how I should wire it?
Should I go for an NPN 2N3904, and if so, do I need more parts to make it work? (yes, I am really new to this)

Thanks for the code part, I need the input to to be a trigger rather than a condition.

ufabet