element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • 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 Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
  • Settings
Pi Chef Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Pi Chef Design Challenge
  • More
  • Cancel
Pi Chef Design Challenge
Blog Automatic Dough Shaper Blog #3 - Pi Chef Design Challenge
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: a_davis_22
  • Date Created: 12 Feb 2018 8:31 PM Date Created
  • Views 597 views
  • Likes 9 likes
  • Comments 5 comments
  • cookie
  • ac_power
  • pi chef design challenge
  • thermistor
  • diy cnc
Related
Recommended

Automatic Dough Shaper Blog #3 - Pi Chef Design Challenge

a_davis_22
a_davis_22
12 Feb 2018

Sometimes your mistakes are so simple, you can’t find the answers on the internet…

 

Yeah... so after I put the SD card into the raspberry pi, it worked. I then went on to make several more mistakes on the same level, but eventually I figured them out as well.

 

Let’s get into the progress I’ve made and what I learned. This week I worked on getting the toaster oven control done. I decided to use a thermistor to measure the oven temperature. I have never done anything with thermistors before, and this article https://learn.adafruit.com/thermistor/using-a-thermistor was very helpful to me. It seemed good practice to use an NTC type for my application and I chose the 103JG1K thermistor. It’s a 10K ohm thermistor and I connected it in a simple voltage divider with a 10k ohm resistor like they did in the article.

 

image

 

Since the raspberry pi doesn’t have a built in ADC, I used the MCP3008. This chip uses SPI communication.  I’ve always been too intimidated to learn how to actually use SPI, but it turned out to be SUPER simple.  I read a bunch of stuff on using SPI communication and this article https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008 explained how to use the MCP3008 really well. I was nervous about being able to still use the touch screen display, but I found that the raspberry pi actually has two channels. To access the second channel I just had to connect to the CE1 pin instead of the CE0 pin, which the touch screen uses. I tested the ADC using the sample code provided in the MCP3008 library and then wrote my own code to calculate the actual temperature from the thermistor. I haven’t really used python before and it took me a long time to figure out how to get it to do my equations with floating point numbers instead of integers. I verified that it worked at room temperature and by touching it to a frozen block of cheese.

image

image

I’ll attach my code at the bottom.

 

For the toaster oven control, I built a mains power switching circuit on a solderable breadboard.

image

image

 

 

It uses the  H11AA1H11AA1 optocoupler for zero crossing detection and the MOC3010 and BT136 Triac for the actual power switching In my previous post I wrote about testing the zero cross detection part of the circuit with the Arduino Trying to get that to work on the raspberry pi though was very difficult I found how to do GPIO interrupts easily enough but it took a few days to discover that you can’t just simply do an interrupt service routine with a timer on the raspberry pi That’s because it’s running like a computer with a full operating system If it were a microcontroller like the Arduino it would easily run timer interrupts This really opened my understanding to the different capacity and uses for the two types of controllers Now I understand why so many of the other projects are using voice control and internet and inter-connecting systems The raspberry pi is naturally a device to use for IoT projects

 

Finally, I decided that rather than spend another one or two weeks trying to get true AC phase control, I’ll just do a bang-bang type of controller. Instead of actually using the zero cross detector to control how much power my circuit is outputting, I’ll just turn on the triac for a few minutes at a time and turn it off when the oven reaches a certain temperature. My code ended up being reduced to just a few lines. If I have time later on, I’ll come back to this and probably get it working with an Arduino and have the Arduino and raspberry pi communicate over a serial line.

 

When I went to put the whole thing together and actually turn on the oven, I realized that because my thermistor is just a little glass bead with two little wire leads sticking out of it, I couldn’t just stick it in my toaster oven. I’ll need some heat resistant wire to allow it to be in the oven measuring temperature and attaching to the raspberry pi, then I can finish the oven control.

 

Now I need to get to work on the platform and roller.

 

(Code is now attached)

Attachments:
week 3 code.zip
  • Sign in to reply

Top Comments

  • aspork42
    aspork42 over 7 years ago +1
    Are you running the Pi Headless and just using VNC to access it?
  • a_davis_22
    a_davis_22 over 7 years ago in reply to aspork42 +1
    Yes
  • DAB
    DAB over 7 years ago +1
    Nice update. I agree, keep the design simple to get it up and running, then fine tune the mains control if time allows. DAB
  • DAB
    DAB over 7 years ago

    Nice update.

     

    I agree, keep the design simple to get it up and running, then fine tune the mains control if time allows.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • a_davis_22
    a_davis_22 over 7 years ago in reply to aspork42

    Yes

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • aspork42
    aspork42 over 7 years ago

    Are you running the Pi Headless and just using VNC to access it?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 7 years ago

    Nice progress on the project.  You seem to be doing a good job of finding work-a-rounds to the problems that get in you way.  Keep up the good work.  I look forward to following your progress through your blogs.

    Gene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • three-phase
    three-phase over 7 years ago

    Great progress being made. Keep going!

     

    Kind regards

    • 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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube