This is my make-through for the week's assignment. Grab a cup of coffee!
Short Intro
I will Design, fabricate, and solder an Input Module PCB and an Output Module PCB, and program your ATTiny44 microcontroller board so that it processes different data signals from the Input Module and controls different actions at the Output Module.
Targets of the week
PCB Design: I will follow the schematic diagram for the Input Module (containing an Op-amp and Multiplexer) and Output Module (containing MOSFET and Shift Register) to design Two PCBs, and export the design files into the final PNG format (the all component are in the two PCBs is entirely through-hole)
Fabrication & soldering: Fabricate the Input and Output modules using PCB milling machine and solder the components
Input Module: Components List
Output Module: Components List
Note that all components are through-hole, except for the high power LED. You will need to solder two jumper wires directly to the two pins of the high power LED, then connect the male jacks on the free end of the jumpers to the 2-pin screw terminal).
Programming: Program your ATTiny44 microcontroller board to do the following:
Take an analog input signal from the Thermistor on the input module in order to control a high power LED connected to the Output module (at the load pin headers)
Take a digital input from the Dip switches to control each RGB color separately at the Output module
Let's start the my forth journey.
Journey taken place in my home and Fab Lab.
main goal journey: Design input and output PCP
Story Characters: Eagle, CNC milling machine, and welding machine.
My goal in this week are
Describing the rationale behind the design of the input and output module boards: how does the input board handle analog signals (from thermistor) before feeding them to the microcontroller? how does the multiple input signals (from the thermistor and Dip switches) are handled with only one input pin at the microcontroller?
how do high power loads (e.g. high power LED) are driven at the output board? how does multiple output signals (to the RGB LED and High Power LED) are driven by a single output pin at the microcontroller?
Describing how the fabricated and soldered the input and output boards
Describing how me programmed the ATTiny44 board to create a smart interaction between the inputs and outputs.
Describing some problem faced me.
Short brief one Multiplexer: is selector which choose one (Y) channel from four input (I0, I1, I2, I3) signals to read by using the selecting pins (S1, S2). For example, if you have four sensors, and you want to connect in signal pin. Selectors Pins are (ABC) with (six Probability) and eight pins as input (sensor), and output pins is Y. And one pin for VCC and GND. Using function table to control which pin I will read from. The table contain STROBE (G) same as enable If I make high the multiplexer will not work. Choose your desired pin. Input in the eight pin is digital not analog pins. If your sensors is analog such as temp sensor you can use 74HC4051 multiplexer.
Shift and LATCH clock
Component list of Input circuit
step 2: Searching on component. go to left window (two columns) and you will find add part search about your components name choose ( smd or through hole = Pads). Remember, to use " if you missed part of component name.
step 3: Finishing the schematic and go to Board, In second tool par after bar you will find button (Generate/ switch to board) make click.
DRC: Rules follow the following photos to make sure that your design rules are correct.
Output Schematic
Output board
Input Schematic
Input Board
Input circuits
Problem found : Output circuits: I can't find 2 zero ohm resistance so that I will use the any solid wire rather than Tin then I know that I can't use tin as wire. I try to remove but we I applied heat from iron and hot air the tin melt in the hole.
Problem: welding and Short circuits uspasp
Potential Solution: asking for helping and tiring to remove tin.
Step1: I watched the videos many times. I understand the concept behind the components in input specially the Multiplexer.
Step2: Download the 74HC4051 multiplexer to know the pins out Datasheet .
Step3: I do a testing code for this input board by selecting the output will show on led 13 on Arduino board. Then, I explain each line in the code to make it as reference. see video Video of testing input PCP. (condition on pin zero and one I choose pin(zero) and pin(one) are low led on Arduino board is high (pushing the switch ). and read my comment in the code code
Step4: Next step, I programed the ATTINY44 board.
Step1: I watched the videos many times. I understand the concept behind the components in input specially the shift register.
Step2: I watched this video and also understand the logic of the output circuit.
Step3: I did a small testing code for this board by lighting up each color on the RGB by input and output a shift number at a time for the shift register. For example, input (2) to light up Red, input (5) to light up Green. Video of testing output pcp. and code
Step4: I programed the ATTINY44 board.
Step1: I have problem with my Attiny board there is short circuit so that i worked using Arduino.
Used boards I/O boards, ATTINY44 & Arduino USBasp to upload the code to ATTINY44 (Arduino).
Step2: wiring input board to ATTINY44 or Arduino
S0 (pin 11) to pin 8
S1 (pin 10) to pin 9
S2 (pin 9) to pin 10
Mux out (pin 5) to pin 2
Vcc (pin 16) to 5V
GND (pin 8) to ground
Step3: wiring output board to Arduino and ATTINY44
Serial Data (pin 14) to pin 3
Shift Clock (pin 12) to pin 5
Latch Clock (pin 11) to pin 4
Vcc (pin 16) to 5V
GND (pin 8) to ground.
the result show in the next video the change of color from blue to green to red it depend on the dip switches. you can see the condition of working the following code.
The first trial I replace the pin of the latch with shift clock. (solved)
The second step is to make a smart combination between the two boards, I will light high power LED on the OUTPUT if the temperature rises above the pre-specified temperature or the voltage reference is change.
What I learned this week is...
The Idea of multimixer and shift register.
Understanding and using the multiplexers and shift register to expand the inputs and outputs of microcontrollers.
Understanding the idea of Op-amp for the purpose of converting analog signals into digital signals
Understanding and use the MOSFET in order to drive high power components