-
Its ALIVE!
10/10/2016 at 07:00 • 0 commentsAfter months of design, redesign, coding, laser cutting, waiting for parts to be delivered (many times over), its always feels great when your creation starts to take real shape and you can feel the original vision coming alive!
Vendotron is finally closing in on the finish line. The front panel is mounted, door locks in place, and one door/servo is in place for testing.
Of course there is a fair amount if tuning to go though. The door hinges are not as tight as I was expecting, so the doors droop a bit and snag on the sides, the carousel rubs against the front acrylic in a few places, etc, but overall I am very happy with the progress and how its turning out!
-
Gluing Acrylic For Front Panel
10/08/2016 at 20:56 • 0 commentsBe sure to have good ventilation and wear gloves / safety glasses! Acrylic glue is nasty stuff.
-
Handling Change
10/07/2016 at 19:03 • 0 commentsEven when you think you thought of everything ahead of time, missing something is inevitable. Case in point, I didn't consider that I would want to control the stepper motor being energized or not. The use case is that there is no reason to keep the stepper energized when the carousel is not spinning and when the doors are all closed. But it is useful to energize if you want to 'lock' the carousel in place to prevent people from pushing the sides while a door is open.
The prototype PCB didn't have this pin connected, so what to do? Jumper wire!
The eagle file has had this connection added in, so future runs of the PCB will not need the jumper.
Just an example of how to deal with change on the fly! :)
-
Homing Code Functional
10/06/2016 at 17:26 • 0 commentsI have a working prototype of the homing sequence code. The homing sequence is broken down into 4 steps:
- Initial search for the home sensor, we look for this at 'search speed'
- Once the sensor is found, we back off some distance
- We then move forward again at a slower 'latch speed' to try and be more precise
- Finally we move some distance from the home sensor as the final home position that aligns the columns with the doors
I still have to tweak some speeds to try and avoid the sudden stop during the search operation, but overall its working well! See for yourself:
-
Panels Acquired and Being Mounted
10/05/2016 at 20:41 • 0 commentsI finally had some time to make it over to the local TAP Plastics and pick up the 1/8" acrylic sheets needed for the sides and rear panels. Since the only holes in these sheets are for the screws to mount into the vertical wood beams, it did not make sense to laser cut them.
Here is a photo showing the progress. You can't really tell but there is an acrylic panel mounted on the closest side in the photo!
-
Progress On Multiple Fronts
08/21/2016 at 15:47 • 0 commentsVendotron had a good week! The homing system was installed, the front acrylic panel was received from Pololu laser cutting service, and the backend interface has made a ton of progress.
Homing System
As mentioned in the previous log, Vendotron uses a hall effect sensor with a magnet installed on the carousel to perform a touchless homing operation. The sensor was installed and tested:
The final code will do a double homing in order to get the best accuracy - the first homing is to detect the magnet, then it will backoff the carousel and then very slowly home again.
Front Panel
The front panel from Pololu Laser Cutting Service looks fantastic! Next step is to mount it to the frame and install all the hardware (deadbolts, servos, hinges, etc).
Backend Web App
The web application is a ruby-on-rails application that serves up a picker for the column/row, shows a description of the product, and then lets you make a purchase via stripe with a credit card or bitcoin.
The admin interface to view purchases, see which slots are empty, restock slots, etc, uses Active Admin, a really nice UI to handle the basic interaction of creating, updating and deleting (known as CRUD in the web app world) things via common input forms. The result is a very nice UI for managing vendotron without having to write much code!
For example:
Well, that's all for this week! =)
-
Homing System Designed, Acrylic Panels In Progress
08/13/2016 at 06:44 • 0 commentsI decided to go with a hall effect switch to do the homing for the carousel. Obviously vendotron needs to know exactly where "zero" is so that when a purchase is made, it can accurately spin the carousel to the correct column.
I decided to go with an off the shelf hall effect sensor that can be purchases on a breakout board and with a wire connector to simplify the design. The one I went with is the SunFounder module:
https://www.amazon.com/SunFounder-Switch-Sensor-Arduino-Raspberry/dp/B013G5N03O
I designed a stand for this sensor that will go under the carousel, with a bracket holding a 6mm magnet attached to the carousel:
Example magnets that fit into the bracket:
https://www.amazon.com/gp/product/B01I79ONIU
The hall effect module will be wired into the 'home' port on the PCB, and code will be written so that when the machine is first powered on, it will slowly spin the carousel until the hall effect sensor detects the magnet. At that point, the software will know exactly where each column on the carousel is relative to the doors.
The front panel acrylic has also been ordered. At MakerHQ we only have a 20"x12" bed on our laser cutter, so we can't do larger jobs in house. When we need to cut larger panels, we use Pololu Laser Cutting Service, because they are fast, high quality and an awesome company to support. Here is an example of the digital proof you get when submitting a job. It looked great, so I ordered it and it should be here in about a week!
-
Steppers and the Cloud
08/08/2016 at 01:37 • 0 commentsThe brains inside Vendotron is a Particle Photon. This device is super awesome because its small, cheap, powerful and very easy to use thanks to the great documentation and example code. There is one little problem, however. Given that it needs to stay connected to "The Cloud", it spends some time every iteration of the standard loop() checking the network, processing events, etc. Usually this is all well and good, but when stepper motors are involved, it gets a little tricky due to the precise timing requirements for stepping.
I am using the AccelStepper library since to spin a heavy load like Vendotron's carousel filled with goodies, you need to start slow and ramp up to speed. Luckiy, this library was already ported to work with particle devices by the community, so the code was basically copy paste from the Arduino Uno I used during my initial prototyping. On my Uno things worked flawlessly. When I first set the same code up on the photon, I got unexpected results. The motor was very jerky and top speed of the motor was very brief. Have a look:
Far from a smooth acceleration. After much searching, I discovered the timing issue. The particle code that managed the cloud was getting in the way. Luckily I discovered the particle people made it so people wanting more control over the cloud connection could use what is called SYSTEM_MODE of MANUAL. This allows you to say when its ok for the photon to check in with the cloud. I modified my test code so that it only processes cloud 'stuff' while the motor is not moving, and voilà, that fixed it! The motor now spins perfectly smooth, just like it did on the Arduino.
Before and after of the testing code can be found in this gist: https://gist.github.com/machadolab/e3bf5fb534a2a65bd561311044e2df0a
According to the documentation, you need to call the Particle.process() method at least every 20 seconds, preferably more often, in order to avoid cloud/wi-fi connection issues. If your application requires long runs of spinning stepper motors, this technique may not work for you, but for this application, which should never have to spin the carousel more than 20 seconds to line up a door, this works great.
Here is the final electronics mounted, along with another spin video showing the smooth AccelStepper code in action!
-
First spin achievement unlocked, PCB assembly in progress
07/31/2016 at 03:01 • 0 commentsToday I finished the frame for holding the carousel, mounted the bearings, put the carousel into the frame and connected up the pulleys and belt to the stepper motor. I wired a simple circuit on the breadboard to do some test spins of the carousel and it went well!
The first spins revealed the belt was not quite tensioned enough, so I drilled out the stepper mounting slots a bit more so I could slide the stepper back just a bit to tension the belt.
I also received the PCB back from OSHPark, and later this week will be assembling the electronics. I also created an electronics enclosure to house the board so that it can easily be mounted on the underside of the frame base board.
All the files for the electronics and enclosure are available in the Github Repo.
Here is a video of the first spin action and some pictures!
-
Carousel in progress, circuit board on the way!
07/23/2016 at 00:14 • 0 commentsAll the wood for the carousel has been laser cut. All the layers except for the final layer have been glued together.
Also, I completed the circuit design and sent a board design off to OSHPark to have fabricated. On the breadboard I was able to get the AccelStepper library functioning using the pololu stepper drivers in order to test the acceleration. This is key because the carousel is fairly heavy so in order to spin it, it has to start out slow and then get up to speed.
Next week I should be able to complete the frame and have the gear system setup.