Pyboard debugging while embedded: powering

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
scardig
Posts: 13
Joined: Wed Jan 10, 2018 8:32 am

Pyboard debugging while embedded: powering

Post by scardig » Mon Feb 05, 2018 3:34 pm

Hello,

we have to embed a pyboard into a dedicated board that will feed power to the V+,GND pins of the Pyboard. With the Pyboard powered in such way, I may need to hot-connect via USB to see what's going on from my PC via Putty (and eventually update my Python code) then reset and hot-disconnect when done. If I understood correctly the positive rail of USB is protected by a diode so that, in case V+ is higher than Vusb, there is no current going back to the usb port. For the same reason I will place a diode on the V+ rail:

1. Any advice for the diode to use (type, current, ...) ?
2. Since such diodes configuration will act as a diode-OR, do I need to pay attention to the voltage difference V+ Vusb to ensure that the host PC will "see" the pyboard (as an example let's see three cases: V+=3,7 V+=5 V+ = 6 with V+ measured before the diode drop)
3. If the board designer asks for power requirements, what V+ should I ideally ask (and current..) ?
3. Do you see a cleverer way to accomplish the task :-) ?

Thanx

cefn
Posts: 193
Joined: Tue Aug 09, 2016 10:58 am

Re: Pyboard debugging while embedded: powering

Post by cefn » Mon Feb 05, 2018 4:11 pm

If you had a USB->UART module like a CP2102 or FTDI, isn't it possible just to connect common GND and RX/TX? Then you can monitor without having to wire through the Micro USB port (and therefore avoid automatically joining V+ to your laptop).

scardig
Posts: 13
Joined: Wed Jan 10, 2018 8:32 am

Re: Pyboard debugging while embedded: powering

Post by scardig » Mon Feb 05, 2018 4:17 pm

cefn wrote:
Mon Feb 05, 2018 4:11 pm
If you had a USB->UART module like a CP2102 or FTDI, isn't it possible just to connect common GND and RX/TX? Then you can monitor without having to wire through the Micro USB port (and therefore avoid automatically joining V+ to your laptop).
You're right but I will "waste" two pins on the pyboard (UartRX, UartTX) to do that. If I can, I would like to avoid that.

Thanx

User avatar
pythoncoder
Posts: 2645
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Pyboard debugging while embedded: powering

Post by pythoncoder » Tue Feb 06, 2018 6:47 am

I can't see an obvious problem with a diode OR.

I've never tried hot-connecting USB to a Pyboard so it might be good to hear if anyone has actually done it. It may be that the firmware doesn't support it. Hot connecting a UART via something like an FTDI adaptor should definitely work.

As for power requirements 5V is ideal in that, even after a forward diode drop the onboard 3.3V regulator has plenty of headroom. The Pyboard typically takes about 80mA when running. I don't know a worst-case figure but unless power is tight I'd specify 200mA to the board designer. As for diode type I'd specify something cheap and ubiquitous like a 1N4001.
Peter Hinch

Post Reply