Jump to content
greeeg

GPS logger for a local Beagle club

Recommended Posts

@@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.

Share this post


Link to post
Share on other sites

 

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 ... ;)

Share this post


Link to post
Share on other sites

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!  :)  :D 

 

Awesome project as usual @@greeeg

Share this post


Link to post
Share on other sites

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.)

post-274-0-52281200-1454690033_thumb.jpg

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.

Share this post


Link to post
Share on other sites

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.

post-274-0-99227800-1454814811_thumb.jpg

 

Needed one badge wire, for the MSP to detect battery charging status.

post-274-0-44353400-1454814820_thumb.jpg

 

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

post-274-0-86763400-1454814909_thumb.jpg

 

 

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.

post-274-0-70228100-1454814918_thumb.jpg

 

 

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.

 

 

 

 

Share this post


Link to post
Share on other sites

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.

post-274-0-42639100-1454816132_thumb.jpg

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)

post-274-0-61913400-1454816140_thumb.jpg

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.

post-274-0-92037800-1454816144_thumb.jpg

 

 

 

Share this post


Link to post
Share on other sites

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.

post-274-0-96353500-1455235206_thumb.jpg

post-274-0-67010500-1455235211_thumb.jpg

 

Fit like a glove.

 

Now I just need to get these into my cnc to do the cutouts.

Share this post


Link to post
Share on other sites

Ran the enclosures through my Mill, made a little jig to aid in positioning.

post-274-0-64239000-1455625291_thumb.jpg

post-274-0-69573200-1455625297_thumb.jpg

 

There are a few issues left to sort out.

  1. PCB is not retained downward in the enclosure, when removing USB the PCB lifts upwards.
  2. LEDs leak light between their corresponding holes in the enclosure
  3. 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.

post-274-0-28491500-1455626582_thumb.jpg

 

Fitted

post-274-0-44513500-1455626605_thumb.jpg

post-274-0-86517400-1455626610_thumb.jpg

 

Button fits perfectly flush with the case to avoid accidental presses.

post-274-0-51788900-1455626616_thumb.jpg

post-274-0-27112000-1455626622_thumb.jpg

post-274-0-58045700-1455626627_thumb.jpg

 

 

Share this post


Link to post
Share on other sites

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)...

Share this post


Link to post
Share on other sites

@@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.

Share this post


Link to post
Share on other sites

@@phenyl A small Chinese model. Typically refered to as CNC3020.

 

post-274-0-13943200-1455688248_thumb.jpg

 

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×