Bouni's blog
random bits and pieces
News on my MDB projects
2013-11-10
Because i’ve got a lot of emails during the last year with several questions about my MDB projects, i try to answer them here.
HTML5 ajax file upload with flask
2013-06-26
Making web uploads less painfull 🔗For one of my current Flask projects i want to have a nice looking and easy to use file upload form. That means no input type="file" form field where i have to select each file and the upload it on at a time. I came across this nice tutorial for a HTML5/jquery file uploader, but the backend is written in PHP. So I decided to try to get this working with Flask and it was easier as I supposed :-)
Comments activated
2013-04-24
I finally activated the Disqus comment system for my blog. I wanted to do this for a while now but was to lazy to do it :-)
Call functions out of jinja2 templates
2013-04-24
I do a few webprojects with Flask and I love it! While creating a template i searched for a way to call functions from within the template, and found out that i can use a @app.context_processor decorator.
A new eccentric tappet for the pcb drill
2013-03-26
The problem 🔗I have built a PCB drill that works nice most of the time, but sometimes it occurs that the stepper motor don’t perform a full turn.
This is caused by the friction of the eccentric tappet. I’ve simply made it out of a piece of steel rod, with a hole outside of its center. That tappet pushes a brass screw upwards. I thought that this will work fine, but it does not (sometimes).
The MDB protocol [part 4]
2012-07-17
I just want to announce that i’ve published my MDB cashless device code for the MateDealer project on github. It would be nice to get some feedback!
Here is the github repo
The MDB protocol [part 3]
2012-07-11
Last Tuesday I’ve nearly finished the complete code for the MateDealer project. After I’ve successfully vended a Club Mate (that is the drink the MateDealer got it’s name from) I loged the MDB communication with my logic analyzer. I have taken a few screenshots of the logic trace and now i will try to explain the complete procedure.
The MDB protocol [part 2]
2012-07-09
Today I want to show you how I connected our vending machine to the Arduino Mega 2560. With a piece of stripboard i made a board that can be stacked on an Arduino like a real shield.
As you can see the board is really simple. It contain just 2 otocouplers to insulate the Arduino from the Vending machine controller, 2 resistors for the leds of each optocoupler and one as a pullup resistor. The values of the resistors might be not perfect, but for me those values worked fine all the time. The optocpuplers are PC814 types. The can be exchanged with other types if you dont have theese available. The board uses the UART1 for the communication. So I can use UART0 which is also used to program the Arduino to communicate with a PC. That has the nice effect that i can connect the Arduino with USB to the PC.
Arduino telnet server
2012-06-25
Today I want to present you a little bit Arduino code because i’ve searched a lot for a working telnet server to control I/O’s over network. The code is based on the “Examples - Ethernet - ChatServer”. So here is my version of the server:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include <SPI.h> #include <Ethernet.h> #define MAX_CMD_LENGTH 25 byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0xE3, 0x5B }; IPAddress ip(192, 168, 1, 177); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 255, 0); EthernetServer server = EthernetServer(23); EthernetClient client; boolean connected = false; String cmd; First declaring all needed variables, configure the MAC address, IP address, gateway and subnet mask. The port is set to 23, which is the default telnet port.
Drilling PCBs the easy way
2012-06-17
I’ve built a PCB drill that drills the holes from below through the PCB. Taking aim on to the solder pads will be done with a webcam. The start of a cycle is triggered with the help of a foot pedal, so that both hands can be used to fix the PCB in place. The lifting is performed by a stepper motor with a eccentric roll.
Here is the result: