Monday, December 25, 2017

Cypress PSoC BLE - The start of ble ble ble....................

This is to start with a simple, well I guess we will see how simple, design of a BLE (Bluetooth Low Energy) badge.  The idea is to have fun creating a name badge that can be controlled using an Android app.  So I project there will be quite a few gotchas that I will need to look out throughout the design process.  To start I am going to set my high level requirements to understand what we are trying to design.  Also this will help us understand by the end if I was successful in the final design.


High Level Requirements:  Create a name badge that can attached to a chain/lanyard to wear around a persons neck or attach to a shirt using a pin or equivalent.  The badge shall have a user interface which includes a screen for feedback and button(s) for control.  The screen shall be an LCD, LED or similar technology which can be controlled using a microcontroller.  The badge shall have the capability to display text and images with multiple colors.  The badge shall have the ability to communicate to an Android phone through BLE to allow the contents on the display to be updated.  The badge shall be powered by a coin cell battery.


So now that I have the high level requirements defined next step is to decompose these into more defined requirements to define our design in a little more detail and how I will achieve that.  Let's look at what it is going to take to meet each of these requirements.  Let's start with the very first one which is given below.

  • Create a name badge that can attached to a chain/lanyard to wear around a persons neck or attach to a shirt using a pin or equivalent.

Based on this I need to build the badge with some type of housing for the badge.  The housing will need to be designed with some type of pin to attach to a shirt or include a ring which can be connected to a lanyard.  I will start with a simple concept just to start understanding the look of the badge.  Below shows a preliminary design of a heart badge with a loop on top.  The LCD is shown in black in the center and below is a single touch button.  For our purpose this will be created using a 3D printer and PLA (Polylactic Acid) filament.





  • The badge shall have a user interface which includes a screen for feedback and button(s) for control.  
To meet this requirement I have chosen a Cypress PSoC 4 to drive the display and also provide the ability to interface with buttons.  The main reason I chose the Cypress PSoC  (Programmable System-on-Chip) is the flexibility of pin configurations, wide range of operating voltages, simple interface to capacitive touch buttons and a version that has built in BLE.  To help prototype this I will use the Pioneer kit (CY8CKIT-042-BLE-A) available through Cypress.

  

  • The screen shall be an LCD, LED or similar technology which can be controlled using a microcontroller.  The badge shall have the capability to display text and images with multiple colors. 

For the LCD there are a few things that need to be considered.
  1. Voltage
  2. Interface Type
  3. Size
  4. Connection type (ribbon, pins, etc)
To keep the cost low and ease the build I will select something readily available online (for now one that I have at my house).  The voltage selection I need to consider one of the other requirements which is to be powered by a coin cell battery.  For this project I will consider using a voltage of 3V.   The interface type I will use to start is one with a SPI interface (ILI9163 driver).  The size will be a 1.44" display (128 x 128) and the connection type will either be header pins or a FFC/FPC cable.  Many of these types of LCD's can be easily be found on Amazon for less that $10.  The drivers may vary but this can be managed through software.  An image is shown below of the type of display that will be used for this project.


  
  • The badge shall have the ability to communicate to an Android phone through BLE to allow the contents on the display to be updated.  
The microcontroller I selected has built-in BLE which can satisfy the badge side.  On the phone side I will need to develop an Android app which can communicate to the badge and provide a user interface that allows the data on the badge to be updated.  For now I will consider the following to be data that can be updated.
  1. Name (Person's name, it is a badge)
  2. Background Color
  3. Image (Allows person to select image to be displayed)
  4. Date & Time 
To achieve this I will use MIT App Inventor 2 which is a nice simple interface that makes it quick and easy to build Android apps.  Depending on the time and interest this may be moved over to an environment like Android Studio or equivalent.
  • The badge shall be powered by a coin cell battery.
This is important is it will drive the voltage level that will be used for the badge.  The selection for this will be 3V based on a  CR2032 lithium coin cell battery.  This also means that I will need to include some type of coin cell holder as part of the design.

Unfortunately I know this is the boring stuff which does not have a lot of technical content but it gives us the overview of the project and what I plan on designing.  For the next steps I will start digging into the prototyping phase.  I will start with some software development using the PSoC development kit to start lighting up some things.  


No comments:

Post a Comment