This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Saturday, January 12, 2008

[oopic] Measurement of Punch Force

Hi everybody.

I have a project where I want to build a punching bag with a build in
sensor that can measure the force of a kick or a punch. I want the
sensor to be connected with pre-amplifier and an OOPic. The OOpic will
communicate with a PC via a wireless seriel connection.

In that way I will be able to see if I have improved my kicking and
see how much time there's between my kicks and so on.

My problem is that I just can't find the right sensors for the job. I
have been looking on some "FlexiForce" force sensors from
Parallax(Parallax.com part number 30056) but they are only rated at
100 lbs max which for sure isn't enough. Need about 1000 lbs to 2000 i
think. Just to be sure.

What about load cells from http://www.appmeas.co.uk can they be used?

The sensor must be able to make a very quick measurement since the
"load" will not be there for more than a couple of seconds.

So if anyone can come up with a good solution to my problem i will be
very happy!

Thanks in advance and may you all have a great new year:)


Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

[oopic] Re: events again

--- In oopic@yahoogroups.com, "dldlhfd" <dldlhfd@...> wrote:
> Hardware wise I have a switch, one side hooked up to 5 volts the
> other side hooked to ground with a 1K resistor.
I would say that the resistor should be on the 5V line to limit the
current, not on the ground line.

> What am I doing wrong?
I am not sure, but your code is working for me with small changes. I
use the OOPic-R board and have a microswitch connected to line 8 with
internal pull-up resistors activated, so I just added this line at the
beginning of main:
ooPIC.PullUp = cvTrue
and changed
sw1.IOLine = 13 to sw1.IOLine = 8
When I press the switch, yellow light blinks 5 times.

Maybe this will be helpful:
http://www.oopic.com/objapp2.htm


--
Mike



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

Friday, January 11, 2008

[oopic] events again

I know I just ask the question but I still can't get it to work. I
hope that someone can help.
Oopic C.1.1+ compiler 6.1.1
Hardware wise I have a switch, one side hooked up to 5 volts the
other side hooked to ground with a 1K resistor. When the line is not
connected to 5 volts it is connected to ground. Just to make sure it
was not the switch I took it out and just used a jumper on my proto
board. I tested it before I hooked it to the oopic
My code is below
I have an if statement in a do loop. If I comment out my event code
and uncomment the if statements in a do loop the program works just s
it should. When I disconnect the 5 volt line the yellow light blinks
with 5 second delay.
With no hardware changes, if I comment out the do statement and the
if statement, so I just have the event as it is now it does not work.
What am I doing wrong?

Dim ev1 As New oEvent
Dim led7 As New oLED
Dim led6 As New oLED
Dim led5 As New oLED
Dim sw1 As New oSwitch
Dim wi1 As New oWire

Sub main()
led7.IOLine = 7 'red
led6.IOLine = 6 'yellow
led5.IOLine = 5 'green
sw1.IOLine = 13 'read the switch on line 13
ooPIC.Delay =500
led7.TurnOn 'some indication it is on
wi1.Input.Link(sw1.Position)'read the switch normally 1
wi1.InvertOut = cvTrue 'yes invert the output
wi1.Output.Link(ev1.Operate) 'inverted output to event norm 0
wi1.Operate = cvTrue 'turn the wire on
'Do
'If sw1.IsOff 'if switch is at zero volts logic 0
' led5.TurnOnBright
' led6.TurnOff
' ev1_Code
'Else 'if switch is at 5 volts logic 1
' led6.TurnOn
' led5.TurnOff
'EndIf
'Loop
End Sub

Sub ev1_Code()
Do 5 Times
led6.TurnOn
ooPIC.Delay = 1000
led6.TurnOff
ooPIC.Delay = 1000
Loop
End Sub


Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

Thursday, January 10, 2008

[oopic] Re: How can I read an external A2D on the OOPic-R?

--- In oopic@yahoogroups.com, "Fiebigc" <fiebigc@...> wrote:
>
> Does anyone have any experience attaching an external A2D to the
> OOPic? I need some more resolution that the 10-bit on board A2D and
> would like to hookup a 12-bit to the OOPic. I just need a little
> direction to get started. If I can hook it to the I/O pins how does
> the OOPic interpret the digital information? Any help would be a
> appreciated, thanks.
>

