You are here

1 slider for 2 separate dimmers | Cypress Semiconductor

1 slider for 2 separate dimmers

Summary: 6 Replies, Latest post by AMraje on 16 Aug 2017 08:37 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_420283366's picture
User
161 posts

Hello All, Greetings.

         I want to configure 2 CapSense Buttons & 1 slider such that, 2 buttons control the ON/OFF of the 2 fans respectively & the 1 single slider enables the speed management for both the fans. If BTN1 is Touched ON & slider is operated the 1st Fan speed changes & if BTN2 is ON & slider is operated the 2nd Fan speed changes.

        The most recent BTN_ON has the control for slider. While doing so I don't want to loose the slider state for the other Fan i.e. it should continue to run to its last state while most recent BTN is changing the slider for its speed change.

        Obviously there are 4 components - CapSense, PWM (for Triac triggering), Clock (for PWM component) & the Digital Pin (for the output).

        Please guide me on how should I proceed on it.

Thanks in advance.

user_242978793's picture
User
1485 posts

Please post your code so we can check it.

user_420283366's picture
User
161 posts

Hello n greetings.

    please find the attached archive for code.

Also tell me, as stated in datasheet (Device - CY8C4245AXI-483)can I configure all 36 GPIO as CapSense at once?

Thanks.

user_1377889's picture
User
10803 posts

Not all GPIO pins in your chip are routable (connected to the DSI) Pins of ports >= 4 can not be used for CapSense.

By the way: Using a 36 pads wide slider will need a skateboard to handle ;-))

 

Bob

user_420283366's picture
User
161 posts

Hello Bob, Greetings.

     I have an radial slider of 12 elements & remaining are switches. Out of those some are used for fan on-off. For those switches I want to use the same slider as a regulator.

     So please guide me on how I can do that with 1 single slider & what could be the max. count of CapSense sensors I can have with CY8C4245AXI-483 device.

Thanks.

AM

user_1377889's picture
User
10803 posts

What makes you think that you need many slider elements? The component interpolates the finger position, so you can easily get a resolution of 250 points with just 8 sensor pads.

To operate your device you will need an indicator which of the two fans will be operated at. Two LEDs will be enough. When a fan is selected the LED will show.  When the slider is not operated for a given time (Timer component) the access to the fan gets cut and the LED goes off.

 

Bob

user_420283366's picture
User
161 posts

Hi Bob,

    Thanks for the guidelines, I will see to that. The actual query was- how many PWM components should I be using to have 2 AC rated dimmers controlled via Triac? How should I use 1 slider to vary the duty cycle of 2 PWMs according to slider position change for both w/o altering the others present state?

Another thing, as given in the datasheet, all GPIOs can be CapSense. I want to use 12 for slider & 16 as switches, will that be fine? Can I set total of 28 sensors on the PSoC 4 device?

Thanks

AM

Log in to post new comments.