LowPowerLab Forum

Hardware support => Moteino => Topic started by: tleavitt on August 01, 2018, 10:53:17 PM

Title: Moteino resetting
Post by: tleavitt on August 01, 2018, 10:53:17 PM
Hi all,
   So I just got my first couple Moteinos the other day after playing around with some RFM69HCWs on my Arduino Unos and Ive hit a weird issue.
Im running a 20mA LED in addition to the RFM69HCW, which transmits at full power. Running on the FTDI header or a 9V battery gives me no trouble, but my intentions are to run them with a 12V tractor battery because they will be outside transmitting frequently and also running the LED. When I connected my Moteino to my regulated 1A 12V wall wart, the moteino will run for about a minute and then will get caught in a reset loop that I can only break by unplugging it and plugging it back in. I have a good multimeter and checking VIN shows it stays stable at about 12.08V regardless, but the 3V3 line drops to about 3.1V when the reset occurs.
What confuses me is that this doesnt occur with a 5V or 9V supply and I would think it would be the other way around. Any ideas on whats going on and how to fix it?
Title: Re: Moteino resetting
Post by: LukaQ on August 01, 2018, 11:58:27 PM
have you checked that you get nice DC from that wall wart? maybe it is only rectified? The only way I know you won't have 3.3v is if your input is not always above 3.6v+ or so. In any other case, regulator is rock solid
Title: Re: Moteino resetting
Post by: TomWS on August 02, 2018, 12:54:37 AM
The difference may be thermal overload.  That's a lot of power (over 1 watt) wasted in the voltage regulator and the VR is probably overheating and shutting down, causing the reset loop.

You would know if you placed your finger on the VR, but I don't recommend that as you could get a nasty burn!  Try putting the tip of a wax crayon on it and see if it melts.

I would suggest adding an inexpensive switching regulator to drop your 9-12 source down to 5V and feed that into Vin.   This will cut the power wasted by the VR by a factor of 5.

Tom
Title: Re: Moteino resetting
Post by: Felix on August 02, 2018, 11:47:37 AM
tleavitt,
Good suggestions so far,
Does this happen with all your Moteinos, or just one of them?

I would not recommend wiring VIN to a tractor 12V battery - while used in the vehicle - since you can expect wild transients as the engine cranks and starts up, not only high positive spikes but negative as well which could really hurt small DC electronics. You'd want a nice clean supply, I know there are automotive power supply transient protection solutions, something to consider if that's what you intended to do, or maybe in some vehicles that is integrated somewhere.
Otherwise 12V from a car battery is as good as from any source.

I would also recommend the RFM69_ATC as a good practice, to dial down TX power when full TX power is not required.
Title: Re: Moteino resetting
Post by: Kilo95 on August 02, 2018, 12:25:01 PM
tleavitt, speaking of using a tractor battery...I am doing the same thing with my SonarMote on my sump pump. I have a 12vdc to 5vdc step down regulator on ebay for I think it was $5-10 or less. It's hooked to my sump pump battery backup. that works like a charm. I'm sure Amazon sells them too if Felix doesn't have any in his store
Title: Re: Moteino resetting
Post by: sparky on August 02, 2018, 12:29:12 PM
Possibly something like this?

https://www.amazon.ca/gp/product/B00QTJWRFW/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

Title: Re: Moteino resetting
Post by: Felix on August 02, 2018, 02:18:14 PM
I actually stock some tiny buck regulators that are made by a reputable brand and have a datasheet :)

https://lowpowerlab.com/shop/product/133
Title: Re: Moteino resetting
Post by: Kilo95 on August 02, 2018, 02:51:50 PM
i hate I missed those the last time. I'll definitely keep you in mind next time i need one
Title: Re: Moteino resetting
Post by: TomWS on August 02, 2018, 03:22:35 PM
Quote from: Felix on August 02, 2018, 02:18:14 PM
I actually stock some tiny buck regulators that are made by a reputable brand and have a datasheet :)

