The prototype PCBs have arrived! In this episode we assemble and test a couple of prototypes - and deal with a couple of hiccups along the way!

Transcript

Welcome back to the fourth installment in the Design of Product with us series. We're designing the PiicoDev servo module and along the way we selected a part, did some coding with a breakout board to get some Hello World out of that part. To make sure we can use it, in the last episode we did the hardware design and there was a two-week gap while we waited for the prototype PCBs to come in.
It's my pleasure to inform you that we have prototype PCBs in the building, so in this episode we'll assemble these and see what we can get working with them. As you can probably see, we're going full steam in The Factory and there's a bit of laser cutting happening in the background. I apologize if things are a little noisier than usual, but this is a working space.
Without any further ado, let's assemble some prototypes and drive some servos. We've busted out the trusty PCB alignment stenciling jig - just some FR4 material and some duct tape is all it takes to do a prototyped stenciling. All you have to do is line up the stencil and then tape it down in exactly the right spot and you've got a perfectly serviceable prototype stencil.
Squeezing on the paste, the pads on this board are not super tiny - the smallest is an O402 - so this setup works just fine for that. If you haven't done any prototyping like this and you're making one, you might as well make a couple. If something goes wrong for the first one, you've always got that back up in case the stenciling wasn't quite right or you just mess it up somehow. Doing that second in the same batch takes no extra time.
It's always good to start with the smallest components first, so here I'm starting with all the O402 stuff just because it's small and it doesn't get in the way of placing other stuff.

Can you imagine if you put all the torque components on first? You'd have to place these tiny parts through a labyrinth of a forest of all these taller components. The next part is the PWM driver itself. It's a really big SOIC part, but again it's not very tall, so it's nice to just get that out of the way. You can see a little bit of overspray on the pasting here. The pasting quality isn't super sharp, I think it's just a combination of that loose jigging and how runny the syringe paste tends to be. It's not going to be a problem though, once we hit it with the heat that'll all pull in nicely.

We're finishing up with the bottom half of the board here, just putting on the JST connectors, the PIC of connectors, and the USB-C connectors. These are just for power delivery so we can power the servos, and there are two of them because of course this should daisy chain.

Next up we've got the big reservoir cap because of course, servos can draw a fair bit of current. Here, I'm processing down a one by six Tiger Core header into two 1x3 Tiger Core headers so that we can use them on these prototypes. We have the one by threes on order currently, but since we've got the one by sixes, we just cut them in half.

Something that I raised in the last episode was that these are not rotationally symmetric headers. If you turn this about 180-degrees, it would look like a pin one left style header and this is a pin one right style header in this format. So, we've created a footprint that can accommodate both. It does occur to me though that if we didn't have a symmetrical footprint, we could kind of have them snugged together a little closer and that might buy us a fourth connection. I know a lot of people on the forums have been talking about a fourth channel being.

A really nice idea! So, maybe that's an upgrade we make to this prototype. I've got parts down on two units and it's time to bust out the whole plate and solder them. These tiny MHP hot plates are marketed as a preheating hot plate for hot air rework. So, you can have your board at an elevated temperature and then you can just bring in your hot air gun to rework them. They do an immaculate job for prototyping and just the whole reflow operation. Very, very useful. They are teeny tiny though. They're kind of the perfect size for like a single unit pukadev module, like something that's a square module. For these longer ones, you can see I just kind of have it spanning the hot plate diagonally. That's just so it doesn't want to fall off quite so easily and then I nudge it around to pull that heat around from one end of the board to the other so that everything solders.

It's always so pleasing to see when those little granules start to turn into a liquid and everything just aligns into place with surface tension. Very satisfying and just giving the board once over looking for any problems that we can catch. Now, if something needs to be reflowed, we can reflow it and say open a closed bridge or something like that. Rinse and repeat for the second unit and you've got two prototypes that are ready for bench testing. Obviously, a good idea first to beep it out with a multimeter. You know, just check that there's no continuity between power and grounds, make sure there are no dead shorts on the circuit lest you let out the magic smoke. These capacitors as well, when they go, they really go. So, making sure they're around the right polarity is super important. If you've ever reverse polarized an electrolytic cap and had it explode on your desk, it's surprising and unpleasant. 0 of the PCA 9685 and we can see the servo moving back and forth

Don't recommend look, there's nothing else for it but to fire it up and drive a servo. I will plug it in and we ought to get a green light. All right, so we at least have power and ground the right way and nothing is blowing up on the board. Let's see if we can detect this device. I've got my python raffle and we can just do an I2C scan. So from machine, we need to import pin and I2C. We want to create an instance of the I2C bus and set it up on bus 0 with SDA equal to pin 8, you got the drill that's CL do a pin nine. And then we want to execute I2C scan, whoops obviously equals I2C and there it is, we have our device appearing at its default address which is 64.

This is a secondary address that we kind of get rid of once we initialize the device. We can talk to our server controller since we can talk to it, this should behave exactly the same way as when we ran the hello world code from earlier on in the series. This is that code last time on The Factory we created a class for the PCA 9685. We're basically just writing bytes to registers to get the things set up in a way that we can drive servos. There's some really basic helper functions we initialize the hardware, we initialize the I2C driver and then in an infinite loop all we do is on channel 0 we're setting the off time because we're changing the pulse width just by changing the off time and I was able to get a servo moving back and forth.

And so theoretically this should be no different. Oh yeah, our other test, I mean it wasn't exactly complete because I still have to connect the high current 5 volts and I mean you could do this with a low a bench power supply with current limiting but I've beeped it out. Everything seems to be on the right way around. Famous last words, I think we're good now. This code is driving Channel 0 of the PCA 9685 and we can see the servo moving back and forth. be on the same address

