I am using 328p nano clones to build sprinkler controllers, garden monitors, and the like. It looks like the best balance of cheap and low consumption (ultimately, these will have solar cells charging batteries . . ).
The AT-09 bluetooth modules with CC2541 is also nicely cheap and seems appropriate.
I'm having no problems talking to the AT-09 on a software serial line while the nano is connected to the computer by USB. But this seems grossly inefficient and inelegant.
I need to program the sketch (and probably dozens of fixes) by the UART, but the USB port will sit empty once deployed.
The AT-09 most commonly comes attached as a daughter board to a larger circuit with six pins, power, tx/rx. enable, and reset.
I can find plenty of comments on reset, but can't find anything on Enable (and my web searching is probably impaired by other uses). With Enable floating, the device works.
My thinking on the best way to handle this would be to assert Not-Enable when the USB is connected, taking this to mean that it is being programmed.
As near as I can tell, the only way I'll be able to detect this is by the +5 signal being present when connected to USB, and not when I'm running on from a converter.
Does that make sense so far?
And if that's the case, I could assert not-enable by using a simple transistor amplifier with a resistor connecting the +5 to the base?
And if that's right, would this be NPN with collector on +5 if I want high, and PNP to ground if I want low (it's been a couple of decades since I've worried about transistor amplifiers!)
Power efficiency isn't an issue when connected, and it would seem that this design would use none (save perhaps leakage) when +5 wasn't present.