A robust and precise viscometer using the forces exerted by a laminar flow inside a small duct is presented: the force is measured on a long cylindrical sensor dipped into the flow. Two devices of respective volumes 1.4 and 0.031 ml have been realized, demonstrating that the technique is usable with small fluid volumes. Several Newtonian and non-Newtonian fluids have been tested at shear rates ranging from 0.3 to 10 s(-1) for the first device and from 85 to 2550 s(-1) for the second one. For Newtonian fluids, of viscosities ranging from 10(-3) to 0.1 Pa s, the linear response of the device has been verified and a 90% agreement with the values provided by commercial rheometers is obtained. For non-Newtonian polymer solutions, the variation of the force with the flow velocity allows one to determine the dependence of the viscosity on the shear rate. Two shear thinning polymer solutions with a power law behavior at intermediate shear rates have been investigated and their rheological parameters have been determined.