Hello All,
A small introduction from myself. I'm Ray (a.k.a ElectricRay1981 here on the forum) 41 years old and living in the Netherlands. I'm working as an electrical engineer for a huge international company which use only the first to letter os the aplhabet (I think many electrical professionals can make a pretty good guess).
I work for them as service engineer at the marine depertment so I travell a lot for them. Te area is usually power distribution so mainly I work with high voltages and currents.
But as a die hard electricial I love anything that has to do with electrics so electronics and programming is something I like to do as a hobby. Especially recently I dove a bit deeper in electronic circuits and try to apply them in a practical way. So the main project I'm focussing now in my spare time is creating a ROVER (smart car). It will have two wheels with speed detection which I would like to use as a feedback for a PID loop. This should make the care drive straight at any speed I would give it. At object detection I have chosen for ultrasone detection (for now, but there are other ideas...who knows)
With starting this first project I had a lot of help from the DroneBotWorkshop Youtube channel and yeah if you are reading this......here I am.
I hope to learn a lot here and also with my background in electrics I think I could even help others with certain theoretical issues in circuits or maybe programming.
Greetz,
ElectricRay1981
Grtz,
Ray
@electricray1981 Welcome to the forum. Your car project sounds like fun, good luck. BTW, how many thousands of hours programming experience do you have and what languages?
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Hmmm nice question but actually I have never counted it. I have experience with severall languages but in no one I'm a prof. But some languages I have played around with.
GW-Basic (it's how I started when I was 6 thanks to my grandfather RIP)
Years later I got a bit deeper with:
VB6.0
VBA
C#/DOTNET
MATLAB
C/C++ But I am a reall rookie with this language C# and Matlab are pretty different and on the other hand it looks a bit a like.
And some PLC programming IEC61131-3 at work I use this once in a while.
Thats about it, in fact regarding C/C++ I was looking for some good tutors for Arduino programming. All I find on Youtube is all beginner stuff. How to turn a led on, create an array or a loop. But this part I know I'm looking for a bit more advanced stuff......any recommendations?
Grtz,
Ray
Greetings.
I remember seeing my first Segway style two wheeler standing more or less stationary and being amazed. The software, running on a basic Uno, I got off a YouTube channel.
I moved on to Mk2 using stepper motors because the motors are then locked to my pulses. I used esp-now for a hand control using ESP32 chips. Good fun but the novelty soon wears off.
Ohw almost forget to mention. Regarding the project I have those speed detectors a s Bill used in his tutor. I did not use interrupts but I poll the full pin (this is really fast 62. ns instead of polling a digitalpin.read()). Tis works pretty good I have to say. Now the next step is applying a moving average on the recordings to filter out big deviations and get a smooth signal prior to sendit to a PID loop. Anybody has any experience with this? Or small I create a separate topic about this?
Grtz
ElectricRay1981
Grtz,
Ray
Grtz,
Ray
@electricray1981 I generally start with the Library Examples to learn new stuff. As far as 'counting it' just multiply 2,000 hours/year x the number of years employed full time as a programmer. When I was hiring, 10,000 hours or 5 years was considered qualified but I didn't interview anyone with less than 10 years. The reason I ask is so we know how to communicate using terms that will be understood based on work experience and language experience.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Do you mean it gets boring soon?
Yes but partly because I've hit a problem, same as others, the PID can get it dramatically wrong after it's run a while and boom, it takes off. Debugging a PID on something on the move is quite a job. You obviously understand this.
This may be what I got the design from - Netherlands too !
Current project is more satisfying. I have 100 year old mantle clock, still working, two chimes. I've removed the mechanism and found a RPi 7 inch TFT fits the space beautifully. I've photographed the dial and have a python script running the hands. Two small solenoids sit next to me to give the original sound. The mechanism is safe and can be replaced when I depart for the big workshop in the sky.
It's a decent and good question. Well in other words I have some experience but I'm not a proffesional programmer. But I'm not a newbie in programming as well I have written some stuff and regarding electrics I have a profound experience working in the branche for around 24 years.
Started with a apprenticeship as a winder for motors and eventually almost finsihed university Bsc Degree but got bored of all the economics and management stuff one needs to know. I was only interested in science and not how to mange a project and making financial calculations.
But in case I come with programming questions if you wish so treat me as a rookie and by my answers you will find out soon what my level is. 🤣 😀
Grtz,
Ray
But in case I come with programming questions if you wish so treat me as a rookie and by my answers you will find out soon what my level is. 🤣 😀
As a matter of interest, the Mk1 Segway robot started out as a cheap ebay "car" kit, that is two DC motors and a simple roller at the front. It worked, I got bored so turned it through 90 degrees. If you want an easier introduction, forget PID for now and get some experience with it flat. That gets you motor control via slot sensor feedback.
From memory, my Mk2 ran for a while under hand control, it could stand a knock but after a while it took off. I'm assuming a counter overflowed. I must return - unfinished business.
Yes I get your point PID loops are hard to fine tune. Specially if your bot is moving around. It would be nice to have a really fast datalogger (not one like Serial.println() thats way to slow) it would give you some data which you could plot.
I assume that you have started with a good Kp. So set the Kp up to the system starts oscillating and devide by 2. Than you could play around with the Ki and Kd. Mostly Kd is not needed but I can imagine for fast system you may want to use it.
On the other hand I like to mention Fighter planes for example use pretty advanced PID loops (ok those companies have better equipement to analyze). But when a auto pilot almost hits the ground or a side of a mountain the PID doesn't do anything anymore also. Humans need to interfere, so maybe a cool challenge would be avoiding to come close to objects, if you haven't done allready?
Grtz,
Ray
Yes I have something like you proposed. Mine came with 4 wheels but I left 2 in the drawer for future use. I use speed sensors. The thing is why I want to use speed control with PID is that you can maintain the speed accurate. You can give a setpoint of say 0.5 m/s and if the bot drives up hill (we don't have such high hills in the Netherlands...but ok) it maintains the speed.
I do not want to use it for a balancing bot as you have built. I would like to build a advanced Rover. One that could drive around take notice of the area, I would like to send GPS coordinates from my computer to it. And maybe the possibility to take manuall control with a joystick. But first I need to have a good accurate bot which drive fully straight and has good speed control
Grtz,
Ray
The video is your bot or from someone from the Netherlands? His accent looks like mine 🤣 🤣 🤣
Grtz,
Ray
@hilldweller (we don't have such high hills in the Netherlands.
Well you have Valkenberg. What a lovely experience sat in the main street, in the sunshine, eating pannekoeken with a nice cold beer. That thought has brought a smile to my face on a winter's day.
Hehehe yes well I live not so close to there. I live in Rotterdam not that bad as well IMO
Grtz,
Ray