-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scout v1.1 hardware revision #11
Comments
If there's a way to make it so that the scout does not reset when connected/disconnected from USB power, that would be awesome. |
Eric and I just had a long talk over hardware issues, and a new proposal is to let the 16u2 be powered off regular VCC instead of VUSB, preventing it from powering down (instead, it will sleep when USB is not connected). This prevents issues with draining power (#4) but also allows fixing #5 and #6 by doing the reset pulse in software instead of hardware. For detecting VUSB, this needs a voltage divider (5V -> 3.3V) connected to a pin on both the 16u2 and the rfr2 (it seems the 16u2 does not have any internal way to tell wether VBUS is applied). |
Has anyone investigated the oscillations on the output of the MCP73832 battery IC charger when battery is disconnected and USB power plugged in? It also makes the yellow charging LED to flash. |
This load-switch was required to solve this issue. The load switch is there to minimize leakage between VBAT and VUSB when no USB power is plugged in. The diode was required because of the strange issue with the blog post above. When you sizzled your load switch, did you just connect the in and out of the load switch to power the scout while USB is plugged in? Looks like it wouldn't power up otherwise b/c the PFET will disconnect upon USB power? |
I did during the initial board design. I believe a 100µF cap minimum is required across VBAT/GND (or the +/- through-holes underneath the battery JST jack) of the battery when running without any battery attached. I think this is in the 73832 datasheet, but decided to leave it off b/c 100µF caps are big, and we weren't going to sell Scouts w/o a battery. A cap should solve it though! |
@blathijs @cisco25 Here is a first pass at the next revision of the board. It covers most (but not all) of the changes listed above. Mind having a quick review to see if it's close? (Still need to add the bias connection for the RF FEM.) |
Few questions:
I noticed that SEROPN (= Serial open signal?) is present on the RFR2 PG5 pin but the signal does not show on any of the 16U2 pin, you might want to make sure it connects.
Now I remember reading about that load-switch issue. On my board I completely removed the switch and actually even replaced the schottky with my "own" 1A schottky diode. I don't remember having any issue to switch between USB and Battery power but I will double check if the PFET issue happens and doesn't allow full battery voltage on the LDO input.
Understood, just making sure that item was known. |
The power connections are made according to the 16u2 datasheet. See "USB Module Powering Options" under "USB Controller". This is the "Typical Self powered application with 3.0V to 3.6 I/O" on page 188. AFAICS the internal regulator needs 4V+ to operate, so instead of using the regulator, we just supply a regulated 3.3V directly. Not sure why UVCC is still connected though, but the datasheet also says the internal regulator should be disabled in software. It does seem that the VCC ->16u2's VCC is missing, or at least not clear from the schematic. I guess renaming the
Good point, I think the pullup should stay, there's no reason to remove it (perhaps you confused it with the rfr2 pullup in your notes, Eric?).
Hm, doesn't the rfr2 offer an 1.5V reference voltage as well? It would be best if could cleanly map 3.3V onto one of the available AREFS.
I suspect it's connected to pin 12, but the label is hidden on the 16u2 side. Some remarks of my own: I just realized a big downside of these voltage dividers: They'll mess up the input voltage when using the pins as digital pins, making these pins effectively analog-only. I think this is a show-stopper - as someone on the forums pointed out, a lead scout would only be left with two digital pins if you cannot use the analog pins for digital I/O as well. Having toggle-able resistor dividers would solve this, but then we'd need to have one extra I/O pin for each analog input (or an SPI-controlled expander / shift register), so I'm not sure how we can make that work... So, perhaps somehow add a 1.8V source or something like that? It seems that the yellow led is supposed to indicate USB power. It is connected to UCAP before, but that doesn't work anymore now. I guess it should just connect to VUSB directly (and have its resistor modified)? Or, looking more closely, it seems it indicates "charging", not "usb connected". Does the charger IC drive its You should probably rename the I think the VUSB_IN resistor divider is connected wrongly? It will put 5V on the IO pin now? |
This is what's missing in this schematic, there is currently no input power source. VCC power should be tied to 16u2 U/Vcc/Vcc/AVcc pins else 16U2 would not get power.
Just throwing that idea out: using a dedicated ADC chip like the ADS7828 (in smaller form factor maybe) that can give you a full range between 0 and 3.3V. That way you free up 8 digital pins... but not sure where you could map those extra pins to. |
Eric and I just had another meeting. Eric just made a few more changes:
I think that was all the clear-cut comments, or are you missing anything @cisco25? Regarding the ADC - adding an extra ADC doesn't really solve the problem, then you still can't use the pins as digital (unless you connect them to both the rfr2 and the ADC perhaps, but still). Putting dividers on half the analog pins could work, but would probably be very much confusing. For now, we thought to just keep the analog pins as-is and leave it to the user to connect the voltage divider if needed... Regarding the load switch, we thought that perhaps the switch stayed open because current flowed through the 16u2 VCC pins, If so, the diode might not be needed. Later, I realized that the most obvious explanation is that, when USB is unplugged, the VBAT FET switches (partly) on before the switch switches off, and then VBAT, through the switch, keeps the FET from completely switching on? If so, we'd need to keep the diode. However I was thinking - why not ditch the load switch entirely and just wire VBUS to the charger and VBAT to the regulator? Then you'd just power through the charger always. It seems this is also how you'd wire things with this sparkfun charger module. Or are there any downsides to this? Current limits? |
For the load switch, apparently another simple solution is to add a diode in each power input to isolate them from each other. I think that, because VUSB is always bigger than VBAT (and the difference is more than diode dropout voltage), we only need the diode on the VBAT side, not VUSB. However, I guess we can't afford to have a diode on the VBAT line, since then we get below the regulator's dropout voltage? This post suggests some "ORing mosfet controllers" to switch between to power sources, but they might be too big or expensive? Finally, I'm thinking that we might be able to completely remove the load switch and diode? If there is VBUS, the FET will switch off and the circuit is powered from VBAT. If there is no VBUS, the FET switches on and power comes from the battery - everyone happy? I think this is also what @cisco25 was saying he is using? |
After reading @cisco25's post again, it seems he removed the switch but not the diode. That makes sense, since without the switch and the diode, VBAT would always turn the MOSFET (partly) off and we'd always have the low voltage condition when USB is not plugged in. Keeping the diode should be enough to prevent this, and we can suffer the voltage drop on VUSB. |
Yep, I think this is correct that we can remove the load switch now. This wouldn't have worked if we were powering the 16U2 via VBUS, because when VBUS was unpowered, the diode reverse current is 100µA, and would have still leaked through the diode into the 16U2, affecting battery life. Now that we're not powering the 16U2 via VBUS, when VBUS is disconnected, there is nothing on that net (unless something's plugged into the VUSB pin), so there should be no more leakage. @cisco25 would you concur? |
Yes I agree, it should work, and I have simulated it to make sure: PowerInput There is no reverse leakage into D1 (obviously, as not connected to anything when USB is pulled out) and the PFET turns on only when VBAT is connected with no USB. The rest of the time VUSB takes over. There is some leakage of VUSB into VBAT for a short period of time when VUSB is plugged-in or removed (time for the PFET to turn off), but I don't think this is a big deal. Note that it is still a better option to keep the PFET as it has a lower Rdson therefore less conduction losses than a diode. |
@erictj Where do you keep the updated schematics? I cannot seem to find them anywhere. |
Thanks @cisco25! I removed the load switch (and thank you for running it through spice!) I just pushed the new schematics up to a I'd like to get this board layout completed very soon, at which point we'll make an order for a few new boards to test. Do you mind having a once-over to look for any other issues? |
It looks good overall but two points that would need a second pass is the front-end module and the uC decoupling. Take a look at the front-end module reference design schematics (page 9) and note the 0.1uF/10pF per each power pin (VCC/VCC1/VCC2):
Note that they also recommend having a small inductor on VCC2, which makes a nice low pass filter out of this pin (this one must be really noisy). Depending on your choice of ferrite bead on the AVCC rail, it could also be used for that purpose, make sure the real impedance gets high in the RF frequency range and place this PI filter as close as possible from VCC2 pin to avoid any noise coming out further than this filter. As for the decoupling of the two uC, I would recommend to switch to 0.1uF capacitor for each pin and make sure those are place as close as possible from the pin. The 1.0uF "bulk" capacitor can be use in complement to reduce the longest current loop, especially if the power pin is located on the other side on the board compared to the power source. |
ah yeah, they do have two caps per pin there.
I think I'll add this one as well. Since we're moving to four layer, we'll have room down there. I want to get this one right.
Ok, will add. The Atmel reference design doc talks about adding 1.0µF per VCC pin, but the 100nF certainly can't hurt. There isn't a lot of room, but I'll add them and see what you think |
Hi @cisco25. Just pushed the changes up to the One, I added the additional caps to the FEM. I did not add the caps or inductor to the antenna trace, since that looks like the pi network they use to tune the RF trace to 50Ω. We already have a pi network on our antenna trace. Two, the FEM's Lastly, I changed the 256RFR2 decoupling caps to 0.1µF, and added a single 1.0µF cap for the 256RFR2. However, this appnote on page 6 and 7 recommends 1.0µF for all *VCC pins on the 256RFR2 (though recommends 0.1µF for transceiver-only chips like the 233.) |
Regarding the ADC inputs:
So, I think with the current design we can effectively double each For rev1.1 we could consider making this connection internal, and (Note that it can only be A1/ADC1 here, because that's the only pin that |
I'm sorry but I just realized that C8 (DVDD) and C19 (AVDD) are bypass caps for the internal regulators outputs (and not input power decoupling caps) so I think they should still be 1.0uF (instead of 0.1uF)... my bad! Other than that it looks good :) Another question: are C29/C30 (on CRX/CTX lines) recommended by the dual-inverter vendor? What's their reason, stabilize the output? Connecting VB_IN to AVDD should work fine as it should not source much. |
On more idea: If the 16u2 stays on always, we could again connect I2C pins together. This could potentially replace the SEROPN and/or VBUS sense line if we'd need an extra pin (though perhaps keeping 1 line as a "something changed, please read status through I2C"-flag from 16u2 to rfr2 is probably useful to prevent needing to poll). Anyway, I thought of this because I was thinking it would be good to have flow control between the 16u2 and the rfr2. If the rfr2 could set a flag when its buffer was full, or even when it goes to sleep, you would prevent dropping bytes. In the sleep case, it's even easy to pull a scout out of a sleep loop as well, which is currently pretty much impossible. |
Hm, 16u2 doesn't have i2c hardware, so that won't work :-( |
Cleaned up a number of spelling error in Backpack documentation
@ChuckM Mind taking a look at this one? |
The text was updated successfully, but these errors were encountered: