Shop OBEX P1 Docs P2 Docs Learn Events
Idea: LEDs of Demoboard as capacitive switch inputs? — Parallax Forums

Idea: LEDs of Demoboard as capacitive switch inputs?

Christof Eb.Christof Eb. Posts: 1,201
edited 2013-07-30 03:32 in Propeller 1
Hi,
this is just a -perhaps silly- idea:
some time ago I have read about capacitive proximity Switches:
An Output is connected to an Input via a resistor. The Output is driven by a square wave signal.
The time between Change of Levels at the Output and the Input is measured. It will be longer, if there is an additional capacity -Hand or finger.

Could a similar Setup be possible with the existing Hardware of the demoboard? I am thinking about the leds and the resistors connected to them and the vga output.
Perhaps there is a timer mode to measure the very short time?

Christof

Comments

  • localrogerlocalroger Posts: 3,451
    edited 2013-07-25 15:33
    It's unlikely to work. Capacitive inputs work because they are very high impedance. It would depend on the LED voltage drop being large enough not to draw any current at a voltage the Prop sees as logic 1, and whether the LED's have any leakage below that voltage -- it wouldn't take much to make capacitive switching unworkable.
  • Clock LoopClock Loop Posts: 2,069
    edited 2013-07-25 19:09
    Forrest mimms shows this could be done exactly because the capacitive falloff rate was measurable using some simple code.

    BlackBox uses exactly this to read on the same output leds, the anode and cathode are connected to prop pins, schematic shows this... that is the limitation, if your demoboard won't allow both legs of leds to be controlled by prop, then you can't use your leds as sensors.

    http://forums.parallax.com/showthread.php/115258-TheBlackBox-Release-v2.0-Propeller-HSS-FX-Sequencer-with-Digital-Audio-SPDIF

    Code is this:
    Pub FxRead
    
    dira[FxBase] := 1           'set direction of fx led anode leg.      
    
    Repeat
     
      '----bLINK led
      dira[FxLed] := 1             ' make n pin an output
    
      outa[FxBase] := 1             ' p - high     LED ON
      outa[FxLed] := 0             ' n - low       LED ON
      waitcnt(blinkwait + cnt)     'wait for time while led on
      
      outa[FxBase] := 0             ' p - low      LED OFF
      dira[FxLed] := 0              ' turn pin output off 
    
       '---READ led-----
      dira[FxLed] := 1             ' make n pin an output   
    
      outa[FxBase] := 0            ' p - low      'reverse bias led        
      outa[FxLed] := 1            ' n - high     'reverse bias led 
    
      dira[FxLed] := 0            ' n - make n pin an input
      waitcnt(readwait + cnt) ' wait for pin to change state
       
      FxStart := ina[FxLed]      ' read state of n pin, and store it.  
    
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-25 19:32
    Clock Loop wrote: »
    if your demoboard won't allow both legs of leds to be controlled by prop, then you can't use your leds as sensors.

    Here's the schematic of the LED section of the Demo Board.

    attachment.php?attachmentid=103023&d=1374805626

    Looks like they can't be used as sensors.

    BTW, That BlackBox project is one of the coolest projects I've seen with the Propeller.
    567 x 563 - 72K
  • HumanoidoHumanoido Posts: 5,770
    edited 2013-07-26 06:42
    Instead of using capacitance, you could try converting the LEDs to inputs and touching one could alter its light sensing characteristics for an input response. Given the closeness of the LEDs on the Demo board, you may need a tiny touch stick instead of using a human finger.
  • VbGuruVbGuru Posts: 35
    edited 2013-07-26 12:44
    An ITT classmate worked on using individual leds as buttons with the basic stamp 2. He had 6-8 leds about 1/8th of an inch a part and by lighting the led then turning it off and i think doing a bit of r/c time he could detect at each led individually. the final result worked very well for his project (a touch interface for his home automation).


    This may or may not be related...

    http://hackaday.com/2006/02/21/low-cost-sensing-and-communication-with-an-led/


    hope that helps...
  • Christof Eb.Christof Eb. Posts: 1,201
    edited 2013-07-30 03:32
    Thanks, for your input, alltogether!
    I have now learned, that the cap will be for example 20pF. Together with the existing Rs this gives only 10ns, which will not be possible to be detected.
    Perhaps I will try an additional R in the socket for VGA.
    Christof
Sign In or Register to comment.