Quick electronics advice needed.

I have ordered a reed switch that Robert Wall shown me at http://spiratronics.com/magnetic-reed-switch-en.html

I am planning to order the MAX6816 Switch Debouncer: http://uk.rs-online.com/web/p/bounce-eliminator-circuits/7326848P/

Would i be right to connect it to the emontx like this? [see attachment]

Robert Wall's picture

Re: Quick electronics advice needed.

Why are you asking? What you have drawn is EXACTLY the "Typical Operating Circuit" from the data sheet right next to the Pin Configurations diagram that you have copied. I think Maxim know how it should be used, so the answer is probably "yes".

You should not enable the input pull-up in your processor, and, if you're using the pulse input, neither should you have R8.

E-Mike's picture

Re: Quick electronics advice needed.

I'm asking because the typical operating circuit has a 0.1µf capacitor between GND and VCC and with having very limited electronics knowledge it doesn't look exactly the same to me. That's why i made the image to get confirmation that the way i was going to connect it was right. I'm sure there was a point whilst you were learning about electronics you too asked a similar daft question to someone lol. I'd love to do a course on electronics but unfortunately i have to work stupid hours so i'm learning the hard way.

I was almost thinking to just connect the switch between the GND and INPUT pins and then connect VCC and Output to the jack then it occurred to me this wouldn't be a circuit.

Now you have said it is exactly the same i'm guessing that the capacitor in the example image is the capacitor that is already on the emontx board.

Thanks for your help Robert.

Regards,

Mike

dBC's picture

Re: Quick electronics advice needed.

I'm asking because the typical operating circuit has a 0.1µf capacitor between GND and VCC

That's a decoupling cap.  Generally you should include one of those, and have it as close to the device's Vcc as possible, but it will probably work without it.

 

Robert Wall's picture

Re: Quick electronics advice needed.

I simply couldn't figure out what you were asking. If you'd said "Is the 0.1 µf capacitor needed?", I'd have known what your question really was. So don't blame me if I can't guess it correctly. So yes, the question itself was daft, but what you were asking wasn't.

As dBC says, if the debounce i.c. is close to the main board (i.e. an inch or two), it probably won't be needed but if in doubt, include it. It's never wrong to have too much decoupling.

E-Mike's picture

Re: Quick electronics advice needed.

Ah i see. So it would be something like this? [attachment] The IC will be close to the board anyway, the length will be the switch to the gas meter.

 

Regards,

Mike

Robert Wall's picture

Re: Quick electronics advice needed.

Yes, put the decoupling capacitor as close as possible to the i.c. it's decoupling. The purpose is to short-circuit noise impulses coming out of the i.c, so the shorter the aerial (= the loop of wire/pcb track from the i.c. to the capacitor and back) the better.

The cable length out to the switch shouldn't be a problem, but if you're running any distance close to mains wiring, "microphone" - twin twisted and screened - cable, with the screen earthed separately (i.e. NOT to processor gnd), would be advisable if you notice problems, otherwise telephone cable, bell wire etc should be OK especially if the run is short (a few metres).

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.