Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Wiring a Button Box on: November 14, 2012, 09:34:51 am
Interesting,
Thanks for the help!  Ill switch it around then (shouldn't be hard) and add the resistor on the reset line.

Thanks again for the help, I appreciate it.
2  Using Arduino / Project Guidance / Re: Wiring a Button Box on: November 14, 2012, 07:45:13 am
Thanks for the tips, I will have to stare at that diagram for a while to figure it out though...

So I made my own of what I have.  Its simple but will hopefully get the point across.  On CrossRoads diagram, it looks like there might be a resistor on the Reset line, so even though your "shorting" out, there is some resistance load there.  If that is the case, then I could just put a resistor inline with the "Green" wire.

3  Using Arduino / Project Guidance / Re: Wiring a Button Box on: November 13, 2012, 08:05:00 pm
As usual, a solution usually shows itself AFTER one asks for help.  Here is what I did, let me know if I am going to let the magic smoke out...

I tied the RESET pin to my (+) line, then my reset button to (GND).  Therefore, connecting reset to ground.  I can't think of a reason why this is bad, but I am just a mechanical guy.

Thanks for the help!!
4  Using Arduino / Project Guidance / Wiring a Button Box on: November 13, 2012, 07:56:15 pm
Hey everyone,

I have created a box with (3) input buttons, plus a reset button.  I think I wired it incorrectly, but before I go tearing into things and messing up my hard work I figured I would just ask. (Hopefully I can describe the situation correctly...)

I used a cable to attach my box to the arduino, with a total of (5) wires dedicated to buttons and reset button.  I made the assumption that the reset button works similar to a regular input button and have wired them to share the (+5v) line with each of the 3 buttons going to digital pins, and the Reset going to the reset pin.

As I learned, this does not work.  Reset works by connecting the Reset pin to ground.

As a mechanical engineer, my solution is to re-wire the box (this will take hours probably) but I am wondering if someone has another solution/something I don't know before I go this route.  The project is for a CNC machine running GRBL, and I am not a programmer by any means so modifying code is not an option.

Thoughts?
5  Using Arduino / Project Guidance / Re: Serial/Sensor reading problems on: April 10, 2012, 06:49:53 pm
Actually, currently the Uno is running off USB, and the buttons, hbridge etc are running of a 6V power supply (2200mah? I would have to check, its a universal AC wall adapter)

I think for the sake of getting the system to work for purpose of my upcoming presentation, I am going to rebuild the system and try to get it working.

Also, I cant seem to find this info.  If my Arduino Mini 5V, runs at 5V, will it be ok if one of the inputs rates at 6V or less?  Im curious because I am considering changing my wiring scheme so that the button connects to Ground THROUGH the Arduino, instead of using a 10k resistor and sensor wire.

Thanks!
6  Using Arduino / Project Guidance / Serial/Sensor reading problems on: April 09, 2012, 04:55:19 pm
Hey all,

Ive been working on a project and after wiring it all together - it did not seem to work.  I have 2 buttons, 2 Sensors, an H Bridge and a motor (connected through the H Bridge).

This equates to 4 inputs and 3 outputs to run the system.

So I went ahead and tested each piece by itself at first.

I was able to get the buttons and sensors to show up on the Serial monitor, and I was able to start and stop the motor.  HOWEVER, when I hook all the code together, I can not get the buttons to work!  The idea is to press the button to turn on the motor, but when I add the motor code, the button no longer works.  I made up this code to test the button using Serial

Quote
int button_start = 0; //start button status start.pin
int button_res = 0; //reset button status res.pin
int brew_time = 0; //brew time
int time_on = 0; //allows timer IF loop if =1

const int res_Pin = 11; //reset button pin
const int start_Pin = 10; //start button pin
const int sens_top = 13; //top sensor pin
const int sens_bot = 12; //bottom sensor pin
const int motor_enable = 5; //enable HBRIDGE controller
const int motor_1A = 6;
const int motor_2A = 9;


void setup(){
  Serial.begin(9600);
 
  pinMode(res_Pin, INPUT);
  pinMode(start_Pin, INPUT);
  pinMode(sens_top, INPUT);
  pinMode(sens_bot, INPUT);
 
  pinMode(motor_enable, OUTPUT);
  pinMode(motor_1A, OUTPUT);
  pinMode(motor_2A, OUTPUT);

}


void loop() { 
  button_start = digitalRead(start_Pin);
  Serial.println(button_start);
   
}

Now, if I remove the

  pinMode(motor_enable, OUTPUT);
  pinMode(motor_1A, OUTPUT);
  pinMode(motor_2A, OUTPUT);

from the code, the button shows up fine in the serial display.  Any reason/idea/theory why this would be??  My thought was maybe somehow the OUTPUTS are draining the voltage low enough that the INPUTS are not being read at a high enough voltage to be considered HIGH?  but that just seems odd...
7  Using Arduino / Project Guidance / Re: Simplest way to "stop" a motor on: March 12, 2012, 07:13:40 pm
oric_dan(333): definitely not the ME you think I am...but MEs do really love linkages for some reason...haha

Anyways, that sounds like a viable option. I dont know if that will reduce cost over just simply using 2 magnetic sensors (Hall effect).  But I will keep it in mind for future reference if I think of a way to do so cost effectively.

Thanks!
8  Using Arduino / Project Guidance / Re: Simplest way to "stop" a motor on: March 12, 2012, 02:48:18 pm
I didnt think this would be this best way either, I dont think he has actually done this (my program is Mechanical design, so most of the professors know very little about electronics/are hesitant to allow us to have a project that utilizes electronics)

As is, I am still planning on using the Hall Effect sensors, I was just hoping someone had some sort of method that I had not found yet.

jake
9  Using Arduino / Project Guidance / Simplest way to "stop" a motor on: March 12, 2012, 11:25:43 am
Hi Everyone.

I am currently working on my Product Design final project. 

My device has a liquid filled cylinder (3inch beaker) with a plunger that has a mesh screen inside of it.  I am using the arduino to control a motor that powers a leadscrew which in turn moves the plunger up and down inside of this beaker.

I need a way to tell the arduino when the motor has reached the bottom or the top of the beaker.  I was going to use hall effect sensors and a magnet, but am thinking that the added product cost may be quite high. Plus, if for some reason there was a bad wire etc, the motor would continue to spin indefinitely - which would be very bad - this device needs to run all by itself.

My professor suggested that maybe i could add physical stops on this screw, and then measure the current to the motor. When the plunger hits a stop, the motor current will spike telling the arduino to "stop" the motor.

Is there a fairly easy way to measure this? or will i need special electronics? OR does anyone have a better way to do this? (the inside of the container needs to be foodsafe, FDA standards) So physical limit switches probably will not work (unless someone knows of a source for a sealed limit switch?)

Thanks in advance!!! Jake
10  Using Arduino / LEDs and Multiplexing / Re: Simpler Code for 7 Segment LED and Shift Register on: March 07, 2012, 10:08:53 am
Very cool, I will try this today and let you know how it works out.

but with this code:

...
byte c; <----Can I change "c" to a binary string such as 0110 0000 ?
void loop ()
{
  c++;
  digitalWrite (LATCH, LOW);
  SPI.transfer (c);
  digitalWrite (LATCH, HIGH);
  delay (20);
...
11  Using Arduino / LEDs and Multiplexing / Simpler Code for 7 Segment LED and Shift Register on: March 07, 2012, 12:01:56 am
Hey everyone,

I started learning Arduino recently so that I could complete my Senior Project in my Mechanical Design Degree (yeah, my professor said the same thing...)

Thus far, I have most of the code figured out, and I even have the 7 segment working using a tutorial from buildr but the code just seems really long and when i put all the code together to finish my project, i think it will be excessive.

So is there a way to Shift in all 8 bits into the register (595) without using 8 lines of code?

my current code looks something like this:
if (number == 0)  {
    //0
  setRegisterPin(0, 0);
  setRegisterPin(1, 0);
  setRegisterPin(2, 0);
  setRegisterPin(3, 1);
  setRegisterPin(4, 0);
  setRegisterPin(5, 0);
  setRegisterPin(6, 0);
  setRegisterPin(7, HIGH);
 
  writeRegisters();

The code that I am interested in using uses the ShiftOut command:
shiftOut(data, clock, LSBFIRST, zero);

where

byte zero = b11000000;

Any suggestions? or am I doing it about right...?
Pages: [1]