Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

Saturday, 24 November 2012

Telescope Arduino Stepper Motor Focuser Current Rating using 28BYJ-48 5V and 12V

The motor focuser is used to control the focusing knob of the Celestron C6 SCT. The controller board is Arduino Nano and the stepper motors is the 5V or 12V versions of 28BYJ48. It seems that the 12V version is using much less current as compared to the 5V version when supplied with 12V. It also should generate less heat.

Current Measurement
Arduino Nano and Driver Board : 40 mA

28BYJ48-5V supplied with 12V (inc arduino nano and driver board)
Max. speed (Delay@750µs) : 380 mA
Min. speed  (16000µs) : 510 mA

28BYJ48-12V supplied with 12V (inc arduino nano and driver board)
Max. speed (900µs) : 150 mA
Min speed (>10000µs) : 180 mA

The delay in microsecond as shown in the parentheses refers to the delay when changing the step of the stepper motor. The shorter the delay, the faster the motor will spin. From stall, the maximum stepping rate for the two motors are different and it is faster in the 5V version as shown above. Once the motor is running, the delay can be reduced slightly to achieve faster spinning. As for the 12V version, ~17RPM is achieved with 850µs delay and ~19RPM with 750µs delay.

Friday, 9 November 2012

PL2303 USB to Serial Adapter Code 10 Cannot Start

Update 24/11/2012
It's still BSoD sometimes. Not the version of driver I guess.

Update 13/11/2012
Seems good so far. No BSoD yet.

Update 11/11/2012
My desktop computer seems to be crashing (BSoD) sometimes when using the SPC900nc/USB hub/Prolific serial usb COMBO. I'm not sure which one is causing the trouble. I switched the driver to this one,

USGlobalSat Prolific GPS AllinOne.
Driver Date: 10/27/2008
Driver Version: 3.3.2.105

---------------------------------------------------------------

Error: This device cannot start. (Code 10)
Solution: Install using vista driver.
Result: Will be recognised as 'This a PL-2303 XA / HXA chip' when checked using the chip checker.

Serial DB9 Pin Layout
Row of 5 (Pin 1 to 5)
2 - Rx
3 - Tx
4 - DTR (Exposure)
5 - GND

Row of 4 (Pin 6 to 9)
7 - RTS (Amp-off)

USB Pin Layout

Red      Vcc
White   Data-
Green   Data+
Black   GND

Sunday, 28 October 2012

Arduino Rotary Encoder

http://www.buxtronix.net/2011/10/rotary-encoders-done-properly.html
Implementation with and without external interrupt. Using two encoders is also possible.

Saturday, 27 October 2012

Stepper Motor 28BYJ-48 5V

http://arduino.cc/forum/index.php/topic,71964.0.html
Gear ratio: (22X26X31X32)/(9X9X10X11) = 63.68395.    ( 283712/4455) 

Friday, 26 October 2012

Arduino Interrupt Software Debounce

Ref: http://www.dave-auld.net/index.php?option=com_content&view=article&id=107:arduino-interrupts&catid=53:arduino-input-output-basics&Itemid=107


int pbIn = 0;                  // Interrupt 0 is on DIGITAL PIN 2!
02.int ledOut = 4;                // The output LED pin
03.volatile int state = LOW;      // The input state toggle
04. 
05.void setup()
06.{               
07.// Set up the digital pin 2 to an Interrupt and Pin 4 to an Output
08.pinMode(ledOut, OUTPUT);
09. 
10.//Attach the interrupt to the input pin and monitor for ANY Change
11.attachInterrupt(pbIn, stateChange, CHANGE);
12.}
13. 
14.void loop()                    
15.{
16.//Simulate a long running process or complex task
17.for (int i = 0; i < 100; i++)
18.{
19.// do nothing but waste some time
20.delay(10);
21.}
22.}
23. 
24.void stateChange()
25.{
26.state = !state;
27.digitalWrite(ledOut, state); 
28.}