Friday, March 29, 2024

MCUs in Electronics Toy applications

- Advertisement -

3. Three-axis accelerometer (Kionix, KXSC7-2050)

4. Five-segment CapSense Slider

5. Bank of eight LEDs

- Advertisement -

6. Thermistor (Murata, NCP21XV103J03RA)

7. 12-Pin Wireless expansion connector

8. 28-Pin External I/O connector (22 GPIO, 2 VDD, 2 GND, 2 SIO)

9. USB programming and debugging interface (Cypress CY7C68013A-56LFXC)

10. USB connector

11. 9-V DC battery holder

12. Jumper J1 Vddio power source select

13. Jumper J4 voltage regulator source select

14. Voltage regulator (Zetex Inc, ZLDO330)

15. General-purpose push button switch

“PSoC ROCKs” raster image using PSoC board.
The board has a three-axis accelerometer. The accelerometer detects the instant acceleration of the board when in motion. The instantaneous voltage at each axis of the accelerometer is directly proportional to the acceleration along that axis. In the firmware Y axis voltage output of the accelerometer is routed to an ADC in the PSoC. This digital value is now a measure of acceleration detected by the accelerometer. If the acceleration exceeds a maximum value, it signals the start of a new wave event.

Figure 5 “PSoCRocks” application Flow chart
Figure 5 “PSoCRocks” application Flow chart

The firmware delays for a fixed period of time to start the first character in the proper position of the wave. The “PSoC ROCKs string is converted into a rasterized display data array before the start of the wave. Each column of the rasterized data array is sequentially output after a fixed delay. The delay periods may be adjusted in firmware. For a particular character in the message, a look up table determines which LEDs to turn on. When the board is waved back and forth rapidly, due to persistence of vision, the user defined image appears to float in the air. Multiple strings may be configured with each string being displayed for an adjustable number of wave cycles.

The “PSoCRocks” application displays a rasterized image of the user defined message (“PSoCRocks!”) using persistence of vision. Waving the circuit board back and forth quickly in the plane of the board generates the message.

Figure 6 “PSoCRocks” application Image
Figure 6 “PSoCRocks” application Image
Figure 7 Bubble levels application flow chart
Figure 7 Bubble levels application flow chart

Bubble levels application using PSoC board
A bubble level displays the amount the level deviates from horizontal using a bubble of air in a glass via level. In Firmware project, a level is emulated by the accelerometer on the board. In bubble level detection, LEDs display the tilt of the board along its length (corresponding to the X axis of the accelerometer). The accelerometer is always under the influence of gravity. When the board is placed flat on the ground, the static acceleration due to gravity along the X axis of the accelerometer is zero. In this position, the two LEDs in the center of the LED display are turned on. Because the board is tilted in one direction, the force of gravity along that axis increases. This increases the static acceleration detected by the accelerometer. The X axis voltage output of the accelerometer is fed into an ADC in the PSoC. The ADC converts this voltage into digital count, which is the measure of the static acceleration detected by the accelerometer. PSoC determines the tilt of the board and lights up LEDs indicating the tilt. If the board is further tilted in one direction, the LED moves accordingly to the extreme of the LED display.

CapSense inputs using PSoC board.
Capacitive sensing determines the presence of a conductive element, such as the finger, on a capacitive sensor incorporated on the PCB. The kit consists of a bank of CapSense sensors in the form of a slider. The size of the sensors and their position is designed such that when a finger is placed on any part of the slider, at least three sensors are active (it detects the presence of the finger by a change in its capacitance value).

Figure 8 Bubble levels application Image
Figure 8 Bubble levels application Image

The CapSense component provides APIs, which report the centroid (relative position) of the finger on the slider based on the active sensors. The firmware then lights up the LED corresponding to this centroid position.

Figure 9 CapSense Flow Chart
Figure 9 CapSense Flow Chart
Figure 10 CapSense Image
Figure 10 CapSense Image

Conclusion:
Electronics toys are using microcontroller in current designs. PSoC is a combination of microcontroller and ASIC. PSoC provides an ease-of-use environment in Electronics toys applications. Using PSoC in these applications helps to reduce the product cost (by reducing BOM cost and design cycle time) and project cost (with PSoC Creator and PSoC Designer implementation).

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators