12 - 18 March 2020
Lessons by Loes Borgers
Assignment: Make a digital/analog switch
Assignment (in pairs):
make one antiprimadonna on/off switch (archive-worthy!)
make one antiprimadonna analog sensor (archive-worthy!)
build the basic tools (a few paperclip connectors, a LED/resistor pad, a voltage divider)
learn how to connect it to a microcontroller, program it, and get readings from your sensor in the serial monitor and plotter of the Arduino IDE (video!)
make a video of the working circuits, and the values coming in, the LED changing brightness (video!)
document step-by-step how you made everything and how you made it work (incl debugging)
show at least 3 annotated iterations of each sensor
I found this assignment pretty difficult, so I started to remake this simple example Loes gave us:
Keep in mind that you don't need an adruindo (code) for this, you can also use the + and - of a battery.
What do you need?
Adruindo
Breadboard
LED
Connectors (cables)
Paper
Paperclips
Copper tape
I use the same breadboard settings for all the levels.
This video from Loes helped me a lot with prototyping: https://youtu.be/OwZUf2DIHVQ
This is my first test. I don't know if it's going to work, but this is how I did it:
I put the red cable in the 3V3 and + side.
The black cable is in the GND and - side.
I connceted the red LED with the black - cable .
Then I connected the LED with a resistor.
The resistor is conncected with the red + cable.
The button paper is connceted with the LED and GND.
I put the GND copper tape where it should be. See pictures.
Then I sticked the LED copper tape where it should be. See pictures.
To test if the test paper prototype really works I installed my Adruindo to my computer and ran an empty file.
The test needed a debugging methode, I had to switch the connceters of the LED from GND and 3V3. Now it's like this & and it works:
This was my first simple digital switch without any code!
I have decided to make a digital swicth (on/off).
Toggle switch needs:
Bread
Copper tape with a small width
Copper tape with a more wide width
Copper rod
Adruindo
Breadboard
Connectors (cables)
Resistor
LED
Paperclips
Paper
Process:
I tried to make a switch with small breads, but it did'nt work. The hole for the copper wire was to narrow.
I found a tube of a tape holder and wrapped the coper wire around it.
After I wrapped the wire trhought the tube I wrapped the tape around the tube.
Now i got two endings of the copper wire. I think that's good? Not sure if that's going to work. I will tape both endgins without touching each other with a copper tape to the copper rod.
Now I'm going to make the paper prototype of the paper that will connect everything.
I'll use 3 small copper tape pieces and put one on the left side of the paper, one on the right side of the paper and one on the bottom of the paper. Don't let them touch each other!
Put a tiny hole in the paper for the copper rode to go throught.
Connect the cables to the tape.
The Gnd cable goes on the bottom tape which will be connected with the copper robe.
The led cable will be connected to the lef or right tape of the paper.
Connect the power and toggle for some light.
It works! It doesn't really toggles yet, but the priciple works. Let's start making the real thing.
Tips:
Find good breads or round abjects that can toggle.
Bend your copper rob before you attach the toggle.
I am going to use the priciples which I described in the Simple toggle switch, but i'm going to make the final version which will fit into the series (See assignment).
Again I used paper, copper tape and my self made toggle.
This time I'll use black and more thick paper than the white paper I used before. I think the black paper is about 300 gr thick.
I put the tape on the paper and put a tiny hole in the paper so my toggle will fit. But now I have to find a way how I can secure the toggle on the paper and still be able to move the toggle and receive feedback from the LED.
I'll use some aquipment I already had, but you can also do this with just hand power.
With the tools I bended the copper rod in such a way it would be easily to attach it to the GND tape. But I made a little mistake, so please do whatever suits you best.
Because I bend the copper rod in the wrong way I couldn't secure the rob on the back but I had to secure it on the front, else the rob would not be toggling.
See videos, GIFs and photo's for the final result.
Go to the page of my teammate this week to see the analog sensor:
I will test the LDR again on this page:
Week 6 and 8
Trying to connect a LDR to a LED with NodeMCU
The first code from Loes I am going to try:
I tried to work with this schematic drawing of how the circuit should look like:
I made this out of it:
It didn't worked:
I find the LDR LED really difficult so I'll try some old codes I had and re-install my board.
So I started with the basics again. Does my LED really works?
I ran an empty code to see if my LED really worked.
And it worked!
I went back to the slides and found this image:
I wanted to run the same code i did previously and came across this error:
The port of my NodeMCU is not found. I checked my settings and also saw that the serial print speeds were also not the same, that's why I couldn't run my code and open the serial monitor port. The serial port speed was around 4200. So I set everything back to 115200 and restarted my NodeMCU. It now connects again.
But when I run the code again this happend:
Well nothing happened. I send the code to my NodeMCU and I didn't got any variables. I run it again and it still didn't worked, so I started debugging my board.
I changed every piece of cable and finally I found out what was wrong and why my LDR sensor didn't gave any values: The LDR resistor had to be on the GND pin and I think it was not really pushed in it real good.
My values are: 3 to 4 and sometimes 5. I still don't really trust it, but it does shows values, but I know it are not the right values.
I still don't trust the values but I'll go on with the code. So I adjusted my Min and max values on line 36 to 3 and 4.
And my serial still says a lot of thinks with a really high speed:
After I ran this code my computer crashed.
I still didn't get why my LDR sensor was nog working. So I asked my boyfriend if he wanted to help me with a puzzle. I gave him the image of how the board must look like and all the necessities. He has no knowledge abut coding, adruino or anything like that, so it was a fresh start. He made the board look exactly as the image that I showed, which I had done in my previous attempts. I ran the code, and it worked! What!
I used the min value 560 and max value 611. It worked, but it's crashes my laptop. So I'm going to try it out with a more wider min max value, maybe that will work better.
Trying it out with a flash light the values wil be min 560 and max 955:
It worked a lot smoother then the code with a closer min and max value.
Link to the digital zine of week 6: https://andreimotian.com/quarantzine/
This week we had to understand a few parts of the texts we had to read. The teacher also wanted us to understand some specific subjects. We could chose from these subjects:
Discuss this week’s work in relation to one of the following…
The difference between digital and analog sensors (if any)
The different meanings of the word analog
The relationship between technological development and the military-industrial complex
Proprietary hardware, software and electronics design
The ideology of “blackboxing” in design and technology
I had chosen this one:
The difference between digital and analog sensors (if any)
The differences between a digital and an analog sensor
The differences are not so big. They both do something when it’s required, but the way they do it is different. The digital sensor can only provide two outcomes or it can only work with these outcomes, which are 0% or 100%. Like on/off, but then in a sensor kind of way. The analog sensors differs in that way, because it can work in outcomes from 0% to 100%. With an analog sensor you can say I want you only to work at 55% or I want you to work only at 55% and a little at 20%.
So you could say there’s a big difference, but I think that depends on what you want to do. If you only want something to work when there is 100% outcome needed or 0%, there is no difference. If you want to make something more specific then there is a big difference.
Outcome: