i am new in the community and currently working on building a demonstrator for our conductive film. I have some problems which i can't figure out myself. Hope someone can give me some advice.
I plan to separate the conductive film into 10 isolated sliders. When we touch any of the slider, there will be visual indication of touched slider with LCD and LEDs, meanwhile, there will be sound effect too.
I ordered the CY8CKIT-050B Kit, which contains CapSense CSD component with two Bottons and five Linear Sliders.
Normally if we use the sensor buttons or sliders on the kit, we need to add a CapSense_CSD component to the hardware design schematic file (TopDesign.cysch). After that we can configure the sliders or buttons and assign the slider segments to corresponding IO Pins.
In my opinion, there are two approaches:
1) I connect my conductive sliders to the sensor button and sliders on the kit with wires. But the problem is: there are only 2 buttons and 5 sliders, which are not enough for 10 conductive strips.
2) I connect my conductive sliders directly to the GPIOs and use them as external sensor compenents. But will that work? How can i realize it in my Topdesign schematic? Can I also somehoe use CapSense_CSD?
Thanks for your help!
Welcome in the forum!
The Kit-050 has got 2 buttons and one slider with 5 elements. You may add additional sliders with some elements and connect them to some free pins of the PSoC5. Then modify the properties of the CSD component accordingly.
There is an expansion board which can be used with the Kit-050, look here secure.cypress.com/
thanks for your advice!
I thought of using CY3280-SLM as an expansion board. But i consider this as a plan B. I would like to build thie prototype without an expansion board in order to save some area.
You told me i can add additional sliders and then connect them to the free pins. I don't really understand that.
I knew that in the Topdesign file i can configure the component CapSense_CSD and I can add linear sliders or Buttons in the Widgets config.
However, the problem is: how can i assoicate the added sliders with physical sliders. There is indeed only 5 physical sliders on the kit.
Let us agree about the vocabulary first:
Your Kit-050 doed not have 5 sliders, it has got one (1) slider made out of 5 segments.
If you want another (one more) slider you have to make a (small) pcb that has the correct traces for the segments and a wired connection to your Kit.
Have a look into the schematics of your PSoC5 board to see how the connections of the sensor traces is made.
PS Where in Germany are you located? I live near Bremen
Stuttgart is not so far away from Nuremberg (Nürnberg) where you can meet Cypress at the "embedded world" end of February. I always found it very informative and there are usually some engineers like Mark Saunders who are willing to answer any question.
thanks for your information. You are right with the vocabulary.
You said that: If you want another (one more) slider you have to make a (small) pcb that has the correct traces for the segments and a wired connection to your Kit.
I want to connect my own touch elements (which is conductive nanomaterial coated on PET substrate, and structrured into different segments) to the board. Since the Capsense IC is integrated in the main CPU, i think i just need to make a wired connection from my touch segments to the GPIOs. For example, In the attached schematic, the Capsense Buttons and Slider are routed to the P5 to P5.
But somehow i don't believe it can be so easy because of the signal routing and stuff. What do you think?
hopefully you are not dissappointed, but it is that easy. Start with a self-made button before you make a slider, could be easier.
You can find a bunch of docs to read about CapSense here www.cypress.com/capsense/ I recommend for your case the "Design Guidelines"
thanks ! I think i just need to try out! Btw, i don't see any buzzer on the PSoC kit. Is it possible to make any sound effect with the board?
You may use a PWM to generate an output pulse-stream form on a pin, the drive mode is a bit limited and when connecting a coil you should take precautions that no overshoots are generated which could stress the pin above "Absolute Maximum Ratings" as listed in the PSoC5 Family Datasheet. The integrated protection diode can only swallow 100µA.
Your PSoC5 Kit hasn't got a speaker on board. Here is a recent discusion on how to connect a speaker for audio (speach, music) to a PSoC www.cypress.com/. In case of simple "Beeps" the connection should be made with digital outputs.
If you are going to use a voice coil speaker be sure to
use protection diodes to clamp any transients that exceed
Vtrans > Vdd or Vtrans < Vss. Otherwise you potentially will
destroy PSOC. A series R with speaker and protection diodes
on speaker side of R best plan. R ~= 200+ ohms. Vout connected
to speaker to ground. This of course is digital, not voice grade
If using ceramic speaker take a look at attached.
can i also drive the speaker like below (you posted this schematic in another discuss)? The diodes can clamp any transients that exceed Vtrans > Vdd or Vtrans < Vss. But the design below is for 2 speakers, why is that?
The speaker needs to be driven by an op-amp, but what is the difference between using an integrated Opamp and programmable gain amplifier?
Wei, when you follow that thread a bit further you'll see that there is not a big difference. The idea behind was to increase the power for the speaker by driving the audio signal to Vdd and Vss. With only one amplifier you may reference the signal to Vdd/2,
The name for this is "Push-pull amplifier", in German "Gegentakt EndStufe"
The design is for one speaker, the pin nomenclature makes it look like
2 speakers involved.
Driving a speaker differentially doubles the Vdrive at the speaker, hence quadruples
the power. Within the limitations of the OpAmp. The PGA was used to get a G = -1,
which matches follower G with a sign change.
If you want real power like 100 mW or more there are a number of simple speaker
drivers, cheap, from TI, ON, Fairchild and I am sure many others. The principal
problem with the circut posted is OpAmps cannot drive much load, so need for
series R's, which in turn throws away power. Some of the new simple speaker drivers
are class D which is very efficient with power. Approaching 100% vs the Class A at
best 50% or AB at ~ 78%.
If you are just digital tone signaling use a simple transistor with speaker in drain/collector
and protection diode clamps as described earlier. Limit base drive if NPN with a series
R, cal bases on saturating collector with Ib = Ic/10 rule of thumb. Also tie from base to
ground a 10K to insure transistor does not turn on from leakage when output is tristated.
Note one issue with above is if output ever goes on, stays on, or
is driven at very low frequency, the current draw of the speaker quite high,
can fry the transistor. So either insure that will never happen, or connect speaker
to ground, in series place an electrolytic cap, and connect that to jucntion of collector
and a series R in collector to Vdd.
Hello Bob and Dana,
what i want is just to make 8 different kinds of tone effect to indicate the touched element....
In the first schematic, 0.7V is the bulid-in potential for a silicon diode, Vmax is Vdd, Vmin is Vss, the poential between the diode can be limited between Vdd to Vss. Am i right?
I don't have any experience with speaker. Can i just simply order a speaker like PKB24SPCH3601-B0, which is a piezoelectric buzzer with built-in circuit and selfdrive? And i connect the buzzer either single ended amplified like in the first schematic or differentially amplified like in the second schematic
Yes a piezo quite appropriate, but cannot be driven differentially as it is an
oscillator, simply switch power on to it. Keep in mind you still need protection
diodes, look at Murata ap manual I posted earlier.
One note, datasheet does not show device to be polarity sensitive, so migh be possible
to drive differentially, however would have to be at its natural frequency whose tolerance
not speced. So I would just think of it as switch power on and let it do its thing.
Murata used a pair of LV zeners to do that.
To generate different tunes you can stay digital within the PSoC. Use a PWM to generate the tone. "a" is 440Hz, each note of our 12-tone scale differs by the factor of 1,0594630943592952645618252949463 from the next . The number is the 12th root of two.
Using the PWM you can adjust the loudness by choosing the duty-cycle between 0 and 50%. When using two output pins, one of them inverted, you will need to switch the outputs off when muted. There is an output enable signal availlable that sends them into high-z state.
PS: I'm playing the flute
"what i want is just to make 8 different kinds of tone effect to indicate the touched element...."
Timer or PWM and a table of values for the period value of each tone is all you need.
You would change the period of the timer/pwm to change the tone.
Note the buzzer is a feedback piezo, with its own resonant freq. So I would suggest
you use a non buzzer, just a piezo speaker, to do the job. Note that all piezos have a resonant
freq, where its output deviates dramatically. So check that against the speaker you choose
to avoid that freq, assuming you would like all the tones to be roughly equal loudness. If you
use the non buzzer try out the diff drive, experiment with WaveDAC8 amplitude settings.
Also consider using WaveDAC8 component for tone generation as sine generated by it has very low harmonics.
There is an example project in Creator.
Interesting overview -