Monday, November 21, 2016

MAX5481 10-bit Digital Potentiometer Arduino Code

ADVERTISEMENT:

Subscribe by Email! (via FeedBurner)
By Gabriel Staples
Written: 21 Nov 2016
Last Updated: 21 Nov 2016

Here is a sample code I wrote a couple years ago to command and control a MAX5481 digital potentiometer using SPI commands, including storing commands in the chip's on-board EEPROM (to save the last value written), or not.

In this example you have to type commands into the Arduino Serial Monitor to set the digital potentiometer. I then interpret your serial command you typed, then I send it to the MAX5481 via its defined serial SPI API.

The circuit and hookup is described in full in my comments at the top of my code. If you have any questions please post a comment below and I'll be sure to try and get back to you.

Enjoy.


***Subscribe by Email! (via FeedBurner)***

Tuesday, November 8, 2016

Eagle PCB CAD - How to copy a part from one schematic to another

ADVERTISEMENT:

Subscribe by Email! (via FeedBurner)
Gabriel Staples
8 Nov 2016

Learning EagleCAD? Here's how to copy a part from one schematic or board layout to another.
  1. Open up an Eagle Control Panel, and the board and schematic you are working on.
  2. Open up a *second* Eagle Control Panel, and the board and schematic you want to copy from.
  3. Use the group tool to make a selection of a part to copy.
  4. Click the copy tool, then ctrl + right click to copy the *grouped* selection to the clipboard. Press Esc now to not paste it anywhere in this project. 
    1. Note that you *must* use the group tool followed by ctrl + right click even if only copying a single object, since that's the only way to get it to your PC's clipboard.
  5. Go back to the schematic you'd like to paste into, and click the "paste" tool. Left-click anywhere to paste what's in the clipboard. 

Done!

Helpful References:
...among many others.





***Subscribe by Email! (via FeedBurner)***

Monday, October 24, 2016

Learning More About Power Electronics

ADVERTISEMENT:

Subscribe by Email! (via FeedBurner)
By Gabriel Staples
Written: 24 Oct. 2016
Last Updated: 24 Oct. 2016

Other Articles:
So, recently I was introduced to www.PowerElectronicsNews.com by SixtySecondTech, a website which aims to become somewhat of a "website directory that lists quality websites they find valuable and resourceful for the Technology community" (source). As SixtySecondTech grows their database, I hope they can become a good resource to the electronics, maker, Arduino, Raspberry Pi, and other communities.

PowerElectronicsNews is a brand new company who offers "electrical engineering news focused on power and power solutions," including highlighting "solutions and products featuring the latest innovations" in power design.  As I continue to grow my skills I hope to be able to apply some of the background knowledge I glean from their articles, so I can use it in real, hands-on projects I can then share and apply instead of just reading a high-level description of it. A few interesting-looking articles of theirs include the following. I have marked with asterisks the articles that particularly interest me. The more asterisks, the better.

***Subscribe by Email! (via FeedBurner)***

Friday, October 21, 2016

Adding & Customizing Nicely-formatted Blocks of Source Code on Your Website using SyntaxHighlighter

ADVERTISEMENT:

Subscribe by Email! (via FeedBurner)
By Gabriel Staples
Written: 21 Oct. 2016
Last Updated: 21 Oct. 2016

Related Articles:
Other Articles:
For quite some time now I've needed a nice, clean way to post snippets of source code, such as C++, Python, or HTML, on my website here. Finally I decided to figure it out. Here's how it's done. Note that my website is hosted on Google Blogger, but your website on Wordpress or anywhere else should also work just fine with this "SyntaxHighlighter" tool by Alex Gorbatchev that I'm about to present.

***Subscribe by Email! (via FeedBurner)***

Monday, July 11, 2016

Arduino-like millisecond (ms) and microsecond (us)-resolution timestamps in Python: millis(), micros(), delay(), & delayMicroseconds()

ADVERTISEMENT:

Subscribe by Email! (via FeedBurner)
By Gabriel Staples
Written: 11 July 2016
Last Updated: 22 Oct 2016
History (newest on top):
-posted updated code (v0.2.1) with Linux functions too (not just Windows) - 22 Oct. 2016

Other Articles:
Below, I show some code for basic Python millisecond (ms) and microsecond (us)-resolution timing functions. I made these to resemble Arduino functions I am already familiar with. Since these functions use the Windows API's QueryPerformanceCounter and QueryPerformanceFrequency functions, as-written, they work for Python in Windows only. If you decide to adapt them to Linux, please share how you did it in the comments section. Update (19 Oct 2016): I have updated these functions to work with Python in Linux now too! See below.

Functions and code samples. Functions include:
micros()
millis()
delay()
delayMicroseconds()

***Subscribe by Email! (via FeedBurner)***