Artwork for podcast The CircuitPython Show
Kevin Matocha
Episode 1425th July 2022 • The CircuitPython Show • Paul Cutler
00:00:00 00:16:54

Share Episode

Shownotes

Kevin Matocha joins the show and shares some of his projects, including the Hackpad and TinyLogicFriend.

Show Notes:

00:20 Welcome

00:27 How Kevin started with computers and electronics

3:50 HackPad

8:20 Wiring the HackPad

9:55 TinyLogicFriend - a logic analyzer using Sigrok

15:28 Which microcontroller?

Transcripts

Paul Cutler:

Welcome to the circuit Python Show. I'm your

Paul Cutler:

host Paul Cutler. This episode I'm joined by Kevin Matocha.

Paul Cutler:

Kevin is a longtime CircuitPython community member,

Paul Cutler:

and currently works as a vintage stereo repair technician in

Paul Cutler:

Austin, Texas.

Paul Cutler:

Kevin, welcome to the show.

Kevin Matocha:

Hey, thanks for having me. Thanks for

Kevin Matocha:

invitation, I hope I've got something useful I can share

Paul Cutler:

how did you first get into computers and

Paul Cutler:

electronics?

Kevin Matocha:

probably like me and 12 million other families, I

Kevin Matocha:

had a Commodore 64 as a kid. And my, my brother was actually the

Kevin Matocha:

better programmer and, you know, studying how to do the

Kevin Matocha:

programming at but a little bit rubbed off on me as a kid

Kevin Matocha:

playing games and typing in code from magazines, with the family

Kevin Matocha:

has we traded off typing, and eventually did some courses in

Kevin Matocha:

high school learning Pascal, which was kind of the

Kevin Matocha:

educational language of choice then, and thought I wanted to go

Kevin Matocha:

into computers, I started in a double E program, electrical

Kevin Matocha:

engineering program with computer emphasis thinking I

Kevin Matocha:

want to do computer stuff, but then got distracted with more of

Kevin Matocha:

the semiconductor design processing aspects of things. So

Kevin Matocha:

kind of, you know, took some more programming classes in

Kevin Matocha:

college but geared towards more of the, you know, how the chips

Kevin Matocha:

are made, and designed, and fabricated in commercial

Kevin Matocha:

environments. So so I kind of strayed from computing, you

Kevin Matocha:

know, pure computing, but always retain that sort of software

Kevin Matocha:

coding capability. In particular, how do you analyze

Kevin Matocha:

big groups of data? How do you visualize it? And that got me

Kevin Matocha:

into MATLAB and eventually into Python after that? So so that's

Kevin Matocha:

how I sort of was had an always an interest in computing, maybe

Kevin Matocha:

straight from that, but I always use sort of coding or to sort of

Kevin Matocha:

help me in my, in my day to day work. How did you discover

Kevin Matocha:

circuit Python, I think I got here through Arduino, my

Kevin Matocha:

daughter had a Arduino Uno, I think one of the basic boards

Kevin Matocha:

stuck down to her bed for a long time that she got as a gift, I

Kevin Matocha:

pulled it out and and realized, wow, the tools that are

Kevin Matocha:

available now, which was Arduino at that time, are so much more

Kevin Matocha:

than what I had when I was in, you know, first looking at

Kevin Matocha:

microcontrollers. And in undergrad, I remember starting

Kevin Matocha:

with Motorola, HC 11 programming and assembly, using buffalo to

Kevin Matocha:

talk to some arcane in a way of analyzing what the chip was

Kevin Matocha:

doing. And that was actually on a project sort of assistance

Kevin Matocha:

technology project with a professor who was trying to make

Kevin Matocha:

it where you could push a button, and it you know, say

Kevin Matocha:

something or highlight a picture or something like that. But it

Kevin Matocha:

was near impossible to get anywhere with with so low level

Kevin Matocha:

coding. So, so fast forward 20 years later, and see Arduino and

Kevin Matocha:

all these libraries. And you know, there's support for things

Kevin Matocha:

that visit any chip you wanted to talk to or use, you could

Kevin Matocha:

find somebody who had done that to help you along. So that was

Kevin Matocha:

eye opening. And after that, doing some basic projects, you

Kevin Matocha:

know, even some graphics projects with Arduino, then

Kevin Matocha:

heard about circuit Python, I thought, wow, this is even, you

Kevin Matocha:

know, the next level if I thought Arduino was, you know, a

Kevin Matocha:

huge leap forward in this circuit Python thing is, is even

Kevin Matocha:

further. So just got involved with that first a user and then

Kevin Matocha:

didn't help them contribute on on especially some graphics

Kevin Matocha:

things. And just been enjoying it with circuit Python, I guess

Kevin Matocha:

is awareness that basically the chips are getting so powerful,

Kevin Matocha:

that there's been an oversupply of capability, right? Like how

Kevin Matocha:

fast the process did you do? Do you need to flash LEDs, right?

Kevin Matocha:

It's probably not not that much. But you can use that processing

Kevin Matocha:

power to make it so you can flash LEDs, you know, in two

Kevin Matocha:

minutes, instead of taking 20 minutes to figure out how to do

Kevin Matocha:

that. So I think that's that's what I like about it that you

Kevin Matocha:

get something working in a few minutes rather than maybe an

Kevin Matocha:

hour or something like that with other other things. So so that's

Kevin Matocha:

why I was just kind of stuck with it and trying to trying to

Kevin Matocha:

move things along little ways that I can. Well, that's a great

Kevin Matocha:

segue to one of your next projects that it does involve

Kevin Matocha:

graphics, that probably takes a little more than a couple of

Kevin Matocha:

minutes, but you've been working on something you call the hack

Kevin Matocha:

pad. Tell me about that. I've always been interested in

Kevin Matocha:

displays. And sort of a big jump for me was when the Adafruit PI

Kevin Matocha:

portal came out, it was a chip and display all connected. So

Kevin Matocha:

basically, it's easy to prototype. You don't have to

Kevin Matocha:

have a bunch of wires hanging out there to connect the

Kevin Matocha:

display, which always seems to be as the wires are always a

Kevin Matocha:

stumbling block or a place to break. So with that it made it

Kevin Matocha:

clear, hey, you have this ship and circuit Python and display

Kevin Matocha:

capability. But it's pretty small. So having any kind of

Kevin Matocha:

user interface is pretty limited, just based on how big a

Kevin Matocha:

thing fingers are. So I've been looking for how to get a big

Kevin Matocha:

display, working in circuit Python. And in particular, the

Kevin Matocha:

problem with big displays is they're more expensive

Kevin Matocha:

processors a small cost, but now the display is sort of over

Kevin Matocha:

overwhelming costs. So from just a prototyping standpoint, I was

Kevin Matocha:

able to find some displays that were basically these conference

Kevin Matocha:

room scheduling units that I guess they're supposed to be

Kevin Matocha:

mounted on the wall in a conference room. And so you can

Kevin Matocha:

see oh, is this room available or how much time

Kevin Matocha:

I'm I've actually never used them. But I think that's the

Kevin Matocha:

purpose. So they're fairly big, and they have a capacitive

Kevin Matocha:

touchscreen on them. So that's really what I was looking for.

Kevin Matocha:

So, and even better, I could find them on eBay for 20 bucks

Kevin Matocha:

apiece, so, so probably even cheaper than I could buy a raw

Kevin Matocha:

display from, you know, overseas to get it. So you know, sort of

Kevin Matocha:

hit all the right targets or criteria for what I was looking

Kevin Matocha:

for cheap and big display and capacitive touch. And as I said,

Kevin Matocha:

one of the challenges with making a, I guess a product with

Kevin Matocha:

a display is the display cost. Part of that display cost is

Kevin Matocha:

usually the processor that goes between your microcontroller and

Kevin Matocha:

the display itself. And actually, this display that I

Kevin Matocha:

found is actually one of the simplest displays, so called

Kevin Matocha:

like an RGB display, or sometimes called dot clock

Kevin Matocha:

display, where you've got to give it a lot of signals

Kevin Matocha:

basically, for you got to send it signals to read draw every

Kevin Matocha:

time you want to draw frame, as opposed to other displays have

Kevin Matocha:

some controller in between has memory, and you just send it

Kevin Matocha:

like maybe what parts you want to update. So it has some some

Kevin Matocha:

displays have some intelligence built in. But these so called

Kevin Matocha:

RGB displays are cheaper because they don't have that, that

Kevin Matocha:

controller, okay, but it takes more work to be able to run

Kevin Matocha:

them. And at the same time that was fortuitous, a new chip came

Kevin Matocha:

out from espresso called the ESP 32 s three, which actually

Kevin Matocha:

inside the main processor has the capability to drive this

Kevin Matocha:

kind of simple RGB display. So So in essence, for you know, one

Kevin Matocha:

price and the microprocessor, you don't need another chip in

Kevin Matocha:

between to actually run the display. So in essence, it's

Kevin Matocha:

kind of a combination of realizing this s3 Chip now has

Kevin Matocha:

the capability of driving these simple displays, and finding a

Kevin Matocha:

suitable display to hack around on so that that's how the heck

Kevin Matocha:

tablet came about. So most of the work of getting it to work

Kevin Matocha:

in circuit Python has been how to, to understand this new LCD

Kevin Matocha:

driver built into this s3 chip. And it's still new things coming

Kevin Matocha:

every day from this press of team to try and how to better

Kevin Matocha:

use that. So that's, that's my final goal is to make something

Kevin Matocha:

that you can, you know, kind of make iPad like demos on, it's

Kevin Matocha:

probably never gonna be as fast as you know, what Apple can do

Kevin Matocha:

with its, you know, amazing chips and stuff like that. But

Kevin Matocha:

at least you could toy around with some touch interaction and

Kevin Matocha:

a reasonable size of a display that you can touch and, and

Kevin Matocha:

modify and react to. Right, I don't think I've seen anything

Kevin Matocha:

bigger than a PI portal title that has touch on it. So that

Kevin Matocha:

would be great to see are these about a seven inch tablet like

Kevin Matocha:

the old Google unexercised? Yeah, seven inches, so there's

Kevin Matocha:

one I've got, of course, if you, if you have that capability for

Kevin Matocha:

the running an RGB display, then you can pick whatever size you

Kevin Matocha:

want. So another benefit of this, this new chip is that it

Kevin Matocha:

got, or at least the demo boards that that I've been able to get

Kevin Matocha:

as they got quite a bit of RAM and also storage space on them.

Kevin Matocha:

So you'd have plenty of space for you know, large memory space

Kevin Matocha:

for frame buffers for these displays, too. So it's a sort of

Kevin Matocha:

combination of all the features of these new chips, or are

Kevin Matocha:

making it easier to drive these big displays. How hard was it to

Kevin Matocha:

connect that SP 32? s three chip to it? Was it just a matter of

Kevin Matocha:

simple soldering? Or was it a lot of reverse engineering

Kevin Matocha:

involved? Well, as you could get here, from our previous comment

Kevin Matocha:

about wiring the hands, sometimes the difficult, most

Kevin Matocha:

difficult problem, my first attempt, used a bunch of

Kevin Matocha:

adapters, you know, you've got first you got the chip or the

Kevin Matocha:

demo board with headers, and you got to convert that some maybe

Kevin Matocha:

40 pin cable connector, so the you know, connecting 40 Or maybe

Kevin Matocha:

it's not quite 40 but you know, 30 pins between the demo board

Kevin Matocha:

and cable adapter that's that's usually where the problem is.

Kevin Matocha:

Plus you got to drive the backlight. And so there's just a

Kevin Matocha:

bunch of wires so it's a real pain eventually at this my first

Kevin Matocha:

demo circuit board so I made a circuit board adapter which made

Kevin Matocha:

my life a heck of a lot easier where I could solder it and just

Kevin Matocha:

wires it's nothing more complicated than that. So if you

Kevin Matocha:

think of it that it just saves you from having to pull wires

Kevin Matocha:

out of your breadboard on a daily basis so so the circuit

Kevin Matocha:

board even though it's a you know, kind of takes a while to

Kevin Matocha:

get it made and delivered is made my life so much easier to

Kevin Matocha:

make some progress on the project.

Paul Cutler:

Did you submit the hack pad to the latest Hackaday

Paul Cutler:

contest that they're running?

Kevin Matocha:

Yep, sure did on the figure this the the one that

Kevin Matocha:

just finished up basically, how do you reuse user recycle? I

Kevin Matocha:

can't remember the name of it. But yeah, submitted to the heads

Kevin Matocha:

up and I noticed that a similar project got selected for the

Kevin Matocha:

next one, disabuse pupi, which is a kind of a gamepad, but also

Kevin Matocha:

reusing displays. So I've been watching his project for a while

Kevin Matocha:

and actually learned a lot from what he's done. So it's good to

Kevin Matocha:

see the see what he's going to come up with next.

Paul Cutler:

I've been watching his projects as well and he'll

Paul Cutler:

be a guest on an upcoming episode. I'm looking forward to

Paul Cutler:

having him on.

Kevin Matocha:

Oh, cool.

Paul Cutler:

One of your other projects is tiny logic friend.

Paul Cutler:

What is that project?

Kevin Matocha:

This was a project that was started by

Kevin Matocha:

Scott shockcraft. Attend Nuit that works on the circuit Python

Kevin Matocha:

project, he had this concept of how to use low cost,

Kevin Matocha:

microcontroller boards like Adafruit, and many others sell,

Kevin Matocha:

but use the capability to do logic analysis are a formal

Kevin Matocha:

logic analyzer. And what that is, is basically, when you have

Kevin Matocha:

two chips talking to each other, they have a certain language of

Kevin Matocha:

ones and zeroes and timing, so that they can communicate, but

Kevin Matocha:

if something goes wrong, you can't see what's going wrong

Kevin Matocha:

with the communication, right? You may just get nothing back or

Kevin Matocha:

garbage or, or what when you're just you know, talking with from

Kevin Matocha:

your processor to house a a sensor is talking back, often

Kevin Matocha:

you'll need some way to debug, you know, what is it actually

Kevin Matocha:

talking, you know, what is the microprocessor sending to the

Kevin Matocha:

sensor, and what is the sensor sending back? First, you might

Kevin Matocha:

think you need an oscilloscope, which they say is at a time

Kevin Matocha:

measurement of signals, which that might work. But

Kevin Matocha:

oscilloscope, it basically measures like I said, a voltage

Kevin Matocha:

level over time, but it's usually used for repeating

Kevin Matocha:

signals. So that echoes the same waveform used to analog signals,

Kevin Matocha:

not necessarily, but usually some kind of repeating

Kevin Matocha:

measurements, that's the same thing over and over. But in

Kevin Matocha:

contrast, the chips talking back and forth, you know, it's a one

Kevin Matocha:

in zero of, you know, different timing between each one and, and

Kevin Matocha:

so usually you'll need to string like a long amount of ones and

Kevin Matocha:

zeros to see, you know, one transaction or you know, what

Kevin Matocha:

the chips sending one request for data, and then a long thing

Kevin Matocha:

have all the data back from the sensor say, So in essence, what

Kevin Matocha:

you really just need is, okay, how long was the zero for how

Kevin Matocha:

long was the next one for you know, so in essence, you just

Kevin Matocha:

want to know the ones and zeros and the duration of them. Okay,

Kevin Matocha:

so that's what a logic analyzer does, it basically tells you,

Kevin Matocha:

okay, you know, how long that those ones and zeros are for, so

Kevin Matocha:

you can then decode that into something that makes sense to

Kevin Matocha:

you. So this project was actually conceived as an add on

Kevin Matocha:

to an existing piece of software called Sigrok. So SIG signal

Kevin Matocha:

meaning Sigrok is, is a combination of signal analysis,

Kevin Matocha:

which the logic analyzer is, and grok, which is a word, I think,

Kevin Matocha:

developed in the 50s, or 60s that was used to say, like, hey,

Kevin Matocha:

understanding something, and I think I think coders use that a

Kevin Matocha:

lot. So So anyway, combination of signal understanding, is a

Kevin Matocha:

software. And in essence, what that does is takes, you know,

Kevin Matocha:

even just a raw file basically has to take that data of ones

Kevin Matocha:

and zeros over time, but then convert that into something you

Kevin Matocha:

can understand like, whether it be visually of seeing the

Kevin Matocha:

timing, which there's a tool inside of that tool suite to do

Kevin Matocha:

that called Pulse view, or build on top of that, like, knowing

Kevin Matocha:

that when that ship sends a hex code 32, that means I'm asking

Kevin Matocha:

for data or you know, are converting even a bit to numbers

Kevin Matocha:

or, you know, or letters, you know, Hex hex codes or something

Kevin Matocha:

else. So it has capability to build on top of that, not just

Kevin Matocha:

what ones and zeros and how long, but what does that mean,

Kevin Matocha:

on in multiple different levels. So so basically helps you even

Kevin Matocha:

further analyze how these two chips are talking back and

Kevin Matocha:

forth. So long story, but in essence, it's how to how to,

Kevin Matocha:

instead of buying a, you know, several $100, you know, logic

Kevin Matocha:

analyzer that's, you know, custom made for that, can we

Kevin Matocha:

take these $15 boards, and also use them because they can

Kevin Matocha:

measure fast, you know, they're spitting out signals at the same

Kevin Matocha:

rates? Why can't they read them and report them back. So So in

Kevin Matocha:

essence, it's, it's how to connect, you know, simple

Kevin Matocha:

microcontrollers, to Sigrok. So you can use the existing tool

Kevin Matocha:

set, but these fairly low cost boards, and this tiny logic

Kevin Matocha:

friend is one of the several others that are trying to do the

Kevin Matocha:

same same kind of thing. So was there a way to contribute that

Kevin Matocha:

back into upstream into the Sigrok project? Yeah, there,

Kevin Matocha:

there is a way but since we're talking to circuitpython, you

Kevin Matocha:

know, one thing that's, you know, promoted about

Kevin Matocha:

circuitpython is that there's a big community wrapped around it,

Kevin Matocha:

right? There's a forums where there's people crawling around

Kevin Matocha:

there that are willing to, you know, contribute their time to

Kevin Matocha:

do that, when I worked on this tiny logic friend, it felt a

Kevin Matocha:

little more like little more lonely of a project, I would say

Kevin Matocha:

that basically, I'm contributing, it's not a huge

Kevin Matocha:

community. And the best way to communicate is through an email

Kevin Matocha:

server to get some help. But it's kind of hard difficult to

Kevin Matocha:

elicit feedback from that, I guess, because people are doing

Kevin Matocha:

their own things. And, and most of that the project, actually, a

Kevin Matocha:

cig rock is focused on commercial or, you know,

Kevin Matocha:

analyzers, that people are using that so so but I have seen as

Kevin Matocha:

sort of a group of different projects that are kind of

Kevin Matocha:

heading in the same direction. So I'm hopeful that maybe those

Kevin Matocha:

can converge around maybe make an easier that, that the concept

Kevin Matocha:

is the Sigrok software can have a generic capability to be able

Kevin Matocha:

to accept data from a lot of different microcontroller

Kevin Matocha:

boards, maybe a standard way of talking to it. So you don't

Kevin Matocha:

really need to be changing cigarettes a lot. You just need

Kevin Matocha:

to you can take any kind of board as long as you fit or

Kevin Matocha:

behave a certain way. Can you get the cigarette to understand

Kevin Matocha:

that so I see a few projects You know, kind of heading in that

Kevin Matocha:

direction? So question is, Can Can we all sort of come together

Kevin Matocha:

and figure out how to make that work? So basically, can anybody

Kevin Matocha:

take any kind of small board that they want and still have

Kevin Matocha:

hooked that into the Sigrok project, which has a great

Kevin Matocha:

capability to be able to analyze and, and understand these these

Kevin Matocha:

signals? So. So that's, that's the ultimate goal. I can't say

Kevin Matocha:

achieve that yet. But I think that's what the concept of this,

Kevin Matocha:

this is

Paul Cutler:

a last question for you. You're about to start a new

Paul Cutler:

project or prototype. Which microcontroller Are you reaching

Paul Cutler:

for?

Kevin Matocha:

Yeah, for me, it's no question. I mean, that

Kevin Matocha:

PI portal, it's got a special place on my desk, I haven't made

Kevin Matocha:

a bracket. So it sits right on top of my monitor. And it just

Kevin Matocha:

stays there looking at staring at me with a with a blinker

Kevin Matocha:

right there and repple. So no question. That's, that's my

Kevin Matocha:

first one to go to. You know, it's good to have a display

Kevin Matocha:

connected so you can get different outputs if you if you

Kevin Matocha:

want to debug what's going on. So yeah, that that cortex in for

Kevin Matocha:

CHIP, and it's got a fair amount of RAM. It's got touch response

Kevin Matocha:

on the display. So that's definitely got to be my go to.

Kevin Matocha:

I'm right there with you. I've talked about on the show before

Kevin Matocha:

how I have a pipe horrible title on my desk, and it's one of my

Kevin Matocha:

favorite circuit Python devices. Yeah, exactly. Yeah. Kevin,

Kevin Matocha:

thanks so much for being on the show. Yeah, thanks a lot. Thanks

Kevin Matocha:

for having me.

Paul Cutler:

Thank you for listening to the circuit Python

Paul Cutler:

Show. For show notes, transcripts and to support the

Paul Cutler:

show. Visit circuit Python show.com. Until next episode,