Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Wednesday, February 11, 2015

Adding a HC-06 (JY-MCU) Bluetooth Module To an Arduino or Spark Core Project

JY-MCU Bluetooth Breakout Board
I picked up a HC-06 (Part JY-MCU, ) from Vetco Electronics today to add a Bluetooth serial port to projects I am working on. I wanted to hook this into a Spark Core and so I wired it up and tried to pair with it.

No luck. I could not see the Bluetooth module from my phone or from my Mac. Why?

A little searching and I came across Erich Styger's post (Getting Bluetooth Working With JY-MCU BT Board v1.06)trying to figure out the same thing. He is way more advanced than me but he found both a hardware solution and a software solution. Since I did not want to modify the board (and I was sitting at Starbucks hooking this up) I went with the software solution.

The sort answer was, to get the Bluetooth module to start broadcasting for pairing I had to add the following to my Sketch (code for the app):

#include "PORT_PDD.h"

PORT_PDD_SetPinPullSelect(PORTC_BASE_PTR, 3, PORT_PDD_PULL_UP);
PORT_PDD_SetPinPullEnable(PORTC_BASE_PTR, 3, PORT_PDD_PULL_ENABLE);

Erich also has a great article on Using The HC-06 Bluetooth Module which I am digging through to understand my Bluetooth module a little better.

Monday, February 10, 2014

Programming Arduino on Windows 8

Image: Adafruit
I came across this great overview of programming Arduino on Windows 8 Pro and Android tablets: Adafruit Programming Arduino with Android and Windows Tablets

It has a great overview of how to get going with Arduino development using tablets and has good tips about tablet models to avoid due to issues with driver loading on Windows.

For about $200, if you don't have an Android or Windows 8 Pro tablet, you can get started programming Arduino with a tablet without needing to lug around your laptop.  Yes, like lugging a laptop is a big deal (it isn't) but it's always nice to be more portable.

If you want to skip straight to the PDF with the entire article here is the link: http://learn.adafruit.com/downloads/pdf/programming-arduino-with-android-and-windows-tablets.pdf

Tuesday, January 28, 2014

Fitness Tracking: Bring DIY biomedical technology to your home or school | MAKE


This project shows the power of the Maker Movement. These guys are opening up a field of research to DIY which unleashes numerous problems that can now be worked on by others with a lower cost of entry.

Do I have a use for the DIY E‎MG (Electromyograph) module? Not really but what can I think of that would be cool with this?

How about when cycling if it graphed your muscle output along with speed, watts, and altitude change. Would this give us more insight after collecting multiple sessions as to whether we should back off
 this training session or go harder?

Can the EMG readings of our muscles show us if we are over/under trained?

Can we make cheaper, consumer products with modules like this to allow anyone to easily unlock their potential? 

I have found that as I have trained, there are many questions I ask myself. Should I push harder today? Should I do that extra workout? Should I back off?

A work out plans is just a guide to how to reach a goal.  The guide is usually one that someone else has used which will help you prepare.  Guides are available for many distances and as long as you put in the time and keep to the guide, you should be able to complete the distance trained for.

The amount of training for a marathon for example ranges from 3-6 runs a week.  Then there are cross training days or sessions.  How can some go so far on so little training and others on so much?  Are some of us overtraining and some under training?

We are all different training plan/guides are just that, a guide used by someone else that worked for them.  Can we get more quantitative with our training and be able to customize it on the fly to avoid injury, burn out, and ultimately to increase our potential?

I know you can wear a heart rate monitor (HRM) all the time and look at your resting heart rate (HR) in the morning to get idea of your level of training. Too high above resting HR (and historical morning HR) and you are getting sick or have over trained.  So, you'll need to dial back today.

Can we make this even better with EMG‎ monitors?  Can we get a reading of how hard we can push our muscles for their peak workout?

I feel that the current wearable fitness tracking devices and apps are just the infant stages of where we can go with technology to help us achieve more in our physical pursuits.


What would you do with a wearable EMG?

Monday, January 27, 2014

Arduino Meetup: KingMakers

James, of Guitar Jam Night, joined a Meetup of Arduino makers, KingMakers, a couple years back.  Back then there were about 50 people.  Now there are over 500 and I finally joined up.

I figured it was time I started to learn a bit more about building electronics since I have so many ideas I want to create which span hardware and software.  So, let's jump in.

KingMakers

I attended my first session on Sunday, January 26.  It was a two hour session on adding a Real Time Clock (RTC) module to your project called Time to Get Wired.

What is an RTC?  It is a battery operated clock that lets your project know the date and time so that between reboots, power outages, etc, you project knows the time to be able to fire events.

