element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
element14 presents
  • Challenges & Projects
  • More
element14 presents
Blog What's in the box! Don't look in the box!
  • Blog
  • Forum
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: easyejl
  • Date Created: 30 Mar 2021 9:32 PM Date Created
  • Views 1948 views
  • Likes 10 likes
  • Comments 25 comments
  • buildinsidethebox
  • build inside the box
  • box.
  • bitb
Related
Recommended

What's in the box! Don't look in the box!

easyejl
easyejl
30 Mar 2021

Probably that will get tiresome after a while, but dang that was a good movie.

 

image

And whoo boy after starting looking, I think I might know more about what to do with a severed head than this image

 

Mostly it seems that the MKR Zero uses different libraries and definitions than the nano/e3 so some of the sample code I had been looking at for the VL53L0X won't work without major rewrite. But there's always other sample code.

 

The box's contents

 

1 - Arduino MKR Zero (in the end 2 image )

1 - MULTICOMP PRO Portable USB High Capacity Power Bank

a whole bunch of WAGO Pluggable Terminal Block

1 - MICROCHIP MCP604-I/P Operational Amplifier

1 - VISHAY Phototransistor

1 - MIDAS OLED Graphic Display

1 - MICROCHIP Temperature Sensor IC

2 - ST Range/Gesture Sensor 53L0-SATEL-I1

 

 

I'm not very good at electronics. It's funny, I was going through the early teens at just the wrong time, turned 13 in 1980 image I pretty well skipped straight from simple electrical experimentation to computers. Luckily nowadays you can buy component blocks that have the details of "what ohms resistor do I use" or "how many microfarads of a capacitor do I need" already worked out. But I'm pretty rocking at software development, been writing code for 41 years I guess now. Dang I feel old.

 

 

The Arduino MKR Zero

It's pretty interesting how many different options there are in Arduinos (as well as the other SBCs/microprocessor boards). The MKR Zero is one of the smallest form factors, energy efficient and has a built in SD card slot. It also has a few neat features not in most other arduino boards.

* There's a connector that meant for connecting a LIPO battery which is handy.

* This board runs on 3.3v instead of 5.

* There's another connector for a second hardware I2C channel. Useful as there are a limited number of pins so in a larger project this really could make a huge difference.

 

Beyond that, what's supposed to be it's big feature is I2S (Inter-IC Sound). That's an electrical serial bus interface standard for connecting digital audio devices. This allows for the MKR Zero to directly play and analyze music files but that would specifically be .wav files.

 

Pretty nice overall, handy for portable projects. I killed my first one's USB port by shorting out the USB power pins due to attaching power with it not on a breadboard. There was a pair of pliers on the desk and the pins ended up brushing on it. No problems with the 2nd one outside of what others have noticed - the USB isn't exactly stable on a windows machine. I frequently had to put it into bootloader mode to get it to connect.

 

Also something new I learned is that you can't have Cura running with the Arduino IDE, even if its set to use Octoprint. Cura appears to scan USB ports and frequently locked the Arduino.

 

MULTICOMP PRO Portable USB High Capacity Power Bank

A pretty nice power blank. no complexities here. I had considered opening it up to see what it's battery native voltage was (to use plugged directly into the MKR Zero), but it felt unnecessary. Worked nice overall.

 

WAGO Pluggable Terminal Blocks

I had never looked at these before, but they are pretty cool. they come in various configurations of how many wires connect together, and then each module can click into a variety of holders they have. For this project they'll get used for the AC power coming into the box.

 

MICROCHIP MCP604-I/P Operational Amplifier

Given my lack of great electronics knowledge, i wasn't totally sure on what to use this for. I understand the general use, but the devil is in the details. Plan for it is to use it with the phototransistor to help buffer it to giving a true on/off signal.

 

VISHAY Phototransistor

This I went back and forth with, partially due to my difficulty with getting a straightforward open/closed signal from it. For this project, plan was to have it be a safety interlock, shutting off the circuit if the box is opened.

 

MIDAS OLED Graphic Display

I was surprised at how small this was. Still quite a nice display, and Adafruit has some simple libraries that work really well.

 

MICROCHIP Temperature Sensor IC

Nice, small, easy to work with. It's downside is that its not a fast temperature sensor. It takes a second or two for it to update. Also, it appears to have a really fine measurement capability, but at the same time it appears to vary a bit (within 0.1 degrees though).

 

And the fun part, that really drove the thought process for me

 

ST Range/Gesture Sensor 53L0-SATEL-I1

These are pretty neat. Basically a LIDAR unit. These are configured to be used with ST's Nucleo development board, and their documentation is a little spotty if you're planning on using it as the whole satellite board without the Nucleo. They are breakoff boards, so you can bust it down to just the VL53L0X piece but then you need some other components. Also, part of the challenge with this was that the ST libraries didn't cooperate with the MKR Zero, as its a SAM-D board. There's some differences in the dependent libraries like Wire which added to the challenge. ST has an example with gesture recognition that I was never able to get working. In the end it was ok, it was still easy to get the distance measurements from the chips which was all I really needed.

 

My Project

I started off with a variety of ideas, but ended up with something my wife came up with. She showed me a video of someone using Alexa to control a sewing machine's speed and that started it off.

 

The core concept is helping someone who has difficulty with using a foot/knee pedal consistently to use hand gestures instead. The gesture sensors will catch the gesture, the temperature sensor would be attached to the sewing machine motor, and both the power level and temperature would be displayed on the OLED. The phototransistor would as mentioned above act as a safety interlock, shutting everything down if the box is opened as it will have live 110 AC. The power bank would power the arduino so there's no need to use a wall wart or other transformer with it.

 

Other parts

I started with trying to wire up a triac myself, but realized I didn't have an appropriate transformer so wasn't going to be able to do a decent zero detect. So I ended up ordering a dimmer board meant to use with an Arduino. I also got an I2C multiplexer to make interfacing the gesture sensors a little easier.

 

Progress

It didn't reach completion in time, but I will still finish it. I ran into a variety of issues over the project. Shorting out the first MKR was one. Another issue was the number of components. I got to running out of pins on the Arduino. Related to that, although some pins are programmable, some are not. So trying to get it all working together took a bit of shuffling around. In the end I couldn't manage to get the zero detect and interrupts with the dimmer working along with everything else. Their library I couldn't get to work at all, but found some more direct code that worked when the only thing connected to the arduino was the dimmer. with everything connected it never worked out. That also could be from the code however as using the PWM based on zero cross is pretty timing specific. It happens every 166 milliseconds, so any delays would throw it off.

 

 

But here's a video with most of the rest of it working!

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

The rest of the journey is documented below. It was fun getting here, and painting the sewing machine was a lot of fun too.

  • Sign in to reply

Top Comments

  • danzima
    danzima over 1 year ago +4
    SOMEONE on the e14 team made this same joke in a group call, and we decided it was too dark!
  • easyejl
    easyejl over 1 year ago +3
    So after some struggle, i've worked out the pinout on the breakoff portion of the TOF boards. It appears ST "intends" for them to be used with their nucleo eval board setup which with header sockets soldered…
  • easyejl
    easyejl over 1 year ago +3
    Well woohoo-ish. I got a very simplified, not using their library, version of the dimmer actually outputting correct AC power. so now I need to integrate that back into the sewing controller
  • easyejl
    easyejl over 1 year ago in reply to mayermakes

    It was a lot of fun. I boxed up the box    and set it aside for now until she starts reassembling that sewing machine. I'll design a case and finish the project when she gets to that point. But she's flipped to using one of the other sewing machines for leather work, so I'm back to trying to make 3d printed investment casting work for me with brass. Pewter, zinc, aluminum are all pretty easy but brass is more in the temperature range of silver and I keep getting garbage results

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mayermakes
    mayermakes over 1 year ago

    bringing new life to old stuff is always worth the challenge! You played a high risk high rewards game here. and time is not in favor of those. nevertheless a relly good project idea and a great couple project!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • easyejl
    easyejl over 1 year ago in reply to cstanton

    Good idea. I'll do that once I'm done with work today

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • cstanton
    cstanton over 1 year ago in reply to easyejl

    Some projects work out, some don't, but we still achieve with them image everyone that does an element14 presents video learns and shows this as well!

     

    You may want to edit your blog post to tie the story together and have everything in a good flow to show the project and it's journey image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • easyejl
    easyejl over 1 year ago

    Sigh, today is the deadline and no real new progress to report. i'm going to try to put it in the box at least and semi-permanently mount the TOF sensors + all to make a nicer video. functionally, the video above is as far as I got. I'll at least add a "What did I learn" piece here. Also either way I will be continuing on the project as I do want to see it running the sewing machine image and it has real value as there are a number of people with disabilities that make using a normal foot pedal difficult to keep good control.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube