Can It Be this SIMPLE?


Results 1 to 40 of 41

Threaded View

  1. #1
    Join Date
    Apr 2005
    Posts
    32

    Default Can It Be this SIMPLE?

    OK I have a Childs Electric Powered GO KART, ( Peg-Perego / Power Wheels type thing ) that I'm doing a
    REBUILD / HOP-UP on for my 3 year old nephew. The thing came with a single 6 Volt battery and runs
    forward by pressing a button on the steering wheel. I'm adding NOS / Turbo by installing a second
    6 Volt battery in series. ( Insane I know but see this site http://www.modifiedpowerwheels.com/ ).
    Also Wired in a switch for a powered reverse.
    ( see MY circuit and explanation at http://home.comcast.net/~david.lynch1/GoKartCkt.html )

    Anyway I'm posting here with a question about some code I just hacked out to controle a
    6 Volt ONLY "Soft Start" so the little one can't hold down the "NOS / Tutbo" button and step
    on the "GAS Pedal" & end up launching form a dead stop to 12 Volts in an instant.
    On the matter of 12 Volts burning up the motor, word is that most of these motors are 18 Volts.

    My thought is to use a PIC12F675 to check voltage at the motor & if it's 6 or 12 volts
    then it's OK for the "Go Faster" button to be pressed, the PIC needs to do nothing
    except loop back to check again. BUT, if the motor voltage is 0 (zero) then the thing
    is standing at a stop and if the Go Fast button is pressed when the gas pedal is pressed
    I want to use a relay to disable the 12 Volts for some period of time, and allow the thing to
    start at 6 Volts then release the relay and apply the full 12 Volts

    Now ASSUMING that I have all my registers set properly and constants and variables
    declaired, is the CODE as SIMPLE as this or have I COMPLEATLY missed it?
    Code:
    start:
    	ADCIN 0, Motor_Volts
    
    	If Motor_Volts > 0 THEN start 	' do nothing as SOME voltage exist at the motor
    					' and we really don't care if the voltage goes from 
    					' 6V+ to 12V+, that is what it is intended to do
    	
    	ELSE
    		IF Motor_Volts = 0 THEN Delay_12V
    	ENDIF
    
    	GOTO start			' do we NEED this statement?
    
    	END
    	
    Delay_12V:
    
    	Motor_V2 = Motor_Volts
    
    	WHILE Motor_V2 = 0		' as long as the motor voltage is at zero volts
    					' we want to engage the RELAY which disables
    	HIGH 12Volt_Cancel_Relay_OutPin	' 12 Volts from getting to the motor so we do not
    					' have a HARD start from zero directly to 12 Volts
    		
    	ADCIN 0, Motor_V2
    	
    	WEND
                 
            PAUSE 3000
    
    	LOW 12Volt_Cancel_Relay_OutPin
    	
    	GOTO start
    Last edited by Mike_Lynch; - 21st August 2006 at 04:11.

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  3. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  4. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  5. Replies: 4
    Last Post: - 7th September 2005, 14:11

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts