• Hallo Zusammen, Aufgrund der aktuellen Situation setzten wir die Möglichkeit aus, sich mit Gmail zu registrieren. Wir bitten um Verständnis Das RCMP Team

Projekt ESP32 Arduino RC Sound und Licht Controller

Bastler1024

Mitglied
Ja über den Standgas hinaus bin ich bei den Tests nicht weiter gekommen :) (Bin beim Refactoring an anderen Baustellen dran und vom Audio habe ich ehrlich gesagt wenig Ahnung). Variable sampling rate ist vermutlich problematisch wie schon richtig erkannt, diese wird normalerweise bei der I2S Initialisierung gesetzt oder später mit i2s_set_sample_rates. Ich wollte mir mal einen Netzwerk-Media-Player bauen und das CJMCU-1334 Board für diesen Zweck bestellt, aber das Projekt liegt seitdem immer noch auf Eis... Ich würde es mal mit einem kompakten Modul auf Basis von MAX98357 versuchen (https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/pinouts).

DAC Pins sind beim ESP32 immer GPIO25 und GPIO26, ob über I2S angesteuert oder nicht.
 
Zuletzt bearbeitet:

neo2001

Mitglied
Danke für den Link. Habe bestellt, mag mich nicht ärgern. Wobei zu sagen ist, dass die ESP32 mit CP2102 auch nicht immer sauber uploaden, wenn boot nicht gedrückt wird. Dazu habe ich auf dem Board den 2.2uf Kondensator zwischen GND und EN vorgesehen, seither funktioniert es sauber.
Bei neueren ESP32 Boards scheinen die Hersteller mit einem kleinen Kondensator am EN Button nachgeholfen zu haben.

Inzwischen habe ich einen CH9102X ausprobiert und er funktionierte auch sofort ohne Probleme mit den gleichen Einstellungen in PlatformIO. Er wird allerdings als /dev/ttyACM0 (Modem) und nicht als /dev/ttyUSB0 (USB serial device) erkannt. Die beiden werden aber normalerweise unter Linux vollkommen identisch behandelt. Der CP2102, sowie der CH340, erscheinen als /dev/ttyUSB0 und geben sich damit quasi "korrekt" als USB to serial device aus. Vermutlich funktioniert zumindest der CP2102 deswegen auch unter MacOS besser.
 

FrikkieBester

Mitglied
On the weekend, I got my ESP32 -WROOM-U modules, the "U" standing for a Ipex connector instead of the built-in antenna. Unfortunately, I didn't find any 30-pin dev boards with that module already mounted, so I replaced them myself on the ones I already had.

Den Anhang 133035 betrachten Den Anhang 133036 betrachten Den Anhang 133037 betrachten

As Martin already mentioned before, the noise coming from the WiFi part of the ESP32 does not really change, it is still audible with the external antennas. I have no idea, if the external antenna has some other advantages for this firmware, for example less noise for the SBUS signal, but I will use them for future vehicles and maybe find out in the process. I assume, that these external WiFi-antennas (not sure if it's for Bluetooth, too) are probably mainly for range extension.

For now, there doesn't seem to be a practical advantage using a external antenna (although it probably doesn't hurt either).


I also have some notes to share for the MP1584 switching regulator. Some are pre-set to a fixed voltage, others come with a potentiometer.
Usually, I replace the pot with a resistor, since it can't be accidentally changed or it's wiper lose contact over time.

Den Anhang 133038 betrachten Den Anhang 133039 betrachten

The space the pot leaves behind fits perfectly for a 0508 SMD resistor, where 27 kΩ is the "officially" used value for 3.3 V (3.4 V actually) and 43 kΩ for 5 V (at little bit less actually).
Since there are only so many values available, I found a nice way to fine tune the voltage is by putting another resistor on top of the other one (in parallel).
Using a 27 kΩ and a 1 MΩ on top, will give a more precise voltage of about 3.3 V.
Using a 47 kΩ and a 680 kΩ results in a voltage slightly above 5 V. Lower values, for the piggyback resistor, will raise the voltage more (because the resistance in total will be reduced).

You can calculate this yourself: 1 / (1/47 + 1/680) = 43.961 (kΩ)

The formula vor the voltage is: (R1 + R2) / R2 * 0.8, for example: (43961 + 8200) / 8200 * 0.8 = 5,089 (V)

