Jump to content

My journey into capacitive touch and Raspberry Pi


Recommended Posts

I had built a nice soundboard into my bucket that utilized raspberry pi to hook into the iComm's Line In and momentary buttons around the chin; but the buttons were not accessible when the armor was worn; the design was pretty short sighted. I had experimented and prototyped new options for helmet sound control via 315mhz remotes; but the fidelity was quite bad. Some of the actuations were picked up, some were not; and given anyone else at the event could also be using a similar frequency, interference was a high possibility.

 

So I experimented with capacitive touch - if one is not familiar, basically an electrical current is run through a single conductor or wire and a logic board will detect if the current drops, meaning someone grounded or has a higher capacity for electricity, absorbs the signal. I experimented with the touch option through Anovos ABS thickness as well as the 3mm ATA armor thickness as well as with rubber TK gloves. So far so goood

 

As I'm not super savvy with electronics, I followed adafruit's guide to wiring their components, their touch breakouts were relatively cheap and easily accessible.

Here's the guide - https://learn.adafruit.com/adafruit-capacitive-touch-sensor-breakouts

 

I basically went nose first into the deep end, picking up a breadboard and began learning about voltage and resistance management. The breadboard as well as this circuit design calculator helped me out greatly.

https://www.falstad.com/circuit/circuitjs.html

 

mROoKcn.jpg

 

After concept proofing, I figured a 5 way breakout was better for my usage. I had not read carefully, but the 5 way pulls low rather than high when sending the signal, which was better for raspberry pi as it has a 3.3v max input. Any more than 3.3v in would burn it out. As I supplied a 5v to the breakout, drops in voltage didn't require down stepping, that made wiring a lot cleaner. I took apart my bucket and hid all the wires under velcro.

fzhBVVz.jpg

 

The touch points were created with conductive adhesive copper tape and a single conductor wire. I found that 26gauge headphone wire worked the best; I had limited supply, but favored their low profile and high conductivity.

JWSltV6.jpg

 

There's a total of 1 x 5 way breakout, 2 toggle breakouts (fans) and 2 momentary (one for iComm PTT and extra control button)

 

The solitary breakouts, even though requires 3 wires total (VDD, Ground, Out) were a lot easier to manage as you could localize the breakout and not have to worry about crossing wires or accidental actuation.

vaqY0mg.jpg

 

Two fan controller breakouts were wired directly to the power supply, controlled by a NPN transistor. It's 5v output needed to be down stepped via 10K and 14K ohm resistors for R1 and R2. The final signal is passed into the pi to trigger voice commands and visual queue that the fans were enabled or disabled.

Version 1

3jsi88V.jpg

 

Version 2

Cp36d58.jpg

 

I didn't plan to, but eventually just soldered directly to the pi, the 40pin headers were too tall for profile in the helmet. Also tried experimenting with a usb soundboard rather than the iComm. Haven't figured out the voice changer on pi... maybe one day.

4EIKzKj.jpg

 

I added last minute a visual queue indicator to tell me the status of the touches. It's hard to keep track of the touch combinations and what has actually occurred, so this RGB LED helps a lot

 

https://i.imgur.com/1g2ULHU.gifv

 

This is by no means cable managed, I could've tried harder to conceal the wires, but I'll get to that next time I take this apart. Plugging everything is touch work, and I just want to get to trooping. After messing with the wiring till 6am the day of my first troop, sometimes it's better to keep it simple or just not mess with it.

tL55pDy.jpg

 

On the software side - I'm running a systemd startup service that runs a python script which uses pygame.mixer and a few other libraries to handle the functionality. It's quite spaghetti right now, if anyone's interested, I'll share or upload it to github. Hope this helps someone out.

 

Edit - here's a video of the functions

 

Edited by fishgoh0nk
youtube
Link to comment
Share on other sites

Link to comment
Share on other sites

thought about it - would probably need an i2c pin board for the pi to accomodate additional pins; i'm running out of pins on the 2x20. second thing is - what do we show on the hud? temperature? star wars movie? email? :D

Link to comment
Share on other sites

Are the two lines next to the 14k the batteries?  And the white lines switches?

 

So when you switch the switch you apply current to the base and so the fan turns on? So seems okay ish. Not sure what the two potential dividers are doing for the 2.6v though. Could be that that’s the issue. 

  • Like 1
Link to comment
Share on other sites

19 minutes ago, themaninthesuitcase said:

Are the two lines next to the 14k the batteries?  And the white lines switches?

 

So when you switch the switch you apply current to the base and so the fan turns on? So seems okay ish. Not sure what the two potential dividers are doing for the 2.6v though. Could be that that’s the issue. 

 

I had to divide the 5v because the raspi is a 3.3v device. Do you think the 10k and 14k are too resistive, it was ducking into the micro amps? I did some calculations and I'm currently going to try a board with 1k and 2k respectively; that should give the fans roughly 1.6mA

 

edit - forgot the purpose - they're an out to tell the pi and trigger a audible feedback that the fans are on, just something for fun, not required, but i wanted it to talk to the pi

 

image.thumb.png.bd2235e95d594f73ee5c45f9db75a1e7.png

Edited by fishgoh0nk
Link to comment
Share on other sites

The batteries are also powering the Pi?

So when both fans are off you have no power at all.
 

Current will be what it needs on the fan. If you apply 5v it will draw as much as it takes to spin up.

 

I’m not exactly sure what the aim is here. If you describe what the goal is then maybe we can figure it out. If needed we can start drawing a proper schematic. 
 

Feel free to PM me if you want as well as I am about to heat to bed as it’s now tomorrow here. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...