SyntaxHigh

Showing posts with label #arduino. Show all posts
Showing posts with label #arduino. Show all posts

Sunday, August 24, 2014

Put an inductor to cheap DC/DC dropdown regulator.

Keep Voltage High, and Drop It Down When It is Needed

LM2596 is packaged into a very popular module to drop voltage at your circuit endpoints. When your circuit needs fairly large energy, you should keep the voltage high over all the circuit except for the endpoints where the power is actually consumed, and LM2596 works as an “energy distributor”.

Evernote Snapshot 20140525 183252

This is my humble module that controls 12 LEDs and 4 servos simultaneously. It draws at maximum 2A at 6V (12W). This induces heavy noise both on the voltage and the ground lines, which results in total mess on digital signals.


Then, I put an inductor at the entrance of the LM2596 module after cutting the pattern (voltage line before the first rectifier). Its inductance is 100uH with temporal torelance 3A. This halved the noise especially outside of of the module, as shown below.

Image

The noise inside the module.

Image

The noise outside the module.

This is very important when you use these modules in a parralel manner. The inductor blocks the noise and prevents the noise from being transmitted to the other circuit. Otherwise the noise inside is going to be multiplied.

P.S. To Get Beyond Tutorials

In many examples and tutorials over the Internet, this kind of signal integrity and noise stuff is ignored because those are very simple and work with low evergy. But such small curcuit just works as long as you follow its datasheet.

However, decent application may need a lot of power and suffer noise problems. At this time, I was stuck and I didn’t know how to solve it. I spend a lot of time, and bought cheap digital oscilloscope and logic analyzer myself to solve what’s happening in my circuit. I should have done this long ago already.

That’s why I wrote this post. If you got stuck because you don’t know what’s happening in your electric circuit, just buy your oscilloscope and logic analyzer first, these cost under $100 nowadays.




Wednesday, October 23, 2013

CP2102 と Pro mini を繋ぐ

Arduino Uno にちゃんと保護回路を付けてやれば壊れないのだけど,この間 8 つで $30 で買った Arduino Pro mini があるので,それを使うためのシールドを作る.

USB-serial は同じく 10 個で $10(ぐらい) で買った CP2102のモジュール.FT232 のモジュールはぼったくり(Arduino Uno と同じぐらい) するのでこちらを購入.


  • 右側が CP2102 のモジュール,左側が TLC5940 への出力
  • 電圧は一応 3.3 V, 5V をジャンパピンで変えられるようにした
  • 信号線にフェライトビーズかダンピング抵抗を入れてインピーダンス整合
  • DTR にはコンデンサと抵抗でオートリセットが効くようにする(実はリセットは手動でできるので,書き込むときだけ使うのならそれほど必要ない)
あとは,以下の保護回路もできればいいかな.
  1. 30mA のポリスイッチと,逆流防止のダイオードをデータライン,アナログ入力に挿す
  2. ATMega の消費電力は 1mW 程度なので,これも 30mA のポリスイッチで保護してやる.もし USB の電源 (5V) を取る場合は ATMega 328 に入力する前に分岐し,そこから取る.

あとは駆動側の電源ラインの入力を作って,A0 に入力し,電源が入っていないときは信号を出さないようにしておかないと TLC5940 が壊れやすくなる.

Arduino の回路保護については
http://ruggedcircuits.com/html/ruggeduino.html
ここが参考になる.

とりあえずポリスイッチ入れとけば電流で燃えるのは防げるので大丈夫だろう.