https://lowpowerlab.com/shop/product/133
These are good because they're fixed outputs.  I don't trust the adjustable ones except in a lab environment - adjustable resistors tend to open up on their wipers.  Nice product, Felix, decent price too.
Title: Re: Moteino resetting
Post by: tleavitt on August 02, 2018, 06:35:58 PM
Some good ideas so far. Id like to avoid having to add another regulator if possible. And just to clarify, the tractor battery is not in a vehicle. The circuit is a battery and solar panel connected to the moteino
Title: Re: Moteino resetting
Post by: TomWS on August 02, 2018, 06:52:49 PM
Quote from: tleavitt on August 02, 2018, 06:35:58 PM
Some good ideas so far. Id like to avoid having to add another regulator if possible. And just to clarify, the tractor battery is not in a vehicle. The circuit is a battery and solar panel connected to the moteino
Well, to back up the general statements I made earlier, here are the facts:
Moteino uses an MCP1703 low dropout linear regulator to regulate Vin to 3.3V used by the rest of the circuitry on Moteino  board and 3.3V pin output.
The MCP1703 used is in a SOT23 package which has a thermal resistance of 336degree C/W rating.
The MCP1703 is usable to 125C internal.
With a 12V supply, there is 8.7V across the Vin to 3.3V output of the VR.
Calculating backwards:  Max Power (W) = (125-25)/336.  Assuming a 25C ambient temp.
This calculates to: 0.297W max.
Factoring for 8.7V, this means that you can draw no more than 34mA from your VR - the 328P alone COULD do this, but generally doesn't.  The RFM69HCW almost always does do this but for a very short burst, but add a 20mA LED and you've now set your max current for everything else to 14mA. 

Title: Re: Moteino resetting
Post by: tleavitt on August 02, 2018, 07:14:27 PM
Quote from: TomWS on August 02, 2018, 06:52:49 PM
Well, to back up the general statements I made earlier, here are the facts:
Moteino uses an MCP1703 low dropout linear regulator to regulate Vin to 3.3V used by the rest of the circuitry on Moteino  board and 3.3V pin output.
The MCP1703 used is in a SOT23 package which has a thermal resistance of 336degree C/W rating.
The MCP1703 is usable to 125C internal.
With a 12V supply, there is 8.7V across the Vin to 3.3V output of the VR.
Calculating backwards:  Max Power (W) = (125-25)/336.  Assuming a 25C ambient temp.
This calculates to: 0.297W max.
Factoring for 8.7V, this means that you can draw no more than 34mA from your VR - the 328P alone COULD do this, but generally doesn't.  The RFM69HCW almost always does do this but for a very short burst, but add a 20mA LED and you've now set your max current for everything else to 14mA.

Ok, this makes sense. So if I used a beefier regulator to drop the input voltage to 5V, I could get 158mA out of the VR even in our 90F weather here in Georgia and it would go up to 220mA in the winter time. So the best course of action would be a low quiescent 5V regulator. Ideally one that wont up the current consumption so I can maintain the energy efficiency of the moteino. Either that or can the tractor batteries and switch to a 6V lantern or a LiPo battery, but that would mean giving up my 12V solar panels as well.
Title: Re: Moteino resetting
Post by: TomWS on August 02, 2018, 07:29:52 PM
Quote from: tleavitt on August 02, 2018, 07:14:27 PM
Ok, this makes sense. So if I used a beefier regulator to drop the input voltage to 5V, I could get 158mA out of the VR even in our 90F weather here in Georgia and it would go up to 220mA in the winter time. So the best course of action would be a low quiescent 5V regulator. Ideally one that wont up the current consumption so I can maintain the energy efficiency of the moteino. Either that or can the tractor batteries and switch to a 6V lantern or a LiPo battery, but that would mean giving up my 12V solar panels as well.
What you want, in general, for any voltage conversion up or down is a very efficient switching regulator.  The reason for this is that the power is maintained throughout the conversion process,  3.3V at 220mA translates to 60mA at 12V  (in an ideal world) with very little power lost in the conversion (power=heat - not good in the old Peach State or Hotlanta)

I'm not sure what converter Felix has in his 5V device, but it HAS to be better than driving 12V directly into a linear VR.  You can shop around and find some good converters - this is getting easier and easier every year.  Conversion from Solar is interesting because of the wide range boost/buck converters that a becoming more and more prevalent. 

Net:  A 12V lead acid battery, if you have room for it, is a great, forgiving (albeit finite life) storage device.  If you've got the solar panel to charge it, I say go for it and then drop it down to something close to your target voltage.

Tom
Title: Re: Moteino resetting
Post by: tleavitt on August 02, 2018, 09:22:28 PM
Reading through the MCP1703 datasheet, it seems like it wouldve been better to use the SOT-223 packaging instead of the SOT-23A since its thermal resistance is only 6c C/W compared to the 23A's 336 C/W. The 223 would be able to put out 167mA dropping 12V to 3.3 in 35C weather, which would be able to do what I want. Downside would be the 223's 7mm x 7mm footprint vs the 23A's 3mm x 3mm.
But since that would require Felix to redesign and retool, would getting a MCP1703 SOT-223 and wiring it to the GND, VIN, and 3V3 pins work without frying anything? Or would it be better to get a 5V MCP1703 and connect them in series?
Title: Re: Moteino resetting
Post by: TomWS on August 02, 2018, 10:15:38 PM
Quote from: tleavitt on August 02, 2018, 09:22:28 PM
Reading through the MCP1703 datasheet, it seems like it wouldve been better to use the SOT-223 packaging instead of the SOT-23A since its thermal resistance is only 6c C/W compared to the 23A's 336 C/W. The 223 would be able to put out 167mA dropping 12V to 3.3 in 35C weather, which would be able to do what I want. Downside would be the 223's 7mm x 7mm footprint vs the 23A's 3mm x 3mm.
But since that would require Felix to redesign and retool, would getting a MCP1703 SOT-223 and wiring it to the GND, VIN, and 3V3 pins work without frying anything? Or would it be better to get a 5V MCP1703 and connect them in series?
The reason the SOT223 package is better thermally is that it has a thick copper tab that gets connected to an even larger copper plane on the PCB.  The Moteino doesn't have this copper plane for the VR connection.

If you look at high powered devices such as ESP8266 modules, you will see a large SOT223 VR in that package, but those are energy hogs.  The Moteino board was designed to operate in energy efficient projects and normally doesn't required that extra bulk or wasted power.

A linear regulator in that environment would operate at about 20% efficiency.  It might be cooler than a different solution, but it certainly wouldn't be efficient.  Think of as covering 80% of your solar panel with electrical tape.

Title: Re: Moteino resetting
Post by: tleavitt on August 02, 2018, 11:22:55 PM
Quote from: TomWS on August 02, 2018, 10:15:38 PM
The reason the SOT223 package is better thermally is that it has a thick copper tab that gets connected to an even larger copper plane on the PCB.  The Moteino doesn't have this copper plane for the VR connection.

If you look at high powered devices such as ESP8266 modules, you will see a large SOT223 VR in that package, but those are energy hogs.  The Moteino board was designed to operate in energy efficient projects and normally doesn't required that extra bulk or wasted power.

A linear regulator in that environment would operate at about 20% efficiency.  It might be cooler than a different solution, but it certainly wouldn't be efficient.  Think of as covering 80% of your solar panel with electrical tape.

I dont mean put the SOT-223 MCP1703 on the moteino itself. I have a PCB board beneath it that the moteino plugs into, and that board gives me room to mount resistors, diodes, and some screw terminals. I would attach the larger 1703 to that board and if necessary, there are heatsinks out there that can fit over the SOT-223 package.
I dont see why the SOT-223 MCP1703 would be any less efficient than the SOT-23A MCP1703 mounted on the moteino itself. Its the same chip just packaged differently. And after mulling it over, what I would do is get a 5V MCP1703 to handle 12V input and that would feed the VIN pin on the moteino. That way the moteino's regulator can operate efficiently while the larger 5V regulator on the baseboard handles dropping the bulk of the voltage and dissipating the heat generated from that. And by my calculations, the 5V regulator should be able to handle 207mA and the 3.3V should be able to handle 157mA in our 90* weather here.