Shop OBEX P1 Docs P2 Docs Learn Events
DHB 10 with Intel Edison — Parallax Forums

DHB 10 with Intel Edison

I am trying to get my DHB 10 working with Intel Edison. I have connected TX of Edison to CH1 'W', Ground of Edison to B, and RX of Edison to CH2 'W'.
After I ping /dev/ttyMFD1 at 19200 baud with any command, say "HWVER", the motor status lights on the DHB10 stop blinking, implying successful receipt.
However, I fail to get any response from the driver so far or any motor control activity.

Please help.

Comments

  • The DHB-10 sends data on the CH1 line by default. You need to change this by issuing the command "TXPIN CH2".

    You should then see the relpies sent from the DHB-10.

    This configuration can be saved to EEPROM so you don't have to do it with each power cycle but I don't know the command off the top of my head. If you need help saving the command to EEPROM, let us know and I'll help you figure this out.
  • That is the first command I send it, it acknowledges by stopping the LED blinks.
    However, I still do not see any response or motor controls.

    Is it possible to conclude that I have bricked the driver and need to order another ?
    P.S. I do not see any output on serial terminal also, while using the prop plug (though it can program the EEPROM file)


    Thanks
  • What is the input voltage on the DHT-10? Is the Edison outputting 5 volt signal?
  • Yes, edison is working on 5V levels.
    The input voltage is 12V on the DHB10.
  • Publison wrote: »
    What is the input voltage on the DHT-10? Is the Edison outputting 5 volt signal?

    The DHB-10 has 10K series resistors on the four I/O lines CH1, Aux1, Aux2 and CH2. It's safe to use these with 5V signals.

    I've had a couple of 5V devices which couldn't read 3.3V signals when there was a 10K resistor in series.


    helloerror wrote: »
    Is it possible to conclude that I have bricked the driver and need to order another ?
    P.S. I do not see any output on serial terminal also, while using the prop plug (though it can program the EEPROM file)

    The Prop's bootloader is in ROM. It can't be bricked.

    The normal firmware doesn't send any information over the Prop Plug connection. I could send you a test program to test the communication.

    Can you connect through the Prop Plug connection and CH1/CH2 at the same time?

    I could write a program which would output on CH2 anything sent through the Prop Plug connection.

  • I can connect both at the same time.

    I think my problem is in the way I am sending data directly from the Edison to the Propeller onboard the DHB10.
    I am simply writing something equivalent to: echo "HWVER\r" > /dev/ttyMFD1
    I am not sure if that is the way propeller firmware is supposed to receive data.

    A program as you mention would be helpful.
  • helloerror wrote: »
    I am simply writing something equivalent to: echo "HWVER\r" > /dev/ttyMFD1

    I would have thought the above should work.
    helloerror wrote: »
    A program as you mention would be helpful.

    I attempted to add a second serial driver but my first attempt failed.

    Instead of using two serial ports, for now here's a program which will accept the normal commands through the Prop Plug.

    I commented out line 244 and added a line to use the Prop Plug port.
    Pub ProcessSerialInput | RxCheck, NextCNT, LoopCount, Error
    
      'Term.Start(Rx, Tx, Baudmode, Baudrate)                ' Start a UART for the command port
      Term.Start(USB_RX, USB_TX, 0, Baudrate)                ' Start a UART for the command port
      
    

    I also added the form feed character (ASCII 10) to the carriage return (ASCII 13) as a command terminator in case your terminal program is sending the form feed character.

    I just tested this program and it seemed to work fine when the board is connected through a Prop Plug.

    I'll see if I can get the two serial port version working tomorrow.



  • Thanks! This serial comm is working fine now through the prop plug.
    I am not sure why direct communications between MFD1/Uart(0) and DHB10's propeller is not working, possibly due to minor connection problems.
    In all the tutorials, I have observed, there is always a shield (BOE, propeller boards) that are responsible for communication on CH1/2.
    As a temporary solution, I have ordered a BOE arduino shield for interfacing my uart communications properly (I hope).
  • helloerror wrote: »
    Thanks! This serial comm is working fine now through the prop plug.
    I am not sure why direct communications between MFD1/Uart(0) and DHB10's propeller is not working, possibly due to minor connection problems.
    In all the tutorials, I have observed, there is always a shield (BOE, propeller boards) that are responsible for communication on CH1/2.
    As a temporary solution, I have ordered a BOE arduino shield for interfacing my uart communications properly (I hope).

    I don't think the BOE Arduino Shield is going to do much to solve your communication issue.

    I just to a look at the BOE Arduino Shield's schematic and I don't see any sort of level shifters on the board.

    Have you tried issuing motor commands to CH1?

    Using the original firmware, I'd suggest something like "GO 50 50" (with a carriage return at the end).

    The resistor net on the DHB-10 could cause a communication problem from the Propeller to the Edison but the 10K resistor shouldn't be a problem for Edison to Propeller communication.

    Often times a photo of the setup will allow someone to spot a problem. If you post a photo of your Edison/DHB-10 setup maybe someone will spot an issue.

    I generally try to use 3" jumper wires. 6" jumpers are usually safe but long jumper wires can cause communication problems.

    It's certainly possible to use the Prop Plug communication port with the Edison. You'll want to use a series resistor of at least 3.3K (a 10K should work fine) between the Edison's TX line and the Prop Plug connection's RX line.


  • helloerrorhelloerror Posts: 8
    edited 2016-05-23 22:43
    Hi Duane, I will try to get a photo of my previous setup (need to unassemble the dhb10 from my arlo).
    Right now, I am reliably and conveniently using the /dev/ttyUSB0 on Edison for communications through the prop plug (connected to its USB port).
    Specifically, I am using a nodejs script for my arlo.
    In the interest of other users, who may not have USB port in their boards; I will disassemble the robot and go back to uart debugging.
    Thanks
  • As long as you can communicate with the DHB-10 over USB I'm not sure if you need to worry about getting CH1 and CH2 to work with the Edison.

    It looks like the Edison uses level shifters so it can interface with 5V logic. My guess is the level shifters don't like the combination of 3.3V logic and the 10K series resistor on the com line.

    It still seems like the DHB-10 should be able to accept commands from the Edison. Oh well, at least you can communicate over USB.
  • VonSzarvasVonSzarvas Posts: 3,450
    edited 2016-05-24 12:10
    Hi @helloerror

    Does your Edison board have pull-up resistors on it's inputs?
    Can they be disabled in your Edison code?

    Duane just mentioned level shifters on the inputs.... perhaps they are mosfet shifters with something like 10k-22k pullup resistors...

    I'm not familiar with the Edison family, but curious about the issue. Could you post a link to the board you are using?
  • Hi VonSzarvas,
    Pull up resistors can be configured on the Edison, according to the hardware guide (hardware guide)

    Here is the board I am using.
  • helloerror wrote: »
    Pull up resistors can be configured on the Edison, according to the hardware guide

    Thanks for the links.

    Do you happen to know if you had the pullups enabled during your previous tests? If so... could you try disabling?

    Or..

    change the pullup value. I found this link with code samples here that suggests 2K, 20K or 50K options are availble:
    https://communities.intel.com/thread/59604

    I couldn't yet find out the default value, but 2K won't work because the DHB-10 pulls to ground via 10K (and so the rx low voltage on the Edison side won't be low enough). You'd need a larger than 10K value pullup on Edison (or none at all). So if you could change that Edison pullup to 20K or 50K you should be OK.

    Duane already mentioned above, that this will only be an issue for input (ie. receiving) from the DHB-10 into the Edison. You should still be able to output (tx) to any of those DHB-10 3-pin headers at either 3.3V or 5V no problem. That seems to fit with your experiences.

    Would be neat if you can solve this.

  • helloerrorhelloerror Posts: 8
    edited 2016-05-27 12:17
    @vonszarvas, I will definitely come back to using the Edison's uart soon. I will be shifting my board to sparkfun's, where the CH1/2 communication would be helpful.
    I will configure the pullup value and try my setup again. Here is the board.
  • Any tutorial that shows how to update DHB-10 firmware?
    I have below files in single folder and cant open them with SimpleIDE... They seem to be just TXT files but how to compile them and upload to DHB-10? Should I use prop plug to update the firmware? Each file below compiled and uploaded separately?

    DHB-10 Arlo Firmware.spin

    ├──Quadrature_Encoder.spin

    ├──FullDuplexSerial.spin

    ├──ReadPulseWidths.spin

    └──DHB-10 Motor Driver.spin
  • PublisonPublison Posts: 12,366
    edited 2017-03-17 22:56
    mkasap wrote: »
    Any tutorial that shows how to update DHB-10 firmware?
    I have below files in single folder and cant open them with SimpleIDE... They seem to be just TXT files but how to compile them and upload to DHB-10? Should I use prop plug to update the firmware? Each file below compiled and uploaded separately?

    DHB-10 Arlo Firmware.spin

    ├──Quadrature_Encoder.spin

    ├──FullDuplexSerial.spin

    ├──ReadPulseWidths.spin

    └──DHB-10 Motor Driver.spin

    The Spin files can be download to the board with the Propeller Tool:

    https://www.parallax.com/downloads/propeller-tool-software-windows

    Use the Proplug to update.

    If you extracted the DHB-10 firmware file, you should be able to open DHB-10 Arlo Firmware.Spin, and it should open the other objects if they are in the same directory. This will compile all files and upload to the EEPROM.




Sign In or Register to comment.