duallang

Thursday, September 19, 2013

GPS - ANT+ / BT

We´ll use the module PAN1327 which integrates a complete solution for ANT+ y BT

ANT+ / BT Schematics

Wednesday, September 18, 2013

GPS - Sensors

We´ll use the MAX6631 temperature sensor
Datasheet: http://www.mouser.com/ds/2/256/MAX6629-MAX6632-89478.pdf
  • Range -55ºC ->  +125ºC
  • Precision +/- 0.2ºC
  • Sampling time = 8seg
  • Idle current 6uA @ 3.3V
Temperature sensor schematics

The barometer will be MS5611-01BA03
Datasheet: http://www.meas-spec.com/downloads/MS5611-01BA03.pdf
  • Resolution: 10cm
  • Conversion time 1ms
  • Current 1uA
  • Interface SPI or I2C
  • Range 10 to 1200mbar
  • Integrated Termometer (+/- 2ºC)
Barometer schematics

We´ll use the combined accelerometer/magnetometer/gyroscope LSM9DS0
Datasheet: http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00087365.pdf

Accelerometer schematics

Ambient light sensor will be APDS-9004
Datasheet: http://www.mouser.com/ds/2/38/V01-0184EN-107079.pdf

Ambien light sensor schematics




GPS - GNSS Module

We´ll use the swiss made u-blox MAX 7Q GNSS module with the following features:
  • GPS / GLONASS / QZSS
  • UART or I2C interface
  • Real time clock RTC with integrated crystal
  • Timepulse generation
  • 56 channels
  • 2m horizontal precision
  • A-GPS compatible
  • Active/passive antennas supported
  • 3.3V operation
  • Tracking mode current draw @ 1Hz -> 5mA
  • Dimensions 10 x 9.6 x 2.2 mm
  • Weight 0.6g
  • Price 59€ @1pc (€12.63 @100pcs)
http://www.u-blox.com/images/downloads/Product_Docs/MAX-7_DataSheet_(GPS.G7-HW-12012).pdf

We´ll also use a LNA amplifier suitable for GNSS band (MAX2659) and a chip antenna (AF816M157502-T)

LNA datasheet: http://www.mouser.com/ds/2/256/MAX2659-74449.pdf
antenna datasheet: AF 816M157502 Spec

GPS Schematics

Tuesday, September 17, 2013

GPS - Speaker

We´ll use a 12mm diameter, 0,7g weight speaker (254-PS600-RO)
http://www.mouser.com/ds/2/209/KT-400402-194153.pdf

Price: $2.58 @ 1pc ($1.78 @ 100pcs)

As we just need to play some low quality tone alerts, we´ll use the simplest one-transistor amp driven from a MCU GPIO.

Speaker schematics

GPS - Buttons

We´ll use right angle tactile pushbuttons mounted on pcb edge
http://www.alps.com/products/WebObjects/catalog.woa/E/HTML/Tact/SurfaceMount/SKSL/SKSLLAE010.html
http://es.mouser.com/ProductDetail/ALPS/SKSLLAE010/?qs=sGAEpiMZZMsgGjVA3toVBNCaPNgfU%252bJCTYCpZkB%252bZDs%3d

Price: $0.286 @ 1pc ($0.23 @ 100pc)

Buttons Schematics


GPS - LCD Schematics

LCD schematics

Backlight schematics

For the lcd backlight, i´ll be using 4 white 1206 sized leds driven by PWM output from the MCU.
Leds will be mounted directly on the main pcb on the back of the lcd panel. 


Monday, September 16, 2013

GPS - Screen selection

I´ve been looking at some options for the e-paper LCD panel. Probably the best option, considering price, availability and quality is one from Sharp´s Memory LCD lineup (http://www.sharpmemorylcd.com)

Memory LCD de 2.7" (LS027B7DH01)
Price: $37.16 @ 1pc ($26.80 @ 100pcs)
Product Specification: http://www.sharpmemorylcd.com/resources/LS027B7DH01_Spec.pdf
Mouser link: http://es.mouser.com/ProductDetail/Sharp-Microelectronics/LS027B7DH01/?qs=sGAEpiMZZMvEZpvz4iUm3h4lv3%252bqmbbZ




Connector:
FP12
0.5mm pitch
10 pins
Price: $1.13 @ 1pc ( $0.843 @ 100pcs)
We´ll use http://www.mouser.com/ds/2/307/XF2M_1110-32350.pdf


Power requirements:
We´ll need to provide 5VDC to the panel.
We´ll use a single 5V bus VDDA=VDD.
Panel power requirement is 50uW aprox (5V @ 10uA aprox) with static image and 175uW (5V @35uA) refreshing at 1Hz
Worst case scenario would be 350uW refreshing at 1Hz. As we want to refresh at 2Hz we´ll assume  700uW.
In other words, 5V @ 140uA. 
So the panel would require 3.36mAh (at 5V) to operate 24h. Perhaps 10mAh at the battery (3.7V) considering level conversion efficiency.


Controller requirments:
Panel will happily take data bus at  3.3V
It would need SPI + 2 GPIO from the mcu
MCU SPI SDO -> LCD SI
MCU SPI SCK( 1 MHz )  -> LCD SCLK
MCU SPI CS -> LCD SCS
MCU GPIO1 (with weak pulldown) -> LCD DISP 
MCU GPIO2 (with weak pulldown) -> LCD EXTCOMIN
LCD EXTMODE -> VDD

Sunday, September 15, 2013


Making a DIY GPS to replace the Edge 810

The GPS main tasks would be:
  • Show ride ral time info (bike computer) like speed, cadence, temperature, grade, ascet/descent, altitude, HR, power
  • Save all info to internal flash every X seconds
  • Sync with strava, endomondo, ridewithgps, garmin connect etc
Hardware requirements:
  • e-paper LCD (B&W) to have the best under sunlight experience (no touchscreen)
  • Variable intensity backlight
  • 4 buttons (3 on one side + 1 on the other)
  • Speaker
  • GPS + GLONASS + Galileo receiver
  • Precision temperature sensor +/-0.5 Celsius or better
  • Barometer
  • Accelerometer
  • Giroscope
  • Ambient light sensor
  • Fuel gauge for accurate battery measurement
  • 8 channel ANT+ tranceiver
  • BTLE tranceiver
  • Microusb connector
  • 500mA limited usb charging
  • LION battery managemente ic onboard
  • Battery large enough to allow 24h operation
  • ARM MCU
  • Real time clock (RTC) updated via GPS and/or NTP
  • Hardware Watchdog
  • USB 2.0 
  • Internal flash large enough to save 48h of ride data every 1/2 second
  • RAM memory (for TBT nav handling)
  • microSD reader
  • Unique hardware serial number
  • IPX7 water resistance (up to 1m/30minutes immersion)
  • Garmin compatible bike mount
  • Smaller than Garmin Edge 810 (5.2 x 9.3 x 2.5 mm)
  • Lighter than Garmin Edge 810 (98g)

GPS software requirements:
  • ANT+ sensors support
  • BTLE sensors support
  • Transparent realtime translation ANT <-> BTLE (to allow using the mobile phone with ANT sensors)
  • Compressed propietary internal flash saving
  • Dumping data to pc is done as XML files (realtime conversion)
  • Date, hour, temperature, latitude, longitude, altitude, HR, power, cadence, speed, g-forces saved
  • Saving frequency user defined 0.5s -> 1minute
  • "Smart" saving frequency mode where data is saved only if a significant change is detected in one of the sensors
  • Manual backlight with user defined timeout + auto mode based on ambient light
  • Day/night display mode user defined or automatically changed based on ambient light
  • User selection. The unit allows for 3 users, each of one with its own "partition" and web sync accounts
  • Bike selection (up to 10 bikes)
  • Automatic bike selector. If activity is detected in a sensor thats unique to a given bike then bike profile is changed automatically
  • Automatic wheel size calculation from gps data
  • Dynamic switching between gps data and wheel rotation sensor based on best detected conditions
  • Ascent/descent grade calculation done by distance/altitude averaging + gyro data for improved accuracy
  • auto pause, auto start, auto stop, power off automático
  • Watering alert
  • Ranges alerts (speed, cadence,HR,power)
  • Movement detected while not saving alert
  • Low phone batt alert
  • If gps has low batt then everything is disabled but ANT/BT sensors and saving to maximize the recorded data
  • CLI shown upon receiving a call. A button is provided to reject the call and another one to reject the call and send a predefined text message to the caller 
  • TBT navigation without map showing...just arrows n intersections
  • Livetrack . updates every 30 secs
  • Livetrack init/reinit/stop from the gps function
PC software requeriments:
  • Windows/osx/linux versions 
  • Create/Edit/delete gps screens and all the data shown in them
  • Create/edit/delete users and related data (age/weight/size/gender)
  • Edit general gps settings like saving rate, backlight, alerts etc
  • BT phone pairing
  • WEB sync accounts configuration (Strava ridewithgps etc)
  • Create/Edit/delete bike profiles
  • Activity saving in GPX/FIT/TCX formats
  • Automatic sync with web sites
  • GPS data backup/restore
  • WEB site data backup
Mobile app requeriments:
  • IOS and Android
  • livetrack
  • dataplan costs using user provided rates
  • Auto sync activity upon finishing
  • Mobile dataplan sync usage enable/disable flag
  • Activity summary view (distance/time etc) ... no maps no graphs as we have the more comfortable pc to do it

Friday, September 13, 2013

Garmin Woes


I´ve been, during months, an Edge 610, Edge 800 and more recently an Edge 810 user. When using the 810, i´ve lost some confidence in the Garmin brand.
I would like to have a gps that helps me train, that encourages me to get on the bike... Currently what i´ve got is a gps that i dont trust on, that everytime i want to go out and ridem i have to wait some minutes so that it updates the activity list from the web and that in the middle of the track it turns off without warning...

Edge 810 - hardware issues:
  • The screen is unreadable under direct sunlight, and even without direct sun incidence, the data is hard to read at a quick glance. It requires focusing carefully on the gps with the associated risk it carries (even more if you try to read the little warnings that appear on the bottom area with black background)
  • It doen´t support GLONASS 
  • The temperature sensor is inaccurate (+/- 2 Celsius).
  • Even considering the battery is quite good, there is plenty of space inside the case to have a larger capacity battery... A 1600mAh would be 1mm wider and longer, 2g heavier, a few cents of increased cost and 6 more hours of autonomy. I haven´t tried to replace the battery myself with a larger capacity one, even if it would be very easy to do , i´m not sure the included fuel gauge IC would be happy with it (risk is wrong remaining batt display in the software).. I´ll try this soon
  • It doesn´t have a magnetometer, and specially in MTB unknown trails, it would be very nice to have a proper map rotation when unit rotates.
  • I don´t like the rubber seals on the usb connector and microSD slot. I think it would be safer to have those in the same area as the bike mount so that when unit is mounted on the bike, its impossible to get loose and let water/dust in
  • It only accepts ANT+ sensors while BT is not. The included CC2567 IC supports BTLE so that it might be just a software shortcoming
  • It doesn´t have an ambient light sensor. Having it would save some battery by keeping the backlight permanently off during daytime and bringing the backlight on automatically inside tunnels or dense low light forest areas
  • It doesnt have an accelerometer or a gyroscope which without a doubt would be helpful to better calculate the ascent grade and would also allow to log/show some nice info like G forces, accelerations, braking etc
  • No tiene acelerómetro ni giróscopo que sin duda podrían utilizarse para calcular la pendiente de las cuestas de manera más precisa y podrían mostrarse/registrarse datos como fuerzas G, aceleraciones, frenadas 
Edge 810 - software issues (versión 2.7)
  • It doesn´t have a watchdog that would restart the activity automatically after a system crash. GPS should never crash, but as it does why not doing it in a way that minimizes the troubles? Currently, when it crashes, it turns itself off and remains off until the user realizes and manually have to turn it on then wait for it to boot up then restarting the acitvity so that it continues recording as it was before crashing.
  • Livetrack can´t be started/restarted from the gps itlself
  • Turn by turn navigation would crash the gps randomly
  • Turn by turn navigation does not calculate the track correctly and would shortcut to the finish line when using a circular course
  • Turn by turn navigation stops working very often. It would just stop showing the arrows and providing offcourse alerts
  • The virtual partner would often take shortcuts and go to the finish line in seconds instead of following the full track
  • If a course is not loaded for navigation the elevation profile does not work (not even for the past ridden track)
  • Remaining battery percentage does not show the same value in status bar and the data fields (data field is usually 4% lower)
  • Map colors cant be changed
  • If user has more than one bike, the gps should detect a specific to each bike sensor (cadence or power sensor) and switch to the given bike profile (or at least prompt the user) when sensor activity is detected
  • If the bike has a speed/cadence sensor installed, the gps will use the wheel rotation to calculate distance which in some cases is wrong. If the wheel magnet is accidentally moved during a ride, the wheel turn might not be detected at all or detected some times only so the recorded distance would be incorrect. Gps should detect movement from the sats and discard wheel speed info if its clearly wrong
  • scent/descent rate calculation is innacurate. When starting to climb, the grade shows a very low percentage while when starting to descend it shows a pretty high value. In places where there are continuous climbs and descents, info is just garbage... It would be better to show the value only when its known to be correct (after gathering enough distance/ascent data to calculate the grade correctly)
  • I don´t use a power meter but many users in the garmin forums have complainted about the edge 810 dropping power data randomly
  • The gps does not come with a hardware verification routine. I would like to run a stress testing function to verify the cpu, ram and flash works up to spec (perhaps garmin know a lot of units would be RMA if this function is provided)
  • The unit does not verify its sensors. There are some users reporting impossibly high or low altimeter or temperature readings which means the sensors are faulty and the gps does not alarm the user 
  • the unit should show on the screen the caller party when a call comes in. Many times, a call comes in and we just ignore it because the phone is in the back pocket/backpack and it could be important call
Iphone App
  • Livetrack stops working without any warning from time to time. In my particular case, my wife uses the livetrack feature to follow me when i go riding alone. When livetrack stops without warning -> wife realizes it stopped -> wife stresses as it doesnt work again -> wife calls to check everything is alright -> call is ignored because i think is a telemarketer -> wife stresses more and calls again -> i ignore it again -> then call again and i just stop and upon answering it reinforces my idea that a faulty livetrack implementation is worse that not having anything in the first place
  • Livetrack usually needs more than 1/2 hour (luckily) to start. The iphone app gives priority to downloading past activities from the web over the livetrack function. Thats bad enough but it gets worse when the iphone deletes daily every activity so that it will redownload the whole year again every day. In my case, i have around 80 activities in 2013 and it would take around 1/2 hour to download them when im at home using broadband wifi.. over 3G i would just forget about it
  • Upon finishing and saving the activity, the phone is supposed to automatically upload data to the Garmin Connect site but it doesn´t work as advertised.. It usually takes 2-3 days to do it and in some cases, after a week i end up uploading them manually. This feature is useless in its current form
Garmin Connect
  • They added a "Feedback" button on the last update (june '13). This has 2 issues: on one hand when using an ipad the blue feedback button keeps in the middle of the screen when scrolling the page.. its very annoying and on the other hand, feedback data provided by users seems to go nowhere as i´ve made couple of inputs and havent heard from them in long time.. not even a receipt acknowledgement.
  • Creating courses usually throws an error "This course could not be created" and when retrying a dozen times it magically works... It seems their server is overloaded
  • If the gps crashes (and some times without crashing), the FIT activity file gets corrupt and the web wont allow you to upload it. Third party websites allow you to autorepair the FIT file and the Garmin Connect happily takes the file... Why not having Garmin Connect autofixing the file itself instead of making you solve the problem elsewhere?
Given that the only 2 features that make the Edge 810 better than the 800 are: Livetrack and auto uploading activities dont work, its better to save money and keep the old Edge 800.

The worst part is that Garmin seems to not care at all. Livetrack worked a lot better before updating the iphone app to 1.2, there are numerous upset users in forums.garmin.com and still, 2 months after the upgrade there no fix, and there no even a way to rollback the software and keep having a working device. Ive submitted a ticket in the support area, they sent me a receipt ack saying they would get back to me in 48h and more than a month gone by without Garmin doing anything.. not even a "we know the issue and are working to fix it" email.... a shame

UPDATE 11/05/2013: iphone app version 1.2.1 does not fix any of the described bugs. Garmin says this version fixes bugs but i don´t really know which ones as the big ones are still there.

Thursday, September 12, 2013

Garmin Edge 800 vs Edge 810 - Hardware comparison

Curiosity is a bad thing...I just dissasembled my Garmin Edge 800 and Edge 810 to find internal differences.  This might be helpful to somebody else.








Lets go

On the outside they are identical... just different colors:
Garmin Edge 800 vs Garmin Edge 810
On the backside, there are 6 TORX screws. After removing them, the touchscreen sensor panel can be removed (just be careful with the flex cable). This procedure is identical in both units.

Garmin Edge 800/810 touchscreen connector

There are 2 TORX screws holding the lcd panel. 

Garmin Edge 800/810 LCD screen
After removing the LCD screen, the main board can be extracted.. little pressure and the connector releases
Garmin Edge 800/810 dissasembly

Both touchscreen sensors are identical
Garmin Edge 800/810 Touchscreen
both LCD screens are identical
Garmin Edge 800/810 LCD panel
Same batteries. Batteries are hold in place with some soft glue.. below them there the little speaker.
Garmin Edge 800/810 battery
main boards: edge 800 on the left, edge 810 on the right
Garmin Edge 800/810 main pcb
backside of the main boards after removing the RF shield

Same barometer (MS5607-02BA01)


same GPS LNA (Infineon BGM781N11)


same GPS frontend (ST STA5620C)


The 800 has a Samsung MCP memory K5 that combines in side the same IC a MobileDDR RAM running at 166MHz, 256Megabits en 16 wide bus and a NAND Flash of 1Gigabit in an 8 wide bus (K521F57ACA-B060)

El 810 has a similar spec´d RAM+FLASH but its Memocom brand instead of samsung


Both units use an ARM cpu manufactured by ST for Garmin.. By looking at the P/N it seems that the 810 has a different (better?) cpu


Voltage regulation is identical in both units


Both units share the same SD/MMC level converter (WM406L)
Both units use the same fuel gauge ic (Maxim 17040)
I couldnt id the rest of the IC.. if somebody recognizes any of them, please let me know


800 uses NordicSemi nRF24AP2 for ANT+ (8 channels)

810 uses Texas Intruments CC2567 which integrates ANT and BT inside same silicon.Next 2 pics shows 810 ANT/BT:


As we can see, the 800 and 810 are very similar devices. They basically added BT, perhaps a faster cpu (not confirmed) and they deployed a new firmware

I dont recommend upgrading from 800 to 810 at this time... 810 software is still buggy, Livetrack does not work well (probably because IOS/Android apps are buggy) and Turn by Turn navigation will work sometimes for part of a route but most of the times it will crash the unit without any warning.