Show Posts
Pages: [1] 2 3 ... 15
1  Using Arduino / General Electronics / Re: 110/220V to 72V Power Supply in Parallel? (formerly HV...) on: February 16, 2014, 05:10:46 pm
OK, thanks. I was concerned about loops under loads. Also, do these supplies need to be regulated for the motor drives?

Thanks for info on voltage ranges. I guess I've been reading too much about, and labeling of, the high vs low voltage sections (i.e., 220V vs the 5V logic) of the system.
2  Using Arduino / General Electronics / 110/220V to 72V Power Supply in Parallel? (formerly HV...) on: February 16, 2014, 12:45:39 pm
I have a linear unregulated power supply, toroidal transformer that has two sets of primary and secondary windings, so it can be wired input for 110 or 220. The output side has independent rectifiers, each 72V and 10A. I would like to connect them together to get 20A.

Can I do this? Would I need diodes to prevent the current from running into the weaker side?

This is the supply (different than the picture since it has two output sections, but otherwise the same):
http://www.cnc4pc.com/Store/osc/product_info.php?cPath=27&products_id=400

I want to power 3 steppers with Gecko 203V drives.
3  Using Arduino / General Electronics / Wirewound Potentiometers - Interfacing with 110V on: January 28, 2014, 03:53:00 pm
Hi All, I thought I posted here this morning, but maybe I violated a rule or the post did not make it through?

I was looking for a WX14-12 wirewound single turn potentiometer in 560 ohm. I find the exact part in different values at aliexpress, but cannot find the value I need so that is what I'm searching for. It is for the speed control of a milling machine power feed, and I think the circuit is 110V.

The thought then came to me that I could rather interface Arduino to the 3 wires and direction switch instead. I was also wondering what components and circuit could be safely used instead. This is appealing because I could have better and more versatile control.

Thanks
4  Using Arduino / Displays / Re: lcd pushbutton hookup on: January 02, 2014, 02:49:45 pm
It is not clear to me how buttonVal == 0

Try printing buttonVal to LCD to see:

