Help required for m...
 
Notifications
Clear all

Help required for model railway project

182 Posts
9 Users
9 Reactions
2,266 Views
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2142
 

 

@imillard 

@tfmccarthy

On the question of cost.  I was just talking to an electronic enthuisiast at Jaycar who said he buys a much cheaper miniature version of the esp32 that has fewer pins for his projects and is very cheap.  I will have to drop in and ask him again for where he gets them from.  I was in a hurry at the time. For your project a few pins may be all you need. He did mention you could expand the pins but I missed exactly how. It will also take up a lot less space in your machines.

Maybe it is this one.

espMini

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2142
 

@imillard 

@tfmccarthy

It was the ESP32 01 from AliExpress. He said it doesn't run ESP32-NOW but I didn't think to ask why not. Mentioned a pin extender.

Anyway I have two esp32s to see if I can mock up a working circuit with code.

esp32Circuits

 

 


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 127
 

@robotbuilder 

Good News! You only need one power supply...for the whole kit-and-kaboodle.

Use the 3v rail to power the ESP32's using the 3v pin. Just 2 connections.

Use the 5v rail to power the servos and lights. Of course, the servo and light signal wires go the ESP GPIO pins.

A little trick I use: I use a 2.5 in. section of chops sticks to give the servos something to screw into. They just need one side screwed in and they'll stand up.


   
ReplyQuote
imillard
(@imillard)
Member
Joined: 1 month ago
Posts: 50
Topic starter  

Posted by: @robotbuilder

@imillard 

@tfmccarthy

It was the ESP32 01 from AliExpress. He said it doesn't run ESP32-NOW but I didn't think to ask why not. Mentioned a pin extender.

Anyway I have two esp32s to see if I can mock up a working circuit with code.

-- attachment is not available --

 

@robotbuilder

Thanks.  I'd prefer the ESP's to have the ESP-NOW capability.

Also, I probably hadn't mentioned it before, but there is no room inside the machine to mount the ESP's, even the smallest one.  They were always planned to mount outside and run wiring to inside the machine for the switch and servos.

What model of ESP's are in your picture above?

I've found these at Digikey, and at AU$13.81, I'd be happy with that.

https://www.digikey.com.au/en/products/detail/espressif-systems/ESP32-C3-DEVKITC-02/14553009

Do you think these would be OK?

Cheers.

Ian

 

Ian Millard
Port Macquarie, NSW, Australia
ESP32/Arduino etc novice


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2142
 

@imillard   FYI @tfmccarthy

I've found these at Digikey, and at AU$13.81, I'd be happy with that.

What model of ESP's are in your picture above?

Just an ESP32 as far as I know from Jaycar.

To enlarge, right click over image and select Open link in new window.

ESP32 WROOM 32

I tried to get it going with the Arduino IDE but am having problems getting it recognized or finding a port. Obviously I need to do some settings somewhere. The IDE works fine when I plug in my Arduino Mega board.

The digiKey one has 30 pins whereas the one that I have has 38 pins.
Probably work the same if the same pins are used.

 


   
ReplyQuote
imillard
(@imillard)
Member
Joined: 1 month ago
Posts: 50
Topic starter  

Posted by: @robotbuilder

It was the ESP32 01 from AliExpress. He said it doesn't run ESP32-NOW but I didn't think to ask why not. Mentioned a pin extender.

Anyway I have two esp32s to see if I can mock up a working circuit with code.

-- attachment is not available --

 

@robotbuuilder

I've been meaning to ask what are those power supply boards called, and where did you get them?

Cheers,

Ian

 

Ian Millard
Port Macquarie, NSW, Australia
ESP32/Arduino etc novice


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2142
 

@imillard 

MB102 Breadboard Power Supply Module 3.3V 5V Solderless Bread Board

Bought mine as a package with breadboard from Jaycar. Probably much cheaper online.

https://www.aliexpress.com/item/32382955228.html

 


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 127
 

@imillard 

Posted by: @imillard

Thanks.  I'd prefer the ESP's to have the ESP-NOW capability.

You're missing something here. The ESP-NOW capability is a feature of every ESP32 chip. Any ESP32 you get can do it. The one robotbuilder showed will do the trick nicely.


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 127
 

@imillard

Posted by: @imillard

Also, I probably hadn't mentioned it before, but there is no room inside the machine to mount the ESP's, even the smallest one.  They were always planned to mount outside and run wiring to inside the machine for the switch and servos.

Well, that's a hell of a thing to keep under your hat! (nudge-nudge, wink-wink)

Not a problem. But you do need to provide some indication of how this will be laid out in the model. (Nothing fancy, just block diagram would do.) You need internal room for the two servos. Right now, they're 9g servos (SG90, I believe, and you can look up the spec for the dimensions.) The control wires can be extended outside of the model.

By "mount outside" you mean a small enclosure attached to the back of the model? That has to house the ESPs and a power supply or a connection to a power supply. 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7590
 

@imillard I have some esp modules that are only slightly bigger than my thumbnail. Canadian link, change country as needed.

LINK

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.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2142
 

Posted by: @tfmccarthy

@imillard 

Posted by: @imillard

Thanks.  I'd prefer the ESP's to have the ESP-NOW capability.

You're missing something here. The ESP-NOW capability is a feature of every ESP32 chip. Any ESP32 you get can do it. The one robotbuilder showed will do the trick nicely.

Ian only needs enough pins to read two switches and drive a servo motor so a smaller esp board might do the job and be much cheaper.

 

 


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 127
 

@robotbuilder 

Posted by: @robotbuilder

Ian only needs enough pins to read two switches and drive a servo motor so a smaller esp board might do the job and be much cheaper

Not exactly. There are 2 servos in each staff machine. One drives the tumbler lock and the other is the galvanometer section indicator. There are two switches per staff machine. One for staff insertion and one for staff extraction.

That's a total 4 GPIO pins. The servos require PWM GPIO pins.

The lights are development enhancements and currently won't be part of the final version.  Each light requires 1 GPIO pin. The lights are used as digital pins but IIRC, they need to be PWM as well.

So, for development, you need 6 GPIO pins.

For release you need 4 pins.

I'm unaware of any version of ESPs that don't provide you with 4 pins.

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7590
 

@robotbuilder @imillard @tfmccarthy Here are some pics of the smallest ESP boards I have.

The board on the left (bigger) has a USB connector on the other side a RST button and some components. The 2nd picture shows the FTDI like board needed to upload to the really tiny board on the right in pic 1. The 3rd pic is the backside of the tiny board showing the pinout. Note this is a castelated board so can be either surface mounted or normal pins.

EDIT: The smaller board does NOT need the FTDI type programmer, it is a shield type board for the last 2 pics. That board is exactly 1" by 1/2". It has the following pins in case they aren't visible

3V3, GND, EN, RX, TX, RST, IO2 and IO? I think it's IO0. It's an ESP-01.

 

IMG 8582
IMG 8581
IMG 8583
IMG 8584
IMG 8585

 

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.


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 127
 

@zander 

Yikes!

I stand corrected. This ESP doesn't provide any pins you can use. It's a single purpose board that only has the transmit and receive pins. You'd have to do some surgery to get the additional pins.


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 months ago
Posts: 127
 

@zander 

What's the small board for?  Is it the same WiFi board whose link you posted? Or something else?

 

Edit: Ah! it's a communication board with I2C, ESP-01...hmmm.


   
ReplyQuote
Page 5 / 13