Showing posts with label Internet. Show all posts
Showing posts with label Internet. Show all posts

Wednesday, November 27, 2013

Google Play Music Internet Radio (Raspberry Pi and Arduino)

IMG_20130626_095126.jpgI was looking for a project to do with my Raspberry Pi and found this Instructable and thought I would have a go at something similar which worked with Google Play Music. I had a rough idea of what I wanted the final item to end up like and was able to get my dad interested in helping me with the design and construction of the enclosure.

All code and CAD drawings can be found in the GitHub repo.

Before we begin I should probably point out that a reasonably good understanding of electronics and Linux makes this project a lot easier, especially since my Instructables are probably not the easiest to follow (I do try my best), however feel free to ask if something isn't clear enough.

A full parts list is a little difficult for a project this size so I'll highlight the important parts only: Arduino IC (i.e. ATmega 328 with Arduino bootloader, you can but them blank and flash then yourself or pre flashed with a bootloader) Raspberry Pi (512MB version if possible, because you know, more memory is better... but seriously I haven't tested with a 256MB version, but it should still work) Digital potentiometers (logarithmic taper (we'll be using it to attenuate audio) & i2c (from the Pi), a DS1807 will do) Amplifiers (I used pre-built modules but feel free to build your own if you feel up to it) DC-DC converters (12v to 5v, 600mA output, isolated) Rotary encoders (from font panel, cursor movement and volume) An LCD (4 rows, 20 columns works for me, if you have songs with really long names maybe get a 40 column one) As for tools, you just need all the standard electronics and woodworking tools, a few others which may be useful: Bus Pirate (I don't actually have one, but they are very useful, alternatively you can do what I do and write Arduino scripts to make an Arduino act like a Pus Pirate to some degree) Laser cutter/engraver (not essential, but makes production of mounting hardware and front panels SO much easier) Router (for construction of enclosure) Accurate callipers (essential for measuring sizes for panels and mounting hardware) I think that is about it for specialist parts and tools, but of course I would highly recommend you read through the entire Instructable before starting work on this project.

[I will have a video here when I get a chance to shoot and edit one, most likely 27/06]

IMG_20130411_172632 (copy).jpgThe order in which I went about this project seemed fairly logical and seemed to work for me, so I'll go with that.

In that case first up is the electronics which control communication between the radio and the user, in my radio the included 6 buttons, two rotary encoders which also have a switch for when they are pressed and a 4 row, 20 column backlit LCD, the majority of this is controlled using a ATmega 328p which interfaces with the Raspberry Pi using RS232 (over a level converter, since the Pi has a logic level of 3.3v and the Arduino is 5v), the one exception is the LCD backlight which is switched on and off using a GPIO pin from the Pi.

So here is an overview of what IO devices were actually connected to the Arduino, how they were connected and why: Pins 0 and 1 connected to the Raspberry Pi GPO header through a MOSFET level converter, this was for the serial communication between the Pi and the Arduino. The front panel button were connected to ADC pins 0 to 5 with either an external pull up or pull down resistor (whichever is easiest, in hindsight pull up would have been easier then I would only need ground on my front panel board). The LCD is connected on digital pins 8 to 13, the actual pin assignment is not important at this stage as it can be configured in the Arduino script. The encoder buttons are on pins 6 and 7, using the internal pull up resistor. The encoders are on pins 3 and 5 and 2 and 4, it is important to have at least one interrupt pin per encoder, this will greatly improve the performance. Most of this can be seen easily on the schematic which has all of these relevant sections annotated, note that this is the schematic for the main board only, so the actual devices are shown as pin headers, I will go over wiring the actual devices in the next step.

View the original article here

Friday, October 25, 2013

Top 10 Ways to Deal With a Slow Internet Connection

Sometimes, slow internet is the universe's way of telling you to go play outside. Other times, it's the universe's cruel joke to destroy your productivity. Here are 10 ways to troubleshoot, fix, or just survive a slow internet connection.

Top 10 Ways to Deal With a Slow Internet ConnectionS

Sometimes, your internet is slow because you're only paying for slow internet. Log onto your provider's web site (or give them a call) and find out what plan you have. Then, head on over to Speedtest.net and run a speed test. If the numbers match up to what you're paying for, then your network is working fine and you're just paying for slow internet—and the best way to speed it up will be to upgrade. (Though some of the below tricks will help you eke out a bit more speed). If the numbers don't match, read on for a few ways to fix that problem.

Before you go cursing your internet provider, give your modem and router a quick reset (that is, turn them off and on again) and see if that helps. Check the other computers in your house to see if their internet is slow, too—if the problem only happens on one computer, the problem is that computer, not your router or modem. Run through these troubleshooting steps to see if it's a hardware problem. Then, once you fix your router or modem (or replace it), you'll be browsing speedily once again. Check out our complete guide to knowing your network for more router tips, too.

Top 10 Ways to Deal With a Slow Internet Connection

If you're using Wi-Fi, you might find that your router and internet are fine, but your wireless signal is weak, causing a slowdown. In that case, you may need to reposition, tweak, and boost your router with a few tricks. There are more than we could share in one paltry paragraph—in fact, we have a whole top 10 list just for fixing Wi-Fi, so check that out if you suspect wireless signal is the problem.

Top 10 Ways to Deal With a Slow Internet ConnectionS

If your hardware seems to be in working order, see if any other programs are hogging the connection. For example, if you're downloading files with BitTorrent, regular web browsing is going to be slower. You should also try installing extensions like AdBlock Plus or FlashBlock, which will block some of the bandwidth-hogging ads, animations, and videos that can use up your connection. They probably won't solve all your issues, but they can at least help make a slow connection feel more usable.

Top 10 Ways to Deal With a Slow Internet Connection

When you type an address into your browser—like lifehacker.com—your computers uses something called DNS to look up and translate that into a computer-friendly IP address. Sometimes, though, the servers your computer uses to look up that information can have issues, or go down entirely. Check out our guide to finding the fastest (and most secure) DNS servers for more information. If your default DNS servers aren't having problems, then you probably won't find too much of an improvement with an alternative server—but it might speed up your browsing by a few milliseconds, at least. Photo by Studio 37 (Shutterstock).

Troubleshooting slow internet can take awhile, and in the meantime you still need to browse. Or maybe you're at a coffee shop or on a plane, and there's nothing you can do about your slow speeds. In that case, it's time to optimize your web for a slower connection: use mobile or HTML versions of your favorite sites, disable images, and use features like Opera Turbo. In fact, we recommend setting up a secondary browser on your laptop for just such a situation—it can really make a difference when you need to work on a slow connection.

Top 10 Ways to Deal With a Slow Internet ConnectionS

If you need to get work done on your slow connection, you may have to prioritize tasks differently than if your internet were super fast. So, separate your tasks into bandwith-heavy and bandwidth-light ones. Get the light ones done when you're on your slow connection, and group all the bandwidth-heavy tasks together so you can do them if and when you get faster access (and if you can't get it at home, see if you can borrow a neighbor or relative just for those tasks). Similarly, work outside your browser whenever possible—if you're doing basic writing, do it in your favorite text editor instead of in your browser. If you plan your work ahead of time, you can at least make the best of a bad situation. Photo remixed from Kirill__M (Shutterstock).