R2 being the resistor already in place (see picture). If it has a different value, this value needs to be used (but I've never seen a board with another value than 8.2 kΩ).

In reality, it doesn't really matter if the voltage is a little bit lower or higher. I like to set it a little bit higher, since with more current flowing, the voltage usually drops, too.


And then, I was testing out, why my resistor calculations, for current limiting the LED lights, were always a little bit off with reality, and I ended up selecting the right resistor, by simply testing it with a bench power supply and/or a amp-meter.
Turns out, that it's really important, how much current flows, while measuring the forward voltage. The forward voltages measured by a multimeter or a "Transistortester" (ATmega328 based device) are not only too low, they also allow no conclusions by simply adding an offset. Multimeters also have the disadvantage of a limited voltage range.

The best way to get the "real" forward voltage, seems to be to use a bench power supply, limit the current to a reasonable amount (like 15 mA) and let the voltage adjust automatically. For the regular China LEDs, I get the values seen below.

I found this to be quite interesting, but in reality it doesn't really matter, when it comes to the brightness of the LEDs.

I usually aim for 10 mA for 3 mm LEDs and 15 mA for 5 mm LEDs, sometimes 20 mA for headlights.

But I get the feeling, that I could go way lower, without losing much brightness at all. But then again, compared with the power consumption of the rest of the vehicle, it doesn't matter either way.

Den Anhang 133040 betrachten

As you can see, I've spend a lot of time finding out stuff, that doesn't really matter or other people already knew. :) :cry:
Hello….I tried soldering SMD components for the 1st time in my life yesterday! Did not go so well on the 1st try. I wondered why my soldering station said “soft air”, but clearly not “soft” enough, still blew my resistors away, or onto the components next to it. Will try again! Thank for the tip, adjusting these variable outputs are tricky, the smallest movement and the output jumps. This is also what was causing the noise on my compact excavator card.

2CEA10AA-C900-4A05-BAAC-242F8C8110C2.jpeg
 

neo2001

Mitglied
@FrikkieBester In this case, I used my soldering iron. With a big blob of solder, the pot can be removed.

But I have been there, including lifting pads by pulling too much and removing components, I didn't want to. If you work with hot air, flux is very important and always wait, until you can take off the components without any force at all. If there is too much solder, remove it with a solder wick (and lots of flux!).

I've used solder wick in the past and up to some point, I was totally disappointed, because it didn't really worked for me. But that changed, when I realized, that it also needs flux to work (not really a surprise, but I never thought of it). Now, I get even the solder out of the two-sided holes.

When using a soldering iron, the usual approach is to clean everything and then tack on one side of the SMD first (doesn't matter how it looks!), then the other side. For this, I put a little bit of solder on one of the SMD pads first. After both sides are connected, put some flux over it and reheat both sides again, to make it nice and shiny.

With hot air: To get back fleeing components, find them or get a new one, clean their pads (solder wick), put some fresh solder on and.... flux on it, then put the component on top of that. After heating up, the components will basically snap back at their position by themselves. Solder paste is better suited for this, but in the end it's also just melting solder.

I'm using a cheap Chinese hot air station, but it works fine for the stuff, I occasionally do. Try to set the airflow first, by trying to (not) blow away a non-soldered component on your bench. ;) To be honest, I set the airflow years ago and never changed it again. I only adjust the temperature and use the same nozzle for everything (including heat shrink).

Also, I use a lot of IPA (Isopropanol) to clean the PCB in between and afterwards, using a toothbrush first and then rinse with a squeezing bottle over the sink. That also helps to identify possibly bad solder joints or bridges later.
 

FrikkieBester

Mitglied
Not sure if someone has experienced this….


The locking/unlocking sound starts the moment I start driving. At the beginning I thought it was my limit switch that was giving problems while towing the trailer (making intermittent contact) I have now replaced the limit switch, wiring, terminals and switched out the board and ESP….same result.
Have now tested with just the King pin, no trailer, same result. Even moving the king pin does not re-create the noise if the servo is locked. Have tried with V9.3 and V9.6, Scania 143 and KenworthCummins335.

The sound does not affect the functioning of the trailer lights (brake, indicator etc.) For now I have commented out the #define COUPLING_SOUND as a “work around”.

My Scania is still on an V8.8 that I have modified to still have the sidelights on the trailer and the LCD working. (Is there a way with the newest version of the card to have the LCD and sidelights on the trailer at the same time?)
 
The locking/unlocking sound starts the moment I start driving.
Very strange. I have just tested with the 9.7.0 beta software I'm working on. No issues. of course it can't be used in combination with THIRD_BRAKELIGHT or RZ7886_DRIVER_MODE, because these options are using the same pin. The wiring is OK? No interference or bad contacts?
Is there a way with the newest version of the card to have the LCD and sidelights on the trailer at the same time?
Unfortunately not, because there are not enough pins available.

BTW: There will be some new options in the transmission section:
Bildschirmfoto 2022-06-05 um 20.51.49.png
 

FrikkieBester

Mitglied
Very strange. I have just tested with the 9.7.0 beta software I'm working on. No issues. of course it can't be used in combination with THIRD_BRAKELIGHT or RZ7886_DRIVER_MODE, because these options are using the same pin. The wiring is OK? No interference or bad contacts?
I had the issue with the previous version of the card aslo. 1st thought it was the switch, replaced it. Same issue, then cut off the terminals and crimped new ones, then replaced wires. Then resoldered pin 32. Then replaced entire board with the latest version and new ESP32. Only RX and ESC is original…. The board I fitted was my test board for the battery monitoring, and then it did not do it What else can cause interference?
 
Zuletzt bearbeitet:
I have an FS-i6s i cant manage to setup it to get beacon to work.

Can you "move" beacon mode to cab? Or so that beacon, is one of the "light" modes?

And is it possible to add indicators/sidelights in the beacon mode aswell? Just curious :)
 

