Monday, April 1, 2024

Fun for Cats!

 Arrakis 2.0 has been my coffee table for well over a year. I probably turn it on a couple times a week to just change the pattern currently on the table, or to draw new patterns. When the 1000 mm/sec spiral erase pattern runs, Ms. Kitty recognizes the sound that the table makes and comes running to chase the ball. She will push anything on the table to the floor so it won't be in her way. 

I'm hoping to catch that on video one day and will post a link here if I do. There's another thing I want to catch on video. Sometimes she spins around so fast that she loses her footing (maybe she gets dizzy?) and falls off the table. If I catch that on video, Ms. Kitty and I will be making the late night talk-show tour and probably die rich and famous.

Anyway, I was thinking about cat toys and which ones keep Ms. Kitty interested and which ones she gets bored with. I've come to the conclusion that cat toys that will hold the her interest for a long time should have random motion at speeds that she can keep up with or a little faster. The toys Ms. Kitty never seems to tire of are balls hanging by string on the end of a stick and a laser pointer. Both exhibit movement that will catch a cat's attention and move as fast as you move your arm. Everything else bores her to tears.

That got me thinking that she might find it interesting if I make the ball on the sand table move in random directions at random speeds. To that end I wrote a spreadsheet that would generate the necessary gcode. The spreadsheet generates gcode that will move the ball a random amount at a random speed, then stop for a random period before darting away.

The spreadsheet needs to know the size of the table (or the area to which you want to restrict the ball's motion), the minimum and maximum allowable speeds, and minimum and maximum allowable dwell time. It's currently set up to create 500 moves, so if you average 2 seconds of dwell time at each point, you can expect the pattern to run for about 17 minutes. That's long enough for Ms. Kitty to lose interest (she's usually good for just a few minutes), but can be easily extended if she ever demonstrates interest for the duration of the pattern. 




Now I know what you're thinking. "I'd like to try this with my cat and sand table." There's a link to the spreadsheet, below, but before you get too excited, you should know that I run the ball between 500 and 1500 mm/sec with acceleration at 10,000. Ms. Kitty won't pay much attention to anything slower. Arrakis 2.0 achieves that speed by using servomotors instead of steppers. If your table uses stepper motors, it's probably limited to a maximum speed around 100 mm/sec, and that might not draw much interest from your cats.

The servo motors are NEMA17 size, so you might be able to fit them into your sand table, but they also need step/direction/enable signals to run, and a beefy power supply- Arrakis 2.0 uses a 350W 24V supply.

Here's the spreadsheet.

I tried to implement similar random motion using arcs instead of straight lines, but it's a much more complex problem- the arcs can go beyond the limits of the table and that causes the table to stop moving. If I make any progress on it I'll post it.

No comments:

Post a Comment

Leave comments or a questions here and I'll try to post a response as soon as I can.