Top 10 Ways to Deal With a Slow Internet ConnectionS

If you've gone through all the necessary troubleshooting steps and your internet is still slow, then it's time to call your internet provider and see if the problem is on their end. Remember: don't just assume they've done something wrong, and treat your customer service representative with respect. You're much more likely to get good results. Check out our guide to getting better customer service for tips on cutting the line and getting your way. You might want to see if you can get a better deal on your internet, while you're at it—especially if they've been giving you the wrong speeds all this time. Photo by sergign (Shutterstock).

Top 10 Ways to Deal With a Slow Internet ConnectionS

If your ISP can't help you (maybe they don't provide the speeds you want, or maybe you're just sick of their horrible customer service), it's time to find a new ISP. That may mean you need to switch to a different type of provider, like cable, DSL, satellite, or fiber, so you should do a little research before you pick up the phone. Check out our guide to choosing the best provider in your area, and make sure they provide the type of speeds you want. Photo remixed from Kim Scarborough and Andreas Gradin.

Top 10 Ways to Deal With a Slow Internet Connection

If you're lucky, you can get your internet speeds back up to snuff quickly and stress-free. But, if not, you can at least try to put a good spin on it: As long as your work isn't too bandwidth-intensive, slow internet could actually make you more productive. After all, if Facebook takes a minute to load, you're a lot less likely to pop over for a "quick break" (that turns into an hour-long photo-fest) when you're supposed to be working on that term paper.


View the original article here

Sunday, October 6, 2013

Internet Laundry

opening.JPGIn a world of increasingly intrusive technologies, one sector hasn't quite wiggled its way into our beloved hive-mind.  That sector, ladies and gentlemen, is laundry.  

Where would we stand as humans in the 21st century without the ability to feverishly check the status of the things we hold closest to our naked bodies - our clothes - while they tumble round and round in seemingly endless ecstasy?  How could we live, unsure of the availability of a washer or dryer for our wet and dirty garments, longing for redemption?

It is with great pleasure that I give to the world: open source Internet Laundry.

2 - AC Optocouplers (Lite-On LTV-418H) 1 - 56K Ohm Resistor 1 - 560 Ohm Resistor 1 - 1uF capacitor 1 - perf board (prototyping circuit board) 1 - Raspberry Pi + accessories (power, ethernet, SD card) a length of 4-conductor cable. 1 - 3 pin 0.1" female header Optional: male+female polarized connectors for connecting the 4-conductor cable to the perf boards Tools: Soldering Iron Wire Strippers Screwdriver Volt Meter

