We're dabbling with Makerverse Shields for Raspberry Pi Pico this week in The Factory. The internal area is just large enough to fit useful circuits, and if these circuits are stackable then they ought to be very friendly for beginners or users who want a plug-n-play solution.

Transcript

Welcome back to The Factory!

In this episode, we've squeezed some Makerverse designs into a shield format that is then stackable onto a Raspberry Pi Pico for truly solderless expansion of the Pico. We've also made a few big upgrades with our Pico audio projects by finding a much nicer speaker and we're even making a musical instrument with this keyboard. Let's get cracking!

We've been talking about Makerverse audio projects a fair bit on The Factory in the past few weeks and that's just because they're so interesting and there are so many different components to them. If you don't recall we've been working on a digital-to-analog converter that converts digital signals from a Raspberry Pi Pico into an analog signal that can then be passed into an amplifier and then off to a speaker.

It's a pretty small pretty low powered 4-ohm speaker it's got a little port to lower the frequency response, and that's been fine for validating this design we thought it might be nicer to find something a little more suited to higher-quality audio. After a bit of digging we came across this little woofer this is an 8-ohm 5-watt woofer and it performs so much better than this little speaker just take a look at the size difference, that's already going to help the bass response.

It looks like there are two speakers here but there's actually only one driver and this fellow on the right here is a passive radiator. You see passive radiators everywhere in the wild on small desktop speakers like those for computers they do the same job as a port on a ported speaker but their advantage is that to get to the lower frequencies this port has to become larger and obviously that's really intractable on a really tiny speaker. Referring to the manufacturer respect this smaller speaker rolls off at about a thousand hertz whereas this larger one rolls off at about 200, so that's going to give a much more pleasant listening experience, and here's what they sound like.

Okay so that's nice we were playing audio out of a speaker usually from like a wav file either on the Pico's memory or some external memory. We got thinking though that it would be it would just be so trivial to include some kind of keyboard in this arrangement so that you could say press the keys of a piano to play that note. That would be like a really, really clear cause and effect relationship and you could actually get probably more creative if we turn this into an instrument as well. So we whipped up this little eight key keyboard that's intended to plug in right in the bottom right corner of the Pico where every button just connects to a dedicated GPIO, and you can see there are some labels for the C-major scale, that's like all the white keys on a piano.

Now you might be thinking that it's a little bit inefficient having a single pin for every one of these buttons you know, matrix keypads exist where you can have I know like 12 buttons being controlled by only seven pins. We went with this one-to-one relationship because first of all, it allows for n-key rollover so we can read the state individually of all of these buttons which means that you could press two buttons at the same time or as many buttons as you like to combine those tones.

To get n-key rollover in a matrix you would need as many diodes in the design as there are rows and columns and you know for eight keys that would be what two by four which is six pins already and then you need a bunch of diodes to assemble so we figured it would be easier to just do eight pins for eight keys. So that was a really quick design to whip up and there's just a little bit of work to do in creating some kind of driver so that you can play a tone from each of these notes. We're thinking something along the lines of like a sine lookup table or a wavetable if you have a lookup table of many sine values you know from zero to one then you can just scan through that table really quickly at some frequency the appropriate frequency for each of these keys to pick out the value of that wave, that also means that if you want to play two notes at the same time then you just have two instances scanning through that wavetable at different speeds and summing their results together. That's probably the shape that it's going to take but we'll look into it a bit more later.

Moving on to some other new products we designed this expansion board for Raspberry Pi Pico about a year and a half ago and this was to enable the PiicoDev ecosystem, the idea was that you would plug the Pico into the expansion board and you'd be able to connect your PiicoDev accessories through the PiicoDev connector at the bottom, and just to be helpful we also included some breaking out for each pin on the Raspberry Pi Pico.

It turns out this has been pretty popular among people who aren't even using PiicoDev but just want a convenient Raspberry Pi Pico breakout. So we figured we'd make something a little more helpful and make the Makerverse breakout for Raspberry Pi Pico and I mean this is a simple board obviously the Raspberry Pi Pico just plugs in into the center and then you've got every pin broken out, in this case, we have every GPIO broken out and then a power ground pair so you could theoretically plug a servo straight into these headers but you've got power and ground distributed at every point so you can just pick it up wherever you need.

Now this marks a bit of a foray into making shields for the Raspberry Pi Pico, or whatever you want to call it some kind of solderless pluggable board that includes some functionality. We've talked about a power timer on The Factory a little while ago this is a kind of Raspberry Pi Pico shield for that power timer the point is that you could take your Raspberry Pi Pico with female headers or stackable headers however you like, plug in the power timer, and straight away you've got a battery connection that can then power cycle the Raspberry Pi Pico periodically. And so we've been toying with this idea of a Raspberry Pi Pico shield ecosystem and this is just the first one that we decided to make because we get to reuse one of our old designs. So there could be a couple of options moving forward you could have the Raspberry Pi Pico with shield stacking on top you can also plug into some kind of prototyping breakout to create a more prototyped experience.

So of course this is just our first run this is of course just a prototype unsure whether we'll stick with mail headers facing up or maybe even female headers facing up whether you prefer to use male-to-male dupont wires for example let us know in the comments. Other obvious candidates to be turned into shields are things like motor drivers real-time clocks all those things that makers use every day that you can just make really, really easily accessible. So if there's something you think we should work on next let us know so I think for some kind of shield experience the Raspberry Pi Pico with stackable headers pins down and female headers up is probably the way to go.

The Raspberry Pi Foundation have already said that their preference for Pico's that have pins is for the pins to go down so we'll follow along with that and then make it stackable with those female headers. Next up I've got another prototype for you the Makeverse lithium polymer battery charger, but this isn't really about this exact design you know we've seen battery charges before. There's a lipo charging circuit backed right into the PiicoDev expansion board for Raspberry Pi Pico this is more about design for manufacture and minimizing unique components. Since we've already made designs that charge lithium polymer batteries you know they use the same connector the charge circuit is used on a different device even this little two-pole dip switch is used on other PiicoDev hardware. There's a lot of reused parts on this we figured why not just make a separate device available for the people that want it.

You know you've got two mounting holes so you can mount that in your enclosure with the USB port up against the the wall of the enclosure and now you've brought battery charging to your project. We've already designed the circuit, we've tested it with all the component values, we know that it works, this is just a bit of a quality of life enhancement you can change the charge current by using the dip switches instead of using solder jumpers which are maybe a little bit more painful or a little less beginner-friendly.

But while you can reuse the parts to make new devices you can't reuse the test jigs if the devices have a different shape or some kind of different topology and so this is the test jig for testing the battery charger and it's quite interesting how do you test that your battery is being charged correctly, you've got to somehow emulate a battery in a circuit let's have a look at how we do that.

Here's the schematic for the test jig and it looks pretty similar to a lot of our test jigs now we've kind of standardized around using the Raspberry Pi Pico because it's just so good at what it, does it's cheap, abundant, and quite powerful.So we've got our Raspberry Pi Pico footprint and this is the test circuitry I'll just zoom in on this middle part though this is the this is all it takes to test that a battery is going to be charged correctly. The top of the zener diode connects to where the battery ought to connect to on the battery charger, and you can't just put a resistor to emulate a battery because the charger is looking for a constant voltage, if you put that resistor in the voltage will be far too dependent on the current that the charger is supplying.

And so we throw in this little 3.6 volt voltage drop so that when the battery charger is passing say 50 milliamps through the circuit it's seeing that 3.6 volt voltage drop and then a little bit extra in our shunt resistor then we can just measure off the voltage of that shunt resistor and make sure that it's appropriate for whatever charging current this defaults to, in this case it's 50 milliamps.

That works out to be about a quarter of a volt which is more than plenty for the resolution of the Pico's ADC otherwise the other passive components in the test circuit are just there to help check for the presence of the current setting resistors we don't want to be holding this against the test jig and flicking the switches to make sure that all four currents can be set by the user, instead, the current setting resistors create a voltage divider with these resistors on board and we just look for the right voltage. If the voltage is incorrect then it means one of these resistors is missing or not the correct value.

And so there you have it thanks for joining us on this episode of The Factory I believe this is episode number 50 so that's quite a milestone we're very pleased about that. If you'd like to see anything a little bit closer or if you just have some questions let us know in the comments below. Until next time catch you later!

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.