Editing
Pulse Necklace 15Nov2009
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Hack Notes, pulse choker, Nov 15th, 2009= ==TENS Pad Electrodes== We tested out the new [http://www.otcwholesale.com/koalaty-32dtan.html TENS pads] today. We didn't buy lead connectors, which were expensive (e.g. $10 for a pair), so we ended up using the leads from the multimeter and attached those by alligators to our Arduino + Open ECG project chip. The readings were quite comparable to that of the red dot, though slightly noisy. The noise might just be due to our code being optimized for use of red dot electrodes. Further work could be done. We also experimented with removing the connectors on the pads. We found strands of white and black thread inside. Only the black threads conducted though. When we connected the cut TENS pads with exposed threads to our circuit, the LEDs flashed randomly. Hence, we'll stick with the red dots for now. ==Op-Amp Experiment== Chung-Hay bought a couple AD 620 op-amp chips to experiment with bypassing the Open ECG chip at filtering/amplifying the bio-electric signal. We worked off of the lab document [http://www-univie-ac-at_cga_courses_BE513_Instrumentation_pe3quc01.pdf BE 513 Lab], in addition to the AD 620 data sheet. The sample circuit for detecting ECG in the AD 620 data sheet included two other op-amp components. We have yet to figure out what the op-amp circuit attached to the gain-control resistor does... Chung-Hay is going to seek EE assistance on that front. To look at the output signal from AD 620, we resorted to a virtual oscilloscope - link and code are in the next section. Unfortunately, we saw only noise from the oscilloscope. We tried switching the gain-control resistor from 98 ohms (two 47 ohm resistors) to 1 kohm. That only lowered the amplitude. We were using red dot electrodes, so the ECG signal was entering the chip reliably. More work to be done on this front. ==Oscilloscope Code== We got great code for a virtual Arduino oscilloscope from [http://accrochages.drone.ws/en/node/90 Poorman's oscilloscope] and just changed the serial port name to correspond to either Eric's or mine cable. Below is the Arduino code: <pre> // The Arduino code. #define ANALOG_IN 2 void setup() { Serial.begin(9600); } void loop() { int val = analogRead(ANALOG_IN); Serial.print( 0xff, BYTE); Serial.print( (val >> 8) & 0xff, BYTE); Serial.print( val & 0xff, BYTE); } </pre> And here is the Processing code doing all the computation: <pre> /* * Oscilloscope * Gives a visual rendering of analog pin 0 in realtime. * * This project is part of Accrochages * See http://accrochages.drone.ws * * (c) 2008 Sofian Audry (info@sofianaudry.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import processing.serial.*; Serial port; // Create object from Serial class int val; // Data received from the serial port int[] values; // Change this to the portname your Arduino board: // Have USB cable connected. Open Arduino app. // Go to tools -> Serial Port -> Find /dev/tty.usbserial-<blah> option //String portname = "/dev/tty.usbserial-A9007Llr"; // Chung-Hay's String portname = "/dev/cu.usbserial-A8007U5u"; //Eric's void setup() { size(640, 480); // Open the port that the board is connected to and use the same speed (9600 bps) //port = new Serial(this, Serial.list()[0], 9600); port = new Serial(this, portname, 9600); values = new int[width]; smooth(); } int getY(int val) { return (int)(val / 1023.0f * height) - 1; } void draw() { while (port.available() >= 3) { if (port.read() == 0xff) { val = (port.read() << 8) | (port.read()); } } for (int i=0; i<width-1; i++) values[i] = values[i+1]; values[width-1] = val; background(0); stroke(255); for (int x=1; x<width; x++) { line(width-x, height-1-getY(values[x-1]), width-1-x, height-1-getY(values[x])); } } </pre> [[Category:Sensebridge]]
Summary:
Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Noisebridge:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Request account
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Dig in!
Noisebridge
- Status: MOVED
- Donate
- ABOUT
- Accessibility
- Vision
- Blog
Manual
MANUAL
Visitors
Participation
Community Standards
Channels
Operations
Events
EVENTS
Guilds
GUILDS
- Meta
- Electronics
- Fabrication
- Games
- Music
- Library
- Neuro
- Philosophy
- Funding
- Art
- Crypto
- Documentation/Wiki
Wiki
Recent Changes
Random Page
Help
Categories
(Edit)
Tools
What links here
Related changes
Special pages
Page information