You have 3 basic choices: I2C, SPI and parallel. I2C connects the chip
to the OOPic local bus (the one with the EEPROM) and since it is bit-
banged, transfers will be slow. Maxim MAX127 has an I2C interface

www.maxim-ic.com

Maybe transfer speed and samples per second aren't important. If they
were, you wouldn't be using an OOPic.

SPI is a simple serial interface and quite common on A/D converters.
It is also bit-banged so, again, it won't be quick. I haven't examined
the datasheet in detail but the good news is that transfers are in
terms of 8 bit bytes which might be compatible with oSPI. Maxim
MAX1340 is one device.

Parallel devices such as the Analog Devices AD7891 need more than 16 IO
lines for the interface - 12 for data plus some for status/control.
The transfer will be very fast, as fast as the OOPic can read an
oDIOx. But there won't be very many pins left...

I think I would start at Analog Devices www.analog.com and do a
parametric search on A/D Converters. You can review the Vcc spec (you
will want 5V), interface type, number of bits and number of channels.
See http://www.analog.com/dynamic/parametric/scResultsDisplay.asp?
SearchType=PSS&ProductLine=ADC

Then it's time to study the datasheet until you fully understand how it
is going to work.

Richard


Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

[oopic] Re: How can I read an external A2D on the OOPic-R?

Well I'm not really sure, that's the kind of information I need to get
started. What protocol would most readily be handled by the OOPic?


--- In oopic@yahoogroups.com, ooPIC Tech Support <dennis.clark@...> wrote:
>
> What kind of external A2D? You can get parallel, I2C or SPI chips that
> do this.
>
> DLC
>
> Fiebigc wrote:
> > Does anyone have any experience attaching an external A2D to the
> > OOPic? I need some more resolution that the 10-bit on board A2D and
> > would like to hookup a 12-bit to the OOPic. I just need a little
> > direction to get started. If I can hook it to the I/O pins how does
> > the OOPic interpret the digital information? Any help would be a
> > appreciated, thanks.
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> --
> ------------------------------------------------------
> Dennis Clark ooPIC Tech Support
> www.oopic.com
> ------------------------------------------------------
>



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

Wednesday, January 9, 2008

Re: [oopic] Trouble with new OOpic

The obvious check is to make sure that you have power at the LED, then
that the LED is good. After that, make sure that you have the correct
pin chosen - Often we will confuse the IOLine with the I/O pin number.
If you have 5V on the board and everything else checks out good then you
need to consider if the ooPIC PIC chip has been damaged. They are
pretty tough, so trying another IOLine might do the trick. Can you post
your code?

DLC

andy braham wrote:
> Hello all,
> My son and I are working on a school project using a OOPic II. We
> are trying to make sure that the OOPic is working so we tried loading
> a sample of the oLED object and hooked up a LED just to make sure that
> everything was working ok but it is not. We do not get any errors when
> downloading and can read the info from the eprom. I checked the ioline
> with a volt meeter and there is no voltage so i tried changing the
> ioline and still get the same result.
> I looked up the troubleshooting on the website and everything looks
> ok. i setup the programming cable again and the program finds it and
> set the delay.
> I have experiance with working with OOPics and have never seen this
> and i am totaly lost why this is happening any ideas?
>
> Thanks
> Andy
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

--
------------------------------------------------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------------------------------------------------



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

Re: [oopic] How can I read an external A2D on the OOPic-R?

What kind of external A2D? You can get parallel, I2C or SPI chips that
do this.

DLC

Fiebigc wrote:
> Does anyone have any experience attaching an external A2D to the
> OOPic? I need some more resolution that the 10-bit on board A2D and
> would like to hookup a 12-bit to the OOPic. I just need a little
> direction to get started. If I can hook it to the I/O pins how does
> the OOPic interpret the digital information? Any help would be a
> appreciated, thanks.
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

--
------------------------------------------------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------------------------------------------------


Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/