-
Thanks +allObjects, that's way more illustrative!
Do you know what the device between the GATE/SRC/DRN pads is? I had assumed that would be a regulator for 16V -> 5V (and hadn't yet been confident enough to supply > 3.7V to
BAT_IN
), but clearly it's something else and now I'm just curious :) -
It doesn't I'm afraid (there's no 5v regulator) - the VBAT pin is battery or USB volts, so you need to be careful there. There's actually the circuit diagram of the power supply here: espruino.com/Pico
Given this is the only big thing you thought I got wrong, I had enough confidence to wire up 10V to the
BAT_IN
and check it with more than just USB coming in, you are of course right :)I've had a look at that power diagram a couple of times, but without knowing more about how it worked I couldn't really get much out of it because the pins on it are
VBAT
,5V
andVDO
- given they're not referenced like that anywhere else on that page it's not obvious (to me) that they were pins so I'd originally assumed this was somewhere in the middle of the circuit and hadn't realised I could easily probe any of those points.Given the little business card that comes with the kit, the board itself and the schematics all have different names for these pins - do you think that a section could be added to that page clarifying which pins have changed names over time and what those various names are?
-
Hi All, Thanks for all the answers.
I've had a go at following all of the above and also spent more time following traces, probing points on the board, etc, my understanding is now as follows:
- It's safe to power the Pico via the
BAT_IN
pin (akaBAT
) from any DC 3.5-16V source - The
VBAT
pin (akaVCC
or5V
) will get power from a 5V regulator - The
3.3V
pin (akaVDO
or3.3
) will get power through a 3.3V regulator (which is powered from the 5V regulator) - USB will always run through a schottky diode to prevent
BAT_IN
from giving power to USB if it's > 5V
I think my original question was doubly confusing as I'd confused
VBAT
andBAT_IN
(partly due to all the different names for the same pins in different places).Another question comes up though if I need a few 3.3V devices - the regulators according to the power section appear to be MCP1703T-3302E-CB which is rated up to 250mA - is this the correct limit for the version on the board and are there any other limits that will cause a problem first?
Would it make sense to put as many devices on the 5V regulator (
VBAT
pin) as reasonable to increase efficiency / raise maximum Watts if I'm coming at all close to that limit?I don't think I will come close to the limit for anything I'm currently trying to solve (but I will actually test mA on each device individually now), but I'd just like to know what the best approach would be (short of introducing another regulator / external voltage follower / etc).
Cheers,
Dave - It's safe to power the Pico via the
-
Hi,
This may be kinda dumb, but I'd rather ask a dumb question before I break my Pico :)
On the Pico page (http://www.espruino.com/Pico) it talks about the voltage regulator accepting between 3.5-16v and the board being happy to run on a 3.7v Lithium cell - can I use the VBAT pin for either or if I wanted to supply a higher voltage should I be supplying it via some other pin?
So far I've been running a regulated buck converter set on 5V through a USB plug I've wired up "just in case", but I'm wondering if I can just chuck a less well regulated supply straight at VBAT?
Cheers,
Dave -
What happens if you disconnect your voltage divider and connect the 3.3v pin in Espruino directly to A5? That should ensure that you have over 2.9v on A5, while not running the risk that you're over-volting it?
This works fine :/ and now that you ask, I remember this was actually the first test I ran (i.e a wire straight from 3.3 -> A5, as a quick way to see what
analogRead(...)
gave).Depending what you're connecting to, it's possible that you're actually measuring something with an AC component? If so the volt meter may well read less than the actual peak voltage.
I think you're probably right and you've given me a couple of good things to try out.
I'm trying to switch a couple of devices based on the voltage in a 24V (nominally 24, in the real world 22-32V) offgrid solar system - to try to do that I'm currently testing with a cheapie Lab PSU in that range (I'm pretty sure the DC signal on this is ok) and supplying power to the Pico through a regulated buck converter circuit (this looks identical to the one using http://www.ebay.com.au/itm/181409861491) set to 5V and supplying the 5V via the USB plug. When I actually tested I was very slowly ramping up volts on the PSU (started at about 7V).
All GNDs are common.
I suspect if there's an AC signal getting in it might be the switching noise from the buck converter regulator.
I'll see if I can get some time with an Oscilloscope to see if I can find any fluctuations that shouldn't be there.
Cheers,
Daveedit: many many typos.
-
Thanks for confirming it should be right to go to at least 3.3V +Gordon.
The troubleshooting page is where I figured out how to reflash and boot to an empty program from.
I'm going to stick with a much bigger voltage divider gap (and less accuracy in the range I care about for now).
I'm also getting a more accurate multimeter on the off chance that's the issue :)
-
-
The backlight stuff was just tinkering about trying to make it "feel" right - i.e you hit the button and it comes on, stays on for a while after but if you hit it a few times it stays on until a while after the last press (hence
var
ing the timeout).The
(function(){...})();
is just a closure, common in the web world (the background I come from, I'm new to electronics).This wasn't by any means final code I was just worried I'd broken the board by putting 2.9V in to A5 - FWIW after getting the code to run on the board again, it still freaks out (crashes and I have to reload an empty environment) when I put 2.9V to A5 from the Lab PSU, so there's definitely something bad going on.
For now I've added another 10K resistor on the
divr1
side (makingdivr1
ESR of 20K)... it seems to function fine with this, so there's definitely something about ~2.9V on that pin that's breaking things. -
Hey +allObjects thanks for the reply.
I had
save()
in there like that so I could just plug the board in to the laptop, upload the latest change and disconnect immediately (i.e not having to manually typesave()
before switching over to in situ mode).Dropping the
save()
and typing that manually does seem to have brought everything back to working (i.e I can reupload that code and board detects the right voltage with the divider in place again).So that at least means I haven't totally nuked the board, thanks :)
I'm still a little concerned about why it worked previously with a
save()
during the upload and why it still works with the other two boards I have - it suggests something funky has gone awry at the hardware layer.P.s Your example code seems to have gone missing.
-
I have just been playing with my picos for a couple of days, but the main one I've been using is now returning:
Erasing Flash...... Programming 48640 BytesY............................................... Checking... Done! Uncaught Error: Function "ho" not found! at line 1 col 1 ho(1); ^
when I try to upload code that uploads just fine to another pico. It fails when none of the pins on the pico are connected to anything else too.
Once this happens the board becomes unresponsive in the IDE and I have to reboot it hitting the button after the first LED flash to skip loading saved code.
I've tried reflashing it to see if that helps and the same thing happens when I reupload code.
I seem to be able to upload some simple code but for the longer code I'm running (attached) I get the
"ho" not found!
error repeatedly.The code was basically just to take a voltage divider reading and display it on a PCD8544 display.
At the time it first failed I had the voltage divider configured like so:
Lab PSU + <---> 10K resistor <-- A5 pin --> 1K resistor <---> GND (common GND to Lab PSU and Pico)
I had a multimeter on A5 and GND to make sure A5 never saw too high a voltage and only took the PSU up to 3V at the A5 pin, but at just under the 3V (IIUC I can take the pin to VCC or 3.3V?) point the display corrupted. I turned off the PSU and switched back to powering off the laptop and found the pico was mostly non-responsive at this point.
... so now for the actual questions:
Is there anything else I can try to recover the board?
What might I have missed that's caused the problem in the first place?
Awesome, thanks again +Gordon (especially for taking the time to humour me about figuring out what the PFET was) :)