So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By buzzy
#78268
rudy wrote:
You mentioned an RC delay? What is that? Could you please elaborate some more.


I never have input pins connected directly to wire outside the product. I would have a pull up resistor, say 1K, then 10K between the 1K resistor and the input. And from the input to ground I use a small capacitor. Sometimes 0.1uF, but it depends on how quickly I need to respond to the change on the input.

Layout of the wiring is also important. Usually in a case like your's I ask to see a picture of the setup. To see what might be possible causes.


Putting a 1uF capacitor between the input pin and ground solved the problem! Thanks!

Anyways, here is the video that shows my previous problem. It might help other people in the same situation. Seems you should ALWAYS put a capacitor on the input pins to make sure your circuit works in places with flakey mains.

https://www.youtube.com/watch?v=5dadR-qMipo
User avatar
By schufti
#78269 then just try to operate i2c with an 1µ capacitor on the clk/data line.
this is just another misleading "BUT I saw it working on youtube" or "BUT it workde for me" thread.
you have been told how to takle the problem in a more correct way, not with the sledge hammer.
User avatar
By buzzy
#78271
schufti wrote:then just try to operate i2c with an 1µ capacitor on the clk/data line.
this is just another misleading "BUT I saw it working on youtube" or "BUT it workde for me" thread.
you have been told how to takle the problem in a more correct way, not with the sledge hammer.


Why would I use a capacitor when doing i2c? This thread is regarding a regular binary digital input pin.
User avatar
By rudy
#78272 I watched the video. Phone chargers are Battery chargers. The are not designed to be stable power supplies for powering electronics. They are cheap and they do the job that they were designed for. Most of the time. If you want reliability then a higher quality power supply should be used. That will not prevent all issues but it is the starting point.

Lots of people are able to through together electronic components that will work reliably much of the time. But there is lots more to consider if you need it to work reliably all the time. And that takes a lot more understanding and experience to accomplish.