Wow.. got the problem solved for communication with ca-45 nokia data cable. I have to rewire the resistors actually made a small stripboard and wired the complete stuffi.e. Rx/Tx and Gnd.
previously i was using an extension cable between the Laptop and the USB hub of CA-45. This cable i think was culprit... Now i just connect the CA-45 cable directly to Laptop.
you can see the Hyperterminal recognise the port, Arduino too recognise the port. I used Arduino Serial communication window to send MMMMMMMMMMMMMMMMMMM to Arduino and you can see the No. of Mmmmm display on LCD..
One wiered things the COM on LCD do not display the Port..But when i send M it display M...i.e. COM: M ....
All thing working fine except the above problem.
The reset button still not working..may be in later stage i\with help of you the problem may be resolved...
I checked the voltages at Rx and Tx pins of at ATMEGA328P pins. With Rx-Gnd = 0.5V and with Tx-Gnd= 5V, The CA-45 cable Rx=0.1V and Tx=3.5V, Have i to change the resistor values between CA-45 Tx/Rx and Arduino Tx/Rx to get it work properly?
Hi, I have started building a PCB a while ago the brain of which is ATMEGA328P.. The circuit can control two IRL530NS transistors and contain a shield for Easydriver...
The circuit works fine you can see the following Youtube video:
The above circuit was specifically made for DAVID LASER SCANNER control hardware... It has capability to control LCD display, 12Watt Light a Laser and motor controller.... I have posted the build process of the above circuit in David laser Scanner forum: http://www.david-laserscanner.com/forum/viewtopic.php?f=9&t=2655 LATEST UPDATES AND PROBLEM My controller can not do plane-less scanning and it can't interface with the laser scanner software.. This is because i have no Serial port connection at micro-controller hardware to send/get data from the Scanner software through Laptop USB port... I searched the Internet and found some expensive USB FTDI cables 15 US Dollar up to 20US Dollars.. that is not a cheap option... So decided to hack Nokia data cable CA-45 for that... Today i went to bazar and searched a CA-45 cable and i found it 80Pakistani Rupees( I US dollar=86 Rupees).. It has only 4-pins out toward the Mobile side connector and very close pins... Difficult to find the right pins i.e. GND, TXd and Rxd..... I put a small wedge at the edge and the connector pop out into two.. and i found only 3-wires coming out of connectors..RED, BLACK and WHITE... the RED one was connected to the external body of the connector, so in first guess i found it GND.. but to confirm, i used multimeter and it was GND, the BLACK and GND gave me 3.5 Volts and WHITE and GND gave me some 0.2V DC.. As the TX pin is always at high voltage as compare to Rx so found that the BLack=Tx..I also found that the Device appears as COM5 in device manager.. Hurra..that was a success....
As windows 7 has no Hyperterminal available so i downloaded a 30 days trial of "Hyperterminal Private Edition".. Then i combine the Rx and Tx pins and started the terminal with :
“Bits per second:” to 115200 “Data bits:” to 8 “Parity:” to None “Stop bits:” to 1 “Flow control:” to None and COM5 port selected and typed in Hyperterminal window... and the Keyboard keys Echoed on the hyperterminal window.. so my Tx and Rx pins are rightly identified.. HURDLES- I NEED YOUR HELP: i was able to communicate through Hyperterminal by combining the Rx and Tx connections of CA-45. Todays when i connected the cable wires to Rx and Dx pins of Arduino and Gnd to the common Ground.. I checked the DEVICE MANAGER got the PoRT COM1 and device was recognizable.. The Arduino IDE also got the COM1, even the Hyperterminal got the COM1too but...
1- The David Software unable to recognize the COM port as when i set both the toggle switch to AUTO and enetred all the settings as MATTIA described in his planeless scanning tutorial..The LCD display did not show COM1:(
2- The Hyperterminal was unable to open the port COM1.
3- The Arduino was not able to upload sketches..
SOME MORE EXPLANATION OF PROBLEMS
1- In above pictures, The different COM ports is because i change the COM ports is DEVICE MANAGER from COM1 to COM10, to check why the Arduino not connected....So you see COM5 and COM1 in different screen shots...
2- My Arduino RESET button do not work.. I don't know why.... If you see in the picture... If i press the RESET button it should restart the David program, but it not doing....
3- The Tx and Rx from the USB is connected to Rx and Tx pins of arduino respectively. This is because Arduino need it to connected like this for cross talk...
4- When i remove the ATMEGA328P and install on the original Arduino, the RESET , RX and Tx works because i can upload new sketches... This also means that the IC legs are not faulty.. Their may be some fault in my DIY Arduino schematic, so i am posting the drawing for all of you to trouble shoot..
5- The USB (CA-45) ground when not connected to main Arduino board ground, then i get the erratic results on LCD display i.e. the steps start increasing although all the toggle switches in Auto mode.... but when i connect the USB ground to the Arduino board common ground the LCD display stablized, but do not shows COM:....
6- When i remove the USB from the computer side, this erratic behaviour on LCD start again....I think something is floating...
a) I am researching, some small mistake or some wrong components or some missing component...and also need all of your help including the great Walter... b) I am also looking forward of your suggestions why my RESET button do not work...
Thank You to all who responded:) Sorry for delay in response because my internet connection was down...
It seems that the Arduino 0017 Zip file at the server is corrupt with Avr... ( This is because i downloaded twice from different computer but while unpacking i got some error (corrupt avarice.exe) i dont know how to post the picture...)
So i downloaded Arduin0016 IDE and unpacked it..and move the AVR folder into Arduino 17 unzip folder..Now its working fine..
Last night i studied some more and made a simple pseudocode...
Consider we have two potentiometer at both carriage X and Y. consider both Pots divided into 0~5V ( corresponding PWM 0~255) we can map..
To get the value of Hyp. of triangle the pseudocode..
//Initialization of variables
hyp=0 Old_PWM_A=0 New_PWM_A=0 Old_PWM_B=0 New_PWM_B=0 Constant_RPM_Wheel= 5 //lets suppose this is initial rough value //This value will later fine tuned, but for the time now consider the //sewing machine Paddle is pressed at this when 'hyp=0' or there is //no movement in carriage.
/* When the Machine carriage will start movement (manual or Computer controlled) we will convert the Previous New_PWM values into Old_PWM values */
New_PWM_A= Some value we will get when Pot. change value Old_PWM_A= previously stored New_PWM_value at A New_PWM_B=Some value we will get when Pot. change value Old_PWM_B= previously stored New_PWM_value at B
Now calculating the value of 'hyp' variable and put some DELAY hyp= SQRT(Sqr(New_PWM_A-Old_PWM_A)+sqr(New_PWM_B-Old_PWM_B))
This hyp value will be scaled or Mapped If this hyp!=0 then we can run another DC motor that will press the paddle foot with simple mechanism.
Okay.. One more thought, let we install the two knobes (potentiometer) on the X/Y carriages..As you all know the PWM stuff , you rotate a knobe and motor run in direction following the knob movement.. http://arduino.cc/en/Tutorial/AnalogInput
Now consider you scalled both knobes for X and Y carriages Length..For example The X knob if in the middle of small X-carriage will output the same value as if Y-knob is middle in the Y-carriage length.. http://www.talkshopbot.com/forum/messages/2/49125.jpg We can add gears to take the knob one full rotation through out the length of carriages and scal them equally..
Now when knob moves they will give us some signals and we can then take the hyp. of triangle and then can manage to programm the arduino to control a mechanism that will press the speed control pad up or down.
Hi Pauland Raygun..Thanks for your effective insight on the stitch regulator thing... Its good to know the whole thing is possible with Arduino with little difficulty and motivation from you... NRaygun, Its not difficult for me to move the machine on the carriage...These type of machine are not that heavy..I have built my CNC machine and the Y-axis Gantry is 3 times heavier than that sewing machine, and the Y-axis Gantry is moved with 200 Oz-in Nema 23 Stepper Motor at 70 inch/minute (I have not used Arduino on my CNC).. However Arduino can do much more than that.. Now as i earlier said that my interest is only to get feedback from the carriage by the help of encoder and then make a SKETCH in the Arduino to control the DC Motor on the sewing machine..
3- For creating the ART i can use any CAM software ( I have Vectric Vcarve Pro) to produce Gcode that will be run by Mach3 Machine controller software. I will create the Gcode by using PROFILE CUT Option in the CAM software on any design vectors.
4- Currently i can send the Gcode to Mach3 and drive the machine but i am stuck into the stitch regulator thing... This is what i need to control with Arduino. Some of my initial experimentation to get an idea for mounting the sewing machine on my Home made DIY and some of the results.. I have drawn PENTAGON.. but the stitches worse:(
http://www.cnczone.com/forums/attachment.php?attachmentid=73182&d=1231515169 5- What am I thinking is to put the rotary encoder on the carriage slides so that when the carriage moves the rotary encoder also rotate like a wheel... Now i will have two rotary encoder one on X-carriage and One on Y-carriage... What i understand so far about the above professional cruise controller is that it compares the output of both encoders and generate the signal which ever is move fast....This higher encoder rotation will be the input to the Arduino...
6- Now I have two options: A) To use the same DC Motor on the sewing machine and PWM and convert the output to that DC Motor as a Voltage..as Raygun suggested... For me, i so far understand that the Machine Paddle control the Voltages given to the Machine Motor to move fast or slow... When you press the paddle harder the machine run fast and vice versa..
B) I can install a seperate DC Motor to give the input of encoder and that DC motor rotate the machine wheel to regulate equal length stitch..
7-Now to experiment, we can see How many rotation of sewing machine Wheel require to One needle IN and Out (One stitch)..From their we can get the idea of How many rotation of encoder will be require to rotate the wheel to get the ONE stitch..This programming can be done in Arduino..
So now I will use the stepper motor to drive the machine with Mach3 and a stepper controller...On this motion of carriage i will give instruction to sewing machine wheel motor to regulate the stitch and for this i will use Arduino and Two Encoders..
Hi to all great minds:) I want to make a low-cost Stitch Regulator for a quilting machine for my Wife... I will place the quilting machine on X and Y carriages and this will move the whole quilting machine in X/Y direction.. The X and Y carriages will be controlled by stepper motor by the computer...
Now I have search on the internet and found many cruise controller for sewing machine..The purpose of those controllers is to give the equal length of stitch at differnt speeds of carriages... they are using encoders at X and Y carriages that sense the motion and send the movement into the cruise controller circuit that then send command to the sewing machine to regulate the stitch..These controllers are normally plugged into the sewing machine Padle controll port..
Can we do this with arduino... I only need arduino to take the signals from the encoders and regulate the stitches... I will not use arduino to control the X/Y carriage stepper motors..
You can see the professional cruise controller here