Posts

Showing posts with the label Arduino

Potentiometer to Web

Image
Hi all.. lets do another beautiful DIY... Goal  To read voltage from a potentiometer in real-time and display in a web page dynamically. So.. the goal seems completely dump and does no good job.But the learning curve involved will introduce into many Linux concepts, hardware setup, troubleshooting extents from micro-controller programs to html/php code. Steps 1. Continuously read from analog input of Arduino where potentiometer is connected. 2. Send the value to Raspberry Pi via UART port. 3. Raspberry Pi reads the data and appends and writes it into a file. 4. Make an Apache server run in Raspberry Pi. 5. A combination of simple html file, a php code, and ajax script together does the job of    updating the webpage with latest value from file. 6. Forward the raspberry server to internet and watch the realtime variation of pot value in webpage. Okie.. so lets get started... Hardware Setup.. Yep.. a Raspberry pi and Arduino UNO R3 connected over UART (s...

Bidirectional 3.3v 5v Level Shifter

Image
Hi guys.. welcome to another simple DIY project... Lets make a level shifter, which will just shift a 5v data line to 3.3v or vice versa... Okie why we need such a shifter..  ? or what is this stuff actually.... ? We run around huge bunch of devices that run in various voltage levels.. for example Raspberry Pi runs in 3.3v, and its all GPIO I/O pins are at this level, even though we provide a 5v USB input. And so it is not tolerent to 5V input levels from another device or sensor modules connected to it over I/O pins using SPI, UART, i2C... whatever.... Another example is Arduino UNO which runs in 5V, normally is driving all its I/O at 5V levels.  So interfacing boards at different I/O voltage levels requires a level shifter. Simple voltage divider circuits can help for an extent.. but they dont provide low voltage  device protection or bidirectional shifting. Wait a minute ... Bidirectional... what is it ? Okie.. some communication protocols like i2C are b...