View the original article here

Thursday, September 12, 2013

Solar Tracker in the Internet Cloud

The major system components identified in the block diagram:
90 Watt solar Panel Two axis motion platform constructed from 2x4’s complete with wooden peg gears and re-used curtain rod/pole. Custom electronics – Electric Imp connected to stepper drivers, IO Expander and 6 Axis MEMS accelerometer/magnetometer Rechargeable battery – retired unit from my motorcycle as it is no longer capable of turning the engine over. Solar Charge Controller – cheap unit from ebay to make sure the battery doesn’t overcharge. Smartphone or web browser – monitoring status and remote control. This is a non-essential part of the system done purely for a learning experience to see what it takes to connect a phone to a remote device. (gotta remember to hide the URL so that I don’t have too many people trying to control the panel!) The tracker circuit includes a tilt compensated compass - the math was coded from an application note. The chip has 3 axis magnetic output and 3 axis accelerometer output. The magnetic output tells the system the azimuth angle and the accelerometer tells the system the the inclination with respect to gravity. The GPS location is hardcoded in the firmware (future will have this set by smartphone via the web). The firmware determines based on the time of day and geographic co-ordinates what the sun angle is with a Sun Angle algorithm ported to the Electric Imp Squirrel language from C++ (discussed in later steps). Firmware drives the azimuth and elevation motors to the Sun Angles based on feedback from the mag/accel. 

This whole thing could be done a lot more simply, but I saw a personal learning opportunity with contemporary web development techniques and was intrigued by the Internet Of Things made possible by the Electric Imp. Rather than just randomly reading web articles to get a superficial understanding, I immersed myself in the technology to come up with an most likely an overkill solution to a common problem. Most solutions on the market today are "light followers". They control motors in response to the intensity of light to maximize incident sunlight on the panel. These work well, are low cost and are really all you need. But, you will not learned any of the following on the electronics/firmware/web development side:

1. ASP.NET programming model for web based applications. This is the server side code that the smartphone connects to, to see the status of the system, or to drive inputs to the controller for manual control of azimuth and elevation for debugging purposes.

2. AJAX which allows a web page to update without server page reload. Allows a web page to dynamically query server data directly and update the regions of the page without page reload. This is how the monitoring data is updated.

3. SQL Server work on the back end. The data from the Electric Imp is logged in a SQL Server database. There was a time when writing SQL queries was second nature.... not so much anymore!

4. JQUERY Mobile - great open source library that simplifies working with the Web page Document Object Model. Just scratching the surface of it but it has taken the web by storm. It is a great way to develop Smartphone HTML5 "apps".

5. HTML5 capabilities and the relation to potential hardware independent phone apps. Bumped into a number of apps that will take the Web app and turn it into a traditional phone store application. Some are free until you reach 10000 downloads... yeah right!

6. The Internet Of Things model and what companies like Electric Imp and COSM are doing to make this a reality even for low budget hackers like me.

7. Appreciation of cloud based services and the power of having services provided by the cloud. The electric imp is fully cloud
based....  your firmware lives in the cloud and is downloaded when your device connects to the internet.

8. Algorithms for tilt compensating a compass.. Ultimately I implemented an app note but it was a major journey of "discovery" for
me.

9. Algorithms for sun angle prediction. Ported an Open Source implementation to the Electric Imp. Had no idea that this was such a complex problem. I don't fully understand the algorithm but tip my hat to anyone who does! IJW!

10. I2C hardware communication and associated peripherals - as long as I have been messing with electronics, never controlled an I2C peripheral before.

I'm sure I learned plenty more but I capped the list at 10!

I think the easiest way to tackle this documentation is to walk you through the building of the tracking base, then the electronics/firmware and finally the web app. The electronics and motion platform are independent components of the system. The tracker electronic module was designed to be a reusable component. The tracker base was designed to demonstrate peg gears and levers in another shameless attempt at stimulating my kids’ minds with engineering. A future weatherproof design using more 21st century motion mechanism is in the design phase and will be built over the course of the next year or so. I would like to offer that as complete package to interested consumers. 

OK, let's get started. 


View the original article here

Friday, August 2, 2013

Why ask a pharmacist when Internet has all the answers?

Why ask a pharmacist when Internet has all the answers?

Great discussions are par for the course here on Lifehacker. Each day, we highlight a discussion that is particularly helpful or insightful, along with other great discussions and reader questions you may have missed. Check out these discussions and add your own thoughts to make them even more wonderful!

For great discussions any time, be sure check out our user-run blog, Hackerspace.

If you've got a cool project, inspiration, or just something fun to share, send us a message at tips@lifehacker.com.

Happy Lifehacking, everybody!


View the original article here