Nicla Sense Me is an ideal choice for wearable projects due to its small size and advanced sensor lineup, making it perfect for monitoring motion and environmental data. To expand the board's capabilities, we've designed a handy shield that adds user input through a push button and output via an LED ring. This shield seamlessly integrates with the module, allowing for effortless interaction and providing visual feedback. It's a practical and functional addition that enhances the overall user experience with Nicla Sense Me.
In this tutorial, we'll explore how this Neopixel shield designed for Nicla Sense Me can simulate a tracker for measuring various metrics from Nicla Sense Me sensors. Whether you want to track your steps toward a fitness goal or monitor any other progress, this Neopixel Ring Light has got you covered. With just a simple press of a button, you can instantly see your progress come to life as a specific number of LEDs light up, representing how far you've come and how close you are to reach your goal.
The shield features 12 Neopixel LEDs, which can be individually controlled to create a wide range of colors and lighting effects. This allows users to create custom trackers that suit their individual preferences, such as flashing or pulsing lights, or color-coded LEDs for different types of measurements.
In addition to the RGB color LEDs, the shield also includes a button. This button can be used to control the LEDs, allowing users to turn them on and off, or to change the color or lighting effect. This provides an easy and intuitive way for users to interact with their wearable.
To use the shield as a notification system, users can customize the LED colors and lighting effects in the Nicla Sense Me device's software. This can be done by using the code and the PCB files provided here. Once the settings are saved and deployed on the board, the shield can be attached to the Nicla Sense Me device.
To begin, let's focus on creating our schematic. For this task, I've opted for KiCad as our software for both schematic and PCB design. However, before we proceed, it's crucial to download the appropriate footprints for the LEDs, button, and diodes.
To make the schematic creation process easier, add all the required components first before establishing the connections. In my design, I incorporated 12 LEDs, one button, two diodes, and three sets of pins with 2, 7, and 9 pins respectively. Initially, I placed the pins in a configuration resembling that of Nicla Sense Me, then proceeded to wire connections for each component. To be able to power the Nicla from both the battery and USB, I used two diodes, one connected to the battery pin and the other to the USB charging pin. These diodes are connected as shown in the following image. It's worth noting that the button functioned exclusively with pin A1 after numerous attempts. Finally, I connected all the LEDs, which can be positioned similarly or arranged according to personal preference. This arrangement provides clear visibility of all connections.
Now that we managed to connect our components, let's continue with the board outline. Referring to the Nicla Sense Me datasheet, the board's dimensions are 22.86 mm x 22.86 mm. While designing the cutout, I took into consideration the presence of a reset button and RGB LED in the upper left corner and gas sensors in the lower left corner of the Nicla board. To ensure convenient access to the button, I incorporated a small square cutout in the upper left corner and I removed the upper pin from the top left corner. Additionally, I made a corresponding cutout in the lower left corner for the gas sensors and opted for a symmetrical cutout on the opposite side to achieve a seamless appearance.
Moving forward, our next step involves the careful placement of components and the tracing of routes for the PCB design. To initiate this process, I began by strategically positioning the pins, ensuring their alignment and compatibility with the remaining elements of the shield, and also with the pins from the Nicla Sense Me. You can print your design to check if the pins on the Shield align properly with those on the Nicla board. This helps ensure that everything is in the correct place and that there are no placement errors.
Considering the desired functionality and aesthetic appeal, I opted for a circular arrangement of the LEDs, simulating a tracker. Additionally, I decided to place the button and two diodes in the center of this circular arrangement, as shown in the picture above. This strategic positioning not only improves the overall aesthetic, but also guarantees that these vital components are seamlessly integrated into the PCB design.
To program the Nicla Sense Me device, I used the NeoPixel library to control the LEDs embedded within the shield. The provided code demonstrates the basic functionality by illuminating a random number of LEDs. Notably, I employed a color scheme consisting of four distinct colors. The first three LEDs emit a vibrant red hue, followed by a seamless transition to orange, yellow, and eventually concluding with a refreshing green glow. This color arrangement facilitates the simulation of a tracker, enabling a more intuitive visual representation of progress.
With this code snippet as a foundation, you can effortlessly adapt it to incorporate the data collected from Nicla Sense Me. This ensures that the shield aligns perfectly with your specific monitoring needs and seamlessly integrates with the functionality of Nicla Sense Me.
Be advised that having all the LEDs turned on all the time might deplete the battery of a wearable quite fast. So itβs important to use that wisely in your use case. Unlike all our pretty pictures from above π. One use case could be feedback from the device that it received a press from the user, or based on the sensors you could show patterns to display the levels or some special trigger conditions. But do turn them off afterward or use them with delays so you can create stylish notifications.
What's Next?Now that you managed to create a custom PCB for Nicla Sense Me, all you have to do is figure out what you can use it for. With the multiple sensors on Nicla Sense Me, you can use it as a versatile tracker. It can be adapted for monitoring air quality, humidity, pressure, and even counting steps using the accelerometer and gyroscope. If you're interested in further development, here is an example that demonstrates how to utilize the sensors from Nicla Sense Me to design a hiking wearable and incorporate Machine Learning.
Comments