LPC5506 Based E-Bike Speed Meter Display Panel Reference Design

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC5506 Based E-Bike Speed Meter Display Panel Reference Design

LPC5506 Based E-Bike Speed Meter Display Panel Reference Design

 

       随着近年来人们对日常出行品质的提高,电动自行车(包括共享类)市场得到了飞速发展,其功能日趋复杂智能。作为电控部分的“三大件”,电驱,主控和仪表也在不断升级迭代,其中电驱发展经历了最早期的直流有刷电机驱动到直流无刷方波驱动再到如今的 FOC 正弦波驱动,主控从以前附属在电驱或者仪表里的边缘化概念到如今独立出来的中心化,仪表则从普通的段式 LED 显示到如今尺寸越来越大功能越来越丰富的彩屏显示,而相对应的负责沟通互联“三大件”的通信总线也从传统的单总线到 TTL UART 到 RS485 再到如今逐渐展露头脚的 CAN 总线。对于电动自行车这种大众型消费市场来说,这些电控部分的升级换代给MCU 带来新的机遇的同时也对其性能,外设资源和价格带来了极大挑战。基于此, 针对三大件之一的仪表市场,NXP 开发了一套基于高性价比 LPC5506 系列 MCU 的 E-Bike 迈速表中低端显示屏方案。

系统框图:

calvinji_0-1663122165356.png

主要特性:

  • 4.5v~85v宽范围电压输入,支持24v36v48v锂电池组电源直接接入;
  • 主控LPC5506支持CAN通信,8080 16bit/8bit LCD接口,且封装为LQFP 10*10mm,利于仪表小型化;
  • 支持3.5320*480 16bit及以下尺寸的TFT LCD显示屏,预留I2C接口的电阻屏触摸控制芯片;
  • 支持开源免费的ZLG AWTK GUILittleVgl GUI框架;
  • 板载光敏传感器,可用于根据环境光自动调节LCD背光亮度;
  • 板载六轴Motion SensorMPU6050),可用于转把方向检测,防盗检测和自行车摔倒检测等;
  • 板载GPSBLE模块,可用于定位,精确授时校准,行车轨迹离线存储或者与手机蓝牙通信;
  • 板载4MB SPI Flash,用于图片和字体资源,GPS坐标轨迹存储和其他重要信息存储;
  • 预留了USB Type-C电源供电端口和调试串口,方便工程师调试。

软件环境:

       当前版本的软件代码工程有三份,一份为基于ZLG AWTK GUI的完整E-Bike迈速表工程,可显示车速仪表盘,里程,档位和电池电压等行车参数,也可以进入简单的功能设置界面浏览当前系统信息,且支持通过指定的CAN帧格式更新当前GUI界面的参数信息。一份为基于NXP GUIGuider图形化工具设计开发的LVGL版本E-Bike迈速表工程,分为3个子界面显示车速和骑行状态等详细信息。第三份为移植到本参考设计上的LVGL官方Demo例程,里面包含了配置好的EZH驱动库和LittleVgl基本的设备输入输出框架,用户可以基于此例程灵活开发定制自己的LVGL based其他GUI应用。

       目前基于ZLG AWTK和LVGL GUIE-Bike迈速表显示屏方案在经过优化之后对主控MCU的资源的占用以及GUI整体刷新性能如下表1,由于两个工程所使用的GUI素材和布局不一样,所以不要对两者的资源占用和性能参数做对比。他们都可以满足大部分客户的应用需求(>15fps)。如果将显示屏的分辨率降低到320*240及以下小尺寸的情况下,整个系统的资源占用会相应的减小,刷新性能也会得到更大的提升。

1

方案资源占用及GUI刷新性能(分辨率320*480 16bit)

Demo Code

Flash

RAM

Refresh Rate

AWTK GUI Version

202KB

61KB

22fps

LVGL GUI Version

206KB

78KB

17fps


写在最后:

       本参考设计的初衷是针对E-Bike中低端仪表显示屏市场提供一个高性价比的选择,同时也可以作为一个对于显示,CAN通信和小封装有类似需求的平台性的参考方案推广,比如电摩,带显示屏的便携式医疗设备和工业IoT设备等,希望此方案能给市场带来更好的用户体验和高性价比的选择。

注:由于代码工程超过25M,不能上传到该Community,如有需要请联系NXP销售或FAE索取。

