Loading...
  Show Posts
Pages: [1] 2 3
1  Using Arduino / General Electronics / Re: How to control this stepper motor? on: January 31, 2013, 02:17:23 pm
> The wiring, seemingly 

Yup, and any tips on using it. That's why I'm here, because I have no idea how to turn that data sheet into controlling it from the Arduino.

2  Using Arduino / General Electronics / Re: How to control this stepper motor? on: January 31, 2013, 02:41:53 am
Thanks JimboZA! I edited the post to reflect that.
3  Using Arduino / General Electronics / How to control this stepper motor? on: January 31, 2013, 01:49:23 am
So I picked up an "LED disco light" off Ebay:

http://www.ebay.com/itm/280995441549?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

(If that link is broken, try searching for "DMX512 Disco DJ Stage Lighting Digital LED RGB Crystal Ball Effect Light").

Anyway, the light is great, but the programming is awful. For example there's no way to make the lights stay still or even slow down much, so its super frenetic. My solution has been to put a disconnect switch on the stepper motor, which works, but I was thinking the much more interesting and educational route would be to make it all controlled by an Arduino.

Here's 2 pictures of the servo motor that rotates the LEDs:





Edit: here's the data sheet: http://store.kysanelectronics.com/servlet/-strse-70050/39BYG101/Detail (thanks JimboZA!)

As you can see, the stepper motor has 5 wires: 4 grouped together and 1 set apart.

Wondering if anyone has any tips for controlling that?

One interesting feature is it has a clutch on it, so if it turns against the wires it will simply slip instead of putting much pressure on the wires. So even if I had imperfect control of the motor, I'd be unlikely to damage anything.

Or, failing that, a replacement motor? Its pretty beefy, about 3 inches tall, though that's probably overkill as it only holds 6 LEDs and a small heatsink.

And on the subject of those LEDs, if possible I'd also love to control those. They're 3 watts each though. Any tips on controlling those, ideally with a bit of PWM fading?
4  Using Arduino / General Electronics / Re: Grounding problem? on: March 30, 2011, 09:06:06 am
> The sort of thing I was thinking about was a voltage follower

Does that mean there would be one op-amp per sensor?
5  Using Arduino / Project Guidance / How to remotely mount an Arduino? on: March 29, 2011, 06:09:36 pm
I have a project where I'd like to mount an Arduino about 200 feet away from the computer, ideally connected by Cat5 (or Cat6) cable. The computer should still be receiving Serial messages from the Arduino.

Any tips for doing that?
6  Using Arduino / General Electronics / Re: Grounding problem? on: March 29, 2011, 05:04:31 pm
Aha! I found his circuit, which looks like its exactly the sort of thing you (Grumpy Mike) described:

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/step8/Building-the-circuit/

Here's just the circuit:

http://www.instructables.com/files/orig/F4Q/P3Y1/GHFJXCHX/F4QP3Y1GHFJXCHX.png

Here it is as wired into the arduino:

http://www.instructables.com/files/orig/F0V/A3LJ/G68HEHUH/F0VA3LJG68HEHUH.jpg

I'm going to take a stab at it, feel free to chime in if anything strikes you (anyone) about it.

7  Using Arduino / General Electronics / Re: Grounding problem? on: March 29, 2011, 01:39:58 pm
> You need an op-amp to convert your high input impedance into a lower one.

Thanks for the tip. I was wondering if you had any pointers on which op-amp to use, and how to use it?

I've never used an op-amp before.
8  Using Arduino / General Electronics / Grounding problem? on: March 28, 2011, 11:03:07 pm
I'm trying to build a knock sensor, something like this:

http://www.arduino.cc/en/Tutorial/KnockSensor

Everything is generally working, but sometimes my threshhold (the knock) is randomly triggered, and it appears to be caused by some sort of electrical interference. I posted a video of the problem here:



The LED should only be lighting when a knock is detected.

As far as the circuit, I'm connecting the piezo's negative to ground, and the positive to analog pin 1, and I have a 1 megohm resistor between ground and analog pin 1. This is the piezo I'm using: http://www.radioshack.com/product/index.jsp?productId=2062397

And to describe the problem a bit more, usually everything works well, but seemingly randomly it stops working and the threshhold (the knock) is detected. It usually remains like this until I touch the ground wire, or even put my hand near the ground wire.

Eventually I'd like to have 6 different piezos detecting different "knocks", if possible.

Any tips on how to get rid of the bad readings?

9  Forum 2005-2010 (read only) / Syntax & Programs / problem returning array from function... on: April 15, 2009, 04:12:24 am
I'm trying to use a function to generate an array. Below is a stripped down version of my code. In the loop, the variable named "pattern" should get an array of numbers from the function generatePattern(). Thanks for any help.


Code:
int pattern_local[] = {1, 2};
int pattern[] = {3, 4};


void setup()
{
  Serial.begin(9600);
}

void loop()
{
  pattern = generatePattern();
}



int generatePattern()
{
 int pattern_local[] = {1, 2};
 return pattern_local;
}

This errors out with:
Code:
In function 'void loop()':
error: incompatible types in assignment of 'int' to 'int [2]' In function 'int generatePattern()':

Can anyone point me in the right direction?
10  Forum 2005-2010 (read only) / Interfacing / Re: Arduino + Firmata + Pyduino (Python) on: January 17, 2008, 05:56:36 pm
Links are broken...

http://rafb.net/p/FjOkxU38.html and http://rafb.net/p/u9u2QP86.html are both 404 for me....
11  Forum 2005-2010 (read only) / Interfacing / Re: Arduino-Python bridge on: January 17, 2008, 01:27:24 am
I'm having some trouble with this in Windows XP / Python 2.4 / Arduino NG Rev C.  Can anyone see what I'm doing wrong?

I'm brand new to the Arduino so it's entirely possible I'm doing something very stupid.

I have this sketch successfully loaded onto the Arduino:
http://www.arduino.cc/playground/Code/SimpleMessageSystem

My Arduino is installed as Com4 under Windows, and I set it's buardrate in Device Manager to be 115200 (it installed as 9600, but the change doesn't seem to have affected it).

For simplicity I extracted the relevant parts of the above code:

Code:
import serial, time

baudrate = 115200

comm = serial.Serial(3, baudrate, timeout=0.25)

for i in range(10):
    comm.write("r d\r")
    o = comm.readline()

    if len(o) == 0: print "no response..."
    else: print o

    time.sleep(.5)

With pins GRD and 11 jumpered I get the following output when running the above:

Quote
d 0 0 0 1 1 1 1 1 1 0 0 0
d 0 0 0 1 1 1 1 1 1 0 0 0
d 0 0 0 1 1 1 0 1 0 0 0 0
d 0 0 0 1 1 1 0 1 0 0 0 0
d 0 0 0 1 1 1 0 1 0 0 0 0
no response...
no response...
d 0 0 0 1 1 1 1 1 0 0 0 0
d 0 0 0 1 1 1 1 1 0 0 0 0
no response...

With all pins open (no jumpers) I get the following:

Quote
no response...
d 0 1 0 1 1 1 0 1 1 1 0 0
d 0 1 0 1 1 1 0 1 1 1 0 0
d 0 1 0 1 1 1 0 1 1 1 0 0
d 0 1 0 1 1 1 0 1 1 1 0 0
no response...
no response...
no response...
d 0 0 0 1 1 1 0 1 1 1 0 0
d 0 1 0 1 1 1 1 1 1 1 0 0

Ok, so far so good, the digit 3rd from the right is Pin 11 and it's indicating its status well. However, if I attach a button across the two pins and press and release I get this:

Quote
no response...
d 0 0 0 1 1 1 1 1 0 0 0 0
d 0 0 0 1 1 1 0 1 0 0 0 0
no response...
no response...
d 0 0 0 1 1 1 1 1 0 0 0 0
no response...
d 0 0 0 1 1 1 1 1 0 0 0 0
d 0 0 0 1 1 1 1 1 0 0 0 0
d 0 0 0 1 1 1 1 1 0 0 0 0

Three questions:

1) How do I make it update faster? When I was pressing that button its status never changed. I have a feeling its reading from a buffer. Do I need to clear that buffer when I read from it? If so, how?

2) Is it normal to get no response from the Arduino when querying it? Even when I increased the timeout to 1 I still get the no responses...

3) And on a minor note, why were the other pins fluctuating even when nothing was attached to them?

Thanks for any help.
12  Forum 2005-2010 (read only) / Interfacing / Re: quesetion about interfacing with rotary switch on: April 02, 2009, 01:32:01 pm
Quote
Put 1K resistors between each of the pins, with the last connected to ground and the last on the other end connected to +5V

Tasty! I'll give this a try when I get home on Monday.

I've been experimenting with a pot and simulating a rotary switch by making each range of the pot be a different setting, broken into 10 parts. This works works but it definitely lacks the nice satisfying "click" of a true rotary switch.

Thanks, this is really a great idea.
13  Forum 2005-2010 (read only) / Interfacing / Re: quesetion about interfacing with rotary switch on: April 01, 2009, 04:47:39 pm
I'm trying that but its super flaky. It'll read the input correctly a few times and then stop. But if I touch the rotary switch it'll then read it again.

Interestingly if I touch or even put my hand near the ground wire or input wires, it then reads it correctly again.

Is that a debounce issue?
14  Forum 2005-2010 (read only) / Interfacing / quesetion about interfacing with rotary switch on: April 01, 2009, 08:33:24 am
I picked up an old 11 position rotary switch:

http://www.smcelectronics.com/SWROT06.JPG
http://www.smcelectronics.com/DOWNLOADS/SWROT06.PDF

I'm not sure what the technical way to describe it is, but it has one pin that I'd call "common", and 11 pins that make contact with the common pin as the switch changes position.

I'm wondering what the proper and most efficient way to connect this to the arduino is. Do I connect what I'm calling the "common" pin to +5v, and each of the other pins to ground via a resistor and then to an input pin on the arduino?

Is there a more efficient way than connecting each output pin of the switch to both ground and an input pin?

Thanks for any help.
15  Forum 2005-2010 (read only) / Interfacing / Interfacing with a string of 12v RGB LEDs? on: July 23, 2010, 06:44:57 am
I have a string of RGB LEDs wired for 12 volts that I'm currently controlling with this controller:

http://www.virtualvillage.com/12v-4a-rgb-led-stepless-dimmer-controller-new-001496-005.html

I've played with other controllers such as this one:

http://www.ledwise.cn/products_detail.asp?id=343

Its ok, but I'd like more control over the fading modes, which is where the Arduino would be nice. I searched around for "arduino led controller shield" and things like that and didn't find anything particularly useful. I'm wondering if there might be some LED controller that people know of that can easily interface with the Arduino?

My main goes is to get more control over the fading modes. For example, to be able to fade very slowly between blue and red and back.

Thanks for any help.
Pages: [1] 2 3