A portable electronic smoking system comprising rechargeable primary and secondary devices , the secondary device being an electrically heated tobacco device, said secondary device comprising a heater configured to heat an aerosol-forming substrate, the primary device comprising a housing , said secondary device being configured to be received within the housing of the primary device during a recharging cycle, the primary device having a first battery and the secondary device having a second battery , and wherein the primary and secondary devices are configured to recharge the second battery from the first battery wherein the primary device comprises: a pair of output terminals for connection to the second battery; a DC power source ; a voltage regulator connected between the DC power source and to the output terminals for controlling a charging voltage; and a microprocessor coupled to the voltage regulator and to the output terminals, wherein the primary device and second battery are configured to be coupled together and to form a charging circuit, and wherein the microprocessor is configured to: control the voltage regulator to supply a first charging voltage; and determine an internal resistance of the charging circuit by measuring a current in the charging circuit at the first charging voltage and at a second charging voltage, wherein the second charging voltage is lower than the first charging voltage by a predetermined voltage difference; and limit the first charging voltage supplied by the voltage regulator to a maximum first charging voltage based on the determined internal resistance and a predetermined maximum charging voltage level of the second battery. a pair of output terminals for connection to the second battery; a DC power source ; a voltage regulator connected between the DC power source and to the output terminals for controlling a charging voltage; and a microprocessor coupled to the voltage regulator and to the output terminals, wherein the primary device and second battery are configured to be coupled together and to form a charging circuit, and wherein the microprocessor is configured to: control the voltage regulator to supply a first charging voltage; and determine an internal resistance of the charging circuit by measuring a current in the charging circuit at the first charging voltage and at a second charging voltage, wherein the second charging voltage is lower than the first charging voltage by a predetermined voltage difference; and limit the first charging voltage supplied by the voltage regulator to a maximum first charging voltage based on the determined internal resistance and a predetermined maximum charging voltage level of the second battery. control the voltage regulator to supply a first charging voltage; and determine an internal resistance of the charging circuit by measuring a current in the charging circuit at the first charging voltage and at a second charging voltage, wherein the second charging voltage is lower than the first charging voltage by a predetermined voltage difference; and limit the first charging voltage supplied by the voltage regulator to a maximum first charging voltage based on the determined internal resistance and a predetermined maximum charging voltage level of the second battery. <EOS>