P Channel Mosfet – High Side Switch

Here’s my schematic and board design for a simple high side switch using a P channel mosfet.  It’s a simple circuit that has a input for positive and negative and an output for positive and negative connections.  Pretty self explanatory.   It seems like every time I go to work with mosfets I have to spend a good 5-10 minutes reminding myself how they work.  So here’s a reminder to myself for the next time I go looking.

Continue reading “P Channel Mosfet – High Side Switch”


Reflectance Sensor Array with RPR-220

I’m working on a robot project and one of the intended uses is to teach line following to college students.  For this, I’m making an array of 9 RPR-220 reflectance sensors.  This post will describe the part I’ve designed and the reasoning behind it.  It’s a bit rambly so consider yourself forewarned.

Continue reading “Reflectance Sensor Array with RPR-220”

TB6612 Update – Does It Need Diodes?

Several months ago I wrote a post about a breakout board for the TB6612 motor driver.  You can find that here.  The reason I made my own breakout board for this was that the ones available from Sparkfun, Adafruit, and Digikey didn’t have diodes on the board.  The TB6612 says it has internal diodes but those are small and I saw somebody online suggest always using external diodes.  Today I realized I wasn’t sure if I actually needed them or not so I decided to do my own test to find out.

Continue reading “TB6612 Update – Does It Need Diodes?”

Simple LiPo Battery Charger with the MCP73831

The little board was built to charge a single lipo battery using the MCP73831 from Microchip.  I plan to use it along with several other boards featured on this blog in a larger project, but I like to break things up and make sure they’re working individually before making them work together.   Continue reading “Simple LiPo Battery Charger with the MCP73831”

Simple Boost / Step-up DC-DC Converter Using the NCP1402

If you’ve read much of this blog, you’ll have noticed that something I like to do is test ideas on simple breakout boards before implementing them into larger projects.  If something goes wrong, I haven’t wasted a bunch of time/money on it.  And if something goes right, then I’ve got an example that I can keep around which will help next time I need to implement that particular part.  This post shows my breakout of the NCP1402 boost converter that takes inputs from 1-4V and outputs 5V at up to 200mA.

Continue reading “Simple Boost / Step-up DC-DC Converter Using the NCP1402”

TB6612FNG Motor Driver Breakout Board

Part of a robot controller I’m currently working on involves using some motor controllers.  Since this robot controller is expensive and I’ve never worked with h-bridges (other than in professional products) I decided to make a breakout board to test it rather than risk making a stupid mistake on the robot controller.  Luckily, it all worked perfectly so I’m sharing it with the world so that other people can learn from it. Continue reading “TB6612FNG Motor Driver Breakout Board”

Using the RPR-220 and a Breakout Board

One of the projects I’m working on is a robot that has reflectance sensors around its circumference.  I had trouble finding sensors that would work in the 0.25-0.75 inch range but eventually found the RPR-220.  To mount this sensor, I made a breakout board with space for resisters and connections for positive, negative, and signal. Continue reading “Using the RPR-220 and a Breakout Board”

Sending 16 bit and 32 bit numbers with Arduino I2C

I’ve been using I2C a lot lately and something that keeps popping up is the need to send large numbers.  I2C normally only sends a single byte at a time so you are limited to 255 as the largest number.  This post will show you how I break large numbers apart to send them over I2C and reassemble them on the other side.

Continue reading “Sending 16 bit and 32 bit numbers with Arduino I2C”

Arduino i2c problem sending multiple bytes

I ran into a bit of a weird problem a little while back when using I2C on Arduinos.  I friend also had the problem recently so I figured maybe it was common enough that this post could help other people.  The problem occurs when you have the master request a certain number of bytes from the slave.  Except when the slave sends the bytes back, they all show up as -1 except for the last one.  Here is some example code and a workaround solution.

Continue reading “Arduino i2c problem sending multiple bytes”

Rotary Encoder on the ATtiny85 – Part 2

One of the most popular posts on my blog is this post about using rotary encoders on the attiny85.  Unfortunately that post is mostly things I tried that didn’t work.  A few months after writing that post I realized why it didn’t work and posted about that.  And finally, I’ve figured out the solution, which you can see below. Continue reading “Rotary Encoder on the ATtiny85 – Part 2”