Labels (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1465213%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ELPC5506%20Based%20E-Bike%20Speed%20Meter%20Display%20Panel%20Reference%20Design%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1465213%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CP%3EAs%20people's%20daily%20travel%20quality%20has%20improved%20in%20recent%20years%2C%20the%20electric%20bicycle%20(including%20sharing)%20market%20has%20developed%20rapidly%2C%20and%20its%20functions%20have%20become%20increasingly%20complex%20and%20intelligent.%20As%20the%20%22three%20major%20components%22%20of%20the%20electronic%20control%20part%2C%20the%20electric%20drive%2C%20main%20control%20and%20instrument%20are%20also%20constantly%20upgraded%20and%20iterated.%20The%20development%20of%20the%20electric%20drive%20has%20gone%20through%20the%20earliest%20DC%20brushed%20motor%20drive%20to%20the%20DC%20brushless%20square%20wave%20drive%20and%20then%20to%20the%20current%20FOC%20sine%20wave%20drive.%20The%20main%20control%20has%20changed%20from%20the%20marginal%20concept%20attached%20to%20the%20electric%20drive%20or%20instrument%20to%20the%20independent%20centralization%20today.%20The%20instrument%20has%20changed%20from%20the%20ordinary%20segment%20LED%20display%20to%20the%20color%20screen%20display%20with%20larger%20and%20more%20functions.%20The%20corresponding%20communication%20bus%20responsible%20for%20the%20communication%20and%20interconnection%20of%20the%20%22three%20major%20components%22%20has%20also%20changed%20from%20the%20traditional%20single%20bus%20to%20TTL%20UART%20to%20RS485%20and%20then%20to%20the%20CAN%20bus%20that%20is%20gradually%20showing%20its%20head%20and%20feet.%20For%20the%20mass%20consumer%20market%20such%20as%20electric%20bicycles%2C%20the%20upgrade%20of%20these%20electronic%20control%20parts%20brings%20new%20opportunities%20to%20MCU%20while%20also%20bringing%20great%20challenges%20to%20its%20performance%2C%20peripheral%20resources%20and%20price.%20Based%20on%20this%2C%20targeting%20the%20instrument%20market%2C%20one%20of%20the%20three%20major%20components%2C%20NXP%20has%20developed%20a%20low-end%20display%20solution%20for%20E-Bike%20speedometers%20based%20on%20the%20cost-effective%20LPC5506%20series%20MCU.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1173129043%22%20id%3D%22toc-hId-2005133144%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3ESystem%20Block%20Diagram%3A%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22calvinji_0-1663122165356.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22calvinji_0-1663122165356.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F193516i0162D5C558BE1D34%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22calvinji_0-1663122165356.png%22%20alt%3D%22calvinji_0-1663122165356.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CH3%20id%3D%22toc-hId--634325420%22%20id%3D%22toc-hId-197678681%22%3EKey%20Features%3A%3C%2FH3%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3E4.5v~85v%3C%2FSPAN%3E%20wide%20range%20voltage%20input%2C%20supports%20direct%20access%20to%20%3CSPAN%3E24v%3C%2FSPAN%3E%20%2C%20%3CSPAN%3E36v%3C%2FSPAN%3E%20and%20%3CSPAN%3E48v%3C%2FSPAN%3E%20lithium%20battery%20pack%20power%20supply%3B%3C%2FLI%3E%0A%3CLI%3EThe%20main%20control%20%3CSPAN%3ELPC5506%3C%2FSPAN%3E%20supports%20%3CSPAN%3ECAN%3C%2FSPAN%3E%20communication%2C%20%3CSPAN%3E8080%2016bit%2F8bit%20LCD%3C%2FSPAN%3E%20interface%2C%20and%20is%20packaged%20in%20%3CSPAN%3ELQFP%2010*10mm%3C%2FSPAN%3E%20%2C%20which%20is%20conducive%20to%20miniaturization%20of%20the%20instrument%3B%3C%2FLI%3E%0A%3CLI%3ESupports%20%3CSPAN%3E3.5-%3C%2FSPAN%3E%20inch%20%3CSPAN%3E320*480%2016-bit%3C%2FSPAN%3E%20and%20below%20%3CSPAN%3ETFT%20LCD%3C%2FSPAN%3E%20displays%2C%20and%20has%20a%20resistive%20touch%20screen%20control%20chip%20with%20an%20%3CSPAN%3EI2C%3C%2FSPAN%3E%20interface.%3C%2FLI%3E%0A%3CLI%3ESupport%20open%20source%20and%20free%20%3CSPAN%3EZLG%20AWTK%20GUI%3C%2FSPAN%3E%20and%20%3CSPAN%3ELittleVgl%20GUI%3C%2FSPAN%3E%20framework%3B%3C%2FLI%3E%0A%3CLI%3EOnboard%20light%20sensor%2C%20which%20can%20be%20used%20to%20automatically%20adjust%20%3CSPAN%3ELCD%3C%2FSPAN%3E%20backlight%20brightness%20according%20to%20ambient%20light%3B%3C%2FLI%3E%0A%3CLI%3EOnboard%20six-axis%20%3CSPAN%3EMotion%20Sensor%3C%2FSPAN%3E%20(%20%3CSPAN%3EMPU6050%3C%2FSPAN%3E%20)%2C%20which%20can%20be%20used%20for%20handlebar%20direction%20detection%2C%20anti-theft%20detection%2C%20bicycle%20fall%20detection%2C%20etc.%3C%2FLI%3E%0A%3CLI%3EOnboard%20%3CSPAN%3EGPS%3C%2FSPAN%3E%20and%20%3CSPAN%3EBLE%3C%2FSPAN%3E%20modules%20can%20be%20used%20for%20positioning%2C%20precise%20timing%20calibration%2C%20offline%20storage%20of%20driving%20trajectories%2C%20or%20Bluetooth%20communication%20with%20mobile%20phones%3B%3C%2FLI%3E%0A%3CLI%3EOnboard%20%3CSPAN%3E4MB%20SPI%20Flash%3C%2FSPAN%3E%20%2C%20used%20for%20image%20and%20font%20resources%2C%20%3CSPAN%3EGPS%3C%2FSPAN%3E%20coordinate%20track%20storage%20and%20other%20important%20information%20storage%3B%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EThe%20USB%20Type-C%3C%2FSPAN%3E%20power%20supply%20port%20and%20debug%20serial%20port%20are%20reserved%20to%20facilitate%20debugging%20by%20engineers.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-1853187413%22%20id%3D%22toc-hId--1609775782%22%3E%3CSTRONG%3ESoftware%20environment%3A%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThere%20are%20three%20copies%20of%20the%20current%20version%20of%20the%20software%20code%20project.%20One%20is%20a%20complete%20%3CSPAN%3EE-Bike%3C%2FSPAN%3E%20speedometer%20project%20based%20on%20%3CSPAN%3EZLG%20AWTK%20GUI%3C%2FSPAN%3E%20%2C%20which%20can%20display%20driving%20parameters%20such%20as%20speedometer%2C%20mileage%2C%20gear%20position%20and%20battery%20voltage.%20You%20can%20also%20enter%20a%20simple%20function%20setting%20interface%20to%20browse%20the%20current%20system%20information%2C%20and%20support%20updating%20the%20parameter%20information%20of%20the%20current%20%3CSPAN%3EGUI%3C%2FSPAN%3E%20interface%20through%20the%20specified%20%3CSPAN%3ECAN%3C%2FSPAN%3E%20frame%20format.%20One%20is%20the%20LVGL%20version%20of%20the%20E-Bike%20speedometer%20project%20designed%20and%20developed%20based%20on%20the%20NXP%20GUIGuider%20graphical%20tool%2C%20which%20is%20divided%20into%203%20sub-interfaces%20to%20display%20detailed%20information%20such%20as%20vehicle%20speed%20and%20riding%20status.%20The%20third%20is%20the%20LVGL%20official%20%3CSPAN%3EDemo%3C%2FSPAN%3E%20routine%20ported%20to%20this%20reference%20design%2C%20which%20contains%20the%20configured%20%3CSPAN%3EEZH%3C%2FSPAN%3E%20driver%20library%20and%20%3CSPAN%3ELittleVgl%3C%2FSPAN%3E%20basic%20device%20input%20and%20output%20framework.%20Users%20can%20flexibly%20develop%20and%20customize%20their%20own%20LVGL%20%3CSPAN%3Ebased%20other%20GUI%3C%2FSPAN%3E%20applications%20based%20on%20this%20routine.%3C%2FP%3E%0A%3CP%3EAt%20present%2C%20%3CSPAN%3Ethe%20E-Bike%3C%2FSPAN%3E%20speedometer%20display%20solution%20based%20on%20%3CSPAN%3EZLG%20AWTK%20and%20LVGL%20GUI%3C%2FSPAN%3E%20has%20been%20optimized.%20The%20resource%20occupation%20of%20the%20main%20control%20%3CSPAN%3EMCU%3C%2FSPAN%3E%20and%20the%20overall%20refresh%20performance%20of%20%3CSPAN%3Ethe%20GUI%3C%2FSPAN%3E%20are%20shown%20in%20Table%20%3CSPAN%3E1.%3C%2FSPAN%3E%20Since%20the%20GUI%20materials%20and%20layouts%20used%20in%20the%20two%20projects%20are%20different%2C%20do%20not%20compare%20the%20resource%20occupation%20and%20performance%20parameters%20of%20the%20two.%20They%20can%20meet%20the%20application%20requirements%20of%20most%20customers%20(%20%3CSPAN%3E%26gt%3B15fps%3C%2FSPAN%3E%20).%20If%20the%20resolution%20of%20the%20display%20is%20reduced%20to%20%3CSPAN%3E320*240%3C%2FSPAN%3E%20or%20smaller%2C%20the%20resource%20occupation%20of%20the%20entire%20system%20will%20be%20reduced%20accordingly%2C%20and%20the%20refresh%20performance%20will%20be%20greatly%20improved.%3C%2FP%3E%0A%3CH6%20id%3D%22toc-hId--1050153831%22%20id%3D%22toc-hId--218149730%22%3E%E8%A1%A8%3CSPAN%3E1%3C%2FSPAN%3E%3C%2FH6%3E%0A%3CTABLE%20style%3D%22height%3A%20160px%3B%20width%3A%20531px%3B%22%20width%3D%22531%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20colspan%3D%224%22%20width%3D%221348px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E%3CSTRONG%3ESolution%20resource%20usage%20and%20GUI%20refresh%20performance%20(resolution%20320*480%2016bit)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22336.24px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3EDemo%20Code%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22336.24px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3EFlash%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22338.25px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3ERAM%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22337.271px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3ERefresh%20Rate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22336.24px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3EAWTK%20GUI%20Version%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22336.24px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E202KB%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22338.25px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E61KB%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22337.271px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E22fps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22336.24px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3ELVGL%20GUI%20Version%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22336.24px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E206KB%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22338.25px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E78KB%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22337.271px%22%20height%3D%2240px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%20style%3D%22text-align%3A%20center%3B%22%20style%3D%22text-align%3A%20center%3B%22%3E17fps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CBR%20%2F%3E%0A%3CH3%20id%3D%22toc-hId--1761721513%22%20id%3D%22toc-hId--929717412%22%3E%3CSTRONG%3EIn%20conclusion%3A%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThe%20original%20intention%20of%20this%20reference%20design%20is%20to%20provide%20a%20cost-effective%20option%20for%20the%20low-end%20instrument%20display%20market%20of%20%3CSPAN%3EE-Bike.%3C%2FSPAN%3E%20It%20can%20also%20be%20promoted%20as%20a%20platform%20reference%20solution%20for%20similar%20requirements%20for%20display%2C%20%3CSPAN%3ECAN%3C%2FSPAN%3E%20communication%20and%20small%20package%2C%20such%20as%20electric%20motorcycles%2C%20portable%20medical%20devices%20with%20display%20screens%20and%20industrial%20%3CSPAN%3EIoT%3C%2FSPAN%3E%20devices.%20It%20is%20hoped%20that%20this%20solution%20can%20bring%20better%20user%20experience%20and%20cost-effective%20options%20to%20the%20market.%3C%2FP%3E%0A%3CP%3ENote%3A%20Since%20the%20code%20project%20exceeds%2025M%2C%20it%20cannot%20be%20uploaded%20to%20the%20Community.%20If%20necessary%2C%20please%20contact%20NXP%20sales%20or%20FAE%20to%20obtain%20it.%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1465213%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ETechnologies%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
100% helpful (1/1)
Version history
Last update:
‎09-13-2022 07:27 PM
Updated by: