problem with dagu mini driver stopped working

If you need technical help with anything you've bought from Dawn Robotics, please post here.

Re: problem with dagu mini driver stopped working

Postby Alan » Thu Jun 18, 2015 12:19 pm

Hi Ray,

Glad to hear at least some progress is being made.

The mini driver firmware sketch fails to compile in newer versions of the Arduino IDE because the Arduino support libraries have expanded between versions (at least that's what I assume has happened). The sketch should compile without problems if you use the version of the Arduino IDE on the Pi, or at least on the Dawn Robotics SD card image.

The version number of your Arduino IDE looks fairly low though, if you're doing this on the Pi, have you made any changes to the SD card? Would it be possible to try reflashing the Dawn Robotics SD card image?

Apologies that you're having to jump through all these hoops to get your kit up and running, it should normally be an easier experience than this. :oops:

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: problem with dagu mini driver stopped working

Postby relast » Thu Jun 18, 2015 8:12 pm

Hi Alan

I was hoping it would be a bit easier!

I reflashed a fresh install of your SD card image, let the pi boot and expanded the SD card. Rebooted, ran the Arduino IDE 1.0.1 on the pi and set the board to Arduino NG or older w/ATmega8 on /dev/ttyUSB0. The pi is powered via the mini USB power connector and it is powering the mini driver via USB. It compiled OK, but cannot program the mini driver. The message is 'avr-dude-priginal:stk500_recv(): programmer is not responding'. Still seems like I can't program the mini driver over the USB port. Is there anything else I could try?

Thanks

Ray
relast
 
Posts: 10
Joined: Sat Jun 13, 2015 8:50 pm

Re: problem with dagu mini driver stopped working

Postby Alan » Thu Jun 18, 2015 10:36 pm

Hi Ray,

It sounds like the bootloader on the Mini Driver has gone again. :( Does the blink sketch download?

What is the rating of the power supply being used to power the Pi? One thing that could possibly be a trigger for the bootloader getting corrupted is the voltage from the power supply dropping too low. In these situations it may be possible for invalid instrutions to execute on the mini driver corrupting the bootloader. I've found that a 1.2A adapter from RS components or the official Pi 2A power supply should work well.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: problem with dagu mini driver stopped working

Postby relast » Fri Jun 19, 2015 11:49 am

Hi Alan

I've been using a 1A supply with the pi, although the only time I've programmed the mini driver with the blink sketch has been via the Uno connected to a PC, where a 0.5A supply has powered both the Uno and the mini driver.

I re-flashed the bootloader using the Uno on the PC (back to blue LED strobe flashes) and then tried letting the pi program the mini driver as per normal in the Dawn Robotics boot up - but this time using a 2A supply. No luck. I still have never got a sketch to download on to the mini driver when using the USB port, either on the Pi or on the PC. I cannot program the mini driver firmware from the PC as even compiling your sketch in Arduino 1.0.1 results in a file that is too large, despite the same sketch compiling in the Arduino 1.0.1 IDE on the Pi. So, I can't get the firmware on to the mini driver, unless I can somehow compile on the Pi and download via the Uno connected to my PC...

Regards

Ray
relast
 
Posts: 10
Joined: Sat Jun 13, 2015 8:50 pm

Re: problem with dagu mini driver stopped working

Postby Alan » Fri Jun 19, 2015 4:36 pm

Dear Ray,

That is bizarre, I assumed that version 1.0.1 on the Pi would give identical results to version 1.0.1 elsewhere. I wonder what the difference is? I'll have to investigate this in depth at some point, but a bit tied up at the moment.

Would it be possible for you to connect a monitor to your Pi and use the Arduino IDE on the Pi to build and flash your mini driver? If it's possible upload sketches on the PC then the command line method I'm using on the Pi should also work but something odd is obviously going on so it would be good to try the IDE on the Pi.

If this fails then on Monday I'll send out a replacement Mini Driver with the sketch preloaded on it.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: problem with dagu mini driver stopped working

Postby relast » Fri Jun 19, 2015 8:41 pm

Hi Alan

Yes - that's exactly what got me - version 1.0.1 should be the same everywhere I thought!

I've already tried what you have suggested. I can build the sketch OK on the Pi but when I try to upload to the mini driver it fails. Again, I can only assume that the problem lies with the USB as you program the mini driver over USB from the Pi and I cannot get this to work. The only time I have got a sketch to download on to the mini driver was from a PC using the Uno connected to the programming header on the mini driver (i.e. not using the USB port) in the same way that I can burn the boot loader. I checked the USB port and considered touching up the USB driver pins with a soldering iron, but this looks a little too risky. Setting up the RasPi with the AVR libraries etc. to program the mini driver over the programming header looks a little too complicated and involved for my free time too!

I think I'm out of options..

Regards

Ray
relast
 
Posts: 10
Joined: Sat Jun 13, 2015 8:50 pm

Re: problem with dagu mini driver stopped working

Postby Alan » Sat Jun 20, 2015 5:26 am

Hi Ray,

If you can't program the mini driver from the Pi Arduino IDE then that would suggest that the bootloader is corrupted again. Or are you in a situation where you can upload something like the blink sketch to the mini driver from your PC, but then when you move it over to the Pi the upload fails? If that is the case then it would suggest a problem with the software on the Pi rather than with the mini driver.

Flailing here but thinking that the control software on the Pi which normally talks to the mini driver might possibly be interfering with programming from the IDE (i.e. it may have the serial port open). To rule that out could you please

  • Disconnect the mini driver from the Pi
  • Reboot the Pi
  • Run the following from the comand line
    Code: Select all
    sudo service robot_web_server stop
  • Connect the mini driver to the Pi
  • Try to program it in the IDE

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: problem with dagu mini driver stopped working

Postby relast » Sat Jun 20, 2015 12:49 pm

Hi Alan

I'm not in the situation where I can upload the Blink sketch to the mini driver on the PC - I can only do this using the Uno as a programmer and not the USB port directly from the PC. I followed your instructions regarding stopping the robot_web_server and trying again from the Pi Arduino IDE, but this still returns the programmer-fails-to-respond error.

Thanks

Ray
relast
 
Posts: 10
Joined: Sat Jun 13, 2015 8:50 pm

Re: problem with dagu mini driver stopped working

Postby Alan » Sat Jun 20, 2015 4:07 pm

Ah,

So when you're uploading blink using the Uno, that will be overwriting everything on the mini driver chip (the atmega8). The bootloader will therefore not be on the Mini Driver and so you won't be able to upload a sketch to the mini driver over USB. That would explain why you're getting results that make it look like the bootloader is corrupted, it's simply not there. :)

If you're able to upload sketches via the Uno though, i.e. the Uno is acting as a programmer, then I think you're about 90% of the way there. The steps to reflash your bootloader on the Mini Driver should be

  • Connect the Uno to the PC and the Mini Driver to the Uno
  • Open the Arduino IDE
  • Select Tools > Board > Arduino NG or older w/ATmega8 (i.e. you're selecting the board at will be programmed)
  • Select Tools > Programmer > Arduino as ISP
  • Select Tools > Burn Bootloader
  • Wait a while...

Once all that completes, if you were successful then you should be able to program the mini driver from the Arduino IDE on both the PC and the Pi using just a USB cable i.e. no Uno required. Although one other thing I've thought of that you may need to do. If you're on Windows, you'll need to install drivers for the Mini Drivers USB to serial chip. A link to the drivers can be found in the Useful Links section of the Mini Driver product page.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: problem with dagu mini driver stopped working

Postby relast » Sat Jun 20, 2015 6:58 pm

Hi Alan

Thanks for persevering here. I should have made it clear earlier, but I always put the bootloader back on using the Uno, before I tried again with the mini driver attached to the pi.

Anyway, I thought I'd give it another go, but no luck. The bootloader burned correctly, lots of flashing LEDs on both boards and a success message. Reconfigured and tried to download Blink directly, PC to mini driver (reinstalled the drivers) and I still get the out of sync message. I followed your instructions to the letter - twice. I got to this point before too as that is when I found I had to use the Arduino IDE 1.0.1 to be able to burn the bootloader.

It's all a bit strange. I know I keep on about not being able to download a sketch over USB, but the mini driver does at least enumerate as a COM port, so some functionality is there...

Regards

Ray
relast
 
Posts: 10
Joined: Sat Jun 13, 2015 8:50 pm

PreviousNext

Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests