Loading...
  Show Posts
Pages: [1] 2 3
1  Topics / Device Hacking / Re: Hacking LinuxCNC to DIY make (or upgrade) your 3D Printer or CNC machine. on: June 12, 2013, 03:17:07 pm
When you ask for a "more complete package" what did you have in mind?

At the moment I'm trying to add in Ethernet support and SD card recording/playback as well as storing canned cycles.
Useful suggestions, requests and code are always welcome.
2  Products / Arduino Due / BUG? pinMode() not retaining HIGH/LOW states through changes. on: May 26, 2013, 08:02:39 am
I just spent an evening hashing out a Due specific issue with the author of the AccelStepper library.(http://www.airspayce.com/mikem/arduino/AccelStepper/)

It seems that if one assigns the state of a pin as HIGH/LOW then later on that pin changes from INPUT to OUTPUT the assigned HIGH/LOW state is reset to the default LOW.

Its probably no big deal if your pin was already set to LOW as the state is still the same, but if your counting on it to remember states while its output has been disabled then it might throw you a curve-ball.
3  Products / Arduino Due / Arduino Due max bandwith guidance. on: May 25, 2013, 09:18:24 pm
I need to exchange 4 longs, 1 ascii and a CR bidirectionally between my PC (running Linux) and my Arduino Due as quickly as possible.

So, what is the fastest bi-directional link I can create between between the two?
I have the following four options at my immediate disposal:
  • USB Serial via 16u2.
  • USB Serial via Native Port. (not properly recognized by OS, except as HID Mouse)
  • Wiznet w5100 Ethernet UDP packet. (Local-LAN 10/100)
  • Wiznet w5100 Ethernet TCP packet. (Local-LAN 10/100)

Any good advice welcome.
Btw:
All my arduino components are official products, no clones.
4  Products / Arduino Due / Re: Updating 16u2 USB firmware on: May 25, 2013, 06:52:36 pm
'Tis old. Time to update... Done.

Thanks.
5  Products / Arduino Due / Re: Updating 16u2 USB firmware on: May 23, 2013, 02:44:01 am
How does one determine if the OE firmware needs updating?

I ask this because my IDE ver1.5.2 "Arduino-DUE-usbserial.hex" file shows the "last modified" date as being 2/6/2013. That's one day newer than the proposed Arduino-DUE-usbserial-prod-firmware-2013-02-05.hex file. (I'm reading as Feb,6,2013 vs. Feb,5,2013)

I also know, that it is possible for neither of these versions to be actually installed (flashed) into the device from the factory. How do I tell?

Is there a trivial way to check if the 'update' is indeed required for the device in question?

User's Interface:
OS == Win7x64
Have dedicated ICSP tool == False
Have spare UNO == True (Should also be flashed?)
Have spare Mega2560 == True (Should also be flashed?)
6  Products / Arduino Due / Re: Arduino Due libraries (official and 3rd party) on: March 08, 2013, 07:09:40 pm
The AccelStepper library works beautifully with the Due. (Using step/dir based driver board.)

Desc:
High performance Non-Blocking (or blocking if desired).
Stepper library written in C++

Developmental Assets:
 Very well documented.
7  Using Arduino / Motors, Mechanics, and Power / Re: Rewersing directionof stepper motor with limit switch on: February 24, 2013, 06:11:29 pm
Ok for that, let's take a look at the AccelStepper command reference:

First, lets fix the brakes:
From:
    Quickstop.pde.

We'll need to add the use of:
stop() "Sets a new target position that causes the stepper to stop as quickly as possible..."
runToPosition() "Moves the motor at the currently selected constant speed (forward or reverse) to the target position..."

Now lets rev up the minimum speed:
setMaxSpeed() "Sets the maximum permitted speed."

