A design of an electron-ion trap for a combined density and composition sensor of the upper atmosphere (ionosphere) intended for placement on nanosatellites is proposed. It allows you to capture charged particles of any energy and the direction of their speed, separating their flows according to the sign of charge and energy. This ensures the correct operation of the vacuum gauge converter of this sensor and the ability to register the density of the fluxes of charged particles, separating them by sign and energy. The processes occurring in the trap are considered, the limiting energies captured by the upper trap electrode system are calculated, and the values of the trap currents in the required height range are estimated. Particles of higher energies are captured by the lower electrode system.