Grasshopper

algorithmic modeling for Rhino

Here's our first test at laser cutting a circuit board to be an external toggle for Grasshopper.

More info: http://lmnts.lmnarchitects.com/fabrication/remote-controls/

Views: 267

Comment

You need to be a member of Grasshopper to add comments!

Comment by machinehistories on October 22, 2015 at 4:44pm

Andy,

   I am trying to use the files you've made and when I do the serial monitor in arduino all is well. When I use the serial monitor in firefly I am not able to get the same values. Is that because this firmata is for an older version of firefly. Is it best to install older version of firefly or do you happen to have the newer files for capacitive touch. thanks, very much

Comment by Erick Katzenstein on November 1, 2012 at 5:01pm

Alright, so the example file is the Capsense library is working for me.  I'm able to run the serial monitor and see changes in the values when I touch an electrode.  I'm not able to do this with the CapSense Firmata because it streams illegible characters (but I noticed this is the same with the Firefly Firmata, at least on my computer).  Back in GH, I'm not getting the toggle when I touch the electrode, but I have to pick up a 1Megohm resistor (I'm working with ~200 kOhm at the moment).

 But, and this isn't related to above, I did notice that after uploading the Capsense Firmata, in the GH Uno Read component, the analog pins were not changing because of noise; so I'm not sure what's going on there.  I'll let you know about any progress.


Thanks again.

Comment by lmnts on October 25, 2012 at 12:41pm

AWESOME.  Thanks so much.

Comment by Andy Payne on October 25, 2012 at 11:58am

Here's another interesting tutorial you might find interesting.

http://www.instructables.com/id/Turn-a-pencil-drawing-into-a-capaci...

Comment by Andy Payne on October 25, 2012 at 11:54am

Hi Erick,

You wont be able to manually 'trigger' the digital pins for capacitive sensing because it all happens way to fast.  The send/receive pins are actually flipping all of the time (and resetting) so you have to code it up in Arduino code first. 

If you're interested in testing out the capacitive sensing Firefly firmata, you can download the arduino sketch here: http://dl.dropbox.com/u/22255624/Firefly_Firmata_CapSense.zip  Basically, what I'm doing is using Digital Pin 2 as my send pin, and using Digital Pins 4 & 7 as my receive pins.  Now, this will only allow you to read up to two capacitive sensors using this sketch.  It's definitely possible to do more, but I wanted to try to keep with the pin configurations of the Uno Read component.  For more pins, we would likely need to modify the code and use the Generic Serial Read component... but this should work for starting purposes.  

In order to use this, you'll need to install the CapSense library on your computer. To do this, create a folder called "libraries" (if it isn't already there) in the Arduino folder found in My Documents.  Then download the CapSense library from here: http://arduino.cc/playground/Main/CapacitiveSensor?from=Main.CapSense  Unzip the download file and place its contents in a folder called CapacitiveSensor inside your libraries folder.  Then, upload the sketch I linked up above.  That's basically it.  Then, just connect your circuit (similar to the diagram in the sparkfun video)... using a 1M ohm resistor coupled with your sensing electrode.  Let me know if you need a diagram.  The Uno Read component will always return a zero for pin number 2, but will return either a one or a zero for Digital Pins 4 & 7 depending on whether the amount of capacitance has surpassed the threshold in the sketch.  Actually, that brings up an important point... The sketch works by checking whether or not the current sensor value is above or below a cutoff threshold value (of arbitrary units... check the CapSense library page for more info).  To modify this cutoff setpoint, simply change the variable called Cap_Threshold which is defined on line 57.  If you load up the sketch and launch the serial monitor, the message that is printed out will tell you what the current capacitance sensor value is for both Pins 4 & 7.  Try touching your electrode and see how those values change, and then set your cutoff to be somewhere between the untouched (resting) value, and the touched value.  Hopefully it's pretty self explanatory.  Let me know if it works for your application.

Cheers,

Andy

Comment by lmnts on October 25, 2012 at 11:30am

Andy,

Great link, thanks for sending.  I took a look at using digital pins as well; starting with toggling a digital pin with 'uno write' and then connecting that to another pin for 'uno read' when touching the electrode.  It triggered the toggle in the read value for that pin, but also triggered all the other pins.  Just getting started with Arduino, so I must be missing something.  This video helps a lot.

We could definitely make use of capacitive sensing for Firefly.  Please send over when it's ready for use.

Thanks again,

Erick

Comment by Andy Payne on October 25, 2012 at 5:16am

Nice.  Looks good.  Your blog post mentioned you were having issues with interference... but that you were using the analog pins to determine if the electrode had just been touched.  Have you tried implementing the CapSense Library developed by Paul Badger (http://arduino.cc/playground/Main/CapacitiveSensor?from=Main.CapSense)?  Here's a good video explaining how it works: https://vimeo.com/50062690  I've been working on a customized Firefly Firmata to work with capacitive sensing (since it's not as easy as just using digitalRead()).  I'd be happy to share this if you're interested.

-Andy

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service