void loop()
{
   if (stepper.distanceToGo() == 0)
   {
     // Random change to speed, position and acceleration
     // Make sure we dont get 0 speed or accelerations
     delay(1000);
     long someRandomPosition=random(lowestRandomNum, highestRandomNum);
     stepper.setMaxSpeed(random(10, highestRandomNum) + 1);
     stepper.setAcceleration(random(1, highestRandomNum) + 1);
     if(digitalRead(switchPinA)==HIGH || digitalRead(switchPinB)==HIGH)
     {
       someRandomPosition=someRandomPosition * -1; // just invert data
       stepper.stop(); // Stop as fast as possible: sets new target
       stepper.runToPosition();
     }
     stepper.moveTo(someRandomPosition);
   }
   stepper.run();
}

Ok, that's my limit of two freebies per customer. Its your turn to hack at it. smiley
8  Using Arduino / Motors, Mechanics, and Power / Re: Rewersing directionof stepper motor with limit switch on: February 24, 2013, 08:04:07 am
Try this instead:

#include <AccelStepper.h>

// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper::FULL4WIRE, 8, 9, 10,11);

#define switchPinA 2
#define switchPinB 3
#define lowestRandomNum -100
#define highestRandomNum 100

void setup()
{
  pinMode(switchPinA,INPUT);
  pinMode(switchPinB,INPUT);
  digitalWrite(switchPinA,HIGH);
  digitalWrite(switchPinB,HIGH);
}

void loop()
{
   if (stepper.distanceToGo() == 0)
   {
     // Random change to speed, position and acceleration
     // Make sure we dont get 0 speed or accelerations
     delay(1000);
     long someRandomPosition=random(lowestRandomNum, highestRandomNum);
     stepper.setMaxSpeed(random(0, highestRandomNum) + 1);
     stepper.setAcceleration(random(1, highestRandomNum) + 1);
     if(digitalRead(switchPinA)==HIGH || digitalRead(switchPinB)==HIGH)
     {
       someRandomPosition=someRandomPosition * -1; // just invert data
     }
     stepper.moveTo(someRandomPosition);
   }
   stepper.run();
}
9  Using Arduino / Motors, Mechanics, and Power / Re: Automatic 4-channel pwm PC fan controller. on: February 23, 2013, 05:28:57 am
As far as I can tell it must be a marketing thing. It seems to be the current fashion, having illuminated fans is the new cool thing to be a 'must have' for all those young consumers.

Myself, I like my gear to perform well and perform for a long time. Looks only count if its part of showmanship.

Now for me (having installed a controller) a bright fan means, something decided it needs full-tilt cooling.

That said, having at-a-glance LED color feedback of temps is pretty nice when your gaming your machine pretty hard.

Seeing immediately not only if something has gotten hot, but also what got hot. Without any need to interrupt the game/benchmark/etc. (which allows the system to cool-off) while frantically trying to load up a temperature monitoring suite, hoping to catch what has gotten out of spec. Before its gone completely cold or even worse, if it had managed to go completely unnoticed until it failed.

The case lights actually transition smoothly from a dim blue (very-cold) to green (ok temps) to yellow (warm) then into bright red (near limits) finally signaling urgently with bright red on/off pulses if something has exceeded it's defined upper limits.

10  Using Arduino / Motors, Mechanics, and Power / Automatic 4-channel pwm PC fan controller. on: February 23, 2013, 05:13:04 am
I recently got a new PC case, complete with multiple led illuminated fans. But its obnoxiously bright and way to loud at night, especially when watching movies or trying to sleep.


So I decided to fix that by making an Arduino-based, automatic pwm, temperature sensing, fan controller that gets its temp readings from the PC's on-board sensors over usb-serial link.

This way, the fans only gets as loud (and bright) as needed to remain cool, while extending fan life and reducing household noise levels.

It even has temperature responsive case lighting to make good use of that ever present side-window that all the newer gaming cases seem to have.

If you have an interest in hushing your gaming rig without those dorky looking knobs and switches, or just want to build ultimate automated gaming-related add-on for your pc, check it out here.
Here's a 'cheap-cam' video of mine in action.
http://www.youtube.com/embed/Y5-TQf7D2xw
11  Using Arduino / Motors, Mechanics, and Power / Re: Rewersing directionof stepper motor with limit switch on: February 22, 2013, 11:22:32 pm
top of file add: (replace A0 & A1 with your selection of pins.)
#define switchPinA A0
#define switchPinB A1

Add to void setup()

  pinMode(switchPinA,INPUT);
  pinMode(switchPinB,INPUT);
  digitalWrite(switchPinA,HIGH);
  digitalWrite(switchPinB,HIGH);

in void loop() replace:
//stepper.moveTo(rand() % 200);
*with*
long someRandomPosition=rand() % 200;
if(digitalRead(switchPinA)==HIGH || digitalRead(switchPinB)==HIGH)
{
  someRandomPosition=someRandomPosition * -1; // just invert data
}
stepper.moveTo(someRandomPosition);



PS: According to  if (stepper.distanceToGo() == 0)
it will change direction based on switches, ONLY after it completes the previous move.

If you wish to have it switch directions instantly, then you just need to put the blue code outside of the if (stepper.distanceToGo() == 0) statement.
12  Using Arduino / Motors, Mechanics, and Power / Re: L298n, Do I need flyback diodes? on: February 22, 2013, 10:58:10 pm
I would think that the motors are indeed the cause. Not because of any generated electricity caused by 'winding down', but rather from back-EMF.

This happens whenever the electrical load carried by ANY coil of wire suddenly drops. As the magnetic field around the coil relaxes, it generates a high-voltage pulse in the opposite polarity.

If your motors are only used in one direction then you just need a diode to short out the reverse-polarity high-voltage spikes.
 ie. Wire up a diode in parallel with each motor but in reverse polarity. That way the diode does nothing during the motor's power-on state, but catches any reversed current leaking back out (and into your Arduino) whenever the motor's power cuts-off.

If you need to run the motors in both directions then you could use two zener diodes rated for a voltage just higher than the motor voltage. The diodes would be wired in opposing directions (tip to tip), then the pair would be wired in parallel with the motor leads. A pair of such diodes per motor.

Rule of thumb: fly-back diodes need to have at least 1/100th amperage capacity of the motor's supply current. Ideally 1/10th capacity for bullet-proof usage.
13  Using Arduino / Motors, Mechanics, and Power / Re: Controller PC fans 3-Pin vs 4-Pin on: February 22, 2013, 10:06:17 pm
I don't know if the topic is still live or not but making an Arduino multi-channel fan controller has already been done, it gets the temp readings from the PC's on-board temp sensors.

The post covers 2,3 and 4 wire fans as well as the differences of how to use a 3.3v vs 5v Arduino for the controller. Even RGB programmable LEDS are supported as an addon option.

If anyone is interested the post can be found at http://www.silentpcreview.com/forums/viewtopic.php?f=9&t=65801&p=571959#p571959

If you would like more of a basic howto guide I posted one on my blog.
14  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: February 02, 2013, 05:48:51 pm
Sweet! Now the fun begins. smiley
15  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: February 01, 2013, 03:52:48 am
Thank you Jeff,

It sounds like you have been going over every bump in the road that I did. smiley Only difference is I started with the controller and worked my way outwards to the mechanical bits. I also knew from past projects that once I learn to make something ( like EMC2Arduino ) I end up learning some new things along the way.

I wrote EMC2Arduino as a pilot project to learn how to make a working DIY CNC.

These days as I get time, I'm working on writing HAL2Arduino to make it even better, to refine what I have learned and distill those ideas into less complicated easier to use / easier to understand project.

When I'm done I intend to make a customized live linuxCNC CD that will have all the tricky bits in place so people won't have to worry about it. That way all they'll have to do it play with is the Arduino.
Pages: [1] 2 3