element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#040 - PioneerPnPSensors
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Cypress Kits requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 16 subscribers
  • Views 501 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#040 - PioneerPnPSensors

kanatomi
kanatomi over 9 years ago

Hello!

 

This project demonstrates the PioneerKit Plug and Play Sensor application for direct connection with SNTerminal running on Desktops and Mobiles giving full access to monitor and control the key status, capsense slider, internal temperature, and LED light parameters: color, brightness and contrast.

The key selects between the last three light control parameters, the color, brightness and contrast, which selected parameter is then controlled by sliding the capsense 5 segments. The state can be observed and modified with the SNTerminal app, which communicates with the board via UART interface and the compact Sensor Network Protocol.

 

Project schematic:

 

 

Firmware description:


Firmware is composed of main.c containing the application, and the sn_cfmsg.c/.h containing the SNP Compact Frame/Message Layers.

 

The ISOTEL SNP - Message Layer specifications provide a compact math enriched content description, making your device a 'web' like box. Message layer defines a two kind of messages:


  1. content description, the static part typically exchanged only once contains elements such as text formatting, data structures, variables, expressions with precision and accuracy calculation, ideal for sensor applications,
  2. dynamic part consisting of arguments exchanged in PSoC4 native format, and are exchanged on value change, either on PSoC4 side or user side. No conversion needs to be done on the PSoC4 side for either input or outpt, preserving maximum precision, accuracy, and releasing the CPU power requirements.

 

Regarding this project, the PSoC4 application needs to implement three functions only:

  • sn_cfmsg_reqdesc: provides an app content description, which are send out only on request,
  • sn_cfmsg_send: provides parameters,
  • sn_cfmsg_recvargs: a handle that receives parameters from user input.

 

 

Hardware connections:


You will need to wire the UART TX and RX pins between the PSoC 4 and the PSoC 5LP on the pioneer kit (See picture below).  There are no other hardware connections.


Test your project:

 

  • You will need to download the SNTerminal software written in JAVA.
  • Program PSoC 4 Pioneer Kit with attached PioneerPnPSensors project.
  • Double Click on the SNTerminal-130624-1.jar software should start the application automatically if JAVA JRE is installed correctly. If serial device driver is properly installed it will be listed on the bottom line of the start page. Click on it, enter the COM settings below and click OK. If everything is okay the DeviceView dialog appears as shown in the picture below.

 

    

 

Please read SNTerminal User’s manual or watch the video for more details.

 

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

 

 

 

Make Your PioneerKit Mobile by using an Android Phone


 

we have finally made the PioneerKit PsoC4 work with your Android (version 3.4+) phone!

 

The onboard PsoC5, which is used as a programmer and UART serial access with the PsoC4 silicion, must be reprogrammed to behave as standard profilic USB<->UART adapter, what is very easy since the PsoC5 features an USB bootloader.

 

Steps:

  1. Unplug the PionnerKit
  2. Keep holding the PioneerKit's reset (SW1) button, plug it back to your USB port, wait at least 1-2 seconds
  3. Run app:  PSoC Creator select > Tools > Bootloader Host
  4. Click on button: Filter, and enter: VID as 0x04B4, PID as 0xF13B
  5. Load the usb2uart.cyacd file, by opening it by pressing the Open toolbar icon
  6. Press program device.

 

That's it.

 

You may use/access the PioneerKit board from your Android device immediately. To use it on Windows use the device drivers below.

 

 

 

DO NOT FORGET TO FIRST DOWNLOAD THE PsoC4 APPLICATION!

 

To be able to download your app to PsoC4 you must restore the PsoC5 firmware. To do that, follow again above steps and use the file KitProg.cyacd file attahed below as well.

 

Note: Since the latest version of the SNTerminal brings paragraphs (\n) besides the line-breaks (represened by \r character now) we have also updated the PsoC4 project. You may not need to update it, but there will be some more spacing between the lines, since \n is now treated as new paragraph.


PS: Please update to the latest Android version


Please also use the latest PSoC4 project attached below, with minor updates in the SNP messages.

 

I hope this example can help you out in your design.

 

Best, Tomi

Attachments:
usb2uart_cdc.inf.zip
KitProg.cyacd.zip
usb2uart.cyacd.zip
PioneerPnPSensors.cyprj.Archive01.zip
  • Reply
  • Cancel
  • Cancel

Top Replies

  • Former Member
    Former Member over 8 years ago +2

    Hello!

    I am new in the topics around pioneer board. First I wanted to try to install on it the Project#040 - PioneerPnPSensors with the nice SNTerminal.

    First I started from the 50 project boundle archive…

  • jesusantoniocar
    jesusantoniocar over 9 years ago +1

    Hello Tomi.

    Thanks for this project. Psoc 4 offer powerful tools to make applications looks like this. i have reading about sensors community and can say that they are doing interesting projects  in this…

  • kanatomi
    kanatomi over 8 years ago +1

    Hi,

     

    We have just released the Android version that offers full access:

    - https://vir.isotel.eu/SNProtocol/wiki/SNTerminal-DownloadTerms

     

    that can access devices over the phone's USB, which is otherwise used…

Parents
  • Former Member
    Former Member over 8 years ago

    Hello!

    I am new in the topics around pioneer board. First I wanted to try to install on it the Project#040 - PioneerPnPSensors with the nice SNTerminal.

    First I started from the 50 project boundle archive, but it seems, it hasnot up-to-date docs, it dont has instructions how can reprogram the USB port to access it as a serial device.

    When I found this online howto, and followed the stepps, it started on my android tablet, and on a Windows XP desktop.

    I am a linux user, and wanted to see it on my ubuntu desktop too.

    From the attached usb2uart_cdc.inf file, it become clear, the communication between the SNTerminal and the pioneer board based on the old CDC_ACM driver. The majority of the linux distributions have such module/driver, usually in the

    /lib/modules/..../kernel/drivers/usb/class dir, in the name cdc-acm.ko

    But the problem is, it dont recognize the usb ID-s of the Pioneer board,s C58xx devices, this are: VID - 0x04B4 and the PID - 0xF13B

    In this case, we have some options solve this problem:

    - we can reprogram the firmware in the USB device, use a "known" ID-s pair by the linux module. You can see the part of this alias list bellow.

    - you can recompile the cdc_acm module, extended with this new ID,s

    - the most simple way to modify one of the "know" pair in the binary file. I choosed this option, used hexedit, to change one of the first alias pairs.

    After this "dirty" mod, when I loaded with modprobe the cdc-acm module, appeared in the /dev dir the /dev/ttyACM0 device, and when I started the SNTerminal, it recognized this new serial device. Need to modify the parameters (at least the speed to 57600 bps) and it start to communicate with the board. Maybe, there is another, more simple solution too?

    Many thanks for this interesting, nice application.

    t.janos

     

     

    Here is a part of the "know" devices, used the cdc_acm module in linux. The fourth is the modified pair.

    -----------------------------------

    alias=usb:v04D8p000Bd*dc*dsc*dp*ic*isc*ip*

    alias=usb:v0694pFF00d*dc*dsc*dp*ic*isc*ip*

    alias=usb:v03EBp0030d*dc*dsc*dp*ic*isc*ip*

    alias=usb:v04B4pf13Bd*dc*dsc*dp*ic02isc02ipFF*    <=====

    alias=usb:v0421p03CDd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0335d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0302d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p01D4d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p04CEd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0154d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p026Cd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0275d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0223d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p01D0d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p02D9d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p010Ed*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0178d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p02E3d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p01F5d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0108d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p00E9d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p003Ad*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0094d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p007Bd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p00A0d*dc*dsc*dp*ic02isc02ipFF*

    • Cancel
    • Up +2 Down
    • Reply
    • Cancel
Reply
  • Former Member
    Former Member over 8 years ago

    Hello!

    I am new in the topics around pioneer board. First I wanted to try to install on it the Project#040 - PioneerPnPSensors with the nice SNTerminal.

    First I started from the 50 project boundle archive, but it seems, it hasnot up-to-date docs, it dont has instructions how can reprogram the USB port to access it as a serial device.

    When I found this online howto, and followed the stepps, it started on my android tablet, and on a Windows XP desktop.

    I am a linux user, and wanted to see it on my ubuntu desktop too.

    From the attached usb2uart_cdc.inf file, it become clear, the communication between the SNTerminal and the pioneer board based on the old CDC_ACM driver. The majority of the linux distributions have such module/driver, usually in the

    /lib/modules/..../kernel/drivers/usb/class dir, in the name cdc-acm.ko

    But the problem is, it dont recognize the usb ID-s of the Pioneer board,s C58xx devices, this are: VID - 0x04B4 and the PID - 0xF13B

    In this case, we have some options solve this problem:

    - we can reprogram the firmware in the USB device, use a "known" ID-s pair by the linux module. You can see the part of this alias list bellow.

    - you can recompile the cdc_acm module, extended with this new ID,s

    - the most simple way to modify one of the "know" pair in the binary file. I choosed this option, used hexedit, to change one of the first alias pairs.

    After this "dirty" mod, when I loaded with modprobe the cdc-acm module, appeared in the /dev dir the /dev/ttyACM0 device, and when I started the SNTerminal, it recognized this new serial device. Need to modify the parameters (at least the speed to 57600 bps) and it start to communicate with the board. Maybe, there is another, more simple solution too?

    Many thanks for this interesting, nice application.

    t.janos

     

     

    Here is a part of the "know" devices, used the cdc_acm module in linux. The fourth is the modified pair.

    -----------------------------------

    alias=usb:v04D8p000Bd*dc*dsc*dp*ic*isc*ip*

    alias=usb:v0694pFF00d*dc*dsc*dp*ic*isc*ip*

    alias=usb:v03EBp0030d*dc*dsc*dp*ic*isc*ip*

    alias=usb:v04B4pf13Bd*dc*dsc*dp*ic02isc02ipFF*    <=====

    alias=usb:v0421p03CDd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0335d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0302d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p01D4d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p04CEd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0154d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p026Cd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0275d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0223d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p01D0d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p02D9d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p010Ed*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0178d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p02E3d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p01F5d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0108d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p00E9d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p003Ad*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p0094d*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p007Bd*dc*dsc*dp*ic02isc02ipFF*

    alias=usb:v0421p00A0d*dc*dsc*dp*ic02isc02ipFF*

    • Cancel
    • Up +2 Down
    • Reply
    • Cancel
Children
  • kanatomi
    kanatomi over 8 years ago in reply to Former Member

    Thank you very much for your effort to make it work also on Linux/Ubuntu.

     

    Best,

    Tomi

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube