Page 11 of 12 FirstFirst ... 789101112 LastLast
Results 101 to 110 of 119

Thread: YATB - Yet Another Teensy Board :D

  1. #101

    Re: YATB - Yet Another Teensy Board :D

    Driving it directly with an output pin seems dangerous!
    A sharp kick to the board can easily generate 10V or more of piezo spiking.
    The resistor doesn't really drop voltage; rather it limits current; high voltage may end up punching holes through the driver FETs on the output pin (avalanche) and burn it.
    The pins are often protected with some kind of Zener for ESD purposes, but those Zeners have very low current tolerance and may burn out, too, after which the output pin is entirely unprotected.
    An external Zener clamping at 3.6V and rated for 100 mA or more would probably be a good idea!

    Separately, when you turn off the unit, it will still have energy that needs to be dissipated, and if current goes down, voltage will go up!
    Thus, I typically parallel these units with a 1 kOhm resistor, and additionally add a low-voltage Schottky diode in parallel, reverse biased. That makes sure I can on/off the unit with reasonable safety.
    Then again, I usually drive them with square waves, and a separate switching transistor (BS170 or simliar) which doesn't allow high quality audio signals. (The frequency response of these buzzers is typically tuned for a specific frequency anyway.)

  2. #102

    Re: YATB - Yet Another Teensy Board :D

    Actually I am using a small Mono Amp chip (LM4862 chip) to drive a small speaker. I have one IO pin D4 which is used to enable or disable the sound and it gets the sound from the DAC pin. So if I want I can use the Audio library and/or I have tried out Talkie code before...

    I have not tested this part of this board out yet...

    Spent some of this morning replacing my Iphone5 which fell into toilet on Saturday with new Iphone7 :0 So still in process of setting that one up. I might have been able to resurrect the IP5, as some of it still worked, but the touch screen did not so I could not quickly turn it off and it drained a half charged battery in probably less than an hour.... So even if I could get the screen to work, not sure I would have trusted it without at least replacing the battery.... But I am totally off topic

  3. #103
    Join Date
    May 2016
    Location
    White Plains, NY
    Posts
    114
    Images
    1
    Rep Power
    6

    Re: YATB - Yet Another Teensy Board :D

    Oh, Jeez! I'm glad I asked! I hadn't considered that effect. I won't populate the buzzer.

    I do like audio feedback (pardon the pun!), so I'll add your suggestions to my newly-formed list of upgrades-needed-in-the-next-revision-of-copper. Hopefully that will be a while - I did remember to re-pour the power planes this time!

    There should be a web list of "Things that fell into the toilet!". I'd have a few entries for it!

  4. #104
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,172
    Images
    27
    Rep Power
    266

    Re: YATB - Yet Another Teensy Board :D

    When it is a plain piezo buzzer element without any internal driver electronics, the simplest method to drive it is to connect one lead to a power supply and the other to a low-side switch (e.g. N-channel MOSFET) that is controlled by a uC pin. You also need to add a 1k resistor in parallel with the piezo leads to permit charge/discharge of the piezo element. Applying a DC voltage to a piezo for extended periods (years) can cause chemical migration within the crystal, so simpler is not always more reliable.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  5. #105

    Re: YATB - Yet Another Teensy Board :D

    I, too, like sound feedback! Like Tician, I drive it with an N-channel MOSFET, and a 1k resistor, although I also add a reverse biased diode, for good measure.

    Kurt, that speaker is the cutest thing. So adorable!

  6. #106

    Re: YATB - Yet Another Teensy Board :D

    Thanks,

    Yes before I was using these little AMPS, I have played around with some different buzzer setups.
    Most of them were copied from what I used on botboarduino (Atmega328) which was the same setup as was used on the old Lynxmotion Botboard2...

    Which I typically did something like go from IO pin through 4.66K resistor to Transistor to speaker, to +5v through 50 resistor, and also used a diode...

  7. #107

    Re: YATB - Yet Another Teensy Board :D

    Another quick update:

    Yesterday I finally plugged the RPI hat onto the RPI3 board and no blue smoke

    the 5Amp Polou DC/DC converter is powering both boards and so far so good.

    Before that I tested that I could make sounds: I used one of the talkie examples with slight mod as I have D4 (LOW) is enable to the pin where program was setup with D5 high is enable... It worked.

    I verified that I could talk to the servos. Both the part where I can turn the power on and off to servos as well as my Buffer chips to enable half duplex at 5v...

    So I configured my Teensy_arbotix_pro sketch for this board. First off talking using USB between boards and I then ran my Linux version of AX_Servo_Test and was able to talk at least to the one servo I plugged in. I then tried my jumpers to jumper from the UART on the RPI to Serial2 on the Teensy. Took a few attempts to get them to talk. First I needed to configure the RPI correctly:
    Found all of the information again at: http://spellfoundry.com/2016/05/29/c...including-pi-3

    Then I first tried talking at 2mbs and I think the RPI had issues with it. When I looked at output on Logic Analyzer the LA guessed it output at maybe 1.8xmbs... So configured both of them to talk at 1MBS and it worked... Need to see how fast RPI3 can talk. I know I pushed some of the ODroids up to maybe 3mbs...

    Side note: also playing with allowing me to program the Teensy while USB is still plugged into RPI3 over Putty type line.
    Note: Arduino has a command line interface that now allows you to run it over a non gui command prompt. The Teensy stuff works to a point except for the Teensy loader program. So I built a version of teensy_loader_cli on the RPI and hacked up a version of platform.txt to use this... So I can now build and download on Teensy with command line, like:
    Code:
    arduino --verbose-build --upload --board teensy:avr:teensy31:speed=120 --preserve-temp-files --port /dev/ttyACM0 ./Teensy_Arbotix_Pro.ino
    Actually I have this in a one line script file...

    It can be improved on and I am thinking of some other ideas, but was fun to see if I could get that to work

    Another thing I am curious about, is on another Teensy thread , there was a person who was getting a higher than expected latency between his PC and Teensy. It turns out on that machine, you are able to get a lot shorter latency if you plug the Teensy into an USB 2.0 hub which connect to his PC... I wonder if that might be true on boards like RPI3 as well? May want to experiment at some point.

    Now back to playing around... Also testing Arduino 1.8.2 with new beta Teensyduino...

  8. #108

    Re: YATB - Yet Another Teensy Board :D

    Another quick update: need to play around some more with the Serial port... There are several threads about the Baud rate of the Serial port not working right... Also need to figure out if I screwed up the Bluetooth by doing the change to
    enable_uart=1 in /boot/config.txt
    Something about the differences between does the hardware UART show up as /dev/ttyS0 or /dev/ttyACM0

    Also again side note playing around with another way to program the Teensy that is plugged into the RPI3.

    But have the build run on my PC...

    So am doing some editing of my sketch on my PC and then I do a build... Actually I am doing the export compiled binary command, which puts the hex file in my sketch folder.

    I have a WinSCP session running to my RPI3 (as well as a Kitty window or two)... So when the build finishes, I use winscp to copy the file to the RPI3...

    On the RPI3 I install inotify tools: apt-get install inotify-tools

    I also wrote a real stupid shell script:
    Code:
    #!/bin/sh
    
    while :
    do
        inotifywait Teensy_Arbotix_Pro.ino.TEENSY31.hex
        ~/teensy_loader_cli/teensy_loader_cli --mcu=TEENSY31 -v -w -s Teensy_Arbotix_Pro.ino.TEENSY31.hex 
    done
    Note: this is using my updated version of the teensy_loader_cli, which takes friendly names (PR was merged yesterday)
    So in a putty window I started up the script:

    Then when I used winscp to download the file to the RPI, I saw in my putty(KiTTY) window:
    Code:
    pi@raspberrypi:~/Arduino/Github/Teensy_Arbotix_Pro $ ./auto_upload.sh
    Setting up watches.
    Watches established.
    Teensy_Arbotix_Pro.ino.TEENSY31.hex MODIFY
    Teensy Loader, Command Line, Version 2.1
    Read "Teensy_Arbotix_Pro.ino.TEENSY31.hex": 0 bytes, 0.0% usage
    Soft reboot performed
    Waiting for Teensy device...
     (hint: press the reset button)
    Found HalfKay Bootloader
    Read "Teensy_Arbotix_Pro.ino.TEENSY31.hex": 24304 bytes, 9.3% usage
    Programming........................
    Booting
    Setting up watches.
    Watches established.
    So it looks like a possibility. Would be nice to hack up (or better yet) integrate a way to have Arduino and/or SublimeText with Stino to be able to do the part of winscp... i.e. a wifi uploader.

  9. #109

    Re: YATB - Yet Another Teensy Board :D

    ttyACM0 is never a "hardware" UART, because it's published by the USB driver stack (used for modems and other communication devices.)
    ttyUSB0 is similar, except for devices who don't claim to be communications devices, just plain serial ports.

  10. #110

    Re: YATB - Yet Another Teensy Board :D

    Sorry Typo: I ment /dev/ttyAMA0 (if I remember correctly) was on other RPI the hardware Serial port, but is now the BT.

    A saw a few things talking about it on web like: http://spellfoundry.com/2016/05/29/c...ncluding-pi-3/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PhantomX using a Teensy 3.1
    By KurtEck in forum Humanoids, Walkers & Crawlers
    Replies: 301
    Last Post: 11-17-2016, 01:08 AM
  2. Looking for Small Board
    By JeffRo in forum Robot Computers
    Replies: 6
    Last Post: 02-13-2015, 06:32 PM
  3. Question(s) Bioloid USB bus board
    By elaughlin in forum Software and Programming
    Replies: 25
    Last Post: 08-14-2010, 02:14 PM
  4. My new Serial Servo Board with on Board RAM :-)
    By Pinter75 in forum Project Showcase
    Replies: 4
    Last Post: 03-03-2010, 09:53 PM
  5. Project AVR Board for Lego
    By Rudolph in forum Robot Computers
    Replies: 2
    Last Post: 02-10-2009, 03:04 PM

Posting Permissions

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