Beansorter: Node.js and the first camera stand

Gene sent me the first camera stand and bracket today. I am actually to the point now where I have enough mechanical items to start doing some more bean testing, but as I feared, I have now become the bottleneck. I have decided Flask and Python are probably not the tools I want to use for the machine interface server, so I am switching over to Node.js. I am trying out the Visual Studio Code IDE to develop the app. So far (which is not very far), I am very impressed with it all and think it will make the whole enterprise easier to develop, deploy, maintain and extend. I might change my mind after I get a little deeper, but so far so good.

Thanks Gene!

A hard plateau

I am stuck.  Over the last week and a half, I have either stayed at the same place or actually even gained weight. I talked to the Physician’s Assistant at my annual checkup last week about it. She said that after losing this weight over an extended period my metabolism has slowed down and I am going to have to change things up to keep going down. She also said (and this was my original plan) that I have about twenty pounds to go. I have been averaging a good chunk under 700 calories per day for several months now so I really do not want to reduce the amount I eat any more. I think what I would like to do is actually increase my caloric intake up to 900-1000 calories and start exercising more. There are so many things on which I want to work that I use the idea that I don’t have enough time to get to the gym, but that is completely bogus. I have identified a program that looks like it might work for me and purchased the (e)book. We will see what happens.

Lorena brings Kelly home (Wisdom teeth)

Trisha rightly the, shall we say, more cavalier and less histrionic, mothering methods of my upbringing as related to health issues. The advice tended toward the “toughen up and quit whining” variety of sympathetic mothering (see here). Two days after the fact, Kelly is still being mothered to death and working it for everything she is worth. It is a good way to go if you have a Mexican mother and can manage it.

Beansorter: Camera mount and industry survey

Gene made the camera mount for our camera stand. This should drop write into our prototype. Progress continues. I know he is really busy, so I appreciated this a lot. We are moving forward on several fronts right now. I think I am going to be the bottle neck fairly quickly so I have decided to continue down that path of working out the UI so we can get an embedded  bean-drop controller setup for both Montana  and Texas before I continue on to any more control stuff. Kelly is going to help us by developing and implementing a market survey that, if this thing looks at all promising, we will continue each year while it is still interesting.

Kelly loses her wisdom teeth

Kelly got all four wisdom teeth removed today. After weeks of histrionics, it turned out to be about a 40 minute affair where they actually gave her the same kind of anesthetic given to guys my age who go in for what used to be quite an uncomfortable procedure, but these days, because of the wonders of modern drugs, is actually quite pleasant and restful. At any rate, Kelly’s Mexican mother is up in Seattle doing the Mexican mother thing (you have to see it to truly understand the magnitude of it all) while I remain safely in Centralia safely away from it all.

A health note

Lorena took me to my semi-annual checkup today. I was down over 35 pounds from the last time I was there, but after the last visit I gained some more weight so my current position is down a little over 42 pounds from my high. This manifested itself several ways. My blood pressure was measured at 117/78, my pulse rate was at 63 bps, and the yellow deposits in my eyelids that are a result of high cholesterol are gone. The PA who attended me said it would be fine if we started reducing/removing the medications I am taking one at a time to see if I really need them anymore. It felt pretty good. We agreed that I really need to lose another twenty or so, so that is what I am working on next.

Lorena, handy-woman

Lorena bought a dresser yesterday, put it together herself, put it into the closet she repaint, and was quite pleased with herself. In the meantime, our bald eagle came back to her roost in the snag outside the living room window. A good weekend on all counts.

Beansorter: Light tower and UI travails

The indicator light tower for the bean sorting project arrived today. Really nice, but really cheap, too. I hope it works when I hook it up. Honestly, I had gotten pretty burnt out on all the user interface programming I was doing and, combined with a ton of stuff going on at my day job and a trip to Canada, I was getting a little weary and was planning to take a break. Then, some new hardware came in the mail and I realized I was not going to be able to hook it up and get it going until I finish with some UI enhancements, bug fixes, and robustification.

There is nothing like new toys for motivation for an engineer and this definitely qualifies. So, today, I am reinvigorated and will dive back into the UI so I can move on to the fun stuff. In the meantime, we are putting together a marketing survey of a large group of potential users of this product. Actually, there is value in making this thing (for me anyway) outside of having a market for it. I am learning a ton, having fun and putting together the structure I need to complete other projects of a similar nature with my buddy John.

Wake Tech, MIT, and homeschool

It was an interesting juxtaposition yesterday when I received an email from a homeschooling mother about the push-back she received from Wake Technical Community College in North Carolina when she tried to enroll her 14 year old child into some classes there. We ran into the same flavor of push-back from Wake Tech when we tried to enroll our son Christian there under very similar circumstances. That interaction was well documented here on the is blog. Click here for a description of that particular part of the story. That email was ironic because, a few minutes before I read it, I was on the phone with Christian, now 22, who was sitting in an airport in New York waiting to catch a flight to Boston to make a presentation on his PhD dissertation topic to the people who fund his research at MIT.

Both our kids were extremely well served by Wake Tech. Both of the kids finished hard, math focused STEM degrees at the undergraduate level with honors, had multiple funded graduate school opportunities at least partially because of their college start at Wake Tech. They functioned well socially and academically at Wake Tech and they went there without adult supervision. We attribute their success from a social standpoint to the fact that they were not socialized in a traditional school cocoon and were able to interact effectively across a broad range of age groups and social backgrounds because of their homeschool socialization.

None of this had to do with any special abilities of our kids. They are/were of normal intelligence and academic gifts, but they excelled because they were in the kinds of environments provided by both homeschool and Wake Tech. It would seem like Wake Tech would want to do more of that sort of thing than less. I hope that I can help promote this if I ever have the opportunity to do so, either with Wake Tech or any other such excellent community college that will listen.

You can read about how we homeschooled by clicking here and how both the kids skipped high school by clicking here.

Weight loss update

Lorena and I are back from Burnaby. Somehow, I managed to stay on my diet while on the road and actually lost a little weight. When I got back, I had dropped enough weight that I passed one of my important thresholds and am now over 40 lbs. lighter and two thirds of the way to my stated goal.  The picture here is of me now with Kiwi in the picture for comparison. Now than I am down a bit, it is getting obvious I need to drop an additional 10-15 lbs. more than my original plan. I just do not have as much muscle mass as I did when I was in my thirties. All good. Hopefully, I will be able to get back into weight lifting again before too long and build a little of that back. For now, I will have to continue to relegate myself to walking.

Programming as a second career

I enter image description herehave a good friend who has had a long and successful career in a very specific kind of Information Technology Services. He is retired from that now as the constant travel and search for new consulting opportunities are fairly onerous. He is older, but does not want to retire completely, so he wants to deviate his career to something that allows him to use his skills and experience in a way that will not require. In talking, he mentioned he has some ideas for niche software tools for which only someone with his level of experience would even know there is a need. But there is a big hole to fill for this because, although he has programmed and been in that world for decades, he has never been a production programmer himself.

He called me and asked me how I would go about it if I were him. Since he has many of the SQL skills he needs to do the job, he really only needs something to glue his idea together. I suggested he needed, as a mechanism to learn, to build a rough prototype of his product in Python. Then, he needed to go learn best practices and rewrite the thing a couple of times and have some experienced programmers do code reviews on what he is doing from the ground up based on the code reviews.

I told him a good language choice right now is Python. I hope this was all good advice. He has time on his hands and can take a year (or more) if needed to put this thing together. It sounds like my kind of project and I am a little envious. The combination of skills he has to do this are things I don’t have–he has domain skills and has identified a specific real need and he has the background to program in that domain with some intense preparation.

Better digs in Burnaby

Lorena and I were given a room on the fifteenth floor this trip to Canada. The highest we had before was 9. We are pretty sure it is because there are not so many people her, but we definitely have a better view!

Short trip to Canada

Headed to Canada for part of the week this week. Maybe just a go there one day and get back the next kind of thing. Not sure when we will go, not sure when we will get back. Oh the vagaries of working from home.

Changing to a new office

Things have not slowed down much now, even though the new floor installations are complete. We have moved my office from the double size room at one end of the upstairs to the other end of the upstairs in a much smaller room. We then moved the guest bedroom furniture and some other pieces into the big room. Actually, we think it will work out quite well. I like it a lot. We put the hide-a-bed in there, so I have a sofa for reading and for Lorena to use while I am working. We will need to get some blinds for the room because of the glare problem in the office and privacy in the now very big guest bedroom.

We had out on a really short trip to Canada tomorrow, but still have some painting to do in the master bedroom before we can move back in there. I actually think we are getting toward the end of what we are going to do on the main floor and the upstairs of the house. The most important new thing will be the blinds. Then we need to move onto the outside and, maybe down to the daylight basement.

Done with hardwood installation for awhile

The floors are all in. Thankfully, we are done with hardwood floor installation for awhile and maybe even forever in this house. That does not mean the house is not still in complete upheaval. Lorena wants to paint the master bedroom before we put anything back into it. Then we have a ton of furniture moving and reassembly as well as some trips to the dump and Good Will. Seeing all the rooms in an uncluttered state inspired us to realize we still have too much “stuff.” In this last series of moves between North Carolina, Oregon, Washington, and Texas, we rid ourselves of much of it, but there is still a lot to go. If our goal is to truly downsize in the house after this one, then it will be quite a big job. There is just so much stuff we carry around that we will never, ever use again.

Ups and downs all day long

It was a long and busy day today. I expected it to slow down, but work poured in right at quitting time and I am just finishing up what was possible to finish. The good news is that the relays to control the LED’s for the bean sorter project arrived today. They are small, cheap and should be perfect for this project, but not as the strobe control I/O’s we need. They are mechanical relays that can switch at a maximum rate of 10ms to active and 5ms to inactive. That is way to slow for what we want to do. The good news about the bad news though is that I thought I was only getting one board, but I got two and I will be able to use them to do a lot of the development work while I wait for some faster solid state switches AND I will be able to use them in the product to control the indicator lights that show machine status.

Beansorter: GUI and live video up and running

The browser based GUI for the bean sorting project is now up and running and being served from the Raspberry Pi. I only have one camera running right now because I only have one camera, but it does all the things that need to be done. There is a lot underneath the hood on this thing, so it should serve as a good base for  other embedded machine vision projects beside this one.

In terms of particulars, I am using a Flask (Python3)/uWSGI/nginx based program that runs as a service in the Raspberry Pi. Users access this service wirelessly (anywhere from the internet). The service passes these access requests to the C++/OpenCV based vision application which is also running as a service on the Raspberry Pi. Currently, we can snap images show “live” video, read the C++ vision log, and do other such tasks. We probably will use something other than a Raspberry Pi for the final product with a USB 3.0 port and the specific embedded resources we need, but the Raspberry Pi as been great for development and will do a great job for prototypes and demonstration work.

The reason I put the “live” of “live” video in scare quotes is that I made the design decision not to stream the video with gstreamer. In the end applications I will be processing 1 mega-pixel images at 20-30 frames per second which is beyond the bandwidth available for streaming at any reasonable rate. The purpose of the live video is for camera setup and to provide a little bit of a reality check at runtime by showing results for each 30th to 100th image as a reality check along with sort counts. There is no way we could stream the images at processing rates and we want to see something better than the degraded streamed image.