Porous silicon structures have been demonstrated as effective biosensors due to their large surface area, size-selective
filtering capabilities, and tunable optical properties. However, porous silicon surfaces are highly susceptible to oxidation
and corrosion in aqueous environments and solutions containing negative charges. In DNA sensing applications, porous
silicon corrosion can mask the DNA binding signal as the typical increase in refractive index that results from a
hybridization event can be countered by the decrease in refractive index due to corrosion of the porous silicon matrix.
Such signal ambiguity should be eliminated in practical devices. In this work, we carefully examined the influence of
charge density and surface passivation on the corrosion process in porous silicon waveguides in order to control this
process in porous silicon based biosensors. Both increased DNA probe density and increased target DNA concentration
enhance the corrosion process, leading to an overall blueshift of the waveguide resonance. While native porous silicon
structures degrade upon prolonged exposure to solutions containing negative charges, porous silicon waveguides that are
sufficiently passivated to prevent oxidation/corrosion in aqueous solution exhibit a saturation effect in the corrosion
process, which increases the reliability of the sensor. For practical implementation of porous silicon DNA sensors, the
negative charges from DNA must be mitigated. We show that a redshift of the porous silicon waveguide resonance
results from either replacing the DNA target with neutral charge PNA or introducing Mg2+ ions to shield the negative
charges of DNA.