Bypass Capacitor for Sharp IR Sensor GP2D120XJ00F

Okay, before I proceed any further, I just need to clear this in order to avoid destroying the bypass capacitor spectacularly.

As everyone knows, it is recommended to add a 10uF (or larger) bypass capacitor between Vcc and GND.

I have a 10uF electrolytic capacitor and also a 0.1uF polyester capacitor.

I have two questions; 1. Which one is more suitable, since I have read of people hooking up the 0.1uF instead of 10uF or more.

*Another reason why I would prefer the 0.1uF is there is no polarity on it, which leads me to the other question of;

  1. In the case the 10uF is more preferable, how EXACTLY do I get the polarities right? Do I hook it up like as shown in the picture?

Where the legs connected to GND is negative (-) and legs connected to Vcc positive (+)?

Thanks.

Use both in parallel. The smaller cap handles higher frequencies better the larger cap handles low frequency noise. See :- http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Where the legs connected to GND is negative (-) and legs connected to Vcc positive (+)?

Yes that is right.