I have a couple projects in mind that could use this and it was one of the "things to figure out" that I had on my list.  So, a session on how to do this, including a sample project, and an RTC module was too good to pass up.

Round Table

Like most Meetups, this one started out with a round table where people spoke about projects they are working on, demoed projects, and asked for advice.  That took about 30 mins and was a nice introduction to the level (beyond me) of projects the group is working on.

I took my 8 yr old son with me with the direction, listen if you want, join me to do the hands on if you'd like, or just read your book.  He read his book mostly but he did listen in to the round table and liked many of the projects.  Once the hands on session was nearing the end and most of us were chatting again he joined in to look at some 3D printed Zelda coins/diamonds that one Maker is creating in place of poker chips.  My son got to take some home so he thought this whole Maker thing is pretty cool.

Main Session

During the Main Session, Dan Tebbs, the organizer gave a presentation on the I2C (Inter-Integrated Circuit) Devices, of which the DC1307 RTC module is an example of.  The presentation was great, quite a few items were over my novice head but I knew enough to pick up a lot of tips.

For example, the fact that using higher resistors not only lowers the voltage on the line but reduces the amperage being pulled which will result in a slower switching response from your I2C.  This also means lower battery consumption such that in cases where you do not need to have a high bandwidth (fast switching) I2C you can use higher resistance resistors to prolong battery life of a project.

Logic Analyzer

As a software programmer I can find the lack of visibility into my hardware projects frustrating.  You do print statements everywhere to get an idea of what is going on.  This only takes you so far and is a long way from a software debugger.

Enter the Logic Analyzer.  I never knew about these before the Meetup today and this was a tangent on the main session about I2C devices.  The Logic Analyzer we reviewed was the Saleae Logic.  This is an 8 channel analyzer that basically gives you a view into what your circuit is doing.


The consensus with the group was that a logic analyzer like this is much better than an Oscilloscope for probing your circuits.  It is also handy for reverse engineering other IC or I2C since it shows you the digital signals coming from a chip.  The group also felt that no one had worked on a project complex enough yet to need the 16 channel model so the 8 channel model is sufficient for most Makers.

The nice thing is that it is also less than an oscilloscope and has some nice features like recording sessions, setting triggers on high/low line voltage changes, and other things I have no idea of. 

Hands-On

The hands on session included sample code, an RTC library, and lots of help for those needing it.  There were sample images of the circuit layout and for those that needed the RTC we were using they could purchase at the session.

The circuit was not very interesting to view, but here it is:


The more interesting bit was the serial output from the RTC:
¥ RTC is NOT running!
2165/165/165 165:165:85
 since midnight 1/1/1970 = 1381621585s = 15990d
 now + 7d + 30s: 2013/10/19 23:46:55

How I Plan To Use A RTC

Here's some ideas of how I want to use an RTC in my projects:
  • Keep track of time to fire events at a preprogrammed time.  ie. turning on a relay to start/stop a pump, fan or heater.
  • Display time on a project that includes a LCD.

What I Like About Meetups

I love that people are passionate about their hobbies.  I am one of those people.  

I love that one way to learn more is to teach others.  Dan and the other Makers today were a great source of information and were all welcoming.

If you are interested in a topic you should check Meetup.com to see if there is a meetup in your area about the topic.  Else, maybe you should start one.

As for the Redmond, WA area, if you are interested in Arduino and Making then you should check out the KingMakers.

Friday, December 30, 2011

Setting the Serial Port of a OSEPP Uno On Mac OS X Lion

I am new to Arduino hacking and as such I installed the latest Arduino software that comes without the need to install separate USB drivers, ie. the FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg file with older Arduino software installs for Mac.

I am on Mac OS X 10.7 (Lion) as well.

So, when I hooked up a second Arduino board I bought yesterday, an OSEPP Uno Rev 1.1, I could not load sketches onto it.

I went to the getting started website for the OSEPP Uno, which suggested setting the board to an “Arduino Duemilanove or Nano w/ ATmega328″ to get it to work. Still nothing.

I looked at the Serial Ports but there were no usbserial ports listed. So, start debugging. I opened the Console and tried unplugging/plugging in the board, sure enough there was an error:

kernel: 0 0 AppleUSBCDC: start - initDevice failed


So, rereading the getting started site, I released that since this board was a little older I might just need to the older drivers.

I downloaded the Arduino 0023 drivers from the Arduino Software page for Mac OS X. I installed just the FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg file.

Restart the Arduino IDE and voila, there should not be a /dev/tty.usbserial-* device that will be the OSEPP Uno board. You can then load your programs.

Hope that helps.