Currently, one of the most popular topics, that moves a lot of people and as a consequence generates a lot of money, is audiovisuals, social media and especially streaming.
Based on this, I have thought of making a device that already exists today and that is very useful for streamers to whom it facilitates their work and allows them to optimise it to the maximum. This device is the Stream Deck or MacroPad keyboard.
This device is used to perform specific actions with a single button. You can zoom in or zoom out, change cameras, manage the volume or anything else you can think of that you can manage with a macro on the computer...
DESIGNThe design of this device is mainly based on the infineon psoc4, with which it will be easy to design the touch screen for it.
This process is divided into two parts, the hardware design and the firmware.
- HARDWARE DESIGN
For the hardware design the following board is done with several pads that serve as capacitive buttons that will detect any keystroke. A metacrilate layer will go over the board to protect all the PCB.
I have printed some icons to add the buttons a good look.
And this is how the device looks after assembly all parts.
- FIRMWARE DESIGN
The intention for the firmware is only to check if the capacitive buttons are could work well with this desing or not, so the code it's so simple.
The code is waiting a capacitive button touch and then signals it switching on or off the user LED.
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
CapSense_Start();
CapSense_InitializeAllBaselines();
for(;;)
{
/* Do this only when a scan is done */
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
/* Process all widgets */
CapSense_ProcessAllWidgets();
/* Scan result verification */
/* Add any required functionality based on scanning result */
if (CapSense_IsWidgetActive(CapSense_BUTTON0_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON1_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON2_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON3_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON4_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON5_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON6_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON7_WDGT_ID)
|| CapSense_IsWidgetActive(CapSense_BUTTON8_WDGT_ID))
{
LED_Write(0); /* LED on */
}
else
{
LED_Write(1); /* LED off */
}
/* Start next scan */
CapSense_ScanAllWidgets();
}
}
}
Thanks to the easy of use of the PSoC Creator software it's quite easy to add the capacitive buttons and the led to the code.
So after these previous steps I could test the capacitive buttons and I could confirm the correct operation of the board. It was quite easy an fast to do the prototype.
The PSoC 4100S kit makes possible to implement quickly and easily the capacitive detection part to be able to generate any device of this kind.
This project can serve as a base for those who see this as an interesting option and want to continue advancing in order to finally create a manufacturable device.
Logically this project has a lot of work ahead of it, as this prototype do something very basic, so the way is open for the realisation of many other creative ideas based on this.
The next steps are based on making or using a library that allows the USB HID protocol to be established in order to send the events of each key to the computer and thus be able to perform the macros.
Improve the case for the device by adding beautiful lighting and a smooth user experience.
Comments