BTEC Unit 6 - SAMs (the egg timer) sample solution

A place to discuss any problems, issues or questions surrounding the E-blocks BTEC Unit 6 course.

Moderator: Benj

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby Q Branch » Fri Mar 02, 2018 6:30 pm

This is something I was working on at the end of last year, but for various reasons it's been shelved until now.
It's my take on how to navigate through the 12-hour supervised assessment period from a student's point of view.
I have no insider knowledge from Pearson - everything is based on what I interpret (or misinterpret) from the various documents and books available.

This first posting is based on the 7 P's - Perfect Planning and Preparation Prevents Poor Performance.
I call this pre-planning because it's something that can be done in advance of the 12 hour period. At least that's my understanding unless anyone has an alternative view.

My argument goes like this: If I'm in industry and expecting a product specification from a customer, I don't need to know the details of the job before I allocate or ring fence some resource for the job and put a rough plan in place.

first_attempt_egg_timer.jpg
first_attempt_egg_timer.jpg (152.66 KiB) Viewed 4616 times
Attachments
pre_planning_2_session_by_session.pdf
(63.06 KiB) Downloaded 131 times
pre_planning_1_planning_the_timetable.pdf
(58.05 KiB) Downloaded 126 times
These users thanked the author Q Branch for the post (total 4):
The G (Mon Mar 05, 2018 3:09 pm) • medelec35 (Mon Mar 05, 2018 4:08 pm) • Steve (Mon Mar 05, 2018 6:09 pm) • Benj (Fri Mar 23, 2018 10:44 am)
Rating: 23.53%
 

User avatar
The G
Posts: 16
Joined: Tue Jan 09, 2018 12:41 pm
Location: Suffolk
Has thanked: 24 times
Been thanked: 8 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby The G » Mon Mar 05, 2018 3:08 pm

Very helpful indeed! And structured in a way aligned with the mark-scheme and sample learner answers from BTEC.
These users thanked the author The G for the post (total 2):
Q Branch (Mon Mar 05, 2018 9:08 pm) • Benj (Fri Mar 23, 2018 10:44 am)
Rating: 11.76%
 
...
G

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

BTEC Unit 6 - SAMs (the egg timer) Session 1

Postby Q Branch » Mon Mar 05, 2018 9:20 pm

Thanks G, things are going slower than I expected because of interruptions, but I'll keep things going as best I can.

This is "Session 1" where the student has to make sense of the client brief (easier said than done).
Pearson have left us with a few issues to ponder here as detailed in the Teachers_Notes etc.

Again - this is just my take on it - feel free to use it as an organ donor for your own use.
Attachments
Teachers_Notes_for_Part_1.pdf
(56.1 KiB) Downloaded 114 times
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_1.pdf
(45.87 KiB) Downloaded 134 times
BOOKLET_76543_QB00700_BRANCH_Q_Part_1.pdf
(86.63 KiB) Downloaded 136 times
These users thanked the author Q Branch for the post:
The G (Wed Mar 14, 2018 11:06 am)
Rating: 5.88%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

BTEC Unit 6 - SAMs (the egg timer) Session 2

Postby Q Branch » Fri Mar 09, 2018 2:20 pm

If I read the specification correctly, this is where we have to compare at least 2 microcontrollers and pick one.
It's like asking for two quotes for the annual church hall emergency lighting check.
We already know the answer before we ask the question, the lowest bid always wins :roll: .

Likewise, it will be the microcontroller and board that you spent most of your 120 GLH on.

Most of this can be prepared in advance and edit the appropriate parameters and comments in the table as required to save time during the session.

Any hardware that you need to add, LEDs, piezo sounders etc - you need to have the datasheets and images to hand because you do not have internet access during the assessment.

There's no teachers notes with this one - it's just as it is.
Next session, I'll need to do some notes to explain how my software design process works.
Attachments
BOOKLET_76543_QB00700_BRANCH_Q_Part_2.pdf
(514.01 KiB) Downloaded 126 times
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_2.pdf
(46.71 KiB) Downloaded 94 times
These users thanked the author Q Branch for the post (total 2):
The G (Wed Mar 14, 2018 11:07 am) • medelec35 (Sat Mar 31, 2018 1:04 am)
Rating: 11.76%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 3

Postby Q Branch » Thu Mar 22, 2018 11:24 pm

Sorry for the delay in getting Session 3 uploaded, but I was getting "Ofsted ready".
Now I can get back to some proper work.

The design is complete and the skeleton of the program is there.
Attachments
Teachers_Notes_for_Part_3.pdf
(211.02 KiB) Downloaded 80 times
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_3.pdf
(46.72 KiB) Downloaded 80 times
BOOKLET_76543_QB00700_BRANCH_Q_Part_3.pdf
(181.14 KiB) Downloaded 91 times
These users thanked the author Q Branch for the post (total 3):
medelec35 (Thu Mar 22, 2018 11:58 pm) • Steve (Fri Mar 23, 2018 9:35 am) • The G (Tue Apr 17, 2018 11:38 am)
Rating: 17.65%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 3 - Flowcode 7 software

Postby Q Branch » Thu Mar 22, 2018 11:41 pm

This is the Flowcode 7 code for Session 3.
It's based on an earlier "hardware test" program with the LED and piezo sounder tests added for the egg timer.
Pressing keys SA0 to SA5, SB6 and SB7 cause the LCD to display their state ('0' or '1'),
Pressing key SB6 causes the piezo to sound, releasing SB6 silences the piezo.
Pressing key SB7 causes the big LED to illuminate, releasing SB7 turns the LED off.

If there's a bug that causes odd behavior later in the development cycle - this is the code to download to the board and make sure the hardware is still ok.

The key_task and Timer_2_ISR will be used without modification for the egg timer design.
The LED and LCD need tasks written to handle them as per the design.
main also needs quite a bit of work.
Attachments
Hardware_test.fcfx
(25.65 KiB) Downloaded 95 times
These users thanked the author Q Branch for the post (total 3):
medelec35 (Thu Mar 22, 2018 11:59 pm) • Benj (Fri Mar 23, 2018 10:44 am) • The G (Tue Apr 17, 2018 11:38 am)
Rating: 17.65%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 4

Postby Q Branch » Tue Mar 27, 2018 10:11 pm

At the half way point it's starting to come together.

The "Quick Start 3½ minute egg" and "Cancel" keys work.
The LCD, LED and piezo sounder work as per the design.

The "SET TIME" and "START" functions will come in Session 5 and you can see the hooks where they fit in the Flowcode.
Attachments
Teachers_Notes_for_Part_4.pdf
(50.92 KiB) Downloaded 73 times
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_4.pdf
(48.31 KiB) Downloaded 71 times
BOOKLET_76543_QB00700_BRANCH_Q_Part_4.pdf
(75.5 KiB) Downloaded 82 times
These users thanked the author Q Branch for the post (total 2):
medelec35 (Sat Mar 31, 2018 1:03 am) • The G (Tue Apr 17, 2018 11:38 am)
Rating: 11.76%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 4 - Flowcode 7 software

Postby Q Branch » Tue Mar 27, 2018 10:23 pm

At Power ON / Reset, you get the Welcome Message for a few seconds or until you press a key.
Then you get "SET TIME", but the only option you have there is "QUICK START"
Then you're "COOKING" until "DONE" or you "CANCEL".
If you let it run until "DONE", press "CANCEL" to silence the piezo and return to "SET TIME"

More to follow.
key_functions.jpg
key_functions.jpg (100.46 KiB) Viewed 4201 times
Attachments
session_4_work_in_progress.fcfx
(63.98 KiB) Downloaded 71 times
These users thanked the author Q Branch for the post (total 2):
medelec35 (Sat Mar 31, 2018 1:03 am) • The G (Tue Apr 17, 2018 11:38 am)
Rating: 11.76%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 5

Postby Q Branch » Fri Mar 30, 2018 10:55 am

"The person that never made a mistake, never made anything" - a quote from my first boss.
The first version of any software will have some bugs and there were a few in the Session #4 software.
The software from Session #5 has all the "must have" aspects of the client brief (and some bug fixes :oops: ).
Attachments
Teachers_Notes_for_Part_5.pdf
(51.43 KiB) Downloaded 72 times
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_5.pdf
(48.08 KiB) Downloaded 72 times
BOOKLET_76543_QB00700_BRANCH_Q_Part_5.pdf
(147.88 KiB) Downloaded 78 times
Last edited by Q Branch on Fri Mar 30, 2018 11:07 am, edited 2 times in total.
These users thanked the author Q Branch for the post (total 3):
EtsDriver (Fri Mar 30, 2018 9:33 pm) • medelec35 (Sat Mar 31, 2018 1:03 am) • The G (Tue Apr 17, 2018 11:38 am)
Rating: 17.65%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 5 - Flowcode 7 Software

Postby Q Branch » Fri Mar 30, 2018 10:59 am

Everything now works for the "must have" parts of the client brief.
There's some enhancements on the way for the fancy stuff.
key_functions.jpg
key_functions.jpg (103.27 KiB) Viewed 4124 times
Attachments
session_5_work_in_progress.fcfx
(65.54 KiB) Downloaded 70 times
These users thanked the author Q Branch for the post (total 2):
medelec35 (Sat Mar 31, 2018 1:02 am) • The G (Tue Apr 17, 2018 11:39 am)
Rating: 11.76%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 6

Postby Q Branch » Sat Mar 31, 2018 12:10 am

Just adding the fancy stuff now - overcooked and test mode up and running.
No teachers notes for this session.
Attachments
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_6.pdf
(48.52 KiB) Downloaded 75 times
BOOKLET_76543_QB00700_BRANCH_Q_Part_6.pdf
(233.24 KiB) Downloaded 80 times
These users thanked the author Q Branch for the post (total 2):
medelec35 (Sat Mar 31, 2018 1:02 am) • The G (Tue Apr 17, 2018 11:39 am)
Rating: 11.76%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 6 - Flowcode 7 Software

Postby Q Branch » Sat Mar 31, 2018 12:19 am

Unless I (or you) find any issues, this is my final software solution (apart from adding some comments).
The operation manual will have the detailed design etc.
test_mode.jpg
test_mode.jpg (92.3 KiB) Viewed 4102 times
Attachments
session_6_work_in_progress.fcfx
(71.08 KiB) Downloaded 85 times
These users thanked the author Q Branch for the post (total 2):
medelec35 (Sat Mar 31, 2018 1:02 am) • The G (Tue Apr 17, 2018 11:39 am)
Rating: 11.76%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) Session 7

Postby Q Branch » Thu Apr 12, 2018 9:49 pm

I found one minor bug :oops: while documenting the system and some annoying behavior :lol: while running on the hardware during this session.

The next (and final) session will include the operating instructions including full documentation of the software.
Attachments
session_7_work_in_progress.fcfx
(74.55 KiB) Downloaded 69 times
TASK_PLAN_76543_QB00700_BRANCH_Q_Part_7.pdf
(49.09 KiB) Downloaded 65 times
BOOKLET_76543_QB00700_BRANCH_Q_Part_7.pdf
(67.37 KiB) Downloaded 74 times
These users thanked the author Q Branch for the post (total 2):
The G (Tue Apr 17, 2018 11:39 am) • medelec35 (Wed Apr 18, 2018 3:36 pm)
Rating: 11.76%
 

User avatar
The G
Posts: 16
Joined: Tue Jan 09, 2018 12:41 pm
Location: Suffolk
Has thanked: 24 times
Been thanked: 8 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby The G » Tue Apr 17, 2018 11:48 am

CANCELLED
DESTROY THE EGG :lol: :mrgreen: :lol:

You have done a lot of work preparing all of this - much appreciated that you are willing to share the resources!

I hope that eventually I shall be competent enough to contribute and not just try to learn a new subject. I really empathise with students who are learning this for the first time and going into this exam next week. I personally don't believe that a student can accomplish anything close to what you have in the allocated 12 hours!
...
G

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) DESTROY THE EGG

Postby Q Branch » Tue Apr 17, 2018 2:03 pm

Thanks G.

The 2 line display looked a little lonely with only one word on the top line, so I added some "user experience" :lol: as it says in the blurb.

The main objective of this exercise from my point of view was to create a solution, following the Pearson documents that can be used as an organ donor by students to pull apart and use for their own projects, learning some useful tricks on the way.

I've skipped over what I called the "underpinning knowledge" in another post.
There's a lot to do an that front and I'm currently exploring my options on that for the future :idea: .

I've got one more post ( session 8 ) to go in order to finish off the task and complete the documentation.
Beyond that I will post a "lessons learned" section on what I've found along the way.

Thanks again for your comments and it's good that people are running the code and taking it apart to recycle as I intended.
These users thanked the author Q Branch for the post:
Benj (Wed Apr 18, 2018 4:33 pm)
Rating: 5.88%
 

Jacob1
Posts: 35
Joined: Wed Dec 27, 2017 4:18 pm
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby Jacob1 » Wed Apr 18, 2018 2:39 pm

Thanks for showing us your solution of this!

I had a go at the egg timer over Easter, but did not have the knowledge of how to activate a buzzer at the end of the each timer routine, which I now do. Your sessions are really useful, especially the content you have done for the design section, such as the comparison of the micro controllers.

So thanks for your time, from a students perspective studying this course, this is a massive help in terms of maximizing the planning we can do for the exam next week,

Regards
Jacob
These users thanked the author Jacob1 for the post (total 2):
Benj (Wed Apr 18, 2018 4:33 pm) • Q Branch (Thu Apr 19, 2018 8:46 am)
Rating: 11.76%
 

User avatar
The G
Posts: 16
Joined: Tue Jan 09, 2018 12:41 pm
Location: Suffolk
Has thanked: 24 times
Been thanked: 8 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby The G » Wed Apr 18, 2018 5:13 pm

Something that has come up in the preparation for the exam is that no internet is allowed. It is going to be quite difficult to compare alternative hardware and solutions without knowing what the scenario actually is in advance. Also potential improvements / technological advancements. And no online datasheets - would we need a paper copy of all components datasheets... hmmm... I wonder if I should drop an email to Pearson...
These users thanked the author The G for the post (total 2):
Jacob1 (Wed Apr 18, 2018 7:53 pm) • Q Branch (Thu Apr 19, 2018 8:47 am)
Rating: 11.76%
 
...
G

Jacob1
Posts: 35
Joined: Wed Dec 27, 2017 4:18 pm
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby Jacob1 » Wed Apr 18, 2018 7:54 pm

Could we say that we have revised the technical data in our heads? But yes we would need datasheet copies if we are to compare hardware in detail

Jacob
These users thanked the author Jacob1 for the post:
Q Branch (Thu Apr 19, 2018 8:46 am)
Rating: 5.88%
 

User avatar
Q Branch
Posts: 20
Joined: Thu Feb 08, 2018 11:03 am
Location: Hampshire
Has thanked: 7 times
Been thanked: 43 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby Q Branch » Thu Apr 19, 2018 10:17 am

Wow - thanks folks - this topic is proving to more popular than I expected.

The original plan was to do a basic, intermediate and advanced solution, but I ran out of time and opted for the advanced solution first.

If you come from a mechanical background, there's tricks you learn on the way like putting a nut on a bolt before you stick it in a vice and take a hacksaw to it. Why? - because it makes your life easier and you don't have to spend the next 20 minutes trying to re form the thread on the bolt.

All branches of engineering have their tricks - engineering is really a blend of art and science. The only way to learn one of the tricks is to have somebody else who knows the trick, show you. I've tried to include some of the more useful ones in the solution to give you reasonable chance of success in a few weeks time.

There's not enough time to do everything from scratch during the assessment, so the more preparation you can do the better.

My take on the comparison of hardware goes like this:
You are going to use one hardware platform for the assessment and if you're reading this forum it's going to be the Matrix one.
I can't see a problem preparing (in advance) a table of say Arduino v Matrix like I did and when you are presented with the assessment, fill in the blanks in the last column. On the comparison of ADCs between Arduino and Matrix, I said something like "I don't intend to use analogue inputs in my solution". Choose the features you are going to use and find a good or neutral reason to steer your decision towards the board you are going to use.

Also, in the real world, if you already use a PIC or Atmel based platform for something, you will have knowledge of that platform including software you already know works, so you will be heavily biased to choose what you are already using.

We seldom write software by starting with a blank page and typing until it's finished. We use libraries and/or functions we (or someone else) have written previously. Some of my favourites have been with me since the early 1980s, starting in Z80 assembler, then translated to other processor assembler, C and now translated into Flowcode.

Other people may have a different view, but knowing how things work in the industry, I don't see a problem with this although I have not asked Pearson for their opinion.

Jacob1
Posts: 35
Joined: Wed Dec 27, 2017 4:18 pm
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: BTEC Unit 6 - SAMs (the egg timer) sample solution

Postby Jacob1 » Thu Apr 19, 2018 11:51 am

Hi,

I completely agree with being able to plan before the assessment, in terms of using datasheets for the comparison of the microcontrollers. I have done this now, but I am concerned about whether I can use this for the assessment, as if we have no internet then Pearson will suspect I have done this outside of the exam period.

However, if they want us to select the hardware, inputs and outputs etc, we would need to use the datasheets in order to obtain the info, unless we are meant to revise this detail in our heads. I believe my teacher has contacted Pearson about this, but I think for the exam I will only have a few parameters and advantages and disadvantages for the microcontrollers, not as detailed as yours! Simply because, this detail I can say I have revised for the assessment and modified where needed.

So unless Pearson say we can use datasheets and obtain technical info before the exam, I think I will just have to go with less detail and include actual photographs of the components instead. This is ashame as I would like to go into the detail you have for the design section! :?


Jacob