Bill, do you intend to replace both nano's on the motor controller board with one ESP32?
Pat Wicker (Portland, OR, USA)
I for one hope not! That would almost seem like overkill for the tasks being accomplished by the Nanos. Plus those of us already going that route or changing just to the ATMEGA328P chip by itself would have to trash all the work we have put into our versions of DB1. Maybe that might be a thought for DB2.
SteveG
I think I mis-remembered and just thought Bill was going to go with an ESP32 when it what he was actually talking about was the ATMEGA328P. It has been so long since I have heard from him on this I forget.
Pat Wicker (Portland, OR, USA)
No, I'm sticking with the ATMega328's, as those with the Nano-based designs can easily add a couple of TTL chips to them to get the same functionality without undoing the work they have already done.
I also think the ESP32 would be an overkill, however, one thing I want to point out is that DB1 is designed with each of these boards as "black boxes" or modules. So you could build a motor controller with an ESP32 and replace the existing one. As technology advances, you can update the project section-by-section, if you feel the need.
I'm actually back in the workshop today, as I was all afternoon yesterday, and I've been soldering up some of the DB1 boards. Like all my projects it has fallen behind due to a lot of things, mostly the current COVID-19 situation. So today it gets my full attention (after I write this forum post and do a few hours of housecleaning), tomorrow I have another project to work on. On Monday I need to get back to the "real world", but this weekend I'm hiding behind my soldering iron!
Who knows, I may even have some progress to show soon - stranger things have happened!
😎
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
That sounds good Bill. I have been doing a lot of programming on both the nanos and the mega. The nano SW is pretty much the same as yours with some personal style changes. On the mega the code lets me send commands to the motor controller (MC) through the serial console. This way I was able to run tests on how the rpm vs pwm curves and how fast I can read the encoder and still get reliable input. On the rpm vs pwm I found that they are very linear; e.g. the acceleration is linear. So there is no need for fancy code to adjust acceleration. I have also add code to the mega so I can control the db1 from an IR controller.
Pat Wicker (Portland, OR, USA)
Thank you Bill, I just watched your excellent presentation on the ESP32 and yes it’s another advance to add to our already excellent arsenal of tools to research, study and build wonderful things. I look forward to your next videos on this excellent device.
@dronebot-workshop I'm puzzled in my ignorance (after all this is hw and I told you how I feel about that). Isn't the AT328 the same processor that is on the nano? If so why change?
Pat Wicker (Portland, OR, USA)
No, it's not ignorance. Those who have constructed the Nano version can do a bit of extra wiring and have an identically functioning motor controller. Also, an Arduino Pro Mini might also be a good choice.
The code is the same, it is the same microcontroller any way you choose to construct it.
The reasons for my switch to the ATMega328:
- Power supply. Powering the Arduino Nano from the +5-volt pin is actually not the recommended way of doing things. If you are using 5-volts you really should be powering the Nanos through their mini-USB ports. And that's a bit awkward, although certainly doable.
- Extra chips & parts for the Emergency stop meant I needed to wire up a new board anyway. But you could also do some wiring changes on the original if you used perfboard.
Using ATMega328's on the redesigned board allows more space for the 74LS11, as well as for a few pushbutton switches and LEDs.
So it's certainly not ignorance, it's a sensible question.
😎
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
Speaking of the power wiring, I took the hint from your video, and I put the power through two micr usb pigtails. Then I have to unplug them to program them. I just cut off the A plug, and ran the tiny wres through the holes in the circuit board and used lots of glue. Those tiny wires were a pain to work with. On the one with 5 volts to the I2C pin, I had t make sure I took the 5 volts from the usb plug.
Pat Wicker (Portland, OR, USA)