Back to Mónica Pedro ←main page ←Assigments
        individual assignment:
        add an output  device to a microcontroller  board you've designed,
         and  program  it to do something
    
    
    I'm very interested in knowing hot to process data coming from a sensor produced in the Lab, and want to understand how some of them work, so for starting this assigment I produced some of teacher Neil...
So I made a Temperature Board
 
    but as is documented above, it was a quite long and frustating crusate to program the board
 
    So downloaded the programs to a folder "Temperature" and CD to it, wher I'd used the comand
make -f hello.temp.45.make
 
    make -f hello.temp.45.make program-ice
Does not worked... PROBLEM
 
    when lokking for suppor online I found a nice overview in AVRDude and Atmel ICE on OSX 10.3 High Sierra
sudo cp -r ~/Downloads/AtmelICE.kext /Library/Extensions
sudo kextload -v /Library/Extensions/AtmelICE.kext
sudo chown -R root:wheel /Library/Extensions/AtmelICE.kext
sudo chmod -R 755 /Library/Extensions/AtmelICE.kext
sudo kextcache -system-caches
this last one showed the permissions problems os MAC OS SIERRA
 
    I've Reboted the system and used the keys CMD+R to access the booting and on the terminal window used the command
csrutil disable; reboot
made all the previous steps and boot the system again... and it continues to do the same error:
 
    
    ...................
make -f hello.temp.45.make
 
    since it worked, now verify if the Atmel-ICE is set in Make file with the command:
cat hello.temp.45.make
it was, so i continued with..
make -f hello.temp.45.make program-ice
 
    next would be to use the TERMinal app developed by professor Neil "hello.term.45.py"
make -f hello.temp.45.make program-ice
pyhton hello.term.45.py
ERROR... it was needed to install some software... Tkinter
sudo apt-get install python-tk
 
    OOK.... now
pyhton hello.term.45.py
 
    Another problem...... Need of numpy
sudo apt install python-numpy
pyhton hello.term.45.py
Answer: Command line: hello.temp.45.py erial_port
to figure out the serial ports used the command
dmseg | grep tty
 
    pyhton hello.term.45.py /dev/ttyUSB0
[Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
sudo pyhton hello.term.45.py /dev/ttyUSB0
 
    
    
    
    
    SparkFun Soil Moisture Sensor uses two large exposed pads as probes for the sensor, together acting as a variable resistor:
the Moisture sensor I've in my lab is quite basic, and the information found online is not precise...

 Moisture Sensor from ACCROW
     Moisture Sensor from ACCROW
    Connecting it to Arduino as ISP
Moisture Sensor pins - Arduino Pins
 
    Sample code on Arduino
 
    after Verify and UpLoad, open the serial port and:
 
    
    
 Adafruit overvew of DHT's sensors
     Adafruit overvew of DHT's sensors
    about Dht11
found a very good documentation....DHT11 & DHT22 Sensors Temperature and Humidity
and here: How DHT11 DHT22 Sensors Work & Interface With Arduino
 
    
 
the humidity sensing component uses two electrods 
  with moisture holding substracte between them
    So as the humidity changes, the conductivity of the substract changes 
      or the resistance between these electrodes changes. 
This change in resistance is measured 
  and processed by the IC 
      which makes it ready to be read by the microcontroller.
The substract (usally is a salt or conductive plastic polymer)
    The ions are released by the substract as water vapor is absorved by it, 
         which in turn increases the conductivity between the electrods.
The change in resistance between the two electods is proportional to the relative humidity
    higher relative humidity decreases the resistance between electrodes, while
         lower relative humidity increases the resistance between the electrodes.
          
 
the NTC temperature sensor is a  thermistor 
    a thermistor is a thermal resistor: 
        a resistir that changes its resistance with change of the temperature. 
    These sensors are made by sintering of  semiconductive materials 
        such as ceramics or polymers 
            in order to provide larger changes in the resistance  with just small changes in temperature.
The term “NTC” means “Negative Temperature Coefficient”, 
    which means that the resistance decreases with increase of the temperature.
 
                    
    
    
    
    
    
    Connecting it to Arduino as ISP
DHT11 pins - Arduino Pins
 
    #include "DHT.h"
.............. will inlcude in compiling the "DHT.h" library
DHT library in Arduino website#define DHTPIN 2
.............. creates a varibale called "DHTPIN with a value of "2"
#define DHTTYPE DHT11
.............. creates a varibale called "DHTTYPE with a value of "DHT11"
DHT dht(DHTPIN, DHTTYPE)
.............. sends a comand to the funtion "dht" existent in the Lybrary DHT, sending to that function the previous created variables (DHTPIN and DHTTYPE)
used EAGLE to design a board using two different microcontrollers
 My board for Moisture + DHT11 Schematic
    My board for Moisture + DHT11 Schematic My board for Moisture + DHT11 Board
    My board for Moisture + DHT11 Board 
     My board for Moisture + DHT11 Board for Vinyl Cutter
    My board for Moisture + DHT11 Board for Vinyl Cutter 
     My board for Moisture + DHT11 Schematic
    My board for Moisture + DHT11 Schematic My board for Moisture + DHT11 Schematic
    My board for Moisture + DHT11 Schematic 
    
     
     
    