All hackerspaces have a vending machine, some have got it working, we intend to get ours operational(we'll see how it goes)
Long time no updates!
I don't even know what kinds of stuff I've gotten sidetracked on lately but for my own sanity that has been a good thing because so far there's been a lot of issues, not really unexpected when you make your first PCB and you for sure are not an electrical engineer! anyways, lets move on to the technical(ish) stuff!
PCB's without any prototyping == Failure.
It shouldn't really come as a shock but the first revision of the PCB to drive the motors in the vending machine was an absolute failure, I had managed to do a bunch of mismatches between n and p-channel mosfets, use the wrong pin order when I designed the PCB layout in kicad and I had forgotten to run the DRC before generating the gerber files and ordering it.
On the picture underneath here you can see the last pic I took of this PCB before I gave up on it, all the mosfets have been rotated and flipped about to make it work, still didn't work... and that is the point where I realized I had done a mixup with the N and P channel mosfets that I could not solve by flipping parts around.
Artsy pic of it all soldered together (yeah I know its vending machine... not vendingmachine!)
Top and bottom of the PCB's before populating it with components.
Testing/Function so far:
So so far everything seems to be working just fine;
I have soldered up one channel, got it tested and then soldered up the remaining channels and tested those and they seem to be working as intended.
I then soldered up the IO-Expanders and various other bits on the boards and after that I have only tested that I've got no short circuits and stuff going on and so far it seems to be OK.
There's only one thing we're worried about right now and that is that I forgot about having pullups on the gate of the mosfets so if the micro controller that will talk to this card uses a really long time to boot or such we might have an issue with that the pins for the motors will be floating and some degree of chaos might ensue until things are booted up.. but we'll see!
As we have no intentions of keeping the coin mechanism, the soggy film buttons or the old circuit board we're designing a new board to drive everything.
This board basically consists of 3 PCA9535 IO-Expanders, two of them drives various IO for the motors(I'll come back to that later), the last one drives 16 pins for various buttons and whatever might come up, its not like we're designing a lot of stuff in advance.
Anyways, we needed some electronics to drive the motors, so as we're a lazy bunch we decided against re-wiring the motors and "encoders" we designed a new card that we can just plug in without re-doing the wiring harness.
The motors are basically multiplexed so you drive one pin high and one motor turns, each motor has one switch that triggers once per rotation and one transistor on the common pin that you break the circuit with.
Hans cooked up a circuit design to drive this design and I decided it was time to design my first PCB and after a week of tinkering and a few days of waiting for the PCB's to arrive from JLC they arrived in my mailbox.
Here's the front side of the PCB, looking pretty snazzy if I'd say so myself.
And this is the backside, with more branding and for those of you not proficient in Norwegian the slogan basically says: "good enough for us, good enough for you"
As I was taken by surprise by how damned fast the PCB was produced I forgot to add the BOM of components for it so haven't gotten around to getting those and we're currently working on finishing some other project, if we remember what we've actually done we'll make a project post for that one as well when we're done.