1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

A little POV with a 18f1220 and hot glue LOL

Discussion in 'Microcontrollers' started by be80be, Sep 11, 2010.

  1. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    nice idea!!! a headphone jak for power OMG lol simple
     
  2. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    I need to learn how to connect the coil to a PIC.

    [​IMG]
     

    Attached Files:

  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    No but I'm looking for that now Thanks ericgibbs

    Atom I'll post the 12f508 setup today

    Code (text):

    :100000002500290A6A002900FF0CE9010307EA011B
    :100010000307250A030C2800DF0C1009040A6800F6
    :100020002700E70CE7016802FC0C03071B0AE70145
    :100030000306170AE7010400E803170A0706200A67
    :100040002707240A0000240A0008C404A4040400AA
    :1000500000086400FF0C32003600170C3500250044
    :10006000000C36000600000C2600B204120202004A
    :10007000A6050602B6041602060046040602560449
    :1000800016020600010C0209A6040602B6041602B6
    :10009000060046050602560416020600010C020977
    :0200A000380A1C
    :021FFE00EA0FE8
    :00000001FF

     
    That's the hex for it the code in basic simple
    for a pic 12f508
    Code (text):

    @ movwf OSCCAL
    lowO var GPIO.5
    highO var GPIO.2
    TRISIO =%00000000
    GPIO =%00000000
    OPTION_REG.5=0
    while 1==1
             HIGH lowO
             low highO
          pause 1
             low lowO
              high highO
          pause 1
    wend
     
     

    Attached Files:

    Last edited: Sep 14, 2010
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US

    thanks Burt
     
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Here what the wave looks like on scope

     
    Last edited by a moderator: Sep 10, 2013
  7. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    Went to the Electronics toy store (SURPLUSGIZIMO>COM)
    boy have they got STUFF!
    found the 2mm power jacks,1/2 the price I paid for them, 20 pin male and female headers, lots of cool stuff. If building a robot this is the place.
    inquired about the Mosfet H bridge I have on my CRITTER RIDDER (Mosfet getting hot). bought some 470 ohm resistors but salesman questioned the H bridge setup. he suggested using just a transistor. Might give it an experiment when I get back but think Audio guru knows best hopefully. Hasn't steered me wrong yet. Going to add the 470 ohm resistors as prescribed.
    could save some $$$ if just a transistor will work but then what is the db difference. Sound pressure I think?
     
  8. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    THANKS BURT! you rock. Ill test in a min
     
  9. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Probably a good idea
    fet are voltage controlled and if you don't turn them on they act as a resistor so if it not all the way on and pulling a load
    it's going to get hot so the old put a 1k ohm to base like a 2n3904 doesn't work
     
  10. bee

    bee Member

    Joined:
    Oct 2, 2008
    Messages:
    152
    Likes:
    0
    Location:
    Melbourne Australia
    Sorry to hear about your news fella

    This is very interesting project could use this one day

    cheers
    bee
     
  11. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    Well it started as this


    But It's all part of a bigger picture LOL
     
    Last edited by a moderator: Sep 10, 2013
  12. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    Not meaning to hi jack thread but in need of more advice

    here is the H bridge I have
    http://www.electro-tech-online.com/attachments/combo-hot-png.44887/
    the top two Mosfets get warm after about 15 miniutes.
    not allowed as this is going under a car hood - no chance of fire allowed.
    any suggestions?
    present suggestion is to replace the 1k resistors with 330 (going to use a 470 in parallel with the 1206-1k smd resistor on the board)
     
  13. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    And some one said that will work no way it's going to get hot when them bottom fet's go high. And you don't need all that to
    drive a piezoelectric speaker. here http://www.murata.com/catalog/p15e6.pdf
     
  15. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    borrowed computer, can't open a pdf. no adobe installed.
    gonna have to wait until I get home.
    am beginning to think the "amp" is over engineered.Works great but can't be getting hot.
     
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    MrDeb why can't you see simple

    Think about this a amp it's little power turning on bigger power
     

    Attached Files:

  17. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    I get 14mA tops lol : (with use of button to test different delay times. Max of 10*10 Cycles (100 cycles in 10 Cycle increments)

    Code (text):

    /* *****************************************************************************
    ;                                                                             *
    ;    Filename:                                                                *
    ;    Date:                                                                    *
    ;    File Version: 001                                                        *
    ;                                                                             *
    ;    Author:   Jason Lopez                                                    *
    ;    Company:  AtomSoft                                                       *
    ;                                                                             *
    ;***************************************************************************** */

    #include <p18f2525.h>
    #include <delays.h>
    #include <string.h>

    #pragma config WDT = OFF, LVP = OFF, OSC = INTIO67, XINST = OFF

    /************************************
    Prototypes
    *************************************/
    void main(void);
    #define lowO LATCbits.LATC4
    #define highO LATCbits.LATC5

    #define Btn PORTBbits.RB0
    /************************************
    Main
    *************************************/
    void main(void){
        char time = 1;
        OSCCON = 0x72;                  //8MHz clock
        while(!OSCCONbits.IOFS);        //wait for osc stable

        ADCON1 = 0x0F;          //Digital Pins (we dont need ADC)

        TRISA = TRISB = TRISC = 0x00;   //All Outputs
        LATA = LATB = LATC = 0x00;      //All Low
        TRISBbits.TRISB0 = 1;

        while(1){
            lowO = 1;
            highO = 0;
            Delay10TCYx(time);

            lowO = 0;
        highO = 1;
            Delay10TCYx(time);

            if(Btn){
                time++;
                while(Btn);
                Delay1KTCYx(10);
                if(time > 10) time = 1;
            }
        }
    }

     
     
    Last edited: Sep 14, 2010
  18. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    I got 15ma could get more by raising the voltage could push it to maybe 100ma @24volts ac maybe as much as 144ma

    Also i was tinkling a iron core to wrap the pick up coil would work better
     
    Last edited: Sep 14, 2010
  19. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    An iron core would add too much weight.
    I interpret from reading the links to this wireless voltage transfer that an iron core would be going in the wrong direction.
    On the amp, I started out with the schematic you posted but used a base resistor and 8 ohm speaker.
    As I understand it, the piezo tweeter has no impedence so the schematic you posed won't work. WHY ??
    I just followed Audiogurus advice. Found several circuits using a piezo device and an H bridge to boost the peak to peak voltage.
     
  20. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    ONLINE
    for get the speaker use your piezoelectric tweeter with a 120 ohm 1/2 watt resistor like i drawled it then try it at 12 volts with a 120 ohm resistor 1 watt see what happens
     

    Attached Files:

    Last edited: Sep 14, 2010
  21. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    what about a base resistor? Don't want to fry my PIC.
     

Share This Page