Code:
void loop()
{
  buttonVal = digitalRead(buttonPin);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(buttonVal); 
  delay(250);

  if (buttonVal == 0)
  {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Not Activated");
    delay(250);
...
5  Using Arduino / Displays / Re: LCD Shield Button Reliability on: January 02, 2014, 09:17:44 am
I managed to come back to this briefly, so I now compare multiple reads and only accept a value if it is repeated a number of times, or optionally within a range:

Code:
int read_LCD_buttons() {
  int test = 10;
  int range = 5;
  adc_key_in = analogRead(0);      // read the value from the sensor
  for (int i = test; i > 0; i--) { // my loop to test button state
//    if ((adc_key_in < analogRead(0) + range) || (adc_key_in > analogRead(0) - range)) test--; //test for button range
    if (adc_key_in == analogRead(0)) test--; //test for exact button value
  }
  if (test == 0) {
      if (adc_key_in > 1000) return btnNONE;
      if (adc_key_in < 10)   return btnRIGHT;
      if (adc_key_in < 136)  return btnUP;
      if (adc_key_in < 312)  return btnDOWN;
      if (adc_key_in < 486)  return btnLEFT;
      if (adc_key_in < 727)  return btnSELECT;
  }
      return btnNONE;  // when all others fail, return this...
}

This slowed the button read code only slightly and seems much more reliable. It may fail to read a button, but that is more of a nuisance than reading the incorrect button and causing the machine to take an incorrect action. I'll still implement a better solution in the final design, but feel I can test drive the machine with this.

Thanks for the mention of charlieplex, something I had not heard before and watched a quick tutorial.
6  Using Arduino / Displays / Re: LCD Shield Button Reliability on: December 26, 2013, 01:05:46 pm
I understand that, but am unsure how to implement such a solution. I am using the L/R buttons to control a stepper motor, which requires continuous pulses. If I am waiting milliseconds to determine button state, then the pulses will be delayed.

This is a (crude) solution I've implemented before on a one-button ISR, and I think the debounce time was minimum around 4ms. I think this would not allow the button to remain pressed for continuous signaling.

Code:
void debounce() {
  if((micros() - last_micros) >= debounce_time) {
    last_micros = micros();
    mode = !mode;
  }
}

The code snip-it below will need significant refinement as it is because the LCD update is slowing the motor down already. The fastest I would like to run the motor is 10 kHz steps, or more practically in this example around 4 kHz (at least cycle through the while loop and execute the btnRIGHT case every 250 microseconds while the button is pressed).

Code:
  while (menu == 6) {
    lcd_key = read_LCD_buttons();  // read the buttons
    switch (lcd_key) {              // depending on which button was pushed, we perform an action
    case btnRIGHT:
      {
        digitalWrite(dir, HIGH);
        digitalWrite(stp, HIGH);   
        delayMicroseconds(rate);               
        digitalWrite(stp, LOW); 
        delayMicroseconds(rate);
        pos++;
        if (pos == 36000) pos = 0;
        //runLCDupdate(pos, rate);
        lcd.setCursor(1,1);
        lcd.print((float(pos)/100));
        break;
      }
  }


7  Using Arduino / Displays / Re: LCD Shield Button Reliability on: December 25, 2013, 11:54:06 pm
I've had a hard time completely grasping debouncing solutions, but came close at one time... I was not suggesting a debounce issue alone, although that would be an extreme exacerbation of the issue. I suppose this could be determined if the adc_key state was output or recorded for each read. The timing to do so seems to overcome that particular issue, so external means become obvious, yet not available here. This is also a reason why hardware debouncing seems desirable.

This and LCD update speed are two areas I need to overcome.

Edit: actually, I do not need to update the LCD that quickly, but just need to offload the data and allow for the button control to take over ASAP.  Human visual perception is all that needs to be overcome there, but machine control is not so easily disguised.

Thanks for the insights.
8  Using Arduino / Displays / Re: Warning to users of some vendors LCD keypad shields. on: December 25, 2013, 04:33:51 pm
Hi All,

Just discovered this issue in my LCD shield.

[edit: I just replaced the transistor with a 2n7002 (marked 702  3d salvaged from a random PCB), since I shorted the transistor that was in there trying one of the earlier suggestions. Whew!]

[edit2:  that lasted a few minutes. I had a simple timer to turn off the backlight after 60 seconds. After a few cycles, instead of going off, the backlight flickered and then went off permanently. I've now cut the trace to D10, the gate voltage is 0.34V, 2.4V on LCD pin 15. I can jump the gate voltage to 5V and measure about 40mA, and the backlight will then go on. So the mosfet seems to be working. Seems like the 4.7K resistor is open or maybe there is not enough to drive the mosfet?]



I have these small signal diodes: PMBD914
datasheet: http://www.nxp.com/documents/data_sheet/PMBD914.pdf

Will that diode work here?

If so, I can cut the trace from arduino pin 10 on the shield. Do I solder pin 3 of the diode to arduino side pin 10?

Thanks!
9  Using Arduino / Displays / Re: LCD Shield Button Reliability on: December 25, 2013, 03:41:22 pm
Thanks Folks.

MAS3 code works very similar to the original code I found for the shield, only using an array for the values and loop is much more elegant.

What I suspect is that when a button is pressed, there is a certain voltage fall time before settling in to a steady state voltage level. Since the processor is sampling the adc_key so often, there is enough of a chance that it will sample during this fall time and return an erroneous result. This is why I changed from looking for values under certain thresholds and went to a narrower range, to decrease the likelihood of finding a valid result somewhere between button states.

Unfortunately, my most used button is "Right", which takes the reading from 1023 to 0 and presents the highest likelihood that any other button could be erroneously returned during this transition, and I observe that a large whole percentage of tries.

I had hoped to use the shield at least in prototype to run the machinery, but it looks like I'll have to build the control panel first, where I will use individual analog pins for each button, or find a better way to implement 5 button control.

I'll be sure to check the backlight issue and have the test code, the thread I found while searching for solutions to this button issue. Thanks!
10  Using Arduino / Displays / Re: LCD Shield Button Reliability on: December 24, 2013, 04:21:43 pm
OK, a realization about the simple miss-logic in my code snip-it.

The following does work, but I need a very reliable button as they are for machine control and a miss-step will cause issues.

Code:

int read_LCD_buttons()
{
  adc_key_in = analogRead(0);      // read the value from the sensor
  // default buttons when read are centered at these valies: 0, 144, 329, 504, 741
  // my buttons when read are centered at these valies: 5, 131, 307, 481, 722
  // we add approx 50 to those values and check to see if we are close
  if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
  if (adc_key_in < 10 && adc_key_in > 0)   return btnRIGHT; 
  if (adc_key_in < 136 && adc_key_in > 126)  return btnUP;
  if (adc_key_in < 312 && adc_key_in > 302)  return btnDOWN;
  if (adc_key_in < 486 && adc_key_in > 476)  return btnLEFT;
  if (adc_key_in < 727 && adc_key_in > 717)  return btnSELECT;   
  return btnNONE;  // when all others fail, return this...
}

11  Using Arduino / Displays / LCD Shield Button Reliability on: December 24, 2013, 12:33:17 pm
Hi Folks,

I'm using a common LCD shield from Hobby King, the one with a 16x2 LCD and the Select, Left, Right, Up, Down, and Reset buttons.

I'm finding the buttons may occasionally read incorrectly and select the wrong button, so I'm looking for solutions in how to fix the problem.  I tried tightening up the conditions, but it does not help, actually the below code does not read the buttons correctly.

I can print the read value and it is fairly stable on a firm press, but will vary quite a bit when varying pressure on the button.

Code:
int read_LCD_buttons()
{
  adc_key_in = analogRead(0);      // read the value from the sensor
  // default buttons when read are centered at these valies: 0, 144, 329, 504, 741
  // my buttons when read are centered at these valies: 5, 131, 307, 481, 722
  // we add approx 50 to those values and check to see if we are close
  if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
  if (adc_key_in < 10 || adc_key_in > 0)   return btnRIGHT; 
  if (adc_key_in < 136 || adc_key_in > 126)  return btnUP;
  if (adc_key_in < 312 || adc_key_in > 302)  return btnDOWN;
  if (adc_key_in < 486 || adc_key_in > 476)  return btnLEFT;
  if (adc_key_in < 727 || adc_key_in > 717)  return btnSELECT;   
  return btnNONE;  // when all others fail, return this...
}

Any ideas?
12  General Category / General Discussion / Re: MS Access/Excel Copy/Paste Woes on: August 16, 2013, 01:04:49 pm
Arduino is only indirectly related to the extent of by me keeping my sanity, I'll be able to continue playing with Arduino.

I'm just going to write a VBA function and forget about trying to understand MS idiosyncrasies.

Quote
General Category -
New Posts   General Discussion
Feel free to talk about anything and everything in this board.
Last post: Re: MS Access/Excel Copy... by CrossRoads on Today at 05:42:42 am
Moderators: admin, Massimo Banzi, David Cuartielles, mellis
13  General Category / General Discussion / MS Access/Excel Copy/Paste Woes on: August 16, 2013, 11:28:23 am
I've poked around a bit looking for a solution. I'm using Office 2010.

When I copy/paste a single record from Access to Notepad, it works fine. When I copy/paste several records, Windows seems to add extra quotes around just some of the records and makes some of the double quotes turn into double-double quotes ""!""

Another problem I had was when exporting a table to plain text, even though the field is set to Memo, I was experiencing field truncating to 255 characters.


The quote issue seems to happen with Excel as well - this is not a solution, so no need to click:
http://www.excelforum.com/excel-general/650997-remove-double-quote-marks-when-pasting-into-notepad.html
14  Using Arduino / General Electronics / Re: TIP120 transistor resistor calculation on: August 14, 2013, 05:03:47 pm
This will be very much helpful since I have a scrap board loaded with TIP120's. I think there is a better TIP for my application, but I wanted to make use of what fell from the sky in an H bridge motor driver. In this case, the motors are unknown and will likely vary considerably in current draw depending on their load.

I'll try to figure out for 5A, but not sure where some values come from

Ic   5   
Vbe   2.25   two time transistor diode drop due to darlignton pair, but look at plot for collector current
Vce   60   from plot, not sure where this comes from exactly
      
Dcgain   2500   from plot
      
Ib   0.002   x5=0.01 this is 10ma from arduino pin, right?
Rb   275   ohm
P   300   W
15  Using Arduino / Programming Questions / Re: Data Types: does double and float exactly the same in Arduino? on: August 14, 2013, 02:31:40 pm
I think you may still get strange results, but those results should not be different that when you were using doubles.
Pages: [1] 2 3 ... 15