ok the one thing I noticed is that the delay and reading of the secondary loop produces a noticeable jitter to the servos. I'm also getting a random jitter from the single servo with my standard code - can't seem to figure out why
ok the one thing I noticed is that the delay and reading of the secondary loop produces a noticeable jitter to the servos. I'm also getting a random jitter from the single servo with my standard code - can't seem to figure out why
Arctic Cat * Maximum Security * Cribbage Board * Rockin Case * Armor Redux
Tempest SXR * Power House * Red Comet * ICHIWZ * Acrylic Headphone Hook
Continuing sponsorship support from PCBoard.ca
Minor update. I got a little bit of work done. I spent a lot of time trying to find the best mounting solution/spot for the eye. Unfortunately, once I realized all I had laid out and all I have to fit in this case, I'm going to have to scrap the idea. There was just no good spot to put it. My original idea was to put it on the front in one of the drive bays. But I'm going to have 2 intake fans (6 bays), the Sentry 2 controller, DVD drive and custom switch panel (last 3 bays). I currently have the Tt tool tray in my 10th bay on my Armor, but the Tempest only has 9 bays, so as it is I need to scrap that.
Now for the little bit of progress I got done tonight. I removed the 2 blue LEDs from the front panel. I wired up a pair of RGB LEDs with resistors. I was using some wire I bought at Radio Shack, but it was just too thick and bulky. I found an old piece of Cat5 cable, cut the ends off, and pulled all 6 feet of wiring from the inside. This is nice small diameter wiring, and now I've got 6 feet each of 8 different strands. It's perfect for hiding the wiring in tight places.
I proceeded to hot glue these into the original locations that the 3mm blue ones came out of
all sleeved up and a 4-pin molex connector installed
and red
green
and blue
that's it for now. I've still got to wire up 8 more RGB LEDs for the 2 top 140mm fans. The 2 120mm front fans and the 120mm side fan that came with the Tempest have 3mm blue LEDs embedded into the fans. Looks nice and clean, but makes it impossible to try to fit in a 5mm LED. So for this I'm just going to take 2 of the clear Tt 120mm fans that are in Armor (and already RGB wired) and put these in the front of Tempest.
Arctic Cat * Maximum Security * Cribbage Board * Rockin Case * Armor Redux
Tempest SXR * Power House * Red Comet * ICHIWZ * Acrylic Headphone Hook
Continuing sponsorship support from PCBoard.ca
Nice LED upgrade. Can't wait to see it in action.
TBCS 5TB Club :: coilgun :: bench PSU :: mightyMite :: Zeus :: E15 Magna EVThat we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously.
--Benjamin Franklin
That sucks about the eye but these things happen. Didn't crenn cure the servo jitter for you?
Charles (CJ) Gantt: Coil Gun // Biohazard // Circuits // 3D Printer // CoD MW2 Case // TBCS 4GHz Club
Sites: The Makers WorkBench // CJ Gantt Photography
he cured the jitter when you take 5v away from the control pin. Now while the loop is running the servo seems to jitter around a lot. Is there a way to get a number of readings (say 5 or 10) and average them to smooth the output?
I've got a 10k ohm resistor to ground from the temp sensor like crenn suggested, and he had me put a 10k ohm resistor to ground from the 5v control pin to cure the jitter when you take the voltage away
Arctic Cat * Maximum Security * Cribbage Board * Rockin Case * Armor Redux
Tempest SXR * Power House * Red Comet * ICHIWZ * Acrylic Headphone Hook
Continuing sponsorship support from PCBoard.ca
What code are you running currently?
I posted up on the arduino boards and had a guy say I could get rid ofCode:// Controlling a servo position using a temperature sensor // by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> // edited 5-12-2010 by Will Lyon to include base setting for servo if voltage not detected on pin 7 #include <Servo.h> #define CONTROL 7 Servo myservo; // create servo object to control a servo int temps = 0; // analog pin used to connect the temp sensor int val; // variable to read the value from the analog pin void setup() { pinMode (CONTROL, INPUT); // sets the control pin to input myservo.attach(9); // attaches the servo on pin 9 to the servo object digitalWrite(CONTROL, LOW); // ensure internal pullup resistor is disabled. } void loop() { val = digitalRead(CONTROL); //read input of pin 7 and store it if (val == HIGH){ // reads whether or not 5v is present on pin 7, if 5v present, continue: val = analogRead(temps); // reads the value of the temp sensor (value between 0 and 1023) val = map(val, 350, 700, 75, 105); // scale it to use it with the servo (value between 0 and 180) myservo.write(val); // sets the servo position according to the scaled value delay(25); // waits for the servo to get there } else { if (val == LOW); // if no voltage present on pin 7, continue myservo.write(50); //sets servo position to 50 if no voltage is detected on pin 7 } delay(25); // waits for the servo to get there }
because it's using the else statement. he also suggested something like this:Code:if (val == LOW); // if no voltage present on pin 7, continue
Code:sum = (sum - (sum / 8)) + (analogRead (pin) / 8);
Arctic Cat * Maximum Security * Cribbage Board * Rockin Case * Armor Redux
Tempest SXR * Power House * Red Comet * ICHIWZ * Acrylic Headphone Hook
Continuing sponsorship support from PCBoard.ca
I need to order a servo so I can proto this up.
Charles (CJ) Gantt: Coil Gun // Biohazard // Circuits // 3D Printer // CoD MW2 Case // TBCS 4GHz Club
Sites: The Makers WorkBench // CJ Gantt Photography
the one I'm using the the small blue one from sparkfun. any hobbyshop should have a cheap servo in stock though
Arctic Cat * Maximum Security * Cribbage Board * Rockin Case * Armor Redux
Tempest SXR * Power House * Red Comet * ICHIWZ * Acrylic Headphone Hook
Continuing sponsorship support from PCBoard.ca
it looks just like this one but has transparent blue case
http://www.sparkfun.com/commerce/pro...oducts_id=9065
Arctic Cat * Maximum Security * Cribbage Board * Rockin Case * Armor Redux
Tempest SXR * Power House * Red Comet * ICHIWZ * Acrylic Headphone Hook
Continuing sponsorship support from PCBoard.ca