Shop OBEX P1 Docs P2 Docs Learn Events
Need Help Controlling a Turbo with Basic Stamp - Page 2 — Parallax Forums

Need Help Controlling a Turbo with Basic Stamp

2»

Comments

  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-04-15 15:47
    The VPOD Isn't reading the signal coming out of the Basic Stamp, It's just trying to get a voltage so it can move the vanes. The faster these pulses, the harder it is for the device to detect them as just pulses.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-04-15 15:49
    Torqued, Just hook it up and see if it works at all.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • AmaralAmaral Posts: 176
    edited 2009-04-15 17:06
    ProcessingData... in this case the signal is NOT PWM, is some voltage level or anything you may call it.. and I don't really know what is. But from the papers that Torqued showed us, it does not say anything about voltage level in the PWM line, unless I miss something here. It just say that for the signal to be aquired has to be in a range, but not level sensitive. It is a Digital INPUT.
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-04-16 03:26
    You know, you may be right. Well, we won't know until Torqued tries both ideas.wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • TorquedTorqued Posts: 31
    edited 2009-04-18 01:01
    Parts haven't showed up yet and I quit getting emails for replies to this thread for some reason.

    The·question is:· What type of signal·does the VPOD need to work?··Analog voltage·from 0-12v "simulated" by a pwm signal?··Or a particular pwm·signal·at a particular frequency (cycles)?· I popped open the vpod to see whats going on inside.· There is a printed circuit·board about 2" x 3"·covered with components, chips etc.· The three wires lead into the board, and then there are two big contacts that lead to·what looks like a large solenoid that deals with the air somehow.· It almost looks like there is also some sort of pressure sensor mounted on the board that interfaces with the housing some how, I'm not sure.· It was a lot more sophisticated inside that I·ever would·have thought.··Maybe it needs to·"see"· more than just an analog voltage simulated by PWM.

    If trial and·error is·the method to figure out what I need to send it,·what is the safe approach to figuring this out?· I would like to creep up on the right settings without risking damage to the circuitry.

    Any ideas?

    Post Edited (Torqued) : 4/18/2009 4:03:55 AM GMT
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-04-18 01:36
    Could you get us a good picture of the Board, and the Chip #'s if you can?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • TorquedTorqued Posts: 31
    edited 2009-04-18 03:54
    Here are the pics.· You can see how they mate together in the first pic.· Two contacts clip onto pins to drive the solenoid.· The two red circles are o-rings on a port that seems to be some sort of pressure sensor mounted on the board.
    1152 x 864 - 546K
    1152 x 864 - 568K
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-04-19 00:34
    Can you get us the chip #'s? (BTW, thanks for the Really Good Pics!)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • TorquedTorqued Posts: 31
    edited 2009-04-21 00:10
    Parts showed up.·Using a 9v wall wart to power the stamp and the isolated side of the·optocoupler.· Wired up the 4n35 octocoupler using Processing Data's diagram, and testing with 2 LEDs.· One between the Stamp and the optocoupler so I can see what is being sent to the optocoupler (5v), and one on the other side of the optocoupler (9v from the wart)·to see if the signal made·it through. ·Not messing around with the regulator or 12v right now.·

    Playing·with the PWM command.· I just picked the first program in my What's a Microcontroller book to get an LED to blink, added the 4n35, and added a PWM command to the following program.


    output 0

    reblink:

    out0=0

    pause 1000

    'out0=1

    pwm 0,230,65500

    pause 1000

    goto reblink

    If I comment out the pwm command, and activate the·previous line out0=1, both LEDs (one before the coupler and one after blink in unison with equal amounts of on and off time.

    If I activate the PWM command and comment out out0=1 as shown above,·the LEDs light up for a bit, then they blink on with a much shorter burst of light·and a·bit more off time than the original program.· If I change the duty parameter in the pwm command to 0, the burst of light is much brighter, if I set it to 255, no light at all.· While the brightness changes, the duration of the light always stays the same.· Changing the cycle command doesn't seem to have an effect, not that I've noticed anyway.· Edit: Checked that again, if I set cycles to 1, the blink is almost imperceptable.· If I set it to 65500, the duration of the blink is longer, but still much shorter than turning the light on and pausing for 1000.

    I'm thinking the vpod will need a steady pwm whose duty fluctuates based on what I want it to do.· It seems like the PWM command is a burst, and I'll need to call it again and again·in some kind of loop.· I realize I haven't really thought this through yet and my wiring is really crude, but I'm just trying to gain a basic understanding of what's going on.· I can't seem to get the leds to light up with any duration other than a quick burst.·Edit: Higher cycles means longer burst, but still not very long.·I was hoping·the PWM command would send·a stream of 1s and 0s in the proportion you specified·until you·call the PWM command again with different parameters.· I don't think it works this way.

    I expected that LED2·on the·9v circuit would be brighter than LED1·on the·5v circuit.· There is a difference, but it's not as much as I would have thought.· I tried swapping LEDs just in case one's brighter than the other at the same voltage.· Same deal.

    I'm not really·thinking through·how I'm using·hi vs. lo to allow current to flow.· I just·slapped this·together.·

    Here's a picture of the breadboad.· Yellow wire goes from P0 to 470 ohm resistor, then LED, then pin 2 of the 4n35. Pin 1 of 4n35 gets vdd from the stamp. Pin 5 gets +9vdc that also goes into Vin from the wall wart. Pin 4 (diagonal corner from pin 1) goes to LED2, then 470 ohm resistor then back to Vss.·

    ·

    Post Edited (Torqued) : 4/21/2009 12:33:44 AM GMT
    1152 x 864 - 543K
    1152 x 864 - 549K
    1152 x 864 - 563K
  • TorquedTorqued Posts: 31
    edited 2009-04-21 18:05
    I put the PWM command in a loop with no other commands.· Both lights on all the time.· Inserting a pause in the loop of any duration cause the lights to turn off for the duration of the pause.· If the VPOD needs a steady PWM signal to function properly, then this will be a problem.· The Stamp·goes to look at sensor input, the PWM signal stops, the·VPOD changes the·air pressure to the·actuator·and the vanes·change position.· Not good.

    If the VPOD is looking at the PWM signal as·a digital input that only needs to be refreshed·ever so often,·maybe there would be time to look at sensor input between refreshes.· I doubt it works this way, but maybe it does.· If not, I'm becoming a little more interested in this PWMPAL add on that fits between the BS2 chip and the board:

    ·http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/67/Default.aspx?txtSearch=PWM+PAL

    Is the purpose of this part to·solve this problem or not.· Anyone?

    One·problem I do·see with this part:· the PWMPAL·sandwiches between a 24 pin BS2 chip and the board.· My BS2 OEM chip is 28 pins.· So I'ld need to rig something up if possible (not real clean) or switch over to a different style BS2 to use it.

    One thing I see mentioned in the Stamp books when running the PWM command is using capacitors and resistors.· I have no capacitor wired up.· If the VPOD is looking for an analog voltage, could a capacitor·discharge a steady stream of voltage to the VPOD while the Stamp takes a moment to look at sensor input before it "pings" the capacitor again to·maintain the charge?· Again, I don't know much about electronics,·but trying to figure·things out.

    I need to·see if I can get the VPOD to work at all·using hardcoded values in the PWM command.· Writing the program to determine the duty programatically on the fly·based on·sensor input will come later.

    Side note:· While I had the·LEDs lit steady, pulled out a super cheap volt/amp/ohm meter I had laying around.· Set the dial to DC 10V and bridged across the two legs of each LED, one on the stamp side of the optocoupler, one·on the isolated, 9v side of the optocoupler.· Voltage appeared to be the same at around·2 volts, if I'm reading it right (I may not be)·and if the meter is accurate (it may not be).· Either·way the needle swept to just about the same·location on the gauge.· How can that be?··Do I have things wired·correctly?

    Switched·the meter·over to DC 50mA·to measure current.· Looked like about 8mA for·the LED on the Stamp side, 13mA on the isolated 9v side (again, if I'm reading it right, and if the cheap meter is accurate, but the measurements are relative to one another).· This would explain why the light is brighter on the 9v side, it has more current flowing through it.· But why wouldn't the volts be different?· The resistors are labeled the·same on both sides (470·ohms).· I even swapped them to see if there was any variation, nope.

    Yes, I realize I'm fumbling around with electronics 101 here.· There is something about actually trying to accomplish something that helps me learn in ways reading does not.· If I went back and·re-read what·I read last summer for this project, maybe I could move forward...mentally that is...lol.gif· If someone could just point·to where my stupidity lies, I would appreciate it.

    Time to start playing with 12v and then see if I can get the VPOD to actually do something (hopefully not just release a wisp of smoke and stop working because I wire it up·wrong or send it the wrong signal.)· These·VPODs can be difficult to get ahold of at a good price and I may have·already·smoked one dinking around.· I've got another new one sitting·on deck, but I don't even want to ask how much the Detroit Diesel parts counter·wants for one.·

    So to recap the questions from this post:

    1. PWMPAL - What's it's purpose?· Will it solve the issue I described?
    2. Could a capacitor solve this issue or not?· I·guess I could experiment.
    3. What is the basic electronics concept that I'm missing that explains why the voltage on both sides of the optocoupler is the same, when one side starts with 5v and the other side starts with 9v?· Or does this have to do with·the way I've got it wired?

    Any help always appreciated.
    ·
  • TorquedTorqued Posts: 31
    edited 2009-04-21 19:48
    Bumped up the power supply to 12v.· Wired in the L7809ABV regulator to output 9v to the Stamp.· Sent 12v to to power the·isolated side of the·optocoupler.· Also wired in a 100k pot·after the led and 470 ohm resistor·but· before I connect them to the 12v ground.· Everything works as before.· Turn the pot and it·dims the isolated·LED.·

    The isolated LED seems a bit brighter.· Still getting the·exact same volt and current readings across the legs of both of the·LEDs on either side of the isolator. ·2v·across the legs of both LEDs,·13mA on the·LED on the 12v side of the·optocoupler, 8mA on the 5v/Stamp side of the optocoupler.· I would have thought·switching·from 9v to·12v on the·isolated side of the optocoupler would have·resulted in a different reading of volts,·amps, or both.· Ok guys, clue me in, what·am I missing here?

    Here's the datasheet on the optocoupler:

    http://www.fairchildsemi.com/ds/4N%2F4N35-M.pdf

    On page one they show the schematic for pins 1 - 6.· I followed Processing Data's schematic and wired pins 1, 2, 4, and 5.· Pin 3 is not used, and Pin 6 is labeled "Base".· Is there something I'm supposed to be doing with pin 6?· Just checking my wiring.

    ·
  • TorquedTorqued Posts: 31
    edited 2009-04-21 20:34
    Here's a pic of what the bread board looks like after the changes and some tidying up.· I also·reversed the way the Stamp lights the LED.· Going high on pin 5 of the Stamp with the PWM command lights the led.· This way, a higher duty like 255 makes the LED it's brightest, not off.

    One thing I saw on some of the other posts was that if your Stamp shares the same ground with the components on the other side of the optocoupler (like I have here), you lose the isolation benefits.· Anyone want to comment on this and know of·a solution?

    The program that was running when the pic was taken was:

    output 5

    reblink:

    pwm 5,255,65500

    goto reblink

    There was no blinking, the lights are on full time and you can dim the isolated LED with the pot.· They'll blink with a pause in the loop, and I can dim both leds by reducing the duty down from 255.



    Post Edited (Torqued) : 4/21/2009 9:04:56 PM GMT
    1152 x 864 - 586K
  • Dave-WDave-W Posts: 94
    edited 2009-04-21 21:44
    Torqed
    Using seperate power supplys for the Stamp and the LED will keep the two isolated.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave W.
  • TorquedTorqued Posts: 31
    edited 2009-04-21 22:07
    Dave-W said...
    Torqed
    Using seperate power supplys for the Stamp and the LED will keep the two isolated.

    ·Hi Dave,

    Both the Stamp and the VPOD·will be run off the car's electrical system (switched 12v power and ground) along·with everything else.· How would you recommend I set it up?

    Post Edited (Torqued) : 4/21/2009 10:22:55 PM GMT
  • TorquedTorqued Posts: 31
    edited 2009-04-22 05:47
    Figured out my measurement problem.· I was measuring the voltage drop across the LED which was 2v in all the cases I tested, 5v, 9v, and 12v.· I needed to measure the voltage drop for the complete circuit from supply to ground.

    This allowed me to identify the next problem:

    DUTY·· STAMP·· ISOLATED
    255······· 5v·········· 14v
    127·······2.5v········· 14v

    It's·looks like·the isolator can't pass through the PWM signal signal properly.···It's as if it sees the PWM'd 2.5v as "on" and the 14v is not pulsed down to 7v like it should.· It stays 14v.· What do you guys think?

    The other thing I was investigating was current flow.· The stamp was putting out 27mA·at 5v.· The isolated side was putting out only 13mA at 14v.· This seemed low.· Now this power supply says it's 12v and 5 amps.· So it must be the 4n35 isn't capable of letting enough current flow.·

    Now the smart way to have checked this would have been to measure the resistance going through the isolated side of the 4n35.· Instead, I decided to check the full current from the power supply going down the center of my bread board.· So I switch the range to the highest amperage setting on my meter, 500mA.
    Touch the probes,·buries the needle hard.· Let's see, try to measure 5A on a 500mA range...nono.gif·

    Switch back over to·measure voltage on the 50v range, and what was measuring 14v·now says 40v.· Amp measurements seem similarly·messed up.· Time for a new meter?

    So do the digital VOMs·have some protection to keep you from blowing them up like this? Yeah, I'm learning·lessons·over here the hard way.·lol.gif

    Anyway...I did hook up a vpod just to see if I could get something to happen.· I didn't have air pressure on it but figured I would be able to hear the solenoid rattle if I could get it to activate.· Now maybe I need air pressure since it seems to have some kind of board mounted pressure sensor, because trying different cycles and duties didn't get any response with no air attached.·

    Wrote up a program that loops through different cycles from 1 to 65500 cycles in 500 cycle increments.· At each cycle level, it tries duties of 0, 127, and 255.· The idea is if the vpod is looking for a digital signal of a certain frequency, I should be able to find it.· I can bump down to 100 cycle increments or fewer·if need be. It will just take longer to test.· That's when I started testing the output voltage.· I·was looking for a voltage of around 6 to 7v on a 50% duty cycle like the manual says.· This is when I discovered that the voltage was not dropping on the·isolated·side·like we thought it should.· The other thing I was looking at was the current.· 13mA seems a little weak.·

    So if this isolator is not the ticket I'm looking for, I'm thinking about trying to get the vpod to activate·straight from the stamp.· It won't·see a range of 0-12v, it will see a range of 0-5v, but it will be a true PWM signal (at the wrong voltage).· If the VPOD is·controlled by·an analog signal, then I just can't quite push it to 50% duty.··On the other hand, if it's looking for a digital signal, it will see a PWM, just·a lower voltage.··It will·get more mA·than I tried today.·
    What can I burn·out next?·VPOD?· Stamp?· Yee haw! jumpin.gif

    Now I think I remember reading a Stamp can sink more current than it can source.· I·suppose I ought to look into that and·wire·it·up.· Put some air on·the·VPOD·hook it up, try a couple of duties, and if no response, turn the program loose on it.· More fun tomorrow...time for some shut eye.

    ···
  • TorquedTorqued Posts: 31
    edited 2009-04-22 06:07
    One thing doesn't add up with the idea that the isolator doesn't pass through the PWM signal.· Reducing the duty·on the PWM command·does·cause the·LED to on the other side of the isolator to dim.· So what's happening here?· If I hadn't fried my VOM, maybe I could check some things....
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-04-23 16:45
    Uh-oh, rise and fall time. Ouch. Where's that data sheet? See if when you do the PWM with the LED, and you shake it back and forth if it blinks on and off.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • TorquedTorqued Posts: 31
    edited 2009-04-23 20:33
    ProcessingData... said...
    Uh-oh, rise and fall time. Ouch. Where's that data sheet? See if when you do the PWM with the LED, and you shake it back and forth if it blinks on and off.

    Bear with me guys and keep in mind, when it comes to electronics, Torqued = newbie.· I was measuring the volts the same way I was measuring current, by breaking the circuit and putting the probes across the gap.· This is why I was getting 14v on the isolated side no matter what I did.· Yes, this is the first time I've used a multi-meter blush.gif·and we all saw how·that ended, right? lol.gif· I'm learning...I'm learning.
    So I picked up 2 more multi-meters, one digital (auto-ranging), the other analog.· Took·some more measurements.··After measuring the voltage the right way, it looks like the isolator IS respecting the PWM signal, with some other caveats.· Here's what I came up with.· When I measured the current, I measured two ways.· First, at the begining of the circuit and straight to ground to see what it was capable of.· And second, with all the resistors, leds, etc.

    DUTY········ ·············· STAMP······ ······························· ··· ISOLATED
    ·············· V······ mA-ground·· mA-circuit·············· · V······ mA-ground·· mA-circuit··············
    ·····················
    16········· .3······· ···1.75··········· .3························1.74·········0.68··········· 0.70
    32········· .6·········· 3.5·············.5·························2.13·········1.38··········· 1.40
    64········ 1.2········· 7··············· 1··························2.86·········2.82············2.83
    127······ 2.4········· 13.5············2··························4.21·········5.79············5.6
    255······ 4.8·········· 27············· 4··························6.86········12.55·········· 11.25

    The 4n35 doesn't seem to let a lot of current through in the isolated side.· I was expecting a little more when I was looking at the specs on the digi-key ordering page, but like I've said, it's not like I actually know what I'm doing here.· I'm thinking this may not be enough mA for the vpod.· The other thing is voltage.· Not sure why, but even with a duty of 255, I'm only seeing around 7v, not the 12 I need.· What's the smart way to amplify the volts and the current?· I would like to have the ability to adjust voltage and mA separately if possible.· Two knobs, hooked to what?

    I measured the ohms across pins 4 and 5 of the 4n35 to check resistance when the other side is getting current.· Says right around 500 ohms (if I'm doing it right, and that's always a big "if").

    To further document my predictive abilities, from a previous post: What can I burn·out next?·VPOD?· Stamp?
    The answer is...drum roll....the OEM BS2!·jumpin.gif· I'm sure I wasn't the only one who saw this coming.· I was double checking·voltages at different duties on the stamp side of the isolator.· I had wrapped some wire around one of the VOM probes·for the ground.·· Went to stab it into the ground, and was one·square off.··LED wouldn't light up.· Do·I smell something?··Accidently sent·+12v back through pin 5.·nono.gif··The regulator and·the 28 pin Stamp chip were pretty·hot.· Unplugged·the stamp and let it·cool down.· LEDs light up, but I can't download programs into the stamp anymore.· Say, maybe I·ought to wire up my breadboard a little differently so·+12v isn't available all the way across the breadboard right next to the ground.· That might make·sense.· And maybe I·ought to change my screen name·from Torqued to Toasted.· That might make sense as well.lol.gif·

    Parallax is sending me a·complete OEM BS2 kit·with all the parts so I can get it up an running again. Nice guys.· Gave it to me for half·price, $15.· Thanks·Parallax.·

    I also·talked·to·Tech at Parallax·about the PWMPAL and it sounds like I'll need one to free up the stamp for sensor input.· Tech told me how to wire it since I can't sandwich it in·like intended.· It's on the way as well.· I was going to wait to order this until I was sure I could get a vpod working, but I don't like paying for shipping twice....I'm still optimistic,·perhaps naively so.·smilewinkgrin.gif

    Until these parts·show up, how am I going to satisfy my penchant for·destroying electronic components?· Hmmm....I've got some capacitors laying around.· Maybe I could wire them in backwards while I wait for the UPS truck.· Now, where did I put those·safety glasses?

    Let me know what you think about being able to bump up the voltage and current in an adjustable way.· I would·like to order·what I need while I wait for Stamp parts.

    Again, thanks for any and all help.

    Post Edited (Torqued) : 4/23/2009 9:56:59 PM GMT
  • TorquedTorqued Posts: 31
    edited 2009-04-23 21:47
    A bit of new information, and a glimmer of hope.

    While I can't communicate with the Stamp any more, it does seem to be still running the last program loaded which is a continuous loop with a duty of 255 (full power).· I figure, why not try the VPOD again, this time with some pressure.· Wire it up, put 120 psi into the input port from my compressor, and screw in a pressure guage on the output port.· Power it up, feed the PWM line 6.86v at 11.25 mA.· Nothing.· So I figure, the Stamp is already fried, I might as well try feeding it a PWM Straight off the Stamp.· It will be lower voltage, but more mA (4.75v and 27mA).· Now I don't know if this is what actually·went through the vpod, but this is what this circuit·can deliver (standard caveat: if·I'm measuring·correctly).· Try it out and the vpod rattles and the pressure gauge jumps to 60 psi and falls back to 0 psi all in an instant.· I unplug the power and it does it again.· It doesn't hold the pressure, but instead gives a puff and doesn't do anything until I unplug the power and plug it in again.· The VPOD seems to be self-relieving, meaning if it needs to lower output pressure, it doesn't rely on the device downstream to "consume" air until the pressure it lowered.· The vpod has a litte pressure release valve just below the air input and output valves (looks like a silver buttion).·· A little puff of air comes out of this valve when it "rattles".· It also "rattles" without the air being fed to the vpod.

    Ok, so now some questions.·

    1. Why does·it "rattle"·from the Stamp's PWM signal·and not from the isolated circuit?· Not enough mA on the isolated side, or is the signal somehow altered going through the optocoupler?

    2.·Why does the vpod rattle (bounce up to 60psi and drop instantly).· Why doesn't it hold a steady pressure based on the voltage it's receiving?· Enough mA to make it rattle once, but not enough to actually make it function properly?· Wrong frequency....who knows?·· Maybe the circuitry in the vpod is only looking for one PWM signal, not a steady stream.· That would be nice and·might mean I don't need a·PWMPAL.·I doubt it,·but no·way to test until the stamp parts arrive.

    My first guess is there is not enough mA to make things function correctly, but I don't know.· Any thoughts from anyone?· Ideas of things to try?· Sequence of things to try in ascending order of risk of damaging the vpod?· (Consider my history here folks).

    Any help or suggestions much appreciated.

    Post Edited (Torqued) : 4/23/2009 9:52:49 PM GMT
  • TorquedTorqued Posts: 31
    edited 2009-04-23 21:58
    One thing I'm thinking, is use some resistors to limit the current from the 12v power supply and see if the vpod will run off an analog voltage not orginating from a pwm signal.· Might be risky, but I could measure voltage and current ahead of time.· (The digital vom can check current up to 10A and it's a 5A power supply.· 100k pot?·
  • TorquedTorqued Posts: 31
    edited 2009-04-24 18:58
    Another piece of the puzzle seems to have fallen into place.· I believe the PWM line on the VPOD needs to be driven low to ground.· If I wire the PWM line from the VPOD·into pin 5 on the optocoupler and wire pin 4 on the optocoupler to ground, the vpod will "rattle".· It won't hold a steady pressure, but the gauge gets a burst of pressure, and the silver "button" releases the pressure·almost instantly.·

    If this is the case,·how does this pwm line need to be grounded (duty, cycles, etc.) to cause the VPOD to output a steady pressure?·

    ·I wonder if·the VPOD·does·see the·PWM ground as a digital input, and·100% duty cycle (what the stamp is stuck at until the parts show up) is not part of the·pwm range it is looking for.· The VPOD·responds·by cycling the·pressure once and then waits for·a signal within the proper·range.· The manual spoke about·testing·90%, 50%, and 10% duty cycles.

    If this is the case, perhaps the Pulseout command will work.··I believe the stamp can deal with pulseout and still monitor·sensor input, so that would solve·another problem.· If Amaral's theory proves correct about digital input and pulseout, this might actually work real·well.·




    Post Edited (Torqued) : 4/24/2009 7:24:52 PM GMT
  • TorquedTorqued Posts: 31
    edited 2009-04-30 03:49
    Parts showed up, replaced the interpreter chip and the BS2 came back to life.· Had written a program that tried different cycles in increments of 1000.· At each increment, I tested 3 duties, 0, 127, and 255.· The pressure seemed to hold with a cycle of 10,000 only.· 9999 or 10001 and the vpod would not hold pressure.· I played around with the duty.· I could actually get it to put out and hold different pressures from 20 to 75 psi.· Real progress!· The problem was it was not very smooth.· At some duties, the pressure would fluctuate wildly.· Most of the time when changing from one duty to another, the vpod would pop, the pressure would drop then come back up.· I tried a variety of resistors which altered the duty required for a certain pressure, but the problems with fluctuations still existed.· It really wasn't suitable for precise control or frequent transitions.·

    Since the program will need to be able to hold a steady PWM while the Stamp monitors a variety of sensor input, I wired up the PWMPAL.· Normally the PWMPAL sandwiches between the 24 pin chip receptical and the BS2-IC itself, but since I've got a 28 pin OEM BS2, this wouldn't work for me.· Set up the PWMPAL on the breadboard, wired it up, got it running, and·hooked up the·optocoupler.

    The PWM signal coming out of PWMPAL is different and more configurable than the signal generated by the Stamp's PWM command.· The fact that it continutes to output the PWM stream·with one command while the Stamp·is free to do other things makes it ideal for this application.· The counter capabilties may come in handy when I wire up the·turbo shaft tach as an input.· The shaft speed is not supposed to exceed 100k rpm.· More than that and·the compressor or turbine wheels can·come apart catastrophically. If the vanes clamp down at the·wrong time for too long, boom! nono.gif·

    Wrote up a program to cycle the PWMPAL through some different options and it worked great.· The·VPOD seems·to work fine across a·pretty wide range·of Hertz.·· Got it dialed in so incrementing the on-time by 1 unit changed the pressure output from the VPOD by 1 psi across a 55 psi range.· I can set it up for more or less resolution, but I think this will be fine.· The pressure changes smoothly without fluttering and works great.· I wrote a program that takes the pressure up 1 psi at a time, holds for a few seconds then takes it up another 1 psi.· Once it reaches 75 psi, I bring it down 1 psi at at time until I hit about 22 psi, at which point it drops to zero.· It's very smooth and precise, and adjusts rapidly.· This is exactly what I was hoping to achieve and should work great!·roll.gif

    Thanks to Processing Data and Amaral for the great suggestions and·helping me to·get this up and running.· I've still got a lot of work to do, but this was·the critical piece of the puzzle I was most concerned about.

    Thanks again guys!· Much appreciated!
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-05-01 17:42
    Great! I'm glad you got it working. Could you PM me pics of the finshed project? [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-05-01 17:42
    Great! I'm glad you got it working. Could you PM me pics of the finshed project? [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • TorquedTorqued Posts: 31
    edited 2009-05-03 04:32
    Will do, but it will take some time to get this all put together.· Thanks again!
Sign In or Register to comment.