Sonsivri

Electronics => Projects => Topic started by: sfiga69 on August 26, 2016, 08:49:19 20:49



Title: Spindler RPM counter for CNC
Post by: sfiga69 on August 26, 2016, 08:49:19 20:49
My little (puzzle) project:
RPM counter and voltmeter for spinle of my CNC.
What you need:

digispark with Attiny85
LCD 16x2 + I2C serial conveter with PCF8574
RPR359 or RPR220 Reflective sensor
few other components

in attacched
1) proteus project for rpm/voltmeter with firmware in basic
2) proteus project for sensor
3) photo

Remark:
power supply 12V.(5v are formed by digispark)
RPM count over 40000 rpm with 2,5 readings at second, displays the average of the last 3 readings
votmeter 0 to 50V.

Note:
The sensor must read 8 state changes every lap, so the reflective object is to be divided into 4 reflective and 4 non-reflective areas


Title: Re: Spindler RPM counter for CNC
Post by: Wizpic on August 26, 2016, 11:00:48 23:00
Very neat little project, I was thinking for something like this for my CNC machine. has mine shows hertz


Title: Re: Spindler RPM counter for CNC
Post by: frasenci on September 04, 2016, 05:58:34 17:58
Hi , very interesting for me because I have not been able to get PCF8745/8745A working in Proteus 7.1 with Arduino I2C code for I2c That is ok running in my prototype.  I could also write code in Proton Basic for PIC.
Would yo please give me a hand , I am not able to read both of your attached project files. ( Extension .pdsprj )

Congrats on your RPM indicator, I love this kind of applications.

Thank You
Greetings
Francisco


Title: Re: Spindler RPM counter for CNC
Post by: mars01 on September 04, 2016, 08:58:20 20:58
Would yo please give me a hand , I am not able to read both of your attached project files. ( Extension .pdsprj )

In order to open the attached Proteus 8.x project files (files with extension .pdsprj), use this:
http://www.sonsivri.to/forum/index.php?topic=62554.0


Title: Re: Spindler RPM counter for CNC
Post by: sfiga69 on September 04, 2016, 09:26:43 21:26
@frasenci
in order to work with this project, you need to install proteus 8.x and bascom avr 2.0.7.8
you can install proteus according to the reply of Mars01 and bascom from: http://www.sonsivri.to/forum/index.php?topic=41171.msg179910#new
in bascom avr you must also add the attached library


Title: Re: Spindler RPM counter for CNC
Post by: frasenci on September 05, 2016, 11:30:33 11:30
Thank you both sfiga69 and mars01 for your support.

I did not give up with the PCF8754 in Proteus 7.1 and finally got it working.
It was just a matter of the I2c adrress of the simulated part . Configuration in attached picture gives out 0x3E. ( Range = 70h - 7F )

Learned from this exercise is that I can use standard I2c-LCD code library for Arduino and simulate my prototype entirely in Proteus. ( once again )

Thank you again
Greetings
Francisco
  
  


Title: Re: Spindler RPM counter for CNC
Post by: nPn on September 18, 2016, 09:22:19 21:22
Very nice. Have you thought about increasing resolution and closing the loop to control spindle rotational position? Then you can tap holes (probably only in soft materials since it's not a mill).


Title: Re: Spindler RPM counter for CNC
Post by: sfiga69 on September 19, 2016, 10:09:05 22:09
Have you thought about increasing resolution and closing the loop to control spindle rotational position?

No, at the time it  is enough for me. It may be that further on I think about it