Zero that's Channel Zero of this chip and in our schematic that correlates to position number three Servo channel three as indicated by the silk artwork. Plug the servo in the right way, okay so far so good, and I guess we just hit the Run button. Huh, yeah that's what's up. How good let's it's doing the thing. It sounds kind of annoying. All right, I'll stop that just for extra annoying points. We'll drive two servers at the same time. Uh, I guess we want to connect to Silk server one, that's actually channel two on the chip. Channel 2 on the chip, two servers at the same time. Ready, Set, Go. Nice.

Okay, so you you maybe can't hear it in the video, we experienced this issue last time and this comes down to the differences between server builds. This one is vibrating quite a lot and I think that has to do with our carrier wave frequency whereas this server is totally happy and so of course our library is going to need some kind of way to change that frequency so that it can work nicely with different brands of servo. I think this is still using 200 Hertz, 50 hertz would be way more sensible.

Now of course, PiicoDev is a daisy-chained ecosystem. What if we want our fourth servo? We need to bring in our second driver and daisy-chain them together, so let's set that up now and make sure that works. So it would appear in my haste in our design episode, you may recall when I was laying out the schematic enough it was it was just in a moment of excitement I was doing the Prototype one to get it done shooting The Factory episode. I just tied all these address pins to zero just like oh yeah we know the address it's the default address. I didn't include a provision on the prototype to change the address, so we're gonna have to budge this board to give it a different address because otherwise they'll both just be on the same address. solder everywhere

We can't individually control servos between boards, they'll both just behave exactly the same. So what I'm gonna do is go for I'm gonna budge pin A4 to be high and the reason I've picked A4 instead of A0 is on the circuit board here we have INS. We have a 0 through A4 on pins one two three four five and then A5 is randomly on pin 24. That puts all the address pins on the chip in this top right corner here, zero one two three four here's address pin four and I'm picking that one because I think there's the fewest amount of cuts to do.

You can see this ground is just connecting all the pins together, I'm just going to cut this ground right here, pull it up to voltage and we'll have changed the address. Bust out the Stanley knife and very carefully with this very large knife just trying to cut that Trace between the pins, that's all it's going to take. Just because things are a little bit hard to see, bust out the multimeter do a continuity test to make sure that we're decoupled from ground and was still connected to ground.

It appears that in my haste to find a nice simple solution, I missed this bit right here. Look at this, there's a ground fill that just sneaks in and connects to the pad and in fact the underneath the chip there's no way that I can cut that Trace and that's present on every one of these pins except pin one. Pin one is the only pin where I'm gonna have to go cut cut cut. It'll isolate pin one which I think is address pin zero, I can isolate it with three cuts, solder a wire to go to VCC and that will change the address.

So we're back in the saddle, we're back onto the microscope with the Stanley knife cut cut cut. Things are looking kind of messy at this point, there's mask and there's solder everywhere.

Copper being peeled back, I gave it a brush to try to see if things were looking good and it looks okay. We're ready to go. I'd beep it out again with the multimeter still connected to ground. How is this possible? I don't know, but I'm over it and I'm going to bust out the soldering iron. I'm just gonna lift up that pin, desolder just that pin and try to lift it up. Then we can take some wire wrapping wire and just solder it between VCC and now this airpin. Nothing looks good under a microscope, every little thing looks so much worse under a microscope, but in the flash at one to one size it's looking all right. Wait, it's a prototype. All right, same again. I'm gonna unplug my first module, that's this guy has gone down. We've got the second module with the dodgy wire, we'll plug that in. I've already plugged it in, I know it's not going to blow up, it's fine.

We need to get back into funny and we'll do that same Signs of Life test that we did the first time. Last time we got an address of 64, this time we're looking for an address 65. There it is, our unconfigured device address 65 and that's the I guess like the sub address that you can use as well. So we have two modules, two unique addresses. It's time to drive two boards at the same time. So I have my two boards connected to the Pico, we have the first board and the second board with the budge connects my power to the first board. We need to loop power to the second using a USBC to USBC.

Now for the servos, I've got my big servo, I'll put that on channel one of the first module and my other server we'll put that on channel two of the second module. Okay, so what do we need to do in code? We need to initialize our second module, so I'll call the first one.

Driver A and Driver B, I'll call the second one Driver B and this time we'll pass in address equals 65 decimal. I don't know what that is in HEX at the top of my head, let me know in the comments if you do. The call to action okay, Driver A we're on the first channel so that's that's two and Driver B we're on the second Channel it's on pin one. I'll just copy that paste it down here so there's two thousand so we're going for independent control of two servers each on a separate PWM driver board, different address.

Moment of Truth, promise I haven't done this one before. Hey, that's it looks pretty pleasing. Oh, I had my dad's there for a little while with the with the amount of Hardware budging for that second module trying to get that to work, that's very gratifying to see. I think it's always important to finish on a win so I'm going to leave it there. We've got two unique Servo drivers that can each drive three servos.

I can see a few improvements that I want to make to the board. Of course, we've got to work on the code, we've got to make an actual API that's easy to use, but I can already see a few improvements to the board. We've discussed maybe putting in that fourth Channel if we can sneak in a breakout header as well, that'd be great because this is this is not just a like a PiicoDev board now, this with a breakout header this could be useful to loads of makers.

I'm not exactly sure what the shape of the next episode is going to take. Maybe we'll work on creating a beautiful easy to use PiicoDev library, but in any case keep your eye out for the next revision and until next time, thanks for watching!

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.