Dynamo phone charging leads to discharging
Okay to make this a bit more clear.


To prove that the phone is discharging through the UBEC. Install a diode in series on the BEC output. Ideally a Schottky like 1N582x although a general purpose diode like 1N540x should be okay. Picked those purely as easy to obtain parts.


Check that the voltage is okay, as there will be drop across the diode. Hence the preference for a Schottky.







simulate this circuit &ndash; Schematic created using CircuitLab

This is a crude fix, but if the phone is no longer discharging this will prove it.


Your UBEC is a buck DC-DC converter, this means it drops voltage down but does not work on voltages lower than the output with some dropout, in this case the voltage in has to be 5.5VDC or higher on the input.


My concern which Transistor has proven with maths is that your smoothing capacitor after the bridge voltage is potentially dipping below this voltage on each cycle. Essentially what is mentioned with ripple.



(http://www.electronics-tutorials.ws/diode/diode_5.html)

So essentially those 'troughs' as the capacitor discharges is the ripple, so the voltage may be dipping above and below the 5.5VDC input for your UBEC.

Also my other concern was the dynamo voltage output may be dropping below that required for the 5.5VDC on the UBEC, say if not pedalling, is there a flywheel or anything on the dynamo ?

It would be useful to measure the voltage output of your dynamo, after the bridge rectifier and into the UBEC.


Have you tried this circuit with a standard DC power supply such as a plugpack to confirm functionality, the UBEC is rated for 5.5-26VDC so 12 and 24VDC are both very common, could even use a battery ?
As has been mentioned, you may need to look into resistors for pull-up or pull-down or across the data lines.


These various tests should help determine exactly where the problem actually lies.