I have got by a colleague the Gyro Twister Powerball that's a lot of fun and makes me sweating. The manufacturer claims that up to 10.000 rpm shall be possible, of course I can do more - but how to prove?
My Solution:Recently I have found the Cypress CY8CKIT-148 PSoC 4700S Inductive Sensing Evaluation Kit... and was keen to see what I can do with it. As I do not like any friction to reduce my speed Inductive Sensing can be a solution as it works contactless. Further, no special modification of the ball is needed, no 'sender' or similar needs to be added, just a small copper foil, that hopefully will not bring my ball too much out of balance. By the way, Cypress calls the technology 'MagSense', but don't get confused, no magnet is needed, it's just measuring the inductance by a simple coil. So each metal works, like I mentioned, I am using a copper foil.
Well, if I can detect the copper foil, then I can count the number of rotation within a defined time slot. Doing it for 1 minute I will get the rpm, or counting for 1 second and multiplying it by 60, to get a higher display rate, with less accuracy. Well, accuracy shall not be the topic of this demo, so let's see what is possible by an easy demos setup with the Cypress kit.
The CY8CKIT-148 Inductive Sensing Evaluation Kit, based on the PSoC® 4700S demonstrates buttons and a proximity sensor using Cypress' brand new inductive-sensing technology.
It has three buttons (metal foil over PCB coil) and one proximity coil with larger diameter available directly on the kit's PCB. Additionally a user can order the CY8CKIT-148-COIL Inductive Sensing Coil Breakout Board that features 16 total inductive sensing coils and allows some experiments related to MagSense like
- Proximity and touch detection using a single sensor
- Rotation angle detection with a rotary encoder
- Linear position encoding with two 100x8 linear encoder coils
- Horizontal gesture detection with a six-segment sensor array
For my application just the proximity and touch detection with a single sensor is required, so I am fine with the main kit and the proximity coil in the center.
Block DiagramIn order to use the demonstrator stand-alone I have connect a popular 0.96" OLED display by I2C to the kit. Unfortunately, the kit has nearly no free IO-pins, but as I am just using one coil, I have connected the display also to J4 using J4-3:P04 for I2C/SCL and J4-5:P05 for I2C/SDA communication. To connect the pins directly to the PSoC4700S - no 10pF are required, as I will not use these pins for MagSense coils - I had to assemble two 0 Ohm / 0603 resistors to C52 and C53 (or you just can short circuit it by a small wire).
Within the PSoC Creator project the UART must be disabled, and the I2COLED component can be enabled afterwards. Otherwise the PSoC4700S does not have enough SCB resources, as another SCB is already used for the MagSense tuner, that I like to keep.
Note: The software for that display is used from the Adafruit graphics library ('gfx_ functions')
PSoC Creator ProjectI started with CE225409_ProximitySensor software example provided by Cypress, and could successfully play around with the on-board buttons and the proximity coil, that detected any kind of metal like a coin or scissors.
A 1-second timer was added that allows me to count the detection events within two timer events, what directly gives the speed in Hz. At the beginning the speed was given out via the UART.
The complete source code is attached. A simple state machine is used to control the program flow.
1. STATE_WAITSTARTWait until the copper foil is detected for first time and then start the 1-sec timer.
2. STATE_WAITSIGNALRELEASEWait until no copper foil is detected.If one second is passed then go to 4.
3. STATE_WAITSIGNALWait until the copper foil is detected again.On detection increase the rotation counter and proceed with step 2.If one second is passed then go to 4.
4. STATE_TIMEOVERDisplay the number of rotations (= Hz) and multiply by 60 to get the rpm.
Result & ConclusionSeveral tests have been done successfully to confirm the functionality.
Although speeds of more than 10.000 rpm could been measured, the original plan to measure the max speed of the Gyro Twister failed due to mechanical reasons. On high speed rotation the Gyro Twister cannot be hold stable on top of the pcb coil because of its high gyroscopic loads. That's why often the speed of such systems is measured acoustically. More information can be found on the German Wiki page for Gyro Twister.
The EndOut of a 'simple' idea I could learn a lot about MagSense. Thanks to Achim who teached me about using the MagSense configuration and tuner tool for calibration.
Together with the already known CapSense from Cypress, PSoC microcontroller may allow to realize much more sophisticated applications where capacitive or inductive or both sensing is required.
Well - that's it!... for the moment. Stay tuned!
Regards, Holger
Comments
Please log in or sign up to comment.