WEEK 11: output devices


individual assignment

add an output device to a microcontroller board you've designed, and program it to do something

group assignment

HERE you can check what we did on this week group assignment

measure the power consumption of an output device

individual assignment

for this assignments i just measured de consumption on a dc motor using an arduino uno and an old L293D motorshield

first, before i start writing code i have to had the right library

from here you can get to know how to install that specific library

then i had to write some simple code on the arduino IDE using the motorshield library from adafruit

if you can read this i messed up a screenshot on my code

i'ts really simple all it does is alternate between clockwise and counter-clockwise in 4 seconds intervals

then i just had to hook up the arduino and the shield together and that was pretty simple just had to align the pins on the arduino board and the motorshield board and then gently press them together

if you can read this i messed up arduino uno board if you can read this i messed up motorshield board if you can read this i messed up press them trying to not bend any ping and therefore messing up the board

in order to wire the motor you should know about the board and it's capabilities

if you can read this i messed up motorshield wiring

by default it will try to use the power from the usb or the power jack from the arduino board

but for motors you should always try to use alternative power supplies because arduino boards in general can only handle little currents and motors draw a lot of current depending on the torque and winding of the coils and such

in order to tell the L293D motorshield to handle power from outside the arduino board just remove de jumper on the picture abvove

if you can read this i messed up motorshield without the jumper

now, i had to conect the power supply and the motor to the shield

if you can read this i messed up the motor wired to the shield and the power supply

i used an old protoboard and some jumper wires to conect all together

so, it is finally time to plug the arduino to the usb and the computer and upload the code

here you can have the code i used

once the code is uploaded and the power supply is powered on the motor started to spin and i had readings on the digital power supply display and in the multimeter

if you can read this i messed up multimeter display showing the current the motor is drawing from the power supply if you can read this i messed up power supply display showing all the parameters

in my repo i will upload a video showing my circuit working

video hosted on my gitlab repo

as well as a link to the same video hosted on my youtube chanel

video on youtube


youtube video on using the motorshield

link on how to install the adafruit library

Update 06/07/21

Group assignment

Here you can check the Group assignment on this week

Update 15/07/21

Individual Assignment Redo

I know, i know. I didn't used a board of my own design. I intentionaly leaved this assignment last, because i needed to solve my ISPless issue first. in order to make my own echoBoard ,my own input and so on an so forth.

Hence i'm pushing this today.

I know i still need some polishing in my electronic designer skills.

I'm still learning tips and tricks everyday.

Echoboard v2.0 and output board

in this update i will summarise the design and fabrication of another echoboard and a simple led board controlled with a diferent power supply than the echoboard

screnshot on the echoboard2.0 schematic

I decided to go with the attiny 44a instead of another t45 'cause i wanted a little more pins for another project i'll document later.

And i already have an Attiny45 echoboard

screnshot on the echoboard2.0 board

As always all of the design,fabrication and programming files should be in the links at the bootom of this entry

Screenshot on the output board.brd

i decided to control just a simple led board 'cause one of the problems of my final projec was having to meny points of failure (bad soldering skills,bad programming skills, poor electronic design logic, to many new components i did only knew how they worked in theory).

That´s why in the final version of my final project i decided to do it simpler (get rid of the Mosfets, the unnesesary buttons on the board, jumpers "0 ohm resistors", bluetooth conection port)

Screenshot on the output board.sch

as you can see here i only had one mosfet, it's voltage divider resistances the resistance for the LED and the LED.

Instead of the LED i could have a relay or directly a small DC motor.

but i don't want to waste anymore of the fab's inventory.

and i found this board usefull enough to teach to some of our local students how to electronicaly control a load attaching a solid state switch instead of a relay.

picture on the output board components

i know this resistor ain't SMD but that's what we can purchase locally instead of ordering a 1000 pieces batch from digikey and wait for an eternity for them to arrive.

picture on the echoboard2.0 components

i know this is is just painful to see.

i forgot to replace the SMD version of the FTDI conector block in eagle for one that was THT

picture on the wiring

this is just the code of the button to turn on the LED board