greeeg 460 Posted February 2, 2016 Author Share Posted February 2, 2016 @@greeeg Nice! I'm curious about your first tests ...had some problems in the past to get a quick first fix with these GPS modules. I think we discussed this problem somewhere here some time ago ... I'm yet to code up the GPS stuff just yet, need to alter my test code to ensure I can actually enter a low power mode and shut off the SD/GPS stuff. But yes, unaided GPS will take 30-60 seconds to get a fix. These units are to be used outside so the reception should always be pretty good. That being said, my tests so far have been to "half" solder up one unit, and test the USB / MSC / SD side of things. I forgot to order the High side mosfet switches, so currently everything is always powered on. Cool! I like that vise. I'll be adding it to my wishlist. I bought it with a smoothie board from the hackaday store. Highly recommend, I use it every time I'm soldering electronics. Quote Link to post Share on other sites
yosh 121 Posted February 2, 2016 Share Posted February 2, 2016 But yes, unaided GPS will take 30-60 seconds to get a fix. These units are to be used outside so the reception should always be pretty good. Found the POST ... using sleep() was the solution there ... @"B@tto" and me had difficulties to get a good first fix ... maybe because of pcb design errors. But that's only a side note ... greeeg 1 Quote Link to post Share on other sites
vinicius.jlantunes 50 Posted February 3, 2016 Share Posted February 3, 2016 The basic idea is that a sent is placed with a guy that forms a path, the GPS logger is taken along also. They then attach the device to a beagle (using some kind of vest, I think). And let them follow the scent. That's a funny thing to do! Awesome project as usual @@greeeg Quote Link to post Share on other sites
greeeg 460 Posted February 5, 2016 Author Share Posted February 5, 2016 Found the POST ... using sleep() was the solution there ... @"B@tto" and me had difficulties to get a good first fix ... maybe because of pcb design errors. But that's only a side note ... I have actually heard about this while researching. I suspect that the GPS units are very susceptible to noise on the power rail. hence why physically separating it helps. my design powers the GPS unit direct from the battery rather than the local LDO. So hopefully any switching noise form the Micro is constrained to the LDO rail and wont leak back. I've worked on the code, updated the state machine that handles everything. It's all working on my bench, I'm yet to test the fix time. Current draw while "sleeping" is 700uA (only LPM3, I think I can knock off the timer I'm running to use LPM4), This figure will result in a battery draining within a month if left idle. Ideally I'd want atleast a year, if not better. (the battery protection circuity will cut the battery out if it gets to 3v. then the user would have to recharge the device.) I'm seeing about 25mA to 40mA (for milliseconds during SD writes) for logging the average sits around 25mA. Taking worst case and a trivial calculation, we can expect upto 16 Hours. Not bad. Finally, I've been using these 8Gb patriot SD cards. My local computer store sells their 8gb for $5 each, and it's the smallest size the stock. The hardware seems to support it, although it might not read over 4Gb( 32 bit address space ) but windows was taking forever to recognize the Mass storage device through the MSP430. Around 8-20 Seconds after the initial device connected sound. (I suspect windows tries to do some 'quick' scan, but the MSP USB interface is pretty slow.) I've since partitioned the 8gb card into a 1gb partition using windows diskpart. This is actually working great. Hopefully 1Gb is large enough.. results in around 2 months of continuous loging. Quote Link to post Share on other sites
greeeg 460 Posted February 7, 2016 Author Share Posted February 7, 2016 Everything seems to run fine! No issues getting an initial fix, although because it's battery powered the MCU is always sleeping, and the code is interrupt driven. Needed one badge wire, for the MSP to detect battery charging status. Still no word from the local sale rep from OKW, He said it would be no problem getting 6 units, I'll get onto him this week. For now I'm still stuck with some 3d printed cases, that I can't use outside of development purposes. All the cutouts seem to align though. still need to add light pipes for the status LEDs You may have noticied my resonator lost it's metal can, that was due to the fact that my 3d printed case had support material I did not remove. It must have been pushing against the side of the can. Still a few areas to work on, Sleep current is still too high, battery voltage is still not being monitored to turn off the device if the battery is too low. I also need to ensure that my battery protection circuity will actually disconnect the battery if it falls below 3v to prevent under discharge. Quote Link to post Share on other sites
greeeg 460 Posted February 7, 2016 Author Share Posted February 7, 2016 Here is some information about how I'm doing my current measurement, and the results I'm currently getting. I'm using my uCurrent with my Agilent U1271A (these currents are all in the mA range currently, so the uCurent isn't strictly necessary.) I am measuring the current between the battery and my device, this will give the best battery life predictions. The device currently has 3 modes of operation: Sleep mode, Lowest power mode. This current should be lower, I think I'm getting some leakage through my high side switches. I'm going to instigate further. 700uA is still good, but will discharge a fully charged battery in 2 months, not good. Logging mode, GPS active, SD active. (I might be able to save a few mA's by powering the SD on and off. but it's negligible. the GPS takes the most power) This is an average reading, the GPS is typically 20mA, and then for SD writes it jumps to 30mA. I will get this hooked upto my scope once I've dealt with the bigger issues. USB MSD mode, SD active, battery charging (note, reverse in sign) Charge rate is set to 100mA currently. I think I will up this to 300mA for a two hour complete charge. Quote Link to post Share on other sites
greeeg 460 Posted February 12, 2016 Author Share Posted February 12, 2016 Sleep current has been reduced down from 700uA to 2.5uA by changing some pins form pullup to pulldown when I disable the high side switches for the SD/GPS units. The 0.7mA was due to leakage current through their internal ESD/anti latchup diodes. 2uA is still high, the datasheet specs a LPM4 of >1uA. I might need to disable some modules or lower the core voltage. Maybe disable SVS? In more exciting news finally received some enclosures. This is basically what my local sales rep had on hand. Fit like a glove. Now I just need to get these into my cnc to do the cutouts. Quote Link to post Share on other sites
greeeg 460 Posted February 16, 2016 Author Share Posted February 16, 2016 Ran the enclosures through my Mill, made a little jig to aid in positioning. There are a few issues left to sort out. PCB is not retained downward in the enclosure, when removing USB the PCB lifts upwards. LEDs leak light between their corresponding holes in the enclosure Button needs a mechanism to reach up through the case. I plan to solve these issues by creating 2 custom parts. Part A: This part will wedge between the PCB and top of the enclosure. Have holes over the LEDs to create light pipes out of the enclosure. A channel around the button to house a switch cap, part B. Part B: Switch cap, poke through the cutout in the enclosure I decided to use my CNC to make molds to form the parts out of polyurethane. Straight from the CNC. You can see the switch part took a few attempts to get the tolerance right. Fitted Button fits perfectly flush with the case to avoid accidental presses. vinicius.jlantunes, phenyl, yosh and 5 others 8 Quote Link to post Share on other sites
LIJsselstein 9 Posted February 16, 2016 Share Posted February 16, 2016 Amazing stuff greeeg, is this hobby or profession, having a 3d printer, cnc etc.? The 30V high side switches I use also leak up to 1 uA so if you have a few of them, for the battery voltage measurement and other chips/systems then this adds up. My battery powered system (9-30V) uses ~3 uA in LPM3 and setting all pins correctly high or low was key to that. Were you able to save significantly more by disabling internal functions? Regarding the uCurrent I wonder: will your device still be able to use (say) 100mA when you set it to the uA range? With a normal DMM the voltage drop over the sense-resistor gets too high when the mcu gets out of LPM3 and switches on auxiliary circuits to do useful things so the MSP resets (or at power up)... Quote Link to post Share on other sites
greeeg 460 Posted February 16, 2016 Author Share Posted February 16, 2016 @@LIJsselstein The equipment is all mine and used as a hobby. I like learning new skills. I bought the CNC after reading Guerrilla guide to CNC machining, mold making, and resin casting I wanted to try it for myself.I'm always impressed with the results, but it does take longer to setup than say a 3d printer. Yes, the leakage could be from anywhere. I tested some boards before fitting the GPS/SD card and they measure the same 2uA. So I think it's all down to the MSP430 and passives now. I've heard some ceramic caps can have leakage into the 10-100nA range. Yes I've found that too, I have a serial line connecting to the GPS high after powering the GPS off. This caused quite a high current drain. (500uA) I'm entering LPM4 when the unit is off, (a pin interrupt wakes the unit). So I'm imagining most of the internal function are automatically disabled when the clock is stopped. My voltage divider for voltage measurement is switchable too, so that should not be contributing. Regards to the uCurrent Well the sense resistors are as follows, mA 10m Ohm uA 10 Ohm nA 10k Ohm So 100mA is quite high, a huge jump from 1-2uA. But you can just apply ohms law to determine the voltage drop. V = I * R V = 0.1 * 10 = 1Volt. This is quite significant. Personally this unit only reaches about 20mA so 0.2V drop isn't a huge burden. Quote Link to post Share on other sites
phenyl 18 Posted February 17, 2016 Share Posted February 17, 2016 @@greeeg thank you for posting the guide! What kind of mill are you using? Sent from my SM-N9005 using Tapatalk Quote Link to post Share on other sites
greeeg 460 Posted February 17, 2016 Author Share Posted February 17, 2016 @@phenyl A small Chinese model. Typically refered to as CNC3020. I've bought a new spindle and control electronics. I occasionally have issues with the lead screws binding up, I think upgrading them is the next step on that side project. If you want a unit that was just going to work out of the box I wouldn't recommend getting this model. phenyl and Fmilburn 2 Quote Link to post Share on other sites
Fred 453 Posted February 17, 2016 Share Posted February 17, 2016 Awesome work as always. I bought it with a smoothie board from the hackaday store. What are you using the Smoothieboard for? The mill or the laser? I've recently switched my laser over to one and started contributing to the software. Nothing much so far - just added TTL laser control for now. I'm hoping to add PPI (pulsed cutting) later to help with making mylar solder stencils. Coding for the NXP LPC1769 isn't as nice as any of TI offerings so far. Believe it or not I miss CCS! greeeg 1 Quote Link to post Share on other sites
Fred 453 Posted February 17, 2016 Share Posted February 17, 2016 If you want a unit that was just going to work out of the box I wouldn't recommend getting this model. True - but they're good value if you know in advance that the electronics are junk. And for most of us on here it's something we'd be comfortable fixing - and probably enjoy it too. Quote Link to post Share on other sites
dubnet 238 Posted February 17, 2016 Share Posted February 17, 2016 @greeeg I have really enjoyed your project as it progressed from concept to reality. Good stuff. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.