Mini's micro USB is not powered? Or is mine broken?
 
Notifications
Clear all

Mini's micro USB is not powered? Or is mine broken?  

  RSS
OJFord
(@ojford)
Eminent Member
Mini's micro USB is not powered? Or is mine broken?

I was trying to use Octoprint with my Mini via a Wifi/USB serial bridge; at first I plugged it into the 'main' full-size USB port, but then found out that it has to be the micro USB port. From this one though, my device gets no power.

Is it known/intended that the micro USB port is not powered, or is it an issue with my 'Buddy' board?

The bridge device works fine in a computer, and powers on and operates when connected to the Mini's full-size USB type A, but since it isn't a mass storage device the Mini doesn't do anything with it.

Posted : 19/06/2021 6:39 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Well, I think it might be the port. Taking power from the full-size USB A -

- it runs ok, I can access the embedded web server, I can hear it 'processing' commands I send, (the bridge that is, not the Mini - it's the same unplugged but still powered) but the Mini doesn't respond at all.

Unless  I'm missing something I'm supposed to do to 'enable' the port / serial control I suppose this should be a support request rather than forum thread.

Thanks,

Posted : 19/06/2021 8:49 pm
Daryl
(@daryl-2)
Trusted Member
RE: Mini's micro USB is not powered? Or is mine broken?

Peak currents needed by Raspberry Pi's can exceed the power a 'normal' USB port can deliver (500ma).  I always run my Octoprint Pi's with a wall cube.  Even if the average current is below 500ma, peaks can exceed that.

 

https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md

 

Posted : 20/06/2021 1:57 am
Daryl
(@daryl-2)
Trusted Member
RE: Mini's micro USB is not powered? Or is mine broken?

Schematic for buddy is here:  Buddy board schematic

Page 10 is USB ports.

Posted : 20/06/2021 2:09 am
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?
Posted by: @daryl-2

Peak currents needed by Raspberry Pi's can exceed

No Raspberry Pi here, and per my follow up post powering it (an ESP8266) from the other USB port it does run fine, I don't see a reason to think it can run a web server and respond to my commands but not manage to output them. (And it does when connected to and powered by a laptop USB port.)

Posted : 20/06/2021 6:14 am
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

@daryl-2

Thanks, I think perhaps what's happening with power is that it's expecting to be the slave device, if it were a Raspberry Pi for example the Pi would be trying to supply it with power.

Maybe it relies on power there to consider the port active, in which case my quick and dirty powering from other USB won't work as is - since I used a second board to provide a convenient 3v3/gnd header so I didn't need to solder anything - the USB's 5v is presumably floating.

I'll check that, but if so try supplying 5v there so it's more as if the micro USB supplied it, and the Mini sees it too.

Posted : 20/06/2021 6:31 am
towlerg
(@towlerg)
Noble Member
RE: Mini's micro USB is not powered? Or is mine broken?

Drawing power from the USB post is never a good idea (and bear in mind USB2 is only spec'ed for 100ma max.), a lot of OctoPrint users put tape on the 5V pin to prevent this.

Posted : 20/06/2021 11:54 am
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

@towlerg If this thing draws 100mA, something has gone very wrong.

It's not a Pi, and it's not running Octoprint. It's just a WiFi-serial bridge, so that Octoprint *running elsewhere* can connect over IP.

Posted : 20/06/2021 12:44 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?
Posted by: @ojford

@daryl-2

Thanks, I think perhaps what's happening with power is that it's expecting to be the slave device, if it were a Raspberry Pi for example the Pi would be trying to supply it with power.

Maybe it relies on power there to consider the port active, in which case my quick and dirty powering from other USB won't work as is - since I used a second board to provide a convenient 3v3/gnd header so I didn't need to solder anything - the USB's 5v is presumably floating.

I'll check that, but if so try supplying 5v there so it's more as if the micro USB supplied it, and the Mini sees it too.

I did try that; everything exactly the same but without the  shortcut, powering at 5v as if  from the USB connector, no change. Even if it's not the case that the Mini uses it to detect a device present I realised it was a  silly shortcut - the USB/TTL could well be (trying to be) running on that 5v from USB.

I also tried plugging that second board used just for siphoning power into a (550mA) mains USB adapter rather than the Mini; still nothing.

With the same setup (micro USB adapter and all) but plugged into my computer, as long as I set the baud rate to 57600 it spits out any gcode I send it fine. There doesn't seem to be a baud rate option on the Mini (nor anything serial related at all)? So auto-detection isn't working, or it isn't  supposed to auto-detect and I'm supposed to use something that isn't 57600? Or my port's not working at all?

Would be very helpful if anyone could confirm whether there is some setting I'm supposed to enable for serial control, or if something should appear on-screen if detected, or if their micro USB _is_ powered, etc.

Thanks!

Posted : 20/06/2021 2:13 pm
Neophyl
(@neophyl)
Illustrious Member
RE: Mini's micro USB is not powered? Or is mine broken?

@ojford

I believe the baud rate should be 115200 and not 57600.  I also read that there was a potential issue with the auto detect for the port/rate.  I dont keep up with octo/mini to a huge extent so I don't know the outcome of that or if its fixed/outstanding

Posted : 20/06/2021 2:23 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Thanks @neophyl, I was just  grepping the firmware repo & it does indeed seem to be fixed to 115200 from what I can tell at a quick look.

Oddly at least one of the programs I'm testing with (ESP3D - also using/intend to when it works just use esp-link, but the former is convenient for debugging since I can just go to its web server and hit a button to send some gcode to (in theory) move an axis) also appears to be using 115200.. I'm not sure how it could have ended up running at 57600, I'll check its output again, maybe I overlooked it getting 'sensibly mangled' by reading  at half the rate. Pretty sure I was getting nothing with `screen <port> 115200` though.

Posted : 20/06/2021 2:39 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Well that was the case, not sure what caused that, but I just re-flashed and now it works @115200 on my computer, bidirectionally.

Still nothing from the Mini though, movement nor serial response. I thought perhaps Octoprint does some 'hey enable serial' setup, so tried connecting again; it sends `N0 M110 N0*125` (set line number to 0) but receives no response and connection fails.

Connected to my computer, Octoprint also doesn't see an acknowledging 'ok' response (from me typing it), so that's certainly an issue, but it does show in the ESP3D viewer when I type it vs. not from the Mini, and I assume the Mini should move axes without first setting the line number (?) anyway, so I don't think that's the main issue at the moment.

Anything I'm missing that I should be enabling? Or ideas of an alternative way of testing the micro USB port? It doesn't recognise the flash drive that came with the Mini (via adapter), but then I don't think it's supposed to support mass storage?

Posted : 20/06/2021 3:58 pm
Daryl
(@daryl-2)
Trusted Member
RE: Mini's micro USB is not powered? Or is mine broken?

@ojford

Sorry I missed that.  Love the ESP32 and 8266, use them throughout the house to monitor environmentals, switches etc. 

Found this is another forum post.  Looks like that jumper on the schematic for power to the USB port is default not populated...

"I've kinda given up on waiting for the wifi to be available. I did an octopi setup on a RPi 3A+ The Pi 3A+ is able to have power backfed though it's USB port So I have only a single usb cable on the Pi between it and the Mini. It pulls power off the Mini. There's a small solder pad bridge you need to bridge with a blob on solder on the bottom of the mini's controller board to enable power output on the mini's microusb port. I've been running  this setup for months now with zero issues.

I have a feeling whenever the wifi does become available, it's going to take quite some time for the web UI to provide even some of the basic features you get with octopi. They haven't made much progress with that web UI  even with it being available though the ethernet port."

 

Posted : 20/06/2021 4:46 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Interesting, thanks @daryl-2. If I can get this working I suppose I'll do that too then, to remove my Heath Robinson power arrangement.
https://forum.prusa3d.com/forum/general-discussion-announcements-and-releases/wifi-adapter/#post-392791

That does remove quite a bit of reason to suspect a faulty micro USB port.. but I'm not sure why I can't get it to respond then. I know people will want to say 'only the Pi is supported at this time', but it's just UART, I can't see that the Pi-Octoprint instructions are doing anything special, let alone anything somehow requiring a Pi: https://www.help.prusa3d.com/en/article/octoprint-configuration-and-install_2182

Perhaps the next thing I should try is connecting my computer directly, and sending the same connection test gcode as Octoprint, or anything, and really confirm as 'close' as I can whether or not the Mini's acking it (or giving some error even). Actually, now I say that I don't know why I didn't think of it sooner..!

Posted : 20/06/2021 5:09 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Ok, that was quick and easy. Mini responds fine just using my computer directly connected over USB. Axes movement too. Hm.

Posted : 20/06/2021 5:17 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Oh! I think it might be a USB protocol issue, since I'm using a full-size A  -> micro A adapter in order to plug the ESP into the microUSB port as required.. but really both the Mini & ESP expect to be 'slave' devices  (not sure of USB terminology for that - the non-host), neither of them is acting as the host that my laptop is when I set up a socket to talk to either the Mini directly or to read from the ESP.

So to use it like this I'd need a USB host controller I think, and *that's* what's magic & special about the Pi 😆.

Posted : 20/06/2021 5:37 pm
Daryl
(@daryl-2)
Trusted Member
RE: Mini's micro USB is not powered? Or is mine broken?

Looks like you would have to implement USB hsot in software if you want to use ESPx:

https://github.com/search?q=USB+host+ESP

 

 

Posted : 20/06/2021 6:56 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

I'm not set on ESP, I just thought it was all I'd need in order to do 'serial over IP' as it were. (I want to run Octoprint, just not on a Pi or anything else right at the printer.)

For now hopefully I can find something spare to bridge the two or just to replace the ESP; there's also some work on the firmware towards making the port used configurable, where I initially asked if my assumption that I could use the full-size USB A (yes).
https://github.com/prusa3d/Prusa-Firmware-Buddy/pull/1246

(The author's actually after it on an internal header - fine with me, eliminate the trouble I'm having with USB altogether! - but maybe that could lead to the other USB port & ethernet too :shrug: /speculative-dreaming)

Posted : 20/06/2021 8:34 pm
OJFord
(@ojford)
Eminent Member
Topic starter answered:
RE: Mini's micro USB is not powered? Or is mine broken?

Working!

I programmed an old mbed LPC1768 board I had lying around to act as a USB host for the mini, and bridge it with the ESP01 over UART directly.

It's excruciatingly slow though. Octoprint says a print PrusaSlicer estimated at 11 minutes will take 2.5 hours, and I believe it. It'd be fine if you just wanted to print lots of straight lines!

The network obviously doesn't help, but presumably a large part of that is my dodgy &amp; rusty embedded programming. Octoprint rightly doesn't want to proceed with the next command until the previous one is ack'd though, so I'd have thought there's only so much I could do to improve it. (i.e. I can't just batch up a whole load of commands.)

I've seen there's planned support in the firmware for certain gcode commands that would allow, AIUI, storing to flash ahead of time, so essentially the whole print would get checksummed once at the beginning, and then print from a local file. I assume that's what Prusa will be relying on for the commercial WiFi module.

(As I type, first layer just completed in a speedy 18min. Estimation up to 3.5h now. Might cancel it!)

Posted : 25/06/2021 10:21 pm
Daryl
(@daryl-2)
Trusted Member
RE: Mini's micro USB is not powered? Or is mine broken?

You’re on an ambitious mission!  I just have Pis attached to each printer then wrote software that accesses Octoprint’s API interface to grab info of interest, aggregate and display it on a dashboard...

Posted : 25/06/2021 10:37 pm
Share: