Showing posts with label Beginner electronics. Show all posts
Showing posts with label Beginner electronics. Show all posts

Saturday, 21 November 2020

Back to Basics: Building a Buggy

Although I built a handful of various types of buggies during university, I have always wanted to build another one. There is something about putting together a buggy and watching it work that is very satisfying.
I recently came across one of my old drawings from high-school of a buggy that I had wanted to build but never got around do it. So I decided to collect up some of bits and bobs and put together a very rudimentary buggy just to make my lock-down weekend a little bit exciting.


From what I remember from when I was drawing this I wanted a bunch of features on it, like;
  • Pull out control panel
  • Automatic docking for charging
  • Use as balance-bot and
  • Line following

Wednesday, 4 November 2020

Raspberry Pi Camera Time-lapse

 Previous Post: Setting up your Raspberry Pi Camera

Once I set-up my Raspberry Pi camera, I wrote a simple script to take a picture from my camera every 2 minutes.


Sunday, 1 November 2020

Setting up a Raspberry Pi Camera

I had a small generic Raspberry Pi Camera Rev 1.3 lying around in my parts box for some time and I have always put aside working on it. So I decided to finally take it out and one of my Raspberry Pi zeros to test out the Raspberry Pi Camera.

Friday, 30 October 2020

Setting up WiFi communication between Raspberry Pi and ESP8266 with MQTT

One of the fundamental components in setting up your DIY smart home or IoT project is to set-up the communication method between your devices and the server.

Given the most accessible wireless network to most of us is our home WiFi, I will be using the MQTT protocol to send messages over WiFi. The main server for this will be a Raspberry Pi and the devices (or clients) are ESP8266, ESP32 or similar devices

Wednesday, 6 May 2020

CoViD-19 Social Distance Enforcing Device

Hope you are keeping safe in 2020!
Social distancing is one of the top recommended ways to stop the spread of CoViD-19 disease by the WHO. It is also important to make sure that this is enforced at all times as people can be absent minded or accidentally come close to each other. This is especially true in crowded areas like hospitals and work places.


To mcontinuously onitor and enforce this I have come up with a simple ESP based  device. The idea is to provide everyone working in one location with this device that will continuously monitor if there is a similar device around them. If there is another similar distance around them close to a preset distance of roughly 1 meter or 3 meters according to the regulations in the location and use of PPE, the device will light up or ring loudly alerting the wearer to move away from the location or to be extra cautious.

Thursday, 4 April 2019

Project SpiderWeb

Project SpiderWeb is my domestic answer to the fourth industrial revolution. IoT is one of the key words that gets tossed around during these times. As there is much potential in what can be achieved with devices across the house that talk to each other and exchange and analyse data, I have started my own IoT project (SpyderWeb) - for the love of technology, of course!

Saturday, 26 November 2016

Bluetooth Speakers Update

A few weeks back I tried to use an old cheap Bluetooth headset circuit to drive my HP Desktop speakers. The project wasn’t exactly successful, so I purchased a 3W + 3W Bluetooth 4.0 Audio Receiver and amplifier board from eBay.

Capture

Saturday, 12 November 2016

Solar Panels Update

The solar panels that I bought from ebay were working properly but they were not delivering enough power to do anything useful. So I decided to purchase a few more solar panels and improve the project.

Thursday, 11 December 2014

Cheap MP3 Player from eBay

A few weeks ago I got a really cheap Chinese MP3 players from eBay to take with me to the gym as I didn't mind losing it. The quality of the player was good for the price however the only problem was that the battery lasts only for about 3-4 songs. Which was really frustrating!

Sunday, 20 April 2014

Variable Power Outlet and AC to DC converter

Variable A/C power outlet

I came up with this project mainly to control the performance of some appliances that I use on a daily basis that do not offer output control. For example, I can control the temperature of my 60W soldering iron or a dim a desk lamp that is connected to the unit. It does so by adjusting the output voltage using a simple triac circuit.

Tuesday, 14 January 2014

Edge Lit Display


This experiment works on property of refraction and total internal reflection. The material is transparent Perspex that allows light to pass through it. Most of the light is reflected inside the Perspex sheet. By damaging the smooth surface of the material we can create many tiny different angles that will allow the light to refract out of the material.
        

Sunday, 3 November 2013

Basic Micro-Controller Unit Connections (Part I)

There are many tutorials on the web that teach you how to program various circuits with Micro Controller Units (MCU) such as the Arduino (www.arduino.cc), Texas Instruments MSP430 (www.ti.com/launchpad) and Microchip PIC Microcontrollers (www.microchip.com). However if you want to design your own circuit, here’s a short guide as to how you can make some basic circuits for your MCU.’

 

1. Power Supply and Programming Circuit

One of the first things that you need to do is connect the power supply and the programming circuit to your MCU. If you are using a  MCU that comes with a programming board such as the Arduino and the Texas Launchpad you can skip this step. If not, I recommend that you read the datasheet for your MCU before connecting any wires from the MCU to a power supply or to a computer. There are many tutorials and YouTube videos online that will help you make these connections.

You will also need to install a programming software and system drivers for your programmer. You can find information regarding this from the place where you obtained your programming board or circuit.

 

2. Buttons and switches

Buttons and Switches are digital devices that can only send either a logical high or low to your MCU. It is possible to connect your button directly to your MCU input pin and one of the power rails. When the button is pressed the Logical High value will be recorded on the MCU input, however when the button is not pressed the input pin is floating around. This means that neither a High voltage or a Low voltage is given to the input pin. The value recorded by the MCU at this instance will be altered by natural factors like electrical interference.

To overcome this problem push buttons and switches are wired with either a pull up or a pull down resistor as shown in the image below. These resistors are used to connect the input of the MCU to either the High or the Low voltage when the button is not pressed. The value of the resistor should be relatively large (10kΩ). This is similar to a potential divider where the resistor representing the button swaps between infinite resistance and zero resistance.

Micro-Controller Unit Connections–Basic

Many MCU’s have a built in pull up or pull down resistor which can be enabled when programming the pin configuration of the MCU. When this is to be selected, the push button or switch can be wired directly from the main power supply to the pin.

 

3. Sensors

Most sensors are similar to similar to a variable resistor. They change their internal resistance depending on what they sense. For example the resistance of a Light Dependant Resistors (LDR) reduces when light falls on the it.

Sensors such as LDR, photo resistors, temperature sensors, and other similar input devices are connected as follows which is similar to the wiring to the button

sensors

In this situation a potential divider is formed between the fixed resistor and the sensor. The voltage as a result of the potential divider is read by your MCU. Unlike a button, the sensor is a analogue device. It should be connected to a analogue pin on your MCU to receive the complete range of values.

It is possible to connect the sensor to a digital pin. If you do this you will only receive a High or a Low input depending on the state of the sensor. I advice you to to refer to the datasheet of the MCU to find out how much voltage is required by a digital pin to register as a High or Low voltage.

 

4. Light Emitting Diodes (LED)

LED’s are one of the basic output devices. They are diodes which allow current to flow in only one direction. Before connecting an LED you must know how much voltage is needed by the LED for optimal glow and the rated current.

LED’s are connected via a resistor as shown in the figure below. The resistor that needs to be added in series with LED is to limit the current flowing through the LED. This is needed because of the LED’s I-V curve. According to the I-V curve, after a certain voltage drop the LED will allow almost infinite current to flow through it. This will draw all the current from your MCU and cause the batteries to drain much quickly. It may also blow out your LED.

LED

The resistance of the resistor to be added can be calculated as follows.

  • Reduce the voltage drop over the LED (Ex. 2.2V) from the supply voltage (Ex. 5V) to find the voltage drop over the Resistor (5 – 2.2 = 2.8V)
  • Using Ohms law (V = IR) calculate how much resistance is needed to draw a current less than the rated current of the LED (Ex. 20mA). Remember than in a series circuit the same current flows through all the connected components (R = (2.8/0.02)Ω).

7 segment displays are connected similar to LEDs. They have an input pin which requires a positive voltage and 8 output pins which are connected to the cathode of each the LEDs on the segments.

Bi-colour LEDs are also similar. It contains three pins where one of the pins are the power supply and the other two are the cathodes for each colour.

Multiple LED’s can be connected in many ways: Two LEDs can be connected as follows where one LED will light up and the other one will switch off depending on the output of the MCU pin

Bicolour

If you need to control many LEDs with only a few pins on your MCU please read about Multiplexing and Charlieplexing. I will explain these circuits on another part of this tutorial.

 

On a Final Note

This is only the first part of the Basic Micro controller unit connections tutorial. Other parts will uploaded soon

If you are someone who is always working with electronic circuits, I have found a very useful Mobile app named “ElectroDroid” by lero . There is a free and pro version. You can use it to look up resistor colour codes and SMD values, calculate theoretical values for different circuits and many more.

If you thing this post needs more improvement please let me know by commenting below. If you think this post is useful, bookmark it or share it with someone who might need it.

Thank you for reading.

Thursday, 31 October 2013

“The Everything Box”

I always wanted to work on a home automation project as it is very interesting and challenging to design a circuit to control most electrical appliances in a house. It’s not possible to mess around with the electricals in my room which I stay for rent. So I decided to make an automated box. I call it “The Everything Box”.

The Everything Box will house various circuits designed for different tasks. The circuits are not limited to the inside of the box. Some of them will be wired out of the box to control appliances such as desk lamps etc. Some of the circuits that I have decided to put in the box are:

  • Automated Desk Lamp and other lights
  • Back up power Circuit
  • Automated cooling fan to maintain temperature
  • Data logging
  • Music Player
  • More circuits will be added in the future

To get started with the project I took an old shoe box that was lying around. I cut some holes for the basic items such as the fan and buttons and painted the box in shiny black.

The Everything Box | Jonnytronics

 

The Everything Box | Jonnytronics

The box currently has the switches shown, a cooling fan, a number pad and a blue el wire running along the inside top of the box to illuminate the circuits when the box is opened. I will post updates on this blog when I add new circuits to The Everything Box.

Jonnytronics | Everything Box

Let me know what you think of this project and also let me know of some new suggestions for the circuits in the comments below. Thank you for reading.

Tuesday, 2 April 2013

Lap Timer

SAM_7979

I built this circuit to test the time taken for a line following buggy to complete one lap in a track that I created. Myself and my friend used this circuit to measure the best time taken.
The circuit consists of
  • 2 push buttons to select which user is racing next
  • LCD display to show the best time and the current time while the timer is running
  • A power supply consisting of a 9V battery connected to two voltage dividers that step down the voltage to 5V and 3.3V.
  • A sensor circuit fabricated by my friend which outputs a logic high when the sensor detects any object in front of it at a limited range.

SAM_7968

SAM_7971

To get started, I built the circuit with an Arduino Uno R3. After successfully making basic connections to the arduino and debugging my code I decided the make the circuit with a MSP430 to make it smaller and more portable.
The MSP430 operates at 3.3V but the LCD display needs more than that to record a logic high. To overcome this problem AND gates were used to increase the output to the LCD display connections increase to 4.5V.

SAM_7978

If you want to create a similar circuit with an arduino all you have to do is the following.
  • Read and be familiarised with the “Liquid Crystal” library that comes with the Arduino software.
  • Make connections to the LCD display as shown in the library.
  • Fix two switches and wire it to the arduino.
  • Get a basic IR emitter and a receiver (It is easier to get a TCRT5000). Then wire the receiver same as the switches. Instead of connecting it straight to the arduino, connect it to a comparator and use a voltage regulator to control the output signal.
  • If necessary use a Voltage regulator to drop the voltage from your source to 5V.

You can write your own program. but here is a copy of my program.
 

 Here is a demonstration

Friday, 22 February 2013

Using a regular LED as a basic LDR

(Many of you may already know this, but I didn’t. So I tested it out)

One of my friends told me that we can measure the amount of ambient light by reverse biasing a regular red LED. This didn’t seemed to be quite possible to me at start. So I wanted to see for myself as to how far we can use an LED as an LDR.

To test this hypothesis I set up the following apparatus using my National Instruments myDAQ.

SAM_7917

The 2 wires are connected to the analogue input ports on the myDAQ unit such that the negative end of the LED is connected to the positive analog input and the positive end of the LED is connected to the negative analog input.

Using the oscilloscope I initially took the readings from different sources of light.

 

9 White LEDs held at around 3 inches from the red LED

2013-02-22 23.02.51

Untitled2

This gave me a reading of about 443mV. The Voltage generated was not stationary. It moved up and down very slowly with a voltage of 1.93mV. Overall this was a very small swing. However I was surprised that there was a change in the reading. I continued with my next experiment.

 

9 UV Black Light LEDs held at around 3 inches from the red LED

2013-02-22 23.02.19

The UV light gave the LED a much greater swing of around 1.245V.

 

1 Red LEDs held very close to the LED at test

2013-02-22 23.08.22

The voltage change due to this was very insignificant. It was around 131mV. I replaced the forward biased Red LED with a yellow LED. This gave a swing of 109mV. Then I added another yellow LED to increase the change in voltage to 214mV. Adding another yellow LED increased the difference to 320mV.

 

Knowing that the reversed biased LED changes its voltage due to intensity I tested the voltage change while bringing my 9 white light LEDs closer and closer to the red LED.

I observed the following graph

0

 

A few Observations and Conclusions

  • The Voltage swing obtained from a red LED connected in reverse bias is very small. (high inaccuracy)
  • It takes a ling time for the voltage to rise up to its steady state voltage
  • The voltage at steady state never really is steady. There is always some oscillation that is also very slow.
  • Connecting up a red LED in reverse bias will behave quite similar to a LDR however there are many disadvantages to using this substitute.

 

To find out more about this just set it up yourself and have a go at it. You do not need a power source nor any resistors. All you need is a regular LED and a voltmeter, multimeter or any other voltage reading devices.

Thanks for reading.