Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - Tuomas

1
Project logs / Single pin capacitive touch sensing with an AVR
Hi there.

I've had a project idea on my mind for a while now that would probably need some capacitive touch buttons, but I've never used them before. About a month ago I started looking at some of the possibilities out there. After ruling out external controllers as an option, I noticed that Atmel provides a library for using a normal AVR ADC peripheral to do capacitive touch sensing, with only a single external component. The library is provided as a binary blob, however, and I couldn't find any source code for it. So I decided to try implementing it myself.

As far as I could figure it out, the idea is to take advantage of the sample&hold capacitor inside the ADC block.

I ended up making a dedicated PCB with an ATMega32u4 microcontroller for testing out the capacitive touch sensing (it's amazing having access to a PCB router at the university, transforming a PCB design into a physical board is simply a matter of some clicks of a mouse and waiting 30 minutes. Except for vias, they need to be painstakingly riveted one at a time...):
[attachment=0]

I've got a full writeup of the experimentation on my website, including my understanding of the theory of operation and code (and a video of the board in action, the three buttons controlling the three colors of an RGB LED):
http://tuomasnylund.fi/drupal6/content/ ... le-adc-pin

I'm sure this has been done before many times over, but I had fun trying to figure it out myself and it seems like a pretty elegant and reliable solution in my opinion. I'll probably end up using this in a project in the near future.

Thoughts, comments and corrections are always welcome.
2
Project logs / USB IR Toy Free PCB Build
I actually finished this more than two weeks ago, but a trip abroad got in the way of writing about it.
Today I finally got around to posting about it onto my website.



I did encounter a problem with it, it doesn't seem to work with the only IR device I have in my apartment. I wrote about this on the link given above, but the short story is, I can capture and re-send a signal from the remote, but it doesn't seem to work.

Using another IR demodulator with a scope to compare the signal outputted by the irtoy to the signal from the original remote, the only difference seems to be that the original remote sends a longer "string of zeroes" in the beginning:
http://http://tuomasnylund.fi/drupal6/sites/default/files/u3/irtoy_test_result.JPG

That would seem like the obvious problem, but what is causing it?

On the other hand, that signal on the scope is of course after the demodulator, so the problem could also be something else. For example, I use a 38KHz demodulator on the irtoy / attached to the scope. What if the original remote uses a different frequency? Could that explain my problems?

If you have any ideas, feel free to post.

Also, thanks for the free PCB, kind people of Dangerous Prototypes!

Tuomas Nylund

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01152280992session_write_close ( )...(null):0
20.01182412584ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01192413360Database_MySQL->query( ).../DatabaseHandler.php:119
40.05512552096Database_MySQL->error( ).../Db-mysql.class.php:273