FrikkieBester

Mitglied
Looking good! Just make sure there are no sharp solder that could cut into your yellow wire.... please learn from my mistakes ;). I soldered up my first compact excavator card and did not think it would be a problem, but managed to get a nice short between my earth and the + of the speaker output. Those pins and solder can be sharper than you think!

1654691118452.png

Where did you get the design for the rear cover?

Regards,

Frikkie
 
I have an FS-i6s i cant manage to setup it to get beacon to work.
See:
Bildschirmfoto 2022-06-08 um 16.55.02.png

Heute hab ich dem Landy das aktuelle switch mode Board verpasst, um ihn 3S tauglich (schneller) zu machen und um die Akku-Laufzeit zu erhöhen.

Altes und neues Board:
IMG_4050.JPG

Eingebaut, oben rechts die Kabel zum RZ7886, links die Servos:
IMG_4051D.JPG

Und mit der Empfänger- und Lichtverkabelung:
IMG_4052D.JPG

Die Kalibrierwerte für die Akku-Messung sind gemäss @GeeKaa s Idee beschriftet. Wie Ihr seht, ist der eine Widerstand 2K, so ist die Messung genauer, es kann aber trotzdem noch ein 4S Akku angeschlossen werden, ohne Überspannung auf den ESP32 zu geben. In der nächsten Board-Version werde ich wohl 2K2 und 10K wählen. Hier sind 2 1K in Serie geschaltet:
IMG_4047.JPG

Strommessung mit 3S Akku. Der WPL 370 Motor zieht bei sehr hoher Belastung und Vollgas tatsächlich nur ca. 1.5 A!
IMG_4053D.JPG
 
Zuletzt bearbeitet:

FrikkieBester

Mitglied
Unfortunately not, because there are not enough pins available.
I made some changes to the PIN assignments...would rather be without Cabin lights...but still have some SIDE lights on my trailer and the LCD working...

1654768378582.png


1654768206816.png

Now I must just remember to plug the Sides into the Cabin for the truck. Trailer no change.

Tested it, and LCD works together with my sidelight on the trailer!

1654768785879.png
 

neo2001

Mitglied
Bin gerade am überlegen, ob ein 540er Motor ab 45T und aufwärts (verwende in meinen Tamiya Trucks nur 80T) nicht auch mit dem RZ7886 betreibbar sein sollte? Wenn ich einen 80T Motor an meinem Netzteil betreibe schaffe ich es nicht ihn auf mehr als 3 A zu bringen. Ich weiß jedoch nicht, ob es eine zuverlässige Belastungsprobe ist die Achse des Motors mit den Fingern festzuhalten. ;)
Probieren geht wohl über studieren.

Zwischenzeitlich hatte ich meine diversen PCBs bestellt, weil ich sie auch einfach mal anfassen und austesten wollte. Erfahrungsgemäß ist es zumindest beim 3D Drucken so, dass man irgendwann mal lieber einen ersten Druck macht um Dinge herauszufinden die man sonst nur schwer erfassen kann. Vor allem aber war ich dann aber auch einfach ungeduldig. Grobe Fehler habe ich keine gemacht, wohl aber verschiedene Erkenntnisse.

Mein Paket von WPL ist inzwischen auch gekommen. Allerdings fehlten dem B36 einige Teile, auf welche ich noch warte. Beim C24 hatte ich auch irgendwie kein Glück, weil mir da die relativ viele Kunststoffteile beim Schrauben (an)gebrochen sind oder z.B. bei den Shocks die Schrauben zu lang waren (bzw. es schlicht keine Kürzeren gibt) und sich ins Gehäuse gebohrt haben. Die Anleitungen sind auch nicht gerade der Killer. Habe schon öfter an billigen WLToys Autos herumgebastelt und muss wirklich sagen, dass die Dokumentationen von denen deutlich besser sind, ganz allein schon weil sie dazuschreiben welche Maße die verschiedenen Schrauben haben und wo sie zu verwenden sind. Werde da also mit einer anderen Einstellung dran gehen müssen. Zumindest die Qualität der Karosserien scheint aber ganz ordentlich zu sein. Bei den Achsen musste ich auch noch etwas Herumschleifen bis es einigermaßen gepasst hat.

Deswegen habe ich bisher nur mit dem losen Motor inkl. Getriebebox und Schaltservo testen können. Wie schon beschrieben wurde, wird der IC nicht mal handwarm mit diesen Motoren (daher auch mein Gedanke mit den 540ern mit vielen Turns). Warte noch auf ein paar Kondensatoren.

PXL_20220609_113417514cr.jpg PXL_20220609_113442496cr.jpg
PXL_20220609_113235038cr.jpg
 
Top Bottom