  We theoretically investigate the properties of a double-well bosonic
Josephson junction coupled to a single trapped ion. We find that the coupling
between the wells can be controlled by the internal state of the ion, which can
be used for studying mesoscopic entanglement between the two systems and to
measure their interaction with high precision. As a particular example we
consider a single $^{87}$Rb atom and a small Bose-Einstein condensate
controlled by a single $^{171}$Yb$^+$ ion. We calculate inter-well coupling
rates reaching hundreds of Hz, while the state dependence amounts to tens of Hz
for plausible values of the currently unknown s-wave scattering length between
the atom and the ion. The analysis shows that it is possible to induce either
the self-trapping or the tunneling regime, depending on the internal state of
the ion. This enables the generation of large scale ion-atomic wavepacket
entanglement within current technology.
