1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

BarMixVah Plus

Discussion in 'Projects' started by mark tomlinson, Aug 21, 2014.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    /boot/cmdline.txt
    fbtft_device.rotate=0 <- portrait mode, also 180
    fbtft_device.rotate=90 <- landscape mode, also -90

    Then a sudo reboot ought to read that and apply it. But that doesn't cover the touchscreen aspect of things, too.

    /etc/modules
    swap_xy=x <- need to update that part in the ads7846_device line (or similar driver)

    It might currently have swap_xy=0 but that would need to be changed to swap_xy=1 since this is a boolean. Again, reboot.

    You also need to...

    sudo apt-get -y install xinput evtest

    This will allow you to configure the input device settings for that. The first one configures and the second one is a monitor and query tool.

    : backreading : Alright, so you have xinput...
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    All of that was done already :)
     
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    The reboot didn't actually make any changes, but all of the file edits are done.

    Here they are:

    cd /boot
    sudo nano config.txt
    --------------------------
    #rotate display
    display_rotate = 2


    cd /etc
    sudo nano modules
    ads7846_device model=7846 cs=1 gpio_pendown=17 keep_vref_on=1 swap_xy=1 pressu$

    Nothing has changed visually :)
     
  4. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    Noting that I wrote /boot/cmdline.txt and you wrote /boot/config.txt, for what it's worth. (Those are links.)

    My take on cmdline.txt is that it's used to adjust kernel parameters... and config.txt seems to be a replacement for BIOS-like things.
     
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Well the other links all point to config.txt and that is where the LCD docs direct you to change it. I can try the other as well

    Sent from my SAMSUNG-SM-G930A using Tapatalk
     
  6. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    The two links provide a fair bit of info. : back from Fry's with another roll of Shaxon :
     
  7. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    You could try this in /boot/config.txt

    lcd_rotate=2
    That is supposed to change both the screen orientation and the touchscreen orientation at the same time. Use it in place of display_rotate.
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Sweet! Let me give that a whirl.
    Trying to juggle them both (the other way) is/was a pain.

    I saw a few mentions of LCD_ROTATE and wrote them off a typographical errors :)
     
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    I am working on permanentizeing the project. Eliminating the breadboard and printing the last couple of parts to enclose it all up.
    Pictures to follow. Exact same circuit and parts, just making it permanent rather than leaving it on the breadboard.
     
    OutsourcedGuru and Geof like this.
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Updated and uploaded the schematic (using TinyCAd since it is free) for the amplifier/pump controller.
     
  11. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    I must have missed this on an earlier read. There's a lot of Arduino-compatible add-ons out there and they all want 5V logic; the Raspi pushes 3.3V logic. So it's a pain to do logic-level conversions when you're trying to graft some Arduino robotics goodies onto a Raspberry Pi.

    Wish I'd known about this Arduberry sooner.
     
  12. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Yep, however ... we ended up not needing it :)

    The small circuit we did with the TIP120 did the interface for us. We simply used a single power supply with a common ground to power the Pi and the 12v logic (i.e. the collector out of the TIP 120 and the motor) and the input to the (base of) TIP120 then comes from the Pi output. Yes, it is 3.3v but more than enough to trip the TIP120 into full on :)
    Cheaters...

    Let me find the new schematic...(I did upload it to GitHub):

    MotorControl.jpg
     
    OutsourcedGuru likes this.
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    So that eliminated the need for the Arduberry and all of the code now rests on the Pi (the java code on GitHub). The LED was only in there to give us a visual indication that the circuit was on.

    I actually like this solution better.

    [note: we could have put the motor on the emitter side (the one tied to ground) of the TIP120, but this works just as well.]
     
    #213 mark tomlinson, Aug 30, 2017
    Last edited: Aug 30, 2017
  14. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    Here's my hack if you want a cheap-and-dirty 3.3V->5V logic converter (actually "dual") out of an SN7400N chip, one of the cheapest you can buy at maybe $0.41.

    A typical transistor-based amplifier by its nature reverses the output (low in, high out) so they're sometimes called an inverter or NOT gate. With some clever wiring as I've described below and the following Boolean:

    Code:
    _________
    ___   ___
    A*A * A*A  = A
    
    ...with the interesting twist that the original signal (A @ 3.3V) is now boosted to the VCC of the chip (5V)!

    7400-as-converter.jpg

    Since it's a quad, you can get another converter on the other side of the chip as well.
     
    mark tomlinson likes this.
  15. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    We are updating our control circuits to use the L293D and do away with the T120 and associated bits. This will simplify the control a bit and less parts is a win. I am not sure if we will need to heat sink the chips, but I think not. The pumps/motors don't draw enough current to need it and not for long enough. I'll update the details when we are done.

    Motor control voltage can be as high as 36v in this rig (we will stay at 12v) this is just a LOT less circuitry ... one chip really.



    datasheet here: https://www.mouser.com/ds/2/389/l293d-954810.pdf


    Chip layout here:

    L293D_connections.jpg
     
    #215 mark tomlinson, Feb 7, 2018
    Last edited: Feb 20, 2018
    Geof likes this.
  16. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Here is the v3 Control board. All that is lacking is landing the 1 wire from the Pi for each motor control (digital output) and the two wires for each motor (DC +/-) so that makes 3 wires for each motor set (3 each to one side of the IC for each motor).

    Technically this is wired now for 8 motors rather than the 7 we had before. I am foregoing the LEDs since that really doesn't add much aesthetic value. If I miss it I can re-add them. Once I test it and wire it up I'll add a photo for that.

    The one extra bit is the 7805 on the right to drop the 12v motor power to 5v for the circuit control. That doesn't drive the motors directly so no heat-sink should be needed.

    ControlBoard v3.jpg
     
    Geof likes this.
  17. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Anybody got a cheap PCB Fab place?
    Most of the ones I looked at are silly. Worst case I'll etch my own, but that is not my idea of fun.

    Will be finishing this up on the bread-board over the week-end and getting it back up and running. My initial tests of the circuitry were fine. Should not require any changes to the code on the Pi.
     
  18. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
  19. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,957
    Likes Received:
    7,344
    Yes, thanks for mentioning though :) They are actually the most reasonable we have found so far. Just less than $100 for 3 boards. Most places want at least $250-300 (but may get as many as 10 boards in a batch). Since I can't see needing 10 ....
     
  20. djamplifier

    djamplifier New Member

    Joined:
    May 4, 2018
    Messages:
    2
    Likes Received:
    0
    Has Somebody an actual Image? The links whitch were postet are down, thank you! Greetings from Germany!
     

Share This Page