Sandypi

Hi, I didn’t try with grbl 0.9, I did small tests with 1.1 only.
@vincentbraillard tested it but was having problems as well (I think he was able to move though). I’m not an expert about grbl… Is there a big difference or can you try to update to 1.1?

You must also set a feedrate like f40 for exemple

I think my arduino can’t later version, but it"'s not that important I will try to use another control board.
before I print I set the feedrate via the terminal and got positive ack
$110=800.000
$111=800.000
$112=800.000

I think @vincentbraillard means to use “G1 F40” after connecting to the board.

If this solves the problem you can put it in the settings page in the “on connection” script section to have it done automatically when you connect to the board

1 Like

ok thank you, I’ll try that :slight_smile:

2 Likes

I think that everyone could benefit from merging several software pieces together. All are lacking something and it seems that most of what is needed in total exists, seperately.

Sandify is great, it does not have a way to directly control the bot. It is great for generating designs but, the amount of steps between starting and running the design can take a few minutes.
The prebuilt pi image is great as well except that the interfaces available for control are generic. Again, it is fine but, not easy for someone walking into a living room that has a table sitting there to play with.

Sandypi, which I have not yet tested and will try tonight, looks to be capable of controlling and doing playlists. Other than that it is bare bones at this point.

markroland/ sand-table-pattern-maker

This has a great selection of patterns to mess with and you can export them to use in sandify. Sandify allowing you to move the patterns around the table and set the size of the table is really great.
with rolands software You can modify the project files to change your table size and the rendering size on the site and then create patterns for your table specifically. The variable for these settings are not available on the front end and require modifying the project itself. One very cool pattern tool it has is the ability to free draw. This is something I think people would like very much. hand a tablet to a kid and have them draw whatever they want. export, upload and draw. That could be made to work with a button push to start the whole process somehow.

I think that these three projects can come together to create the best combination of things. Together they cover all you could want to do with a sand table and even a drawing bot. I managed to get the mark roland stuff working for my setup but, cannot get the variables to be public for use in the site so far. I have very little experience in js/html and can mash things together to get something that works. I bet the devs in here could do it much faster/better than I could ever do.

That is often harder than just rewriting features from one into the other. Combining software that has no design to do that in the first place is like combining a lego set and an erector set.

It would be possible to skip the same step and upload step to move a pattern from sandify to sandypi, but I would rather add features to sandify. Especially because it is not limited to sandypi users.

I appreciate the feedback, and I like to see features other projects do better. I will not be working hard to combine these projects though. The best we could do bundle sandify into a sandify image, while finding a web socket or something to connect more closely.

I haven’t looked closely at markrolands, but it looks like a lot of duplication (which is not offensive at all). It would have been better to improve one and not both of them. But these are passion projects. You can’t force someone to work on a project for free.

absolutely understood. It does seem like there is a lot of crossover between the projects in terms of function.
Since your project is the most used one out there, I would hope that others would contribute to the project to implement those changes over time.

I am playing around with the code from each to see what I can do myself but, some of the patterns available in the roland software are pretty neat. Of course, it would have to be written for your setup to be able to move the patterns to it.

The playlist/control side of sandypi is just a wish list sort of thing. I know that you and the others who have built out software are doing a lot of work to get where they are now. Since they all seem to be trying to get the to the same end, maybe the best from each can come together some day.

I agree with the issue of different softwares doing the same thing. In my mind, sandypi was born to be like a “Octoprint” for sand tables in a way that sandify is the slicer that feeds the files into sandypi. From this point of view it doesn’t make sense for sandypi to implement drawings creation mechanics, but it is more logical to get drawings directly from sandify and focus on the table control in a specific way.

Still in my mind, sandypi should have been a smaller and faster project also :grinning:

This is just to say that (as you also pointed out) the project it is still bare bones… I’ve been working a lot on it but the time I can dedicate weekly is never enough… Now I’m working hard to implement the basic and fundamental features that must characterize the software, bug fixing stuff, trying to improve performance here and there, and so on… At the moment I had great feedback from @vincentbraillard who have been testing it for few weeks now. He’s also giving me back a lot of suggestions and ideas. Still, the problem I have is I cannot manage everything in the short term on my own :sweat_smile:

I already had in mind (more or less from the begging I should say) to ask @jeffeb3 about some APIs to make sandypi and sandify work together (not something like “do it for me” but more like “how should I do it” and implement them myself if necessary). But I think it doesn’t make sense to spend much time on that until sandypi is mature enough (tell me if I’m wrong on this).
In the same way, in the future I’m more than enthusiast to have the software installed on the V1 pi image or whichever, but for the moment the software is not ready for something like that.

Lately I’ve seen that some people are starting to play with sandypi. I think I’m not ready to make too much advertisement for the software since it is still an “alpha” version, showing what the software should be cabable of but with a lot of sharp corner to be rounded off. Still, if somebody would like to try it out and give me some constructive feedback (positive or negative) this is exactly what I’m looking for. :slightly_smiling_face:

1 Like

I will be playing with it tonight, hopefully.

Looking at your software, I figured it was for playing the already created paths. I like that you are thinking of it as octoprint for sandtables.

I only recently dug into everything and actually built the motion table and I am working on the actual table build now. it is about 1100x550mm for the sand area. I was trying to find something that wrapped everything up so that I could drop it in place and expect others to be able to figure it out without working too much.

That all being said, I have never built with nodejs before and I just loaded the sandify project to see how it all works. It is very different from what I thought I would be looking at. I was able to run it locally. Now I am trying to change things to see what happens.

I now understand what @jeffeb3 meant by not being able to combine them. I figured it was more that the veriable would all have to be redefined and libraries would not be compatible and whatnot. It is more than that. rolands code is strictly html/css/js. It can be modified and then reload the site real quick to see what happened.

I would like to see if he would contribute his work to sandify. At least some of the pathways he had in there. the free draw one very much so.

With Sandypi, being able to run playlists of all the things I would add to the storage is great on its own. being able to home the system and clear errors without a cnc interface to confuse users. That helps a lot.

Being able to control addressable leds seems pretty nifty as well. Being able to create light motions to match the ball movement would be pretty cool. combining lighting and path playlists together seems pretty amazing.

on another note. If you do use octoprint to control, there is a plugin I have been using for a couple years for printers. It allows you to control outputs on the pi and do a bunch of other things. It is called enclosure.

You can use it with mqtt also. One very cool thing it does is allow you to create M codes to listen for. Then, it can act on those mcodes to do whatever you want next. I have one that triggers a relay for a small amount of time to “push” a button on another device. You could imagine inserting the custom Mcodes into the gcode so that certain lighting routines are triggered. The m code could trigger shell scripts to do other things.

It is definitely worth looking at to play with or for inspiration. being able to create custom macros for use, whenever needed, is great.

Not as easy as it looks… :sweat_smile:
I mean, adding the lights control can be done easily (indeed it has quit high priority in the list and I’ve already prepared some of the code but only for WS2812B at the moment…)… The hard thing will be to sync it with the code running on the table driver… Those firmwares are using buffer for the commands so there is a delay between the command being sent and the execution which means the software needs to simulate the behaviour of the firmware to estimate the position of the ball and animate the lights accordingly… Just to tell that even simple things can be much more difficult than they looks :sweat_smile: Still it is something I would like to have/implement in the future, for sure…

Unfortunately I’m not. I started from scratch and sometimes I regret it but now I have the bicicle and I need to ride. Still, I had a look at the octoprint code a while ago and the architecture is quite similar even though that one is much more defined and complex (I think it is also 1000 times bigger than my software more or less :smirk:)
But you never know, we may get a similar feature in sandypi as well if there is interest or need for that and somebody implements it :wink:

I will talk design with anyone, all day long. I love it.

It would make sense to have something like a drop down or option from the export menu to send it to a local network socket. Either a web socket, or maybe some kind of post. Thinking of your analogy, this would be like the way prusa-slicer or kiri:moto can send gcode directly to an octoprint instance, and can even command it to start. That would be a slick feature.

Another option is to break sfy (I’m abbreviating so the forums doesn’t link every other sentence :roll_eyes:) into some libraries and the UI. So things like the exporters, shapes, transforms, limit code could all be reused. The one place where that would be really helpful in sandypi would be to be able to import code from somewhere else, like a thr file, and then be able to preview it, scale it, apply circular or rectangular limits, and then save it in a format the sandypi could immediately use. Or at the most extreme, you could recreate all of sfy with your own theme, and some options (like export to thr) disabled. That seems like some heavy lifting.

Honestly, if someone gave me a months vacation and told me to make sfy connect to a machine and send gcode directly, I would prefer leaving sfy basically alone, and making a completely different interface to do all of that. I would have an exporter for the controller, and when you hit export, it would post to a completely different page, with controls, file system access, etc, and the gcode would be pre-saved. Given that, it doesn’t make sense for me to do that, since I think sandypi has a strong head start.

The only reason I can even pretend to keep some kind of quality in sfy is because the scope is limited. Also, don’t forget that there are also users who export the sfy patterns on thr machines, or use them to control pen/plotters.

You can call M115 to get the current position. Some versions of Marlin will not actually calculate it, they just send the final position in the planner (which you already know). But you can turn it back on, so it will report the actual position. The trouble comes that Marlin may pause on slow controllers to calculate and present that value. But we don’t really care, since we won’t likely notice it in a sand table.

The sisyphus table does have LEDs and they do sometimes sync with the angle. That’s cool, but it is 90% of the cool to just have interesting patterns that don’t really sync up, but are slow enough that you can’t really tell. I am planning on installing some WS2812bs in my next ZXY table, but I will just control them with WLED, and not worry about getting it synced.

Making the LEDs controlled from sfy is way over the scope I am willing to accept. I can’t imagine that being anything but super confusing to the end user, especially the end users that don’t have LEDs.

The thing I hope to get from sandypi (I still haven’t tried the software, sorry) is:

  • Save all my patterns in one place
  • Give me some visual preview. It doesn’t have to be perfect, but something that I can tell the difference between the ones I have saved.
  • Some kind of playlist capability. We have added layers to sandify, but it bogs down pretty fast, and I want to be able to mix and match patterns, or do things like click in an erase between some patterns. I don’t know how that interface looks, but I don’t really like the ones I’ve seen.
  • Some basic controls to move it x+10, or home, reset, turn off the pi, stuff like that.
  • A pretty looking status page. It doesn’t have to mimic the preview with incremental patterns, but something that shows what % it has completed, what an eta is (maybe) and a preview of the finished pattern.

If we ever get the sfy “save/load” stuff working in a real way, it might be nice to detect if the pattern was from sfy, and then add a button to open an editor to immediately edit that pattern. But I have no idea what that would take for either of us.

I love that entire last post. I tried diving into the code yesterday to understand the setup. Played with colors to see what was what without breaking anything.
Part of the css is coming from an external source, right?

Wled is a great project. So many interfaces that work with anything you want to use. I had 10 boards made for Christmas lighting. I use openhab for my home automation and any time I can use mqtt with something, I try.
I didn’t think too much about marlin because I don’t into the grbl stuff for this project. That does make it harder to cover all builds with one control system. That must complicate things.

I mainly use 8218b LEDs. They’re cheap and reliable. If two controllers are needed for motors and LEDs and both use blocking code, then it would be hard to coordinate if they had to give position information and execute lighting to match.
I was thinking that it could be a time based thing that could be coordinated manually. Run the sand table and get a time for movements throughout. Wled could then be manually timed for effect sequences to make it look like it’s coordinated. If there were triggers available in software, then one could send a start command to the other and then send an end command so that both controls know where they are at in the beginning and end.
This is how a machine shop might use a robot arm with a lathe. Using modbus the lathe would send a trigger stating the job is ready. The arm opens the door, grabs stock and places it within the jaws. Sends a command stating the stock is in place. Lathe grips the stock. Tells the arm it has it. Arm closes door and states it has. Job starts and ends. Repeat.

This is exactly what I was thinking about… I don’t want to us sfy like a library but I would rather prefer to have it communicating with sandypi and have both open in two different tabs, one ready to design and the other ready to manage the files… Still, I’m not ready for something like this now… I just want to have the software to do its fundamental stuff first.

One thing I noticed is that the less you communicate, the less errors you get :sweat_smile:… What I mean is: the more messages you send, the more the serial is busy and that increases errors probability. With marlin is not a real issue because it’s using checksums and it asks to resend broken lines, but for other firmwares like grbl I was not able to find neither of the two, thus it can be dangerous to have errors (like you swap a 1 with a 7 and you move 700mm instead of 100). And also, even with high baudrates it is already a quite busy communication with drawings data only, expecially the ones with a lot of points close together.

Still, with something emulating the movements in the background and correcting them once now and then with the “give me your position command” (grbl also have it with the “?” command once the $10 parameter is set correctly) I think the result can be quite good (looks like a sort of kalman filter if you know what I’m talking about). The only thing is that it requires quite some work to get it running correctly. This is something I would like to add but it is not a priority now. And I agree with you that leds control is something unrelated to the gcode so to sfy as well.

That is exactly what I want it to do. We have all the drawings together already with their previews.
About playlists: I’m working hard on them lately but it is still something in progress… It is possible to add drawings to a playlist, add timing elements (like a delay between drawings), run a random element from the playlist or from the full list of drawings and few more things (not really that much). Still there is a lot of improvements on the list…

Basic control for the moment has only the homing button :sweat_smile: and a terminal to write gcode manually. I’m still thinking if for a sand table makes sense to have also incremental moves, but probably it is better to have than not having them

The status page is not satisfying at all at the moment… It is a preview of the drawing without % or eta… I already have in mind how to put this down but didn’t do it yet…

I had a look… That will save me so much work! I will have a better look when it is time to work on the lights control. Thank you for the suggestion :wink:

It is a tricky problem. For example, you might want to do pattern star, which ends up on the edge, and then do a pattern square, which comes in and ends in the center. Or you might want to do star, but only after an erase pattern, or star and then square, but maybe you want to reverse square so it matches up with star. Then, when you do random, you may want to combine a few (<3) patterns together to be one atomic operation. For example, erase-star-square might be one unseparable piece.

I am all for doing the minimum first, and this may not be the easiest solution. But it might be nice to design your objects in a way that could support playlist of playlists, and to think there may be metadata like reverse, or erase first, and apply that only to the instance of the pattern in the playlist (you might want star to be reversed in playlist A, but not in playlist B).

I may be biased, because I want to check out the machine, and I think it would be especially interesting to do “etch a sketch” like drawing with buttons.

  • Repetier host does jogging in a funny way. It stores a prediction of the current position, and something like a G92 doesn’t reset it. It is annoying (to me), but it does a good job of sending absolute coordinates and not sending it to the moon.
  • Pronterface (I think) sends the G90 (relative), then G1 X10 F600, then G91 (absolute, IIRC, I always get 91 and 90 confused). This would let you let marlin figure out what to do with that command, and you wouldn’t have to keep track of limits or current position.

This seems like a really fun part of the project. Making it pretty is always fulfilling. ETA can start with just a number of lines through the file, and then the slightly fancier of the distance between points, and then slightly fancier would be determining an ETA from basic feedrates, and then ultimately integrating accelerations and other Gcodes (like estimating home time). I’ve seen all of these estimates in octoprint through the years.

WLED is awesome. I have 3-4 of them in my house. My 6 yo knows the patterns better than I do and it connects to home assistant (pretty well). There is a lot of work to do before you could do ball tracking with LEDs. I think it is just a distraction right now. There is an entirely different world that opens up with things like xlights, which I have barely scratched the surface. I plan on using WLED to just do some pretty patterns while the sand table is running. Having any feedback would just be frosting on the cake.

Sounds about right. It wouldn’t need to be every second, every 1/4 s or more could be fine, with some smoothing. But I think this lesson has been learned with temperature graphs. Octoprint doesn’t poll the temps, Marlin added a command to make it periodically publish the temperature. I imagine a similar fix for position (for leds, or for some kind of preview functionality).

I’m sort of doing it like this actually… How I’m doing it could be refined really but the idea allows exactly for something like this…

About everything else: there are a lot of parts that are really interesting! I really like working on this project and I enjoy spending almost the entire freetime I have on this… I truly think that with (a lot) more time and some refinements the software could become interesting to use… Only time will tell :wink:

1 Like

Don’t get overwhelmed by feature creep. Some of the features jeffeb3 mentions can be done by the user by manipulating the files. For example, having a randomized playlist but pattern A-B-C should always be played in that order can be done by combining their gcode into a single file.
And having reversed patterns can be done by exporting 2 files from sandify, one inside-out and one outside-in. As long as the software can detect where a pattern starts and ends it can select a fitting pattern to play after one is finished.
I think something important would be a good scheduling feature, for example draw pattern then wait x minutes before drawing the next. Or draw a pattern every day at y time.
As for the led control, having it synchronized with the ball would be cool, but that’s not as important as other features :slight_smile:

3 Likes

Hi all. I’ve been lurking for a month as I built out my own custom small scale sand table and I’m a complete noob to all of this. Surprisingly, It’s all working great with an UNO, GRBL and a CNC Shield board and I’m drawing patterns as I expect.

The next step is to figure out how to stream patterns to my table without being tethered to my computer. I’ve read through the instructions here, as well as the gcode-feeder script that feeds from a nano. I’m out of my depth on them both.

I was wondering if anyone here, (Luca?) would be interested in any consulting hours to get help just get me started in the right direction, even with a minimal demo-type setup that simply sends a next random pattern.

I can be reached at bill_[at]_brainclippings.com if anyone is interested - thank you.

1 Like

easiest way to achieve what your are looking for is to use a Raspberry Pi usb connected to your control board.
You create and submit your playlist from the RPI, which send it to the control board.
I use an RPI 3 model B connected to an eleksmaker board (arduino uno clone based), hope this helps !

1 Like