Show Posts
Pages: 1 ... 64 65 [66] 67 68 ... 73
976  Using Arduino / Installation & Troubleshooting / Re: Possibly defective board (random triggering of digital inputs) on: February 05, 2012, 09:07:32 pm
The problem is called a "floating" input. Unless you tie it to either +5 or ground through a resistor it is somewhere in the middle. Depends on what signals are in the environment of that pin. Think things like florescent light noise, radio frequency noise (cell phones, wireless devices...) al can put a strong enough random field at an unconnected pin for it to read constantly changing values.

The only time it won't work is when you want that condition to exist, it will then stay at either 0 or 5V...
977  Using Arduino / Motors, Mechanics, and Power / Re: Mechanics: Moving box lid up and down? on: February 02, 2012, 02:52:09 pm
2 shafts with 4 cams, shafts are linked together and operated by a servo.
cover is just floating on the cams.

2 shafts with arms and links, shafts are linked together and operated by a servo.
cover is retained by the links.
978  Using Arduino / Motors, Mechanics, and Power / Re: dc motor controlling by ECG signal value on: February 02, 2012, 02:48:56 pm
Amit -

If you want someone to write the code for you, you probably aught to go somewhere where you can hire a programmer.
If you want some advice then you probably should give some details about what your serial messages look like. This forum is a bunch of UNPAID folks trying to learn, and in some cases help others solve problems they encounter. That does not men that we wish to write your code for you. Show us what you got and what problem you are having and you would probably get a lot more help.
979  Using Arduino / Motors, Mechanics, and Power / Re: DC to DC voltage step down on: February 02, 2012, 02:08:22 pm
What you need is another "power supply" mainly a small stepdown transformer from 120 12 V AC. Go through a ful wave bridge rectifier and a regulator (7812) for your 12V needs, and through a 5 V regulator (7805)  for your 5 volt needs. All this is assuming you need less than 1Amp of low voltage DC. If you need more at 12V then you would have to size that part of the power supply for the 12V needs and still use the 7805 for the 5 V needs. A few appropriate Capacitors at each stage of the DC would clean it up and make the devices connected happy.
980  Using Arduino / Motors, Mechanics, and Power / Re: LIFA+servo position control on: February 02, 2012, 02:02:54 pm
A servo is a device that you control in Open Loop. In other words you tell it where you want to go and hope it gets there because it has no way of telling you it has completed the job. For closed loop you would need a feedback device - a potentiometer, an encoder, a bunch of switches...

Provided the servo is large enough for the intended application it works just fine. If it is too small, it may stall and never make it where you tell it to go.
981  Using Arduino / Motors, Mechanics, and Power / Re: MOTOR DIRECTION CONTROL on: February 02, 2012, 01:58:45 pm
Are your drives all set for step & direction? or are some of them configured with a forward and reverse pins?
982  Topics / Science and Measurement / Re: Differentiate between 1.0 VAC and 1.5 VAC on: February 02, 2012, 01:55:24 pm
TO read the AC voltage with an Arduino is going to require that you rectify it first - check your diodes carefully - they have approx 0.7 V drop. Bring your signal to the Arduino through a Diode with a Capacitor to ground to clean it up a bit and then to the Arduino. you will have approx 0.3 and 0.8 volts,

With a silicon Diode you have about 0.7 volts across the diode, Germanium about 0.3, but the silicon diodes are easier to find.
983  Topics / Science and Measurement / Re: New oscilloscope (without Java) on: February 02, 2012, 01:48:45 pm
Having a program on the Arduino that uses the serial port is no problem. I do it all the time when testing.
984  Using Arduino / Microcontrollers / Re: Little help with bootloading? on: February 02, 2012, 11:44:14 am
You don't need to buy a programmer - you Arduino can do that function - The ArduinoISP sketch on your Arduino board, mount yur new chip on a breadboard with your crystal/resonator, 6 wires from your arduino board to your breadboarded chip, a 120 ohm resistor from +5 to reset on your Arduino board. I made a little board that looks like this -
985  Using Arduino / General Electronics / Re: Using Arduino as ISP — Not able to programme anything on: February 02, 2012, 11:34:05 am
THis line right here has teh problem -

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for AT90USB82 is 1E 93 82

AVR is expecting to get an ID response back of 1E 93 82 and your chip is responding 1E 95 0F.

If you are sure you have everything setup correctly and this is just a newer version of the chip you could add -F to your command telling AVRDudue to ignore the signature and program anyway. It looks like its there...

What version of Arduino IDE did you use to load the ArduinoISP sketch? if you did it with 1.0 there is a bug. Load the ArduinoISP sketch using 0.22 or 0.23. With Arduino-1.0 the ArduinoISP sketch only works at 9600 baud.
986  Using Arduino / Programming Questions / Re: ATmega328 non arduino programmer on: February 02, 2012, 11:21:09 am
To find out how to program the various Atmel AVR chips a good place to start would be searching under Arduino as ISP.

The process is really quite simple, you just want to use Arduino0.22 or 0.23 ti load the ArduinoISP sketch in the board you are using as the programmer. I have used it to program 328 and 2313 chips. Takes longer to read about the process than to actually do it. An 328 chip mounted on a breadboard with power and crystal/resonator hooked up along with 4 wires and the grounds tied together.
987  Using Arduino / Motors, Mechanics, and Power / Re: Precision/Servo-like DC Motor Control? on: February 01, 2012, 01:23:02 pm
I think some folks are trying to make this more complex than it needs to be.

You could use a potentiometer on the output shaft - One side to +5, the other to ground and the wiper to an arduino analog input. You would need a drive for the motor that has forward-reverse. You would then have to figure out the move profile. This approach might tend to hunt as feedback from the pot might be a little coarse. You could instead use an encoder, more prescision, but not self centerring.
988  Using Arduino / Project Guidance / Re: Cheapest possible Arduino (DIY) on: February 01, 2012, 12:57:51 pm
All you really need is the ATMega328 or 328P, a resonator for the clock and a 0.1 cap from +5 to ground. You can build it on a breadboard and use an Arduino board as an ISP to load either the bootloader or a sketch. I have one running on a breadboard that I talk to through a serial port and it functions just like my Arduino board.
989  Using Arduino / Installation & Troubleshooting / Re: Uno wont load sketches (avrdude) trying to use Mega 2560 as ISP on: February 01, 2012, 12:45:43 pm
Why are you programming an Arduino board through an ISP?

The error message indicates that you have the wrong processor selected. What do you have selected as a board, and what do you have selected as ISP?

If you are running the ArduinoISP sketch you would want to select that as the programmer, and you have to select a board with the same processor as you are trying to program.

Also - Are you running the ArduinoISP sketch from Arduino-1.0 or from Arduino0.22? the sketch in 1.0 needs to be have teh serial speed changed (Serial.begin(9600) instead of (19200)) and teh serial speed changed in the AVRDude command.

expect=0x14, resp=0x64 would suggest that you have a 328 (the Ox14) not sure what 0x64 processor is.

you might try adding a -F in the command string so AVRDude will ignore the processor type.
avrdude -P com7 -b 19200 -c avrisp -p m328p -v -F -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m
990  Using Arduino / Motors, Mechanics, and Power / Re: Arduino chip as Stepper Controller on: January 31, 2012, 03:24:55 pm
Got to playing with assembly language - took my code size from 1200 bytes to 86 bytes.

Out of necesity, Arduino adds a lot of overhead to interrupt routines. Saves all the registers and such, but it would take a lot more power to analyze the code and reduce that overhead. Writing in assembler means I had to do the optimizing and I am responsible for what can go wrong...

I am using AVRStudio 4 to write and test the code (has a simulator built in)(even has a disassembler that will load the hex files and list them )
I recommend AVR Studio 4 over 5 as 5 is just to S-L-O-W...

Here's what the code looks like in assembler.
Code:
.NoList
.INCLUDE "tn2313Adef.inc" ; Header for ATTINY2313A
.List
; ============================================
;   R E G I S T E R   D E F I N I T I O N S
; ============================================
.DEF Conf = R16 ; Multipurpose register
.DEF StepCt = R17
.DEF StepMask = R18
.DEF Direction = R19
.DEF PortBHold = R20
.DEF PortDHold = R21
.DEF PortDMask = R22
.DEF SeqBase = R23
; ============================================
;   R E S E T   A N D   I N T   V E C T O R S
; ============================================
.CSEG
.ORG $0000
rjmp Main ; Reset vector
rjmp Step ; Int vector 1
rjmp Dir ; Int vector 2
reti ; Int vector 3
reti ; Int vector 4
reti ; Int vector 5
reti ; Int vector 6
reti ; Int vector 7
; ============================================
;     I N T E R R U P T   S E R V I C E S
; ============================================
Step: add StepCt,Direction
      and StepCt,StepMask
      mov ZL,SeqBase
 add ZL,StepCt
 Lpm PortBHold,Z
 out PORTB,PortBHold
 reti
Dir:  ldi PortDMask,8
      in  PortDHold,PIND
      and PortDHold,PortDMask
      breq SinNeg
 ldi Direction ,1
      rjmp DirEx
SinNeg:  ldi Direction ,-1
DirEx:reti
; ============================================
;     M A I N    P R O G R A M    I N I T
; ============================================
Main:
; Init stack
ldi Conf, LOW(RAMEND) ; Init LSB stack
out SPL,Conf
; Init Port A
ldi Conf,0 ; Direction Port A
out DDRA,Conf
; Init Port B
ldi Conf,(1<<DDB0)|(1<<DDB1)|(1<<DDB2)|(1<<DDB3) ; Direction Port B
out DDRB,Conf
; [Add all other init routines here]
ldi Conf,(1<<SE)|(0<<ISC00)|(1<<ISC01)|(1<<ISC10)|(0<<ISC11) ; enable sleep
out MCUCR,Conf
ldi StepCt,0
ldi StepMask,7
ldi Direction,1
ldi SeqBase, StepSeq
add SeqBase,SeqBase
  sei
; ============================================
;         P R O G R A M    L O O P
; ============================================
Loop:
rjmp loop ; go back to loop

StepSeq: .DB 1,3,2,6,4,12,8,9,0,0
; End of source code
Pages: 1 ... 64 65 [66] 67 68 ... 73