November 23, 2024, 08:51:35 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Prop1 capabilities

Started by davisgraveyard, May 26, 2011, 07:04:13 PM

Previous topic - Next topic

davisgraveyard

I am considering using a Prop1 for a non-haunt related project.  But I have 2 requirements that I'm not sure can be done with a Prop1.


1.  Is it possible to have a switch that will power up a battery operated Prop1 and then programatically power it off so the battery does not loose charge?

2.  Is i possible to store a value in the prop1 that can be retrieved when it is powered back up?  Just a simple counter.

Space is an issue so I'd prefer the Prop1 over the Prop2 and the program is going to be quite simple.   I will use the serial interface with a parallax component and a LCD screen.   


JonnyMac

May 26, 2011, 07:46:43 PM #1 Last Edit: May 26, 2011, 07:49:31 PM by JonnyMac
1. Yes, but you need a bit of code and a circuit.  While it's possible that a FET could be used (less current), I'd have to prototype it to test -- I know this works.  In the circuit below pressing the button applies power to the Prop-1 which immediately activates the relay output, holding the power on.  At the end of the program when you want the controller to shut off you just kill the relay output.  The button will be required to power back up.



2. Easy-peasy.  Use WRITE to save a value and READ to recover it.  WRITE and READ only work with bytes so that limits your count to 255.  If you want to extend to 65535 then you would do this:

Update_Count:
 count = count + 1             ' count is Wx variable
 WRITE countLo, 0              ' countLo is low byte of Wx
 WRITE countHi, 1              ' countHi is high byte of Wx
 RETURN

Recover_Count:
 READ countLo, 0
 READ countHi, 1
 RETURN


Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

I figured there was an answer to both questions.  Just wanted to make sure before I went down this path.

Now for the project.  I want to make a Reverse Geocache Puzzle box like the one in Make Magazine a few months ago.  http://www.youtube.com/watch?v=Lu7IysgaZf8

I know Parallax has a GPS unit that will work with a serial connection and they even have basic stamp code examples to use it.  I know can also get a backlit serial LCD from them too.  So I thought wouldn't it be cool to make one of these using a prop controller!

Wish me luck.


JonnyMac

Well.... I don't know if the Prop-1 has the code space to handle that kind of app (you can try), and I don't know of any GPS unit that will communicate at 2400 baud (most are 4800 or higher).
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

I guess I asked the wrong questions?

Does the Prop2 do 4800 baud?   Do you think the Prop2 has the code space?   It has a bigger footprint but I can probably still fit it into a wooden box. 

As I think about this what about the serial connection.   I need to receive serial data from the GPS unit and send serial data to a LCD panel through the one serial connector on the board.  Is this going to be a problem?





JonnyMac

The BS2 can certainly handle the serial speed and it has the code space, the challenge is going to be receiving and parsing the data.  It has been done, but it's not easy (do a Google search using "BS2" and "GPS").  The trick is that the GPS device is pouring out lots of GPS sentences (comma delimited) and you have to locate the proper header, and then extract the data from it.

I've done it with a BS2p, but this isn't the processor we use on the Prop-2.  Again, Google is your friend on this one.  :)
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

Would this project be better suited for the Prop-SX?


JonnyMac

June 01, 2011, 09:59:22 AM #7 Last Edit: June 01, 2011, 10:09:03 AM by JonnyMac
What I'm going to suggest will be sacrilege to some, but we like you, Jeff, and want to steer you in the right direction.  What I'm going to recommend is not an EFX-TEK product, but something from our friends at Parallax.

The Propeller Proto Board (USB)
-- http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/32812/List/0/SortField/4/ProductID/509/Default.aspx

Here's why:
-- It's cheap and has prototyping space for custom circuitry
-- It has all the code space and horsepower you need (32K)
-- It's easy to program in a C-like language (as with the Stamp and SX, tools are free)
-- You can add floating point math if you need
-- GPS is a breeze
    * (I wrote this): http://www.parallaxsemiconductor.com/sites/default/files/appnotes/AN002-GPS-NMEA0183-v1.0_0.pdf
-- LCDs are a breeze
    * (my LCD code): http://obex.parallax.com/objects/474/
-- With the HC-8+ coming I have no doubt you're going to want to learn the Propeller, anyway

Note to all: we are porting nearly all of our products to the Propeller so learning it will allow you to customize our forthcoming hardware (HC-8+, FC-4+, etc.).
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

Nice find.  I wonder if I can use a smaller antenna?  The box I want to put this in has limited space and that antenna looks big?


davisgraveyard

I am finally getting back to this project.  I have purchased a GPS module from Parallax that has an internal antenna.  It has a simple serial (4800baud) interface that will stream the data.  I have a backlit serial LCD from parallax and a momentary switch which I will wire to a relay and battery for power.

But since the Prop1 isn't going to work and the Prop2 is out of stock I think I'm going to make the leap into propeller code using Spin.   

I happen to have a EZ-8 laying around can I use this for my project or do I need to purchase the HC-8+?   Whichever way I end up going the rest of this tread should probably move to one of those boards forums.

JonnyMac

Coding the Propeller is going to be the cleanest way to go in the long run, and you'll find lots of GPS-related materials developed by Propeller programmers that may be helpful.

While we'd love for you to have an HC-8+ it's dedicated IO structure may make it less-than-ideal for the project (same for the EZ-8).  Parallax makes low-cost prototyping boards that may be best for this particular application.
Jon McPhalen
EFX-